/* =====================================================================
   FAITO — SHARED STYLES
   Design tokens, header/nav (desktop + mobile), buttons, footer, and
   baseline accessibility rules. Every page links this file and then adds
   only its own page-specific CSS in a local <style> block.

   Anything that appears identically on every page belongs here.
   Anything unique to one page's content (a hero treatment, a particular
   section's layout) stays in that page's own <style> block instead.
===================================================================== */

:root{
  --near-black:#0B0D10;
  --panel:#15181D;
  --line:rgba(255,255,255,0.10);
  --faito-blue:#2957A4;
  --faito-blue-bright:#3B6FC4;
  --scooter-cyan:#46B8DA;
  --lifestyle-amber:#C98A3E;
  --paper:#EFEBE2;
  --paper-ink:#17140F;
  --white:#F5F6F7;
  --muted:#9BA3AC;
  --nav-h:78px;
  --nav-h-scrolled:56px;
}
*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  background:var(--near-black);
  color:var(--white);
  font-family:'Inter',sans-serif;
  overflow-x:hidden;
}
h1,h2,h3,.display{
  font-family:'Rajdhani',sans-serif;
  font-weight:700;
  /* line-height:0.98; — commented out: too tight for ordinary body-style
     pages (e.g. Privacy Policy) where h2/h3 wrap onto multiple lines. The
     hero/display headings this was originally meant for are all short
     enough (1–2 lines) that the browser's own default line-height already
     looks fine without it. */
  letter-spacing:0.01em;
}
a{color:inherit; text-decoration:none;}
img,svg{display:block; max-width:100%;}
.wrap{max-width:1360px; margin:0 auto; padding:0 48px;}
@media(max-width:768px){.wrap{padding:0 22px;}}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress{
  position:fixed; top:0; left:0; height:3px; width:0%; z-index:300;
  background:linear-gradient(90deg, var(--faito-blue), var(--scooter-cyan));
  transition:width .08s linear;
}

