/* ==========================================================================
   Home hero — modern redesign (approved prototype, Nov 2026).
   Scoped to .hero--home only (the home page); other .hero pages are untouched.
   Loaded after site.css from home.html head_extra.

   Layout:
   - DARK theme  -> layout A (centered editorial)
   - LIGHT theme -> layout B (split: copy on the start side, the three sample
     answers as stacked cards on the end side), desktop >= 1000px only.
   - Add "hero--split" on the section to force layout B in both themes.
   - Phones (<= 767px) always use the stacked layout; sample cards swipe.
   Source order of the SEO content is the same in every layout (CSS only).

   Height: one full screen under the fixed header on desktop/laptop
   (100svh with 100vh fallback, minus --header-h). Phones: min-height, content flows.
   Theme comes from the site's own <html data-theme="dark|light"> switch.
   ========================================================================== */

.hero.hero--home {
  --hh-text: #f4f1fb;
  --hh-muted: #c3bbdb;
  --hh-soft: #9a92b8;
  --hh-glass: rgba(255, 255, 255, .055);
  --hh-glass-2: rgba(255, 255, 255, .09);
  --hh-brd: rgba(255, 255, 255, .12);
  --hh-brd-hi: rgba(255, 255, 255, .26);
  --hh-h1-a: #ffffff; --hh-h1-b: #e9d5ff; --hh-h1-c: #a5f3fc;
  --hh-chip: #efeaff;
  --hh-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
  --hh-a1: rgba(139, 92, 246, .55);
  --hh-a2: rgba(56, 189, 248, .30);
  --hh-a3: rgba(244, 114, 182, .28);
  --hh-star: 255, 255, 255;
  --hh-video-op: .55;
  --hh-video-filter: saturate(1.15) brightness(.85);
  --hh-primary-text: #12051f;
  --hh-primary-bg: linear-gradient(120deg, #f5c76b 0%, #f0abfc 45%, #a78bfa 100%);
  --hh-primary-glow: rgba(192, 132, 252, .8);

  min-height: calc(100vh - var(--header-h, 76px));
  min-height: calc(100svh - var(--header-h, 76px));
  display: flex; flex-direction: column; align-items: stretch; justify-content: center;
  padding-block: clamp(18px, 3.2vh, 40px) clamp(14px, 2.4vh, 28px);
  color: var(--hh-text);
  background-color: #07060d;
  background-image:
    radial-gradient(120% 80% at 50% -10%, #120e26, transparent 60%),
    linear-gradient(180deg, #0b0918 0%, #07060d 100%);
  text-align: center;
}
[data-theme="light"] .hero.hero--home {
  --hh-text: #17122a;
  --hh-muted: #463e5e;
  --hh-soft: #5f577a;
  --hh-glass: rgba(255, 255, 255, .62);
  --hh-glass-2: rgba(255, 255, 255, .84);
  --hh-brd: rgba(91, 60, 160, .15);
  --hh-brd-hi: rgba(91, 60, 160, .32);
  --hh-h1-a: #1b1238; --hh-h1-b: #5b21b6; --hh-h1-c: #0e7490;
  --hh-chip: #2a2145;
  --hh-shadow: 0 30px 70px -28px rgba(76, 46, 150, .35);
  --hh-a1: rgba(167, 139, 250, .55);
  --hh-a2: rgba(125, 211, 252, .50);
  --hh-a3: rgba(249, 168, 212, .50);
  --hh-star: 91, 60, 160;
  --hh-video-op: .28;
  --hh-video-filter: invert(1) hue-rotate(180deg) saturate(.7) brightness(1.15);
  --hh-primary-text: #ffffff;
  --hh-primary-bg: linear-gradient(120deg, #7c3aed 0%, #9333ea 50%, #db2777 100%);
  --hh-primary-glow: rgba(124, 58, 237, .7);
  background-color: #f7f4fe;
  background-image: radial-gradient(120% 80% at 50% -10%, #ffffff, transparent 60%), linear-gradient(180deg, #fbf9ff 0%, #f6f4fb 100%);
}

/* ---------- background layers (all aria-hidden) ---------- */
.hero.hero--home .hero__bg--video {
  z-index: 0; opacity: 0; filter: var(--hh-video-filter); transition: opacity 1.2s ease;
}
.hero.hero--home .hero__bg--video.is-on { opacity: var(--hh-video-op); }
.hero.hero--home .hero__shade {
  z-index: 1;
  background:
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(7, 6, 13, .35), transparent 75%),
    linear-gradient(to bottom, transparent 70%, var(--bg, #0b0a14) 100%);
}
.hero.hero--home .hero__shade::after { content: none; }
[data-theme="light"] .hero.hero--home .hero__shade {
  background:
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(255, 255, 255, .45), transparent 75%),
    linear-gradient(to bottom, transparent 70%, var(--bg, #f6f4fb) 100%);
}
.hero--home .hh-layer { position: absolute; inset: 0; pointer-events: none; }
.hero--home .hh-aurora { z-index: 0; filter: blur(60px) saturate(1.2); opacity: .9; overflow: hidden; }
.hero--home .hh-aurora span { position: absolute; border-radius: 50%; will-change: transform; }
.hero--home .hh-aurora span:nth-child(1) { width: 60vw; height: 46vw; top: -18vw; inset-inline-start: 18vw; background: radial-gradient(closest-side, var(--hh-a1), transparent); animation: hh-drift1 22s ease-in-out infinite alternate; }
.hero--home .hh-aurora span:nth-child(2) { width: 46vw; height: 40vw; top: 22%; inset-inline-end: -12vw; background: radial-gradient(closest-side, var(--hh-a2), transparent); animation: hh-drift2 26s ease-in-out infinite alternate; }
.hero--home .hh-aurora span:nth-child(3) { width: 42vw; height: 36vw; bottom: -14vw; inset-inline-start: -10vw; background: radial-gradient(closest-side, var(--hh-a3), transparent); animation: hh-drift3 30s ease-in-out infinite alternate; }
@keyframes hh-drift1 { to { transform: translate3d(-8vw, 6vw, 0) scale(1.12); } }
@keyframes hh-drift2 { to { transform: translate3d(10vw, -5vw, 0) scale(.92); } }
@keyframes hh-drift3 { to { transform: translate3d(6vw, -8vw, 0) scale(1.15); } }
.hero--home .hh-stars { z-index: 1; }
.hero--home .hh-stars--1 {
  background-image:
    radial-gradient(1.5px 1.5px at 165px 77px, rgba(var(--hh-star), 0.55), transparent),
    radial-gradient(1.2px 1.2px at 37px 48px, rgba(var(--hh-star), 0.55), transparent),
    radial-gradient(1px 1px at 259px 109px, rgba(var(--hh-star), 0.55), transparent),
    radial-gradient(1px 1px at 222px 214px, rgba(var(--hh-star), 0.7), transparent),
    radial-gradient(1px 1px at 46px 217px, rgba(var(--hh-star), 0.55), transparent),
    radial-gradient(1.5px 1.5px at 114px 31px, rgba(var(--hh-star), 0.55), transparent),
    radial-gradient(1px 1px at 113px 23px, rgba(var(--hh-star), 0.85), transparent),
    radial-gradient(1px 1px at 214px 73px, rgba(var(--hh-star), 0.85), transparent),
    radial-gradient(1px 1px at 92px 52px, rgba(var(--hh-star), 0.85), transparent);
  background-size: 260px 260px;
  animation: hh-twinkle 5s ease-in-out infinite alternate;
}
.hero--home .hh-stars--2 {
  background-image:
    radial-gradient(1px 1px at 49px 280px, rgba(var(--hh-star), 0.55), transparent),
    radial-gradient(1px 1px at 288px 30px, rgba(var(--hh-star), 0.7), transparent),
    radial-gradient(1px 1px at 254px 348px, rgba(var(--hh-star), 0.95), transparent),
    radial-gradient(1px 1px at 397px 160px, rgba(var(--hh-star), 0.95), transparent),
    radial-gradient(0.8px 0.8px at 185px 153px, rgba(var(--hh-star), 0.7), transparent),
    radial-gradient(0.8px 0.8px at 357px 399px, rgba(var(--hh-star), 0.55), transparent),
    radial-gradient(1px 1px at 294px 153px, rgba(var(--hh-star), 0.95), transparent);
  background-size: 410px 410px;
  animation: hh-twinkle 7s ease-in-out infinite alternate-reverse;
}
[data-theme="light"] .hero--home .hh-stars { opacity: .55; }
@keyframes hh-twinkle { from { opacity: .35; } to { opacity: 1; } }
.hero--home .hh-grid {
  z-index: 1; opacity: .5;
  background-image: linear-gradient(var(--hh-brd) 1px, transparent 1px), linear-gradient(90deg, var(--hh-brd) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 42%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 55% at 50% 42%, #000 0%, transparent 75%);
}
.hero--home .hh-grain {
  z-index: 1; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- content ---------- */
.hero.hero--home .hero__inner {
  position: relative; z-index: 2; width: 100%; max-width: 1240px; margin-inline: auto;
  flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center;
}
.hero--home .hero__main { display: flex; flex-direction: column; align-items: center; text-align: center; }

.hero.hero--home .hero__eyebrow {
  margin: 0; gap: .55rem; font-size: .82rem; font-weight: 600; color: var(--hh-text);
  padding: .42rem .5rem .42rem 1rem; border-radius: 999px;
  background: var(--hh-glass); border: 1px solid var(--hh-brd);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); text-shadow: none;
}
.hero.hero--home .hero__eyebrow .ico { color: #f5c76b; width: 1.5em; height: 1.5em; padding: .22em; border-radius: 50%; background: rgba(245, 199, 107, .16); }
[data-theme="light"] .hero.hero--home .hero__eyebrow .ico { color: #b7791f; }

.hero.hero--home h1 {
  margin: clamp(12px, 2vh, 22px) 0 0; font-weight: 700; letter-spacing: -.03em;
  font-size: clamp(2.3rem, 4.3vw, 4.1rem); line-height: 1.15; max-width: 32ch; text-wrap: balance;
  background: linear-gradient(110deg, var(--hh-h1-a) 0%, var(--hh-h1-a) 38%, var(--hh-h1-b) 66%, var(--hh-h1-c) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--hh-text);
  filter: none; padding-bottom: .06em;
}
.hero.hero--home .lead {
  margin: clamp(10px, 1.6vh, 20px) 0 0; max-width: 62ch; color: var(--hh-muted); text-shadow: none;
  font-size: clamp(1.02rem, 1.4vw, 1.25rem); line-height: 1.95; text-wrap: pretty;
}
.hero.hero--home .lead strong {
  color: var(--hh-text); font-weight: 700;
  background: linear-gradient(transparent 62%, rgba(139, 92, 246, .35) 62%);
}

/* chips -> pill links */
.hero--home .hero-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: clamp(14px, 2.4vh, 26px); max-width: 1200px; }
.hero--home .hero-chips a {
  --c: #c084fc;
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
  font-size: .92rem; font-weight: 600; color: var(--hh-chip); white-space: nowrap;
  padding: .5rem 1rem .5rem 1.05rem; min-height: 42px; border-radius: 999px;
  background: var(--hh-glass); border: 1px solid var(--hh-brd);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.hero--home .hero-chips a::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.hero--home .hero-chips a:nth-child(1) { --c: #f472b6; } .hero--home .hero-chips a:nth-child(2) { --c: #f5c76b; }
.hero--home .hero-chips a:nth-child(3) { --c: #a78bfa; } .hero--home .hero-chips a:nth-child(4) { --c: #34d399; }
.hero--home .hero-chips a:nth-child(5) { --c: #c084fc; } .hero--home .hero-chips a:nth-child(6) { --c: #60a5fa; }
.hero--home .hero-chips a:nth-child(7) { --c: #2dd4bf; } .hero--home .hero-chips a:nth-child(8) { --c: #fb923c; }
.hero--home .hero-chips a:hover { transform: translateY(-2px); border-color: var(--hh-brd-hi); background: var(--hh-glass-2); box-shadow: 0 10px 30px -10px var(--c); }
.hero--home .hero-chips a:focus-visible,
.hero--home .hero__cta a:focus-visible { outline: 2px solid #c084fc; outline-offset: 3px; }

/* CTA: one primary + one quiet secondary; the note sits under them (visual order only) */
.hero.hero--home .hero__cta { order: 1; gap: .7rem; margin-top: clamp(16px, 2.6vh, 28px); }
.hero.hero--home .hero__note {
  order: 2; margin: .7rem 0 0; font-size: .84rem; color: var(--hh-soft); text-shadow: none;
  display: inline-flex; align-items: center; gap: .4rem; max-width: 60ch; text-align: start;
}
.hero.hero--home .hero__note::before { content: ""; width: 1rem; height: 1rem; flex: none; border-radius: 50%; background: radial-gradient(circle, #34d399 35%, rgba(52, 211, 153, .25) 36%); }
.hero.hero--home .hero__cta .btn {
  min-height: 54px; padding: 0 1.6rem; border-radius: 16px; font-weight: 700; font-size: 1rem; text-shadow: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.hero.hero--home .hero__cta .hh-btn--primary {
  color: var(--hh-primary-text); background: var(--hh-primary-bg); border: 0;
  box-shadow: 0 14px 40px -12px var(--hh-primary-glow), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.hero.hero--home .hero__cta .hh-btn--primary:hover { color: var(--hh-primary-text); background: var(--hh-primary-bg); transform: translateY(-2px); box-shadow: 0 20px 50px -12px var(--hh-primary-glow); }
.hero.hero--home .hero__cta .hh-btn--ghost {
  color: var(--hh-text); background: var(--hh-glass); border: 1px solid var(--hh-brd);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.hero.hero--home .hero__cta .hh-btn--ghost:hover { color: var(--hh-text); background: var(--hh-glass-2); border-color: var(--hh-brd-hi); }

/* three sample answers -> cards */
.hero.hero--home .hero-samples { margin-top: clamp(18px, 3vh, 36px); width: 100%; text-shadow: none; }
.hero.hero--home .hero-samples h2 {
  display: flex; align-items: center; justify-content: center; gap: .8rem; margin: 0 0 .9rem;
  font-size: .82rem; font-weight: 700; letter-spacing: .02em; color: var(--hh-soft); text-shadow: none;
}
.hero--home .hero-samples h2::before,
.hero--home .hero-samples h2::after { content: ""; height: 1px; flex: 0 1 80px; background: linear-gradient(90deg, transparent, var(--hh-brd-hi), transparent); }
.hero--home .hero-samples__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; counter-reset: hh-s; }
.hero.hero--home .hero-samples p {
  counter-increment: hh-s; position: relative; margin: 0; text-align: right;
  padding: .95rem 1.1rem 1rem; border-radius: 20px; font-size: .86rem; line-height: 1.9; color: var(--hh-muted); text-shadow: none;
  background: linear-gradient(180deg, var(--hh-glass-2), var(--hh-glass));
  border: 1px solid var(--hh-brd); box-shadow: var(--hh-shadow);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  transition: transform .25s ease, border-color .25s ease;
}
.hero--home .hero-samples p::before {
  content: counter(hh-s, persian); position: absolute; top: .85rem; inset-inline-end: 1rem;
  font-size: .72rem; font-weight: 700; color: var(--hh-soft);
  width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--hh-brd);
}
.hero.hero--home .hero-samples p b { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; font-size: 1.02rem; font-weight: 700; color: var(--hh-text); }
.hero--home .hero-samples p b::before { content: ""; width: .6rem; height: .6rem; border-radius: 3px; transform: rotate(45deg); background: linear-gradient(135deg, #c084fc, #38bdf8); }
.hero--home .hero-samples p:hover { transform: translateY(-3px); border-color: var(--hh-brd-hi); }

/* scroll cue (decorative) */
.hero--home .hh-cue { position: relative; z-index: 2; flex: none; margin: clamp(12px, 2vh, 24px) auto 0; width: 26px; height: 42px; border-radius: 14px; border: 1.5px solid var(--hh-brd-hi); opacity: .8; }
.hero--home .hh-cue::after { content: ""; position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--hh-text); animation: hh-cue 1.8s ease-in-out infinite; }
@keyframes hh-cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Entrance: transform/opacity only on secondary items (no layout shift).
   H1 and lead are never hidden, so LCP is not delayed. */
.hero--home .hero-chips,
.hero--home .hero__cta,
.hero--home .hero-samples p { animation: hh-rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero--home .hero__cta { animation-delay: .08s; }
.hero--home .hero-samples p:nth-child(1) { animation-delay: .16s; }
.hero--home .hero-samples p:nth-child(2) { animation-delay: .24s; }
.hero--home .hero-samples p:nth-child(3) { animation-delay: .32s; }
@keyframes hh-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Layout B: light theme (or .hero--split), desktop only ---------- */
@media (min-width: 1000px) {
  :is([data-theme="light"] .hero--home, .hero--home.hero--split) .hero__inner {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: clamp(32px, 5vw, 80px); align-items: center;
  }
  :is([data-theme="light"] .hero--home, .hero--home.hero--split) .hero__main { align-items: flex-start; text-align: right; }
  .hero.hero--home:is([data-theme="light"] *, .hero--split) h1 { font-size: clamp(2.5rem, 4.6vw, 4.6rem); max-width: 12ch; }
  .hero.hero--home:is([data-theme="light"] *, .hero--split) .lead { max-width: 46ch; }
  :is([data-theme="light"] .hero--home, .hero--home.hero--split) .hero-chips,
  :is([data-theme="light"] .hero--home, .hero--home.hero--split) .hero__cta { justify-content: flex-start; }
  .hero.hero--home:is([data-theme="light"] *, .hero--split) .hero-samples { margin-top: 0; position: relative; }
  .hero.hero--home:is([data-theme="light"] *, .hero--split) .hero-samples h2 { justify-content: flex-start; }
  :is([data-theme="light"] .hero--home, .hero--home.hero--split) .hero-samples h2::before { display: none; }
  :is([data-theme="light"] .hero--home, .hero--home.hero--split) .hero-samples__cards { grid-template-columns: 1fr; gap: .9rem; }
  :is([data-theme="light"] .hero--home, .hero--home.hero--split) .hero-samples p:nth-child(2) { margin-inline-start: 2.2rem; }
  :is([data-theme="light"] .hero--home, .hero--home.hero--split) .hero-samples p:nth-child(3) { margin-inline-start: 1rem; }
  :is([data-theme="light"] .hero--home, .hero--home.hero--split) .hero-samples::before {
    content: ""; position: absolute; inset: -12% -8%; z-index: -1; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(139, 92, 246, .3), transparent); filter: blur(30px);
  }
}

/* ---------- Laptop / short screens: keep it one screen ---------- */
@media (max-width: 1320px) { .hero.hero--home .hero-samples p { font-size: .83rem; } }
@media (min-width: 768px) and (max-height: 860px) {
  .hero--home .hh-cue { display: none; }
  .hero.hero--home h1 { font-size: clamp(2.1rem, 3.7vw, 3.5rem); }
  .hero.hero--home .lead { line-height: 1.8; }
  .hero.hero--home .hero-samples p { line-height: 1.8; padding-block: .8rem .85rem; }
}

/* ---------- Phones: stacked, content flows, cards swipe ---------- */
@media (max-width: 767px) {
  .hero.hero--home { justify-content: flex-start; padding-block: 22px 20px; }
  .hero.hero--home h1 { font-size: clamp(2rem, 10vw, 2.7rem); line-height: 1.22; }
  .hero.hero--home .lead { font-size: 1rem; line-height: 1.9; }
  .hero--home .hero-chips { gap: .42rem; }
  .hero--home .hero-chips a { font-size: .86rem; padding: .45rem .8rem; min-height: 40px; }
  .hero.hero--home .hero__cta { width: 100%; }
  .hero.hero--home .hero__cta .btn { min-height: 52px; flex: 1 1 auto; }
  .hero.hero--home .hero__cta .hh-btn--primary { flex-basis: 100%; }
  .hero--home .hero-samples__cards {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    padding: 4px 1.25rem 14px; margin-inline: -1.25rem; scrollbar-width: none;
  }
  .hero--home .hero-samples__cards::-webkit-scrollbar { display: none; }
  .hero.hero--home .hero-samples p { scroll-snap-align: center; box-shadow: none; }
  .hero--home .hh-cue { display: none; }
  .hero--home .hh-aurora { filter: blur(40px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero--home .hh-aurora span,
  .hero--home .hh-stars,
  .hero--home .hh-cue::after,
  .hero--home .hero-chips,
  .hero--home .hero__cta,
  .hero--home .hero-samples p { animation: none !important; }
  .hero--home .hero-chips a,
  .hero--home .hero-samples p,
  .hero.hero--home .hero__cta .btn { transition: none; }
}
