/* ==========================================================
   Elisio — components.css
   Shared chrome and building blocks used on every page:
   header, brand, nav, mobile menu, buttons, labels, crumbs,
   glass, page hero, tags, CTA band, footer.
   ========================================================== */

/* ========== HEADER ========== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  height: var(--header-h);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled,
.menu-open .site-header,
.no-js .site-header {
  background: rgba(15, 12, 36, 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.site-header__bar {
  height: 100%;
  max-width: calc(var(--wrap) + var(--pad) * 2);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  gap: var(--s-5);
}

/* ----- Brand ----- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-height: 44px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.3125rem;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}
.brand__mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand:hover .brand__word { color: var(--lilac); }
.brand__word { transition: color var(--dur-fast) var(--ease); }

/* ----- Primary nav (desktop) ----- */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--text-2);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav a:hover { color: var(--text); background: var(--lilac-wash); }
.nav a[aria-current="page"] { color: var(--text); background: var(--lilac-wash); }
.nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 2px;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--lilac);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

/* ----- Menu toggle (mobile) ----- */
.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--glass);
  align-items: center;
  justify-content: center;
}
.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform var(--dur) var(--ease), opacity var(--dur-fast) var(--ease);
}
.menu-toggle__bars { position: relative; }
.menu-toggle__bars::before,
.menu-toggle__bars::after { content: ''; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -6px; }
.menu-toggle__bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ----- Mobile menu sheet ----- */
.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: var(--z-menu);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s-7);
  padding: var(--s-6) var(--pad) calc(var(--s-6) + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(90vw 60vh at 100% 0%, rgba(139, 115, 242, 0.22), transparent 70%),
    var(--night);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
}
.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s;
}
.mobile-menu__links { display: flex; flex-direction: column; }
.mobile-menu__links a:not(.btn) {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 8vw, 2.25rem);
  letter-spacing: -0.03em;
  color: var(--text);
}
.mobile-menu__links a:not(.btn)[aria-current="page"] { color: var(--lilac); }
.mobile-menu__links .btn { margin-top: var(--s-6); align-self: flex-start; }
.mobile-menu__meta {
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--text-3);
  font-style: normal;
}

@media (max-width: 960px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .no-js .menu-toggle { display: none; }
  .site-header__actions { margin-left: auto; }
}
@media (min-width: 961px) {
  .mobile-menu { display: none; }
}
@media (max-width: 380px) {
  .site-header__actions .btn--sm { padding-inline: 14px; }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 6px 8px 6px 26px;
  border-radius: var(--r-pill);
  font-family: var(--f-text);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn__orb {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease);
}
.btn__orb svg { width: 16px; height: 16px; }
.btn:hover .btn__orb { transform: rotate(45deg); }

/* Amber = the money action */
.btn--amber { background: var(--amber); color: var(--on-amber); }
.btn--amber:hover { background: var(--amber-soft); }
.btn--amber .btn__orb { background: var(--on-amber); color: var(--amber); }

/* Glass = secondary */
.btn--glass {
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn--glass:hover { border-color: var(--lilac); }
.btn--glass .btn__orb { background: var(--lilac-wash); color: var(--lilac); border: 1px solid var(--line-2); }

/* Plain (no orb) */
.btn--plain { padding-inline: 26px; }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: var(--fs-small); }

.btn:focus-visible { outline-offset: 4px; border-radius: var(--r-pill); }

/* Inline text link */
.link {
  color: var(--lilac);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(185, 166, 255, 0.4);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color var(--dur-fast) var(--ease);
}
.link:hover { text-decoration-color: var(--lilac); }

/* ========== LABEL & CRUMBS ========== */
.label {
  display: inline-block;
  font-family: var(--f-text);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--lilac);
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--text-3);
}
.crumbs a {
  display: inline-block;
  padding-block: 12px;
  margin-block: -12px;   /* 44px tap target without moving the layout */
  color: var(--text-2);
  transition: color var(--dur-fast) var(--ease);
}
.crumbs a:hover { color: var(--lilac); }
.crumbs [aria-current="page"] { color: var(--lilac); }
.crumbs .sep { opacity: 0.6; }

/* ========== GLASS ========== */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-card);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 30px 60px -40px rgba(4, 2, 18, 0.9);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .btn--glass { background: var(--surface); }
}

/* ========== PAGE HERO (inner pages) ========== */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: calc(var(--header-h) + clamp(48px, 9vw, 120px));
  padding-bottom: clamp(48px, 7vw, 96px);
}
/* small echo of the home orb: glow + tilted orbit */
.page-hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: calc(var(--header-h) - 40px);
  right: max(-120px, calc(50% - 760px));
  width: clamp(240px, 34vw, 460px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 32%, rgba(255, 221, 170, 0.55) 0%, rgba(255, 181, 71, 0.30) 14%, rgba(139, 115, 242, 0.38) 42%, rgba(60, 40, 140, 0.15) 62%, transparent 72%);
  filter: blur(2px);
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: calc(var(--header-h) + clamp(40px, 9vw, 150px));
  right: max(-220px, calc(50% - 860px));
  width: clamp(380px, 52vw, 720px);
  aspect-ratio: 3.2 / 1;
  border-radius: 50%;
  border: 1px solid rgba(185, 166, 255, 0.22);
  transform: rotate(-16deg);
  pointer-events: none;
}
.page-hero .crumbs { margin-bottom: var(--s-6); }
.page-hero h1 { max-width: 16ch; }
.page-hero .lede { margin-top: var(--s-5); }
.page-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-6);
  margin-top: var(--s-6);
  font-size: var(--fs-small);
  color: var(--text-3);
}
@media (max-width: 760px) {
  .page-hero::before { right: -110px; top: calc(var(--header-h) - 70px); opacity: 0.75; }
  .page-hero::after { right: -200px; opacity: 0.6; }
}

