/* ===========================
   /css/components.css
   Components styling (Navbar, Drawer, Footer, Buttons, Preloader)
   =========================== */

:root{
  --max: 1180px;
  --headerH: 92px;

  --fontBody: "Tenor Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --fontDisplay: "Tenor Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  --bg:#07080A;
  --text:#F7F4EE;
  --muted: rgba(247,244,238,.72);
  --muted2: rgba(247,244,238,.55);

  --line: rgba(255,255,255,.12);

  --accent:#9BBACB;
  --accentStrong:#2F86B8;

  --radiusLg: 22px;
  --shadowSoft: 0 10px 28px rgba(0,0,0,.38);

  --btnBg: rgba(247,244,238,.92);
  --btnText:#0A0A0A;
  --btnGhostBg: rgba(255,255,255,.06);
  --btnGhostText: rgba(247,244,238,.92);

  --navBg: rgba(7,8,10,.58);
}

/* Start: Global Selection (brand) */
::selection{ background: rgba(47,134,184,.45); color:#fff; }
::-moz-selection{ background: rgba(47,134,184,.45); color:#fff; }
/* End: Global Selection */

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body.fcj{
  margin:0;
  font-family: var(--fontBody);
  background: var(--bg);
  color: var(--text);
  overflow-x:hidden;
}
body.fcj.nav-open{ overflow:hidden; }

a{ color:inherit; text-decoration:none; }
img{ display:block; max-width:100%; }

.container{
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

[id]{ scroll-margin-top: calc(var(--headerH) + 18px); }

:focus-visible{
  outline: 3px solid rgba(47,134,184,.45);
  outline-offset: 3px;
  border-radius: 12px;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  cursor:pointer;
  transition: transform .15s ease, border-color .15s ease, background .20s ease, color .20s ease;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 10px;
}
.btn:hover{ transform: translateY(-1px); border-color: rgba(255,255,255,.18); }
.btn--primary{ background: var(--btnBg); color: var(--btnText); border-color: rgba(255,255,255,.10); }
.btn--ghost{ background: var(--btnGhostBg); color: var(--btnGhostText); }

/* ===========================
   Preloader Overlay (2-phase exit + motion blur feel)
   =========================== */

/* ✅ If homepage is loaded with #hash, preloader should not appear at all */
html.skip-preloader .preloader{
  display: none !important;
}

.preloader{
  position: fixed;
  inset: 0;
  z-index: 100000;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.94);
  backdrop-filter: blur(12px);

  opacity: 1;
  visibility: visible;
  transition: opacity 700ms ease, visibility 0s linear 700ms;
}

.preloader.is-mounted{}

/* Phase 2: shell fades */
.preloader.is-exiting-shell{
  opacity: 0;
  visibility: visible;
  transition: opacity 700ms ease;
}

.preloader.is-hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 14px;
  padding: 18px;

  opacity: 0;
  transform: translateY(10px);
  transition: opacity 520ms ease, transform 860ms cubic-bezier(.2,.9,.2,1);
}

/* Entry: inner fades/zooms in */
.preloader.is-mounted .preloader__inner{
  opacity: 1;
  transform: translateY(0);
}

/* Phase 1: inner fades out first */
.preloader.is-exiting-inner .preloader__inner{
  opacity: 0;
  transform: translateY(6px);
}

/* Logo wrapper controls fade/zoom */
.preloader__logoWrap{
  opacity: 0;
  transform: scale(.84);
  transition: opacity 520ms ease, transform 860ms cubic-bezier(.2,.9,.2,1);
  filter: drop-shadow(0 18px 45px rgba(0,0,0,.65));
  will-change: opacity, transform;
}

.preloader.is-mounted .preloader__logoWrap{
  opacity: 1;
  transform: scale(1);
}

.preloader.is-exiting-inner .preloader__logoWrap{
  opacity: 0;
  transform: scale(.92);
}

/* Logo image */
.preloader__logo{
  width: 96px;
  height: 96px;
  object-fit: contain;
  border: 0;
  background: transparent;
  transform-origin: 50% 50%;
  will-change: transform, filter, opacity;
}

.preloader__logoWrap::after{
  content:"";
  position:absolute;
  inset:-16px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.08);
  opacity:.8;
}

.preloader.is-mounted .preloader__logo{
  animation: fcjPulse 1.45s ease-in-out infinite;
}

.preloader.is-exiting-inner .preloader__logo{
  filter: blur(1.8px);
}

.preloader__text{
  color: rgba(255,255,255,.70);
  font-weight: 900;
  letter-spacing: .34em;
  text-transform: uppercase;
  font-size: 10px;
}

@keyframes fcjPulse{
  0%, 100%{ transform: scale(.96); opacity: .92; }
  50%{ transform: scale(1.02); opacity: 1; }
}

@media (prefers-reduced-motion: reduce){
  .preloader__logo{ animation: none !important; }
  .preloader.is-exiting-inner .preloader__logo{ filter: none !important; }
}

/* Navbar */
.siteHeader{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10060;
  min-height: var(--headerH);
  display:flex;
  align-items:center;
  background: linear-gradient(180deg, var(--navBg), rgba(7,8,10,.18));
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
  transition: background .20s ease, border-color .20s ease;
}
.siteHeader:hover,
.siteHeader:focus-within{
  background: rgba(18,20,24,.85);
  border-bottom-color: rgba(255,255,255,.12);
}
.siteHeader.is-scrolled{
  background: rgba(7,8,10,.78);
  border-bottom-color: rgba(255,255,255,.10);
}

.nav__container{
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px clamp(18px, 3.2vw, 40px);
  display:flex;
  align-items:center;
  gap: 18px;
}

