/* =================================================================
   GenioPrep — Shared Chrome (nav + footer)
   Scoped selectors prevent conflicts with page-level CSS.
   Explicit color values avoid CSS variable override issues.
   ================================================================= */

/* ── Skip link ─────────────────────────────────────────────────── */
.skip-link {
  position: absolute; left: 14px; top: -60px;
  background: #0E1530; color: #F6F8FF;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 10px 18px; border-radius: 10px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600; font-size: .9rem; z-index: 1000;
  transition: top .2s ease; text-decoration: none;
}
.skip-link:focus { top: 14px; }
[data-theme="light"] .skip-link {
  background: #FFFFFF; color: #0A1026; border-color: rgba(16,24,56,0.18);
}

/* ── Container (scoped to chrome elements) ─────────────────────── */
.site-header .container,
.site-footer .container {
  width: min(calc(100% - 44px), 1180px);
  margin-inline: auto;
}

/* ── Orb mark (scoped to nav/footer — prevents conflict with
      page-level .orb classes used for decorative backgrounds) ─── */
.site-header .orb,
.site-footer .orb {
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #FFF6E0 0%, #FFD56A 20%, #F0A500 48%, #C97E00 74%, #8A5400 100%);
  box-shadow:
    0 0 16px 1px rgba(240,165,0,.5), 0 0 40px 5px rgba(240,165,0,.24),
    inset 0 -4px 11px rgba(120,72,0,.45), inset 0 4px 9px rgba(255,246,224,.55);
  position: static;
  filter: none;
  pointer-events: auto;
}
.site-header .sq,
.site-footer .sq {
  background: #1A1A2E;
  border-radius: 28%;
  display: grid; place-items: center;
  flex: none; position: relative; overflow: hidden;
}
.site-header .sq::after,
.site-footer .sq::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(240,165,0,.22), transparent 62%);
}
[data-theme="light"] .site-header .sq,
[data-theme="light"] .site-footer .sq { background: #11162C; }

.site-header .wordmark,
.site-footer .wordmark {
  font-family: "Sora", sans-serif; font-weight: 700;
  letter-spacing: -0.03em; color: #F6F8FF;
}
.site-header .wordmark b,
.site-footer .wordmark b { color: #FFD56A; font-weight: 700; }
[data-theme="light"] .site-header .wordmark,
[data-theme="light"] .site-footer .wordmark { color: #0A1026; }
[data-theme="light"] .site-header .wordmark b,
[data-theme="light"] .site-footer .wordmark b { color: #8A5600; }

/* ── Nav CTA button (scoped to avoid page .btn-primary conflicts) ─ */
.site-header .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px;
  font-family: "Sora", sans-serif; font-size: .95rem; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
  text-decoration: none; line-height: 1;
}
.site-header .btn:hover { transform: translateY(-2px); }
.site-header .btn:active { transform: translateY(0); }
.site-header .btn-primary {
  background: linear-gradient(135deg, #FFD56A 0%, #F0A500 100%);
  color: #3A2600;
  box-shadow: 0 8px 24px rgba(240,165,0,.30);
}
.site-header .btn-primary:hover { box-shadow: 0 14px 34px rgba(240,165,0,.42); }
.site-header .btn-sm { padding: 10px 18px; font-size: .85rem; }

/* ── Site header ────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,16,38,0.85);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
[data-theme="light"] .site-header {
  background: rgba(246,248,255,0.88);
  border-bottom-color: rgba(16,24,56,0.10);
}

/* ── Nav layout ─────────────────────────────────────────────────── */
.site-header .nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; gap: 22px;
}
.site-header .brand {
  display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto;
  text-decoration: none;
}
.site-header .brand .sq { width: 34px; height: 34px; }
.site-header .brand .orb { width: 21px; height: 21px; }
.site-header .brand .wordmark { font-size: 1.18rem; }

.site-header .nav-links {
  display: flex; align-items: center; gap: 30px;
  font-size: .9rem; font-weight: 600; color: #8F9CC4;
  font-family: "Plus Jakarta Sans", sans-serif;
}
.site-header .nav-links a {
  transition: color .18s ease; text-decoration: none; color: inherit;
}
.site-header .nav-links a:hover { color: #F6F8FF; }
[data-theme="light"] .site-header .nav-links { color: #5A6485; }
[data-theme="light"] .site-header .nav-links a:hover { color: #0A1026; }
.site-header .nav-links a[aria-current="page"] { color: #F6F8FF; font-weight: 600; }
[data-theme="light"] .site-header .nav-links a[aria-current="page"] { color: #0A1026; }

.site-header .nav-right {
  display: inline-flex; align-items: center; gap: 14px;
}
.site-header .nav-auth {
  display: inline-flex; align-items: center; gap: 14px;
}
.site-header .nav-login {
  color: #8F9CC4; font-weight: 600; font-size: .9rem;
  transition: color .18s; text-decoration: none;
  font-family: "Plus Jakarta Sans", sans-serif;
}
.site-header .nav-login:hover { color: #F6F8FF; }
[data-theme="light"] .site-header .nav-login { color: #5A6485; }
[data-theme="light"] .site-header .nav-login:hover { color: #0A1026; }

.site-header .gp-auth-slot { display: inline-flex; align-items: center; }

/* ── Hamburger ──────────────────────────────────────────────────── */
.nav-hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 9px; background: none; border: none;
  cursor: pointer; color: #F6F8FF; border-radius: 8px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px; background: currentColor;
  border-radius: 2px; transition: transform .22s ease, opacity .22s ease;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
[data-theme="light"] .nav-hamburger { color: #0A1026; }

/* ── Theme toggle ───────────────────────────────────────────────── */
.theme-toggle {
  width: 44px; height: 44px; border-radius: 999px;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  color: #C4CDEA; transition: color .2s, border-color .2s, background-color .2s;
}
.theme-toggle:hover { color: #F6F8FF; border-color: rgba(255,255,255,0.15); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle {
  background: rgba(16,24,56,0.04); border-color: rgba(16,24,56,0.10); color: #34406A;
}
[data-theme="light"] .theme-toggle:hover { border-color: rgba(16,24,56,0.18); }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }

/* ── Mobile nav drawer ──────────────────────────────────────────── */
.mobile-nav { display: none; }
.mobile-nav-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 98;
}
.mobile-nav-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(300px, 85vw);
  background: #0A1026; border-left: 1px solid rgba(255,255,255,0.08);
  padding: 90px 28px 40px; transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  z-index: 99; display: flex; flex-direction: column; overflow-y: auto;
}
[data-theme="light"] .mobile-nav-panel {
  background: #F6F8FF; border-left-color: rgba(16,24,56,0.10);
}
.mobile-nav[aria-hidden="false"] .mobile-nav-backdrop { opacity: 1; pointer-events: auto; }
.mobile-nav[aria-hidden="false"] .mobile-nav-panel { transform: translateX(0); }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 64px 0 40px;
  background: #0C1230;
  margin-top: 0;
}
[data-theme="light"] .site-footer {
  border-top-color: rgba(16,24,56,0.10);
  background: #ECEFFB;
}
.site-footer .footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px 48px; padding-bottom: 40px;
}
.site-footer .footer-brand .brand {
  display: inline-flex; align-items: center; gap: 11px;
  text-decoration: none; flex: 0 0 auto; margin-bottom: 16px;
}
.site-footer .footer-brand .brand .sq { width: 34px; height: 34px; }
.site-footer .footer-brand .brand .orb { width: 21px; height: 21px; }
.site-footer .footer-brand p {
  color: #8F9CC4; font-size: .85rem; line-height: 1.6; margin-bottom: 20px;
  font-family: "Plus Jakarta Sans", sans-serif;
}
[data-theme="light"] .site-footer .footer-brand p { color: #5A6485; }
.site-footer .footer-email {
  display: block; font-size: .84rem; color: #8F9CC4;
  font-weight: 500; margin-bottom: 16px; transition: color .18s; text-decoration: none;
  font-family: "Plus Jakarta Sans", sans-serif;
}
.site-footer .footer-email:hover { color: #F6F8FF; }
[data-theme="light"] .site-footer .footer-email { color: #5A6485; }
[data-theme="light"] .site-footer .footer-email:hover { color: #0A1026; }
.site-footer .footer-social { display: flex; gap: 10px; }
.site-footer .footer-social-link {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 10px; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10); color: #8F9CC4;
  transition: color .18s, background .18s; text-decoration: none;
}
.site-footer .footer-social-link:hover { color: #F6F8FF; background: rgba(255,255,255,0.10); }
[data-theme="light"] .site-footer .footer-social-link {
  background: rgba(16,24,56,0.06); border-color: rgba(16,24,56,0.12); color: #5A6485;
}
[data-theme="light"] .site-footer .footer-social-link:hover { color: #0A1026; }
.site-footer .footer-cols { display: contents; }
.site-footer .footer-col-toggle {
  background: none; border: none; padding: 0 0 18px; cursor: default;
  color: #F6F8FF; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; display: flex; align-items: center;
  font-family: "Plus Jakarta Sans", sans-serif; width: 100%; outline: none;
}
[data-theme="light"] .site-footer .footer-col-toggle { color: #0A1026; }
.site-footer .footer-col-toggle:focus-visible {
  outline: 2px solid rgba(255,255,255,0.15); outline-offset: 2px; border-radius: 3px;
}
.site-footer .footer-col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 13px;
}
.site-footer .footer-col ul a {
  color: #8F9CC4; font-size: .86rem; font-weight: 500; transition: color .18s;
  text-decoration: none; font-family: "Plus Jakarta Sans", sans-serif;
}
.site-footer .footer-col ul a:hover { color: #F6F8FF; }
[data-theme="light"] .site-footer .footer-col ul a { color: #5A6485; }
[data-theme="light"] .site-footer .footer-col ul a:hover { color: #0A1026; }
.site-footer .line-gap { display: inline-block; margin-top: .5em; }
.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 20px;
  color: #5C6890; font-size: .82rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; font-family: "Plus Jakarta Sans", sans-serif;
}
[data-theme="light"] .site-footer .footer-bottom {
  border-top-color: rgba(16,24,56,0.10); color: #8A92AC;
}
.site-footer .footer-made span { color: #FFD56A; }
[data-theme="light"] .site-footer .footer-made span { color: #8A5600; }

/* ── Back to top ────────────────────────────────────────────────── */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px; width: 42px; height: 42px;
  border-radius: 50%; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15); color: #F6F8FF; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s, background .18s; z-index: 90;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: rgba(255,255,255,0.10); transform: translateY(-2px); }
[data-theme="light"] .back-to-top {
  background: rgba(16,24,56,0.04); border-color: rgba(16,24,56,0.18); color: #0A1026;
}

/* ── Responsive: ≤900px — collapse nav ─────────────────────────── */
@media (max-width: 900px) {
  .site-header .nav-links { display: none; }
  .site-header .nav-auth { display: none !important; }
  .nav-hamburger { display: flex; }
  .mobile-nav { display: block; }
  .mobile-nav-panel > a:not(.btn) {
    display: block; padding: 18px 0; font-size: 1.05rem; font-weight: 600;
    color: #F6F8FF; border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: color .18s; text-decoration: none;
    font-family: "Plus Jakarta Sans", sans-serif;
  }
  [data-theme="light"] .mobile-nav-panel > a:not(.btn) {
    color: #0A1026; border-bottom-color: rgba(16,24,56,0.10);
  }
  .mobile-nav-panel > a:not(.btn):hover { color: #FFD56A; }
  [data-theme="light"] .mobile-nav-panel > a:not(.btn):hover { color: #8A5600; }
  .mobile-nav-login { color: #8F9CC4 !important; margin-top: 24px; }
  [data-theme="light"] .mobile-nav-login { color: #5A6485 !important; }
  .mobile-nav-signup { color: #F6F8FF !important; font-weight: 600; }
  .mobile-nav-panel .btn {
    margin-top: 16px; width: 100%; text-align: center;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #FFD56A 0%, #F0A500 100%);
    color: #3A2600; padding: 13px 24px; border-radius: 999px;
    font-family: "Sora", sans-serif; font-size: .95rem; font-weight: 600;
    border: 1px solid transparent; text-decoration: none;
    box-shadow: 0 8px 24px rgba(240,165,0,.30);
  }
}

/* ── Responsive: ≤720px — stack footer ─────────────────────────── */
@media (max-width: 720px) {
  .site-footer { padding: 44px 0 28px; }
  .site-footer .footer-top {
    display: flex; flex-direction: column; gap: 24px; padding-bottom: 0;
  }
  .site-footer .footer-cols {
    display: flex; flex-direction: column; gap: 0;
    border-top: 1px solid rgba(255,255,255,0.08); margin-top: 8px;
  }
  [data-theme="light"] .site-footer .footer-cols {
    border-top-color: rgba(16,24,56,0.10);
  }
  .site-footer .footer-col-toggle {
    cursor: pointer; padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    justify-content: space-between;
  }
  [data-theme="light"] .site-footer .footer-col-toggle {
    border-bottom-color: rgba(16,24,56,0.10);
  }
  .site-footer .footer-col-toggle::after {
    content: ''; display: block; width: 9px; height: 9px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(-135deg); transition: transform .2s;
    flex-shrink: 0; margin-left: auto;
  }
  .site-footer .footer-col-toggle[aria-expanded="false"]::after { transform: rotate(45deg); }
  .site-footer .footer-col ul { gap: 0; padding: 4px 0 8px; }
  .site-footer .footer-col ul a { display: block; padding: 11px 0; }
  .site-footer .footer-col-toggle[aria-expanded="false"] + ul { display: none; }
  .site-footer .footer-bottom {
    flex-direction: column; align-items: center; text-align: center;
  }
  .back-to-top { bottom: 16px; right: 16px; width: 38px; height: 38px; }
}
