/* ==========================================================================
   Layout – header, sections, hero shell, footer
   ========================================================================== */

/* ---------- Header: floating glass bar that firms up on scroll (.is-scrolled, header.js) ---------- */
.site-header {
  position: fixed; inset: 24px var(--gutter) auto; z-index: 50;
  max-width: 1280px; margin-inline: auto;
}
.site-header__bar {
  position: relative; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  padding: 0 32px 0 40px;
  border-radius: 80px;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 0 0 1px var(--glass-edge), inset 0 1px 0 var(--glass-highlight);
  color: var(--text);
  transition: box-shadow .5s var(--ease-out), height .5s var(--ease-out);
}
.site-header__bar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--glass-solid);
  opacity: 0;
  transition: opacity .5s var(--ease-out);
}
.site-header.is-scrolled .site-header__bar {
  box-shadow: inset 0 0 0 1px var(--glass-edge), inset 0 1px 0 var(--glass-highlight), var(--header-shadow);
}
.site-header.is-scrolled .site-header__bar::before { opacity: 1; }
.site-header__logo { display: block; border-radius: 4px; }
.site-header__logo svg { width: 278px; height: auto; transition: opacity .3s var(--ease-out); }
.site-header__logo:hover svg { opacity: .8; }

.site-nav ul { display: flex; gap: 12px; margin-right: -14px; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  font-size: 1rem; line-height: 24px;
  transition: background-color .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.site-nav a:hover { background: var(--glass-hover); box-shadow: inset 0 0 0 1px var(--glass-edge); }

/* Menu button + dropdown: tablet and below only (see Responsive) */
.site-header__menu { display: none; }
.site-nav.is-open { animation: menu-in .4s var(--ease-out) both; }
@keyframes menu-in { from { opacity: 0; translate: 0 -8px; scale: .98; } }

/* ---------- Sections: dot pattern & glows ---------- */
/* Glows and side cards may bleed past the edge – clip horizontally only,
   so phones never get a sideways-scrolling / zoomed-out layout viewport. */
.section { position: relative; isolation: isolate; overflow-x: clip; }
.dots {
  position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: -158px; translate: -50% 0;
  width: min(1072px, 100%); height: 604px;
  background-image: radial-gradient(circle, var(--dot) 1.45px, transparent 1.6px);
  background-size: 17.85px 17.85px;
  -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent);
  mask-image: radial-gradient(closest-side, #000 20%, transparent);
}
.glow { position: absolute; z-index: -2; pointer-events: none; border-radius: 50%; filter: blur(80px); }

/* ---------- Hero shell (both views) ---------- */
.hero { position: relative; isolation: isolate; overflow-x: clip; min-height: clamp(820px, 100svh, 1000px); display: flex; align-items: center; padding: 150px var(--gutter) 96px; }
/* Aurora behind the hero */
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: -20% -10% auto; height: 120%;
  background:
    radial-gradient(38% 42% at 72% 38%, rgb(230 254 44 / .2), transparent 70%),
    radial-gradient(30% 36% at 22% 70%, rgb(159 154 16 / .18), transparent 70%),
    radial-gradient(26% 30% at 90% 85%, rgb(230 254 44 / .1), transparent 70%);
  filter: blur(40px);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 95%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 95%);
  animation: aurora 18s var(--ease-in-out) infinite alternate;
}
.view--creators .hero::before {
  background:
    radial-gradient(38% 42% at 72% 40%, rgb(230 254 44 / .55), transparent 70%),
    radial-gradient(30% 36% at 18% 80%, rgb(230 254 44 / .3), transparent 70%),
    radial-gradient(26% 30% at 95% 90%, rgb(238 236 180 / .6), transparent 70%);
}
@keyframes aurora {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(-4%, 3%, 0) rotate(6deg) scale(1.08); }
  100% { transform: translate3d(3%, -2%, 0) rotate(-4deg) scale(1.02); }
}
.hero__inner { width: 100%; margin-inline: auto; display: grid; align-items: center; }
.hero__title { margin-top: 20px; color: var(--heading); font-size: var(--fs-h1); line-height: 1; letter-spacing: -.005em; }
.hero__text { margin-top: 24px; color: var(--muted-strong); font-size: 1.25rem; max-width: 420px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }

/* Accent word in the headline */
.hero__title .accent, .hero__title .accent .word > span { color: var(--lime); text-shadow: 0 0 40px rgb(230 254 44 / .35); }
.view--creators .hero__title .accent,
.view--creators .hero__title .accent .word > span {
  color: transparent;
  background: linear-gradient(90deg, var(--olive), #c2d400);
  -webkit-background-clip: text; background-clip: text;
  text-shadow: none;
}

/* Brands hero: content at x=189, reel 611×377 at x=640 */
.hero--brands .hero__inner { max-width: 1240px; grid-template-columns: minmax(0, 560px) 1fr; gap: 64px; }
.hero--brands .hero__text { color: var(--neutral-200); }

/* Creators hero: content at x=95, collage 499×419 at x=818 */
.hero--creators .hero__inner { max-width: 1280px; grid-template-columns: minmax(0, 760px) 1fr; gap: 48px; }
.hero--creators .hero__text { max-width: 410px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { padding: 100px var(--gutter) 40px; background: var(--bg); }
html[data-view="creators"] .site-footer { padding-top: 120px; }
.site-footer__inner {
  max-width: 1062px; margin-inline: auto;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 48px;
}
.site-footer__brand { flex: 1 1 auto; min-width: 0; }
.site-footer__logo { width: min(634px, 100%); height: auto; color: var(--neutral-50); }
html[data-view="creators"] .site-footer__logo { color: var(--neutral-900); }
.site-footer__tagline {
  margin-top: 24px; width: fit-content; max-width: 100%;
  font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1.1;
  background: var(--tagline); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Footer navigation: labelled columns, icon chips, glass row hover */
.site-footer__nav {
  flex: none;
  display: grid; grid-template-columns: repeat(2, minmax(190px, auto)); gap: 32px 56px;
  padding-top: 6px;
}
/* dot sits centred over the icon chips (36px), label lines up with the link text (chip + 14px gap) */
.footer-col__title {
  display: flex; align-items: center; gap: 28.5px;
  margin-bottom: 14px; padding-left: 14.5px;
  font-size: 1rem; font-weight: 600;
  color: var(--text);
  transition: color .35s var(--ease-out);
}
/* "live" indicator: dot with a soft ripple, the two columns pulse out of phase */
.footer-col__title::before {
  content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-ui);
  animation: live-dot 2.6s var(--ease-out) infinite;
}
.footer-col + .footer-col .footer-col__title::before { animation-delay: 1.3s; }
@keyframes live-dot {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-ui) 65%, transparent), 0 0 10px var(--accent-ui); }
  70%, 100% { box-shadow: 0 0 0 9px transparent, 0 0 10px var(--accent-ui); }
}
.footer-col ul { display: grid; gap: 2px; }
.footer-link {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; gap: 14px;
  margin-left: -8px; padding: 7px 16px 7px 8px; border-radius: 16px;
  font-size: 1.0625rem; line-height: 1.4;
  color: var(--footer-link);
  transition: color .35s var(--ease-out);
}
/* glass pill grows in behind the row */
.footer-link::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--glass-hover);
  box-shadow: inset 0 0 0 1px var(--glass-edge);
  opacity: 0; scale: .92 .8; transform-origin: 0 50%;
  transition: opacity .35s var(--ease-out), scale .5s var(--ease-out);
}
.footer-link:hover, .footer-link:focus-visible { color: var(--text); }
.footer-link:hover::before, .footer-link:focus-visible::before { opacity: 1; scale: 1; }
.footer-link__chip {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--glass-bg);
  box-shadow: inset 0 0 0 1px var(--glass-edge), inset 0 1px 0 var(--glass-highlight);
  transition: background-color .35s var(--ease-out), box-shadow .45s var(--ease-out), transform .5s var(--ease-spring);
}
.footer-link__icon {
  width: 18px; height: 18px; color: var(--muted);
  transition: color .35s var(--ease-out), transform .5s var(--ease-spring);
}
.footer-link:hover .footer-link__chip, .footer-link:focus-visible .footer-link__chip {
  background-color: var(--accent-ui);
  box-shadow: inset 0 0 0 1px transparent, 0 6px 22px color-mix(in srgb, var(--accent-ui) 38%, transparent);
  transform: translateY(-1px) rotate(-6deg);
}
.footer-link:hover .footer-link__icon, .footer-link:focus-visible .footer-link__icon { color: var(--accent-ink); transform: scale(1.08) rotate(6deg); }
.footer-link__label { transition: translate .45s var(--ease-out); }
.footer-link:hover .footer-link__label, .footer-link:focus-visible .footer-link__label { translate: 3px 0; }
/* trailing arrow slides in */
.footer-link__arrow {
  flex: none; width: 14px; height: 14px; margin-left: -4px;
  color: var(--accent-ui); opacity: 0; translate: -8px 0;
  transition: opacity .3s var(--ease-out), translate .45s var(--ease-out);
}
.footer-link:hover .footer-link__arrow, .footer-link:focus-visible .footer-link__arrow { opacity: 1; translate: 2px 0; }
.footer-link__ext {
  flex: none; width: 14px; height: 14px; margin-left: -4px; opacity: .45;
  transition: opacity .3s var(--ease-out), translate .4s var(--ease-out), color .3s var(--ease-out);
}
.footer-link:hover .footer-link__ext, .footer-link:focus-visible .footer-link__ext { opacity: 1; color: var(--accent-ui); translate: 4px -2px; }