/* ===== NAV ===== */
header.nav{
  position:fixed; top:0; left:0; right:0; z-index:20;
  display:flex; align-items:center; justify-content:space-between;
  padding:22px 48px;
  height:var(--nav-h);
  transition:background .4s ease, padding .4s ease, backdrop-filter .4s ease, height .4s ease;
}
header.nav.scrolled{
  background:rgba(11,13,16,0.86);
  backdrop-filter:blur(10px);
  height:var(--nav-h-scrolled);
  border-bottom:1px solid var(--line);
}
/* nav-on-light: nav is currently over a light section (e.g. the paper editorial block) */
header.nav.nav-on-light{ --nav-ink:var(--paper-ink); --nav-muted:#6b6a63; }
header.nav{ --nav-ink:var(--white); --nav-muted:var(--muted); }
header.nav.nav-on-light.scrolled{ background:rgba(239,235,226,0.86); border-bottom-color:rgba(23,20,15,0.10); }
@media(max-width:768px){ header.nav{padding:22px;} }

/* logo: both images stacked in the same grid cell (robust — no absolute-positioning
   collapse issues) and cross-faded by the SAME light/dark trigger as the navlinks */
.logo{display:flex; height:26px;}
.logo img{grid-area:1/1; height:60px; width:auto; align-self:center; transition:opacity .4s ease; position:absolute;}
.logo .logo-light{opacity:1;}
.logo .logo-blue{opacity:0;}
header.nav.nav-on-light .logo .logo-light{opacity:0;}
header.nav.nav-on-light .logo .logo-blue{opacity:1;}
/* fallback recolor if only one logo asset is supplied — see IMAGES.logoBlue in faito-shared.js */
.logo .logo-blue.is-filter-fallback{ filter:brightness(0) saturate(100%) invert(24%) sepia(54%) saturate(1189%) hue-rotate(188deg) brightness(94%) contrast(92%); }

.logo-word{font-family:'Rajdhani',sans-serif; font-weight:700; font-size:22px; letter-spacing:0.04em; color:var(--nav-ink); transition:color .4s ease;}

/* badges: pinned to the right of the header */
.badge-strip-center{
  position:absolute; right:-2%; top:50%; transform:translate(-50%,-50%);
  display:flex; align-items:center; gap:14px;
}
.badge-strip-center img{height:32px; width:auto; opacity:0.9;}
@media(max-width:900px){.badge-strip-center{display:none;}}

.navlinks{display:flex; position:absolute; align-items:center; gap:34px; font-size:13px; letter-spacing:0.10em; font-weight:600; left:35%;}
@media(max-width:900px){.navlinks{display:none;}}
.navlinks a{
  opacity:0.92; position:relative; padding-bottom:4px;
  color:var(--nav-ink); transition:opacity .2s, color .4s ease;
  text-shadow: 1px 1px 5px #999;
  text-transform: uppercase;
}
.navlinks a:hover{opacity:1;}
.navlinks a::after{content:'';position:absolute;left:0;bottom:0;width:0;height:1px;background:var(--faito-blue);transition:width .25s ease;}
.navlinks a:hover::after{width:100%;}
.navlinks a.active{opacity:1;}
.navlinks a.active::after{width:100%; background:var(--faito-blue-bright);}
/* wp_nav_menu() output: bare <li> items (no wrapping <ul>, via items_wrap
   in header.php) sitting as flex children alongside the search button and
   CTA link. Not strictly valid HTML (li outside a ul/ol) but renders
   correctly everywhere; keeping it this way avoids a custom nav walker. */
.navlinks li{list-style:none; margin:0; padding:0; display:flex; align-items:center;}
/* WordPress marks the current page on its own — same visual treatment as
   the old JS-driven .active class, so highlighting works even with JS off. */
.navlinks .current-menu-item > a,
.navlinks .current_page_item > a,
.navlinks .current-menu-ancestor > a{opacity:1;}
.navlinks .current-menu-item > a::after,
.navlinks .current_page_item > a::after,
.navlinks .current-menu-ancestor > a::after{width:100%; background:var(--faito-blue-bright);}
.navlinks a.nav-cta-inline{padding-bottom:0;}
.navlinks a.nav-cta-inline::after{display:none;}

/* nav search trigger — hidden/zero-width until JS marks it .is-visible
   (once the in-page search bar has scrolled out of view — see initNavSearchToggle
   in faito-shared.js). Kept collapsed rather than just transparent so it doesn't
   eat click space or a tab stop while inactive. */
.nav-search-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:0; opacity:0; overflow:hidden; pointer-events:none;
  background:none; border:none; color:var(--nav-ink); cursor:pointer; padding:0;
  transition:width .3s ease, opacity .3s ease, margin .3s ease, color .4s ease;
}
.nav-search-btn svg{width:18px; height:18px; flex:none;}
.nav-search-btn.is-visible{width:18px; opacity:0.85; pointer-events:auto; margin-right:4px;}
.nav-search-btn.is-visible:hover{opacity:1;}
.nav-search-btn[aria-expanded="true"]{color:var(--scooter-cyan); opacity:1;}
@media(max-width:900px){.nav-search-btn{display:none;}}

/* nav search overlay — a slide-down panel reusing the same search-field/
   search-select styling as the in-page search bar (see below), so opening
   it from the nav feels like the same control, not a different one */
.nav-search-scrim{
  position:fixed; inset:0; z-index:185; background:rgba(11,13,16,0.55);
  opacity:0; pointer-events:none; transition:opacity .35s ease;
}
.nav-search-scrim.open{opacity:1; pointer-events:auto;}
.nav-search-overlay{
  position:fixed; left:0; right:0; top:var(--nav-h-scrolled); z-index:190;
  background:rgba(11,13,16,0.97); backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
  padding:24px 0;
  transform:translateY(-8px); opacity:0; visibility:hidden;
  transition:transform .35s cubic-bezier(.65,0,.35,1), opacity .3s ease, visibility 0s linear .35s;
}
.nav-search-overlay.open{
  transform:translateY(0); opacity:1; visibility:visible;
  transition:transform .35s cubic-bezier(.65,0,.35,1), opacity .3s ease, visibility 0s linear 0s;
}