.nav__brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.nav__logo,
.footer__logo{
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.nav__logo{ width: 56px; max-height: 52px; object-fit: contain; }

.nav__brandText{ display:flex; flex-direction:column; line-height:1.05; min-width:0; }
.nav__name{
  font-weight: 950;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: 11px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.nav__tag{
  margin-top: 4px;
  color: var(--muted2);
  letter-spacing: .30em;
  text-transform: uppercase;
  font-size: 10px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.nav__links{
  display:flex;
  align-items:center;
  gap: 6px;
}
.nav__links a{
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: rgba(247,244,238,.86);
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 10px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.nav__links a:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.14);
  color: rgba(255,255,255,.96);
}

/* Dropdown (slide in/out) */
.navDrop{ position:relative; }
.navDrop__trigger{ display:inline-flex; align-items:center; gap: 8px; }
.navDrop__caret{ opacity:.75; }

.navDrop__menu{
  position:absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(7,8,10,.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  z-index: 3;

  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(.2,.9,.2,1),
    visibility 0s linear 260ms;
}
.navDrop:hover .navDrop__menu,
.navDrop.is-open .navDrop__menu{
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(.2,.9,.2,1),
    visibility 0s linear 0s;
}

.navDrop__menu a{
  display:block;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  margin: 8px 0;
}
.navDrop__menu a:hover{
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
}

/* Toggle */
.nav__actions{ display:flex; align-items:center; margin-left:auto; }
.nav__toggle{
  display:none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  cursor:pointer;
  padding: 0;
}
.nav__toggle span{
  display:block;
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,.90);
  border-radius: 2px;
  margin: 0 auto;
}
.nav__toggle span + span{ margin-top: 6px; }

/* Drawer */
.nav__drawer{
  display:none;
  position: fixed;
  inset: 0;
  z-index: 99999;
}
.nav__drawer.is-open{ display:block !important; }

.nav__drawerBackdrop{
  position:absolute;
  inset:0;
  background: rgba(7,8,10,.88);
  backdrop-filter: blur(14px);
}

.nav__drawerContent{ position: relative; width: 100%; min-height: 100%; }

.nav__drawerTop{
  position: sticky;
  top: 0;
  z-index: 2;
  display:flex;
  align-items:center;
  gap: 14px;
  padding: 14px clamp(18px, 3.2vw, 40px);
  min-height: var(--headerH);
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(7,8,10,.80);
  backdrop-filter: blur(12px);
}

.nav__drawerBrand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.nav__drawerClose{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.92);
  cursor:pointer;
  font-size: 24px;
  line-height: 1;
  margin-left: auto;
}

.nav__drawerInner{
  width: 100%;
  padding: 18px clamp(18px, 3.2vw, 40px) 26px;
  display:flex;
  flex-direction:column;
  gap: 16px;
}

.drawerGroup{ display:flex; flex-direction:column; gap: 10px; }
.drawerGroup__title{
  color: var(--muted2);
  letter-spacing: .30em;
  text-transform: uppercase;
  font-weight: 900;
  font-size: 9px;
  padding: 6px 2px 0;
}

.drawerLink{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 10px;
}
.drawerLink--cta{ background: var(--btnBg); color: var(--btnText); }

/* Footer */
.footer{
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.01);
  padding: 42px 0 18px;
}
.footer__grid{
  display:grid;
  grid-template-columns: 1.05fr 1.25fr;
  gap: 24px;
  align-items:start;
}
.footer__brandTop{ display:flex; align-items:center; gap: 12px; }
.footer__logo{ width: 76px; max-height: 64px; object-fit: contain; }
.footer__name{ font-weight: 950; letter-spacing: .22em; text-transform: uppercase; }
.footer__tag{
  margin-top: 4px;
  color: var(--muted2);
  letter-spacing: .30em;
  text-transform: uppercase;
  font-size: 10px;
}
.footer__desc{
  margin: 14px 0 16px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 58ch;
}
.footer__cta{ display:flex; gap: 10px; flex-wrap: wrap; }

.footer__links{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.footer__h{
  font-weight: 950;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 10px;
  color: rgba(255,255,255,.80);
  margin-bottom: 10px;
}
.footer__a{ display:block; padding: 8px 0; color: var(--muted); }
.footer__a:hover{ color: rgba(255,255,255,.92); }

.footer__bottom{
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  display:flex;
  justify-content:space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted2);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 980px){
  .nav__links{ display:none; }
  .nav__toggle{ display:block; }
}
@media (max-width: 620px){
  .nav__container{ padding: 12px 16px; gap: 12px; }
  .nav__logo{ width: 48px; max-height: 44px; }
  .nav__name{ font-size: 10px; letter-spacing: .18em; }
  .nav__tag{ font-size: 9px; letter-spacing: .22em; }

  .nav__drawerTop{ padding: 12px 16px; }
  .nav__drawerInner{ padding: 18px 16px 26px; }

  .footer__grid{ grid-template-columns: 1fr; }
  .footer__links{ grid-template-columns: 1fr; }
}

.footer__social{ display:flex; gap: 10px; flex-wrap: wrap; }
.footer__iconLink{ width: 42px; height: 42px; display:inline-flex; align-items:center; justify-content:center; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); color: rgba(255,255,255,.9); transition: transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease; }
.footer__iconLink:hover{ transform: translateY(-2px); border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.06); }
.footer__iconLink.is-disabled{ opacity:.55; }
.footer__creditLink{ transition: color .18s ease; }
.footer__creditLink:hover{ color: #ffcc00; }