/* Bottom bar */
.site-footer__bar {
  max-width: 1062px; margin: 80px auto 0; padding-top: 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px;
  border-top: 1px solid var(--faq-border);
  font-size: .9375rem; color: var(--muted);
}
.site-footer__copy { margin-right: auto; }
.site-footer__legal { display: flex; gap: 24px; }
.site-footer__legal a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 2px;
  transition: color .3s var(--ease-out), background-size .45s var(--ease-out);
}
.site-footer__legal a:hover { color: var(--text); background-size: 100% 1px; }
.to-top { display: inline-flex; align-items: center; gap: 12px; transition: color .3s var(--ease-out); }
.to-top__icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--glass-bg);
  box-shadow: inset 0 0 0 1px var(--faq-border), inset 0 1px 0 var(--glass-highlight);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: background-color .35s var(--ease-out), color .35s var(--ease-out), transform .5s var(--ease-spring), box-shadow .35s var(--ease-out);
}
.to-top__icon svg { width: 16px; height: 16px; transition: translate .4s var(--ease-out); }
.to-top:hover { color: var(--text); }
.to-top:hover .to-top__icon {
  background: var(--lime); color: var(--neutral-950); transform: translateY(-3px);
  box-shadow: 0 8px 24px rgb(230 254 44 / .3);
}
.to-top:hover .to-top__icon svg { translate: 0 -2px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .hero--brands .hero__inner { grid-template-columns: minmax(0, 371px) 1fr; gap: 40px; }
  .hero--creators .hero__inner { gap: 32px; }
}