.btn{
  font-size:12.5px; letter-spacing:0.08em; font-weight:600;
  padding:11px 20px; border:1px solid rgba(255,255,255,0.35);
  transition:all .25s ease; white-space:nowrap;
}
.btn:hover{border-color:var(--white); background:rgba(255,255,255,0.06);}
.btn.solid{background:var(--faito-blue); border-color:var(--faito-blue); color:var(--white); min-height:40px;}
.btn.solid:hover{background:var(--faito-blue-bright); border-color:var(--faito-blue-bright);}
.btn.cyan{border-color:var(--scooter-cyan);}
.btn.cyan:hover{background:rgba(239,235,226,0.14);}
.btn.amber{border-color:var(--lifestyle-amber);}
.btn.amber:hover{background:rgba(201,138,62,0.14);}
@media(max-width:768px){ .btn.solid{height:44px;} }

/* ===== MOBILE NAV ===== */
.nav-burger{
  display:none; position:relative; z-index:210;
  flex-direction:column; justify-content:center; gap:5px;
  width:30px; height:22px; background:none; border:none; cursor:pointer; padding:0;
}
@media(max-width:900px){.nav-burger{display:flex;}}
.nav-burger span{display:block; height:2px; width:100%; background:var(--nav-ink); transition:background .4s ease, transform .3s ease, opacity .3s ease;}
.nav-burger.open span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.nav-burger.open span:nth-child(2){opacity:0;}
.nav-burger.open span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

.nav-scrim{
  position:fixed; inset:0; z-index:5; background:rgba(41,87,164,0.9);
  opacity:0; pointer-events:none; transition:opacity .4s ease;
}
.nav-scrim.open{opacity:1; pointer-events:auto;}

.mobile-nav{
  position:fixed; top:0; right:0; bottom:0; width:100%; max-width:98%; z-index:10;
  background:rgba(11,13,16,0.97); backdrop-filter:blur(12px);
  padding:110px 34px 40px;
  display:flex; flex-direction:column; gap:26px;
  transform:translateX(100%); transition:transform .45s cubic-bezier(.65,0,.35,1);
}
.mobile-nav.open{transform:translateX(0);}
.mobile-nav a{font-size:17px; letter-spacing:0.06em; font-weight:600; color:var(--white); transition:color .2s ease;}
.mobile-nav a.active{color:var(--scooter-cyan);}
.mobile-nav li{list-style:none; margin:0; padding:0;}
.mobile-nav .current-menu-item > a,
.mobile-nav .current_page_item > a{color:var(--scooter-cyan);}
.mobile-nav .btn{align-self:flex-start; margin-top:6px;}
.mobile-badges{display:flex; gap:18px; margin-top:auto; opacity:0.85; align-items:center;}
.mobile-badges img{height:30px; width:auto;}