/* page hero entrance — the inner-page version of the one load moment */
@media (prefers-reduced-motion: no-preference) {
  .js .page-hero > .wrap > * {
    animation: rise 0.8s var(--ease-out) both;
  }
  .js .page-hero > .wrap > *:nth-child(2) { animation-delay: 0.08s; }
  .js .page-hero > .wrap > *:nth-child(3) { animation-delay: 0.16s; }
  .js .page-hero > .wrap > *:nth-child(4) { animation-delay: 0.24s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ========== SECTION HEAD ========== */
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .label { margin-bottom: var(--s-4); }
.section-head .lede { margin-top: var(--s-4); }

/* ========== TAGS ========== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}
.tags li {
  padding: 6px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-2);
  line-height: 1.4;
}
.tags li.is-hot {
  border-color: transparent;
  background: var(--lilac);
  color: var(--night);
}

/* ========== CTA BAND ========== */
.cta-band { padding-block: var(--section); }
.section:not(.section--band) + .cta-band { padding-top: 0; }
.cta-band__panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: var(--s-6);
  align-items: end;
  padding: clamp(32px, 6vw, 80px);
  border-radius: var(--r-panel);
  border: 1px solid var(--glass-edge);
  background:
    radial-gradient(60% 90% at 100% 100%, rgba(139, 115, 242, 0.32), transparent 70%),
    linear-gradient(160deg, #1D1748 0%, #140F33 100%);
}
.cta-band__panel::before {           /* orb rising from the corner */
  content: '';
  position: absolute;
  z-index: -1;
  right: clamp(-160px, -8vw, -60px);
  bottom: clamp(-220px, -14vw, -120px);
  width: clamp(280px, 36vw, 480px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 26%, #FFF0D6 0%, #FFC46B 9%, #EFA184 22%, #AE8CF2 42%, #5A43C4 66%, #2C2076 84%, transparent 85.5%);
  opacity: 0.9;
}
.cta-band__panel::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: clamp(-320px, -20vw, -160px);
  bottom: clamp(-80px, -4vw, -30px);
  width: clamp(520px, 64vw, 900px);
  aspect-ratio: 3.4 / 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 213, 154, 0.35);
  transform: rotate(-14deg);
}
.cta-band__copy { max-width: 640px; }
.cta-band__copy .lede { margin-top: var(--s-4); color: var(--text-2); }
.cta-band__action { justify-self: start; }
@media (min-width: 900px) {
  .cta-band__panel { grid-template-columns: 1fr auto; }
  .cta-band__action { margin-right: clamp(120px, 16vw, 260px); }
}
@media (max-width: 899px) {
  .cta-band__panel { padding-bottom: clamp(160px, 40vw, 220px); }
}

/* ========== FOOTER ========== */
.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--night-2), #0B0920);
  padding-top: clamp(56px, 7vw, 88px);
  padding-bottom: calc(var(--s-6) + env(safe-area-inset-bottom, 0px));
  font-size: var(--fs-small);
}
.site-footer__top {
  display: grid;
  gap: var(--s-8) var(--s-7);
  grid-template-columns: 1fr;
}
.site-footer__brand p { margin-top: var(--s-3); color: var(--text-2); font-weight: 600; }
.site-footer__brand address {
  margin-top: var(--s-5);
  max-width: 40ch;
  font-style: normal;
  line-height: 1.7;
  color: var(--text-3);
}
.site-footer__brand address strong { color: var(--text-2); font-weight: 700; }
.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-7) var(--s-6);
}
.site-footer__cols h2 {
  font-family: var(--f-text);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--lilac);
  margin-bottom: var(--s-4);
}
.site-footer__cols ul { list-style: none; padding: 0; display: grid; gap: 0; }
.site-footer__cols a {
  color: var(--text-2);
  font-weight: 500;
  display: inline-block;
  padding-block: 11px;     /* 44px tap target */
  line-height: 22px;
  overflow-wrap: break-word;
  transition: color var(--dur-fast) var(--ease);
}
.site-footer__cols h2 + ul { margin-top: -11px; }
.site-footer__cols a:hover { color: var(--text); }
.site-footer__cols a[aria-current="page"] { color: var(--lilac); }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3) var(--s-6);
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: var(--fs-xs);
}
/* phones: Network + Legal side by side, Affiliates (with the long email) on its own row */
@media (max-width: 639px) {
  .site-footer__cols > div:nth-child(2) { grid-column: 1 / -1; order: 3; }
}
@media (min-width: 640px) {
  .site-footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .site-footer__top { grid-template-columns: minmax(280px, 1.1fr) 1.6fr; }
}