@media (max-width: 960px) {
  .site-header { inset-inline: 16px; top: 16px; }
  .site-header__bar { padding: 0 16px 0 24px; height: 64px; }
  .site-header__logo svg { width: 190px; }
  .site-header__menu {
    display: grid; place-items: center;
    width: 44px; height: 44px; border-radius: 50%;
  }
  .site-header__menu-icon, .site-header__menu-icon::before, .site-header__menu-icon::after {
    display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform .25s ease, opacity .25s ease;
  }
  .site-header__menu-icon { position: relative; }
  .site-header__menu-icon::before, .site-header__menu-icon::after { content: ""; position: absolute; left: 0; }
  .site-header__menu-icon::before { top: -6px; }
  .site-header__menu-icon::after { top: 6px; }
  .site-header__menu[aria-expanded="true"] .site-header__menu-icon { background: transparent; }
  .site-header__menu[aria-expanded="true"] .site-header__menu-icon::before { transform: translateY(6px) rotate(45deg); }
  .site-header__menu[aria-expanded="true"] .site-header__menu-icon::after { transform: translateY(-6px) rotate(-45deg); }
  /* The bar's own backdrop-filter makes a nested blur see only the bar,
     so the dropdown needs a near-opaque surface to stay readable. */
  .site-header__menu ~ .site-nav {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    max-height: calc(100svh - 112px); overflow-y: auto; overscroll-behavior: contain;
    padding: 12px; border-radius: 24px;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
    box-shadow: var(--header-shadow), inset 0 0 0 1px var(--glass-edge), inset 0 1px 0 var(--glass-highlight);
  }
  .js .site-header__menu ~ .site-nav:not(.is-open) { display: none; }
  .site-header__menu ~ .site-nav li + li { border-top: 1px solid var(--glass-edge); }
  .site-nav ul { flex-direction: column; gap: 0; margin-right: 0; }
  .site-nav a { padding: 14px 16px; border-radius: 14px; font-size: 1.125rem; }

  .hero { min-height: 0; padding-top: 130px; padding-bottom: 72px; }
  .hero--brands .hero__inner, .hero--creators .hero__inner { grid-template-columns: minmax(0, 1fr); gap: 56px; max-width: 640px; }

  .site-footer__inner { flex-direction: column; gap: 48px; }
  .site-footer__nav { padding-top: 0; }
  .site-footer__bar { margin-top: 56px; }
}

@media (max-width: 640px) {
  .site-header__logo svg { width: 150px; }

  .hero { padding-top: 116px; padding-bottom: 56px; }
  .hero__text { font-size: 1.0625rem; }
  .hero__actions { margin-top: 32px; gap: 12px; }
  .hero__actions .btn { flex: 1 1 140px; }
  .hero__title br { display: none; }
  /* Small phones: shrink just enough that "creating content" keeps one line (3-line headline) */
  .hero__title { font-size: min(var(--fs-h1), calc((100vw - 2 * var(--gutter)) / 7.2)); }

  .site-footer { padding: 72px var(--gutter) 64px; }
  html[data-view="creators"] .site-footer { padding-top: 72px; }
  .site-footer__tagline { margin-top: 16px; }
  .site-footer__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 12px; width: 100%; }
  .footer-link { font-size: 1rem; padding-block: 5px; padding-right: 4px; gap: 12px; white-space: nowrap; }
  .footer-col__title { gap: 26.5px; }
  .footer-col ul { gap: 0; }
  .site-footer__bar { margin-top: 48px; gap: 16px 24px; }
  .site-footer__copy { flex-basis: 100%; order: 2; }
  .site-footer__legal { margin-right: auto; }
}

@media (max-width: 360px) {
  .site-header__logo svg { width: 128px; }
  .hero__actions .btn { flex-basis: 100%; }
  .site-footer__nav { grid-template-columns: 1fr; }
}

/* Touch devices: hover effects would "stick" after a tap */
@media (hover: none) {
  .to-top:hover .to-top__icon {
    transform: none; filter: none;
    background: var(--glass-bg); color: inherit; box-shadow: inset 0 0 0 1px var(--faq-border), inset 0 1px 0 var(--glass-highlight);
  }
}

/* Coarse pointers: every control gets a ≥ 44px hit area without shifting the layout */
@media (pointer: coarse) {
  .site-header__logo { display: flex; align-items: center; min-height: 48px; }
  .footer-link { padding-block: 5px; }
  .site-footer__legal a { display: inline-block; padding-block: 13px; margin-block: -13px; }
  .site-footer__bar { row-gap: 24px; }
  .to-top { min-height: 44px; }
  .to-top__icon { width: 44px; height: 44px; }
}