/* ===== FOOTER ===== */
footer{background:#000; padding:90px 0 0; border-top:1px solid var(--line);}
.footer-top{display:grid; grid-template-columns:1.4fr repeat(3, 1fr); gap:40px; padding-bottom:70px;}
@media(max-width:900px){.footer-top{grid-template-columns:1fr 1fr; row-gap:44px;}}
.footer-brand .logo-word{font-size:26px; margin-bottom:14px; display:block; color:var(--white);}
.footer-tag{color:var(--muted); font-size:13.5px; max-width:230px; line-height:1.6;}
.footer-col h4{font-size:11.5px; letter-spacing:0.14em; color:var(--muted); font-weight:600; margin-bottom:18px;}
.footer-col a{display:block; font-size:14px; margin-bottom:12px; opacity:0.88;}
.footer-col li{list-style:none; margin:0; padding:0;}
.footer-col a:hover{opacity:1; color:var(--scooter-cyan);}
.footer-bottom{
  border-top:1px solid var(--line); padding:26px 0;
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px;
}
.footer-bottom .wrap{display:flex; justify-content:space-between; align-items:center; width:100%; flex-wrap:wrap; gap:14px;}
.footer-legal{font-size:12px; color:var(--muted);}
.footer-social{display:flex; gap:18px; align-items:center;}
.footer-social a{opacity:0.7; transition:opacity .2s; display:flex; align-items:center;}
.footer-social a:hover{opacity:1;}
.footer-social img{display:block;}

/* ===== SEARCH FIELD (shared by the in-page search bar AND the nav search
   overlay, so both look and behave like the same control) ===== */
.search-wrap{display:flex; align-items:center; gap:16px; width:100%;}
.search-field{
  flex:1 1 320px; display:flex; align-items:center; gap:12px;
  background:rgba(255,255,255,0.04); border:1px solid var(--line); border-radius:2px;
  padding:0 18px; height:52px;
  transition:border-color .2s ease, background .2s ease;
}
.search-field:focus-within{border-color:var(--scooter-cyan); background:rgba(255,255,255,0.06);}
.search-icon{width:18px; height:18px; opacity:0.6; flex:none;}
.search-field input{
  flex:1; background:none; border:none; outline:none; color:var(--white);
  font-family:'Inter'; font-size:14.5px;
}
.search-field input::placeholder{color:var(--muted);}
.search-filters{display:flex; gap:12px; flex:0 0 auto;}
.select-wrap{position:relative;}
.select-wrap::after{
  content:''; position:absolute; right:14px; top:50%; transform:translateY(-50%);
  width:0; height:0; border-left:5px solid transparent; border-right:5px solid transparent; border-top:6px solid var(--muted);
  pointer-events:none;
}
.search-select{
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
  height:52px; padding:0 34px 0 16px; min-width:180px;
  background:rgba(255,255,255,0.04); border:1px solid var(--line); border-radius:2px;
  color:var(--white); font-family:'Inter'; font-size:13px; letter-spacing:0.02em;
  cursor:pointer; transition:border-color .2s ease;
}
.search-select:focus{border-color:var(--scooter-cyan); outline:none;}
.search-select option{background:var(--near-black); color:var(--white);}
.search-submit{height:52px; flex:none;}
@media(max-width:900px){ .search-select{min-width:150px;} }
@media(max-width:768px){
  .search-wrap{flex-wrap:wrap;}
  .search-field{flex:1 1 100%; order:1;}
  .search-filters{flex:1 1 100%; order:2; gap:10px;}
  .select-wrap{flex:1 1 calc(50% - 5px);}
  .search-select{width:100%; min-width:0;}
  .search-submit{flex:1 1 100%; order:3;}
}

/* ===== ACCESSIBILITY / MOTION ===== */
@media (prefers-reduced-motion: reduce){
  *{animation-duration:0.01ms !important; transition-duration:0.01ms !important;}
}
a:focus-visible, button:focus-visible{
  outline:2px solid var(--scooter-cyan); outline-offset:3px; border-radius:2px;
}

/* ===== WORDPRESS ADMIN BAR (logged-in users only) =====
   The nav, scroll bar and slide-out panels are position:fixed at top:0, so
   the black admin bar (32px desktop / 46px mobile) used to sit on top of them.
   WordPress adds .admin-bar to <body> only when logged in, so visitors are
   unaffected. */
.admin-bar .scroll-progress,
.admin-bar header.nav{top:32px;}
.admin-bar .nav-search-overlay{top:calc(var(--nav-h-scrolled) + 32px);}
.admin-bar .mobile-nav{top:32px;}
.admin-bar .nav-scrim,
.admin-bar .nav-search-scrim{top:32px;}
@media(max-width:782px){
  .admin-bar .scroll-progress,
  .admin-bar header.nav{top:46px;}
  .admin-bar .nav-search-overlay{top:calc(var(--nav-h-scrolled) + 46px);}
  .admin-bar .mobile-nav,
  .admin-bar .nav-scrim,
  .admin-bar .nav-search-scrim{top:46px;}
}
