/* ============ v34.2: HOME — Aurora premium home page + hero slider ============
   Look-only release. Loaded ONLY on the home page (header.php conditional,
   home.css?v=1). Every rule is scoped to #page-home. Uses the v34.1 Aurora
   tokens from style.css (:root --nx-*): the cyan -> violet -> fuchsia
   ribbon is decorative; every text-bearing fill stays in the violet
   range (--nx-fill), because white on cyan #22D3EE is 1.9:1.
   The hero, stats bar, marquee, tools band, eco panel and final CTA are
   fixed-dark in BOTH themes; section cards follow the theme variables.
   Contrast: every new text pair computed in home-342/d2_contrast.py,
   WCAG AA in both themes (worst text pair 4.69:1 — white on #6D5DF0).
   v52 pins respected: slide markup/hooks untouched (3 hs-cards, 3 dots
   with <i> fills, #hsCount, .hs-controls, .hs-arrow x2); this file only
   restyles. The slider driver stays in main.js (autoplay 6s, arrows,
   dots, pause on hover/focus); home.js only adds keyboard + swipe. */

/* ---------- HERO SLIDER: the photos ARE the aurora (v18 full-bleed) ----------
   NOTE: the live hero is v18 full-bleed (photo behind, glass card over
   it) — NOT the v16 split frame. So there is no frame to style: the
   aurora ambience comes from the photos themselves. The per-slide
   backgrounds below are the graceful fallback if a photo fails to
   load (they sit behind the opaque photo otherwise). No slider-level
   hairline/blobs: the slider top hides behind the fixed header and
   anything behind the slides is invisible behind opaque photos. */
#page-home .hs-slide[data-slide="0"]{background:radial-gradient(600px 300px at 12% 20%,rgba(34,211,238,.15),transparent 60%),radial-gradient(520px 280px at 88% 78%,rgba(139,124,255,.13),transparent 60%),linear-gradient(135deg,#0A0E1C,#050810)}
#page-home .hs-slide[data-slide="1"]{background:radial-gradient(600px 300px at 12% 20%,rgba(34,211,238,.15),transparent 60%),radial-gradient(520px 280px at 88% 78%,rgba(139,124,255,.13),transparent 60%),linear-gradient(135deg,#0A0E1C,#050810)}
#page-home .hs-slide[data-slide="2"]{background:radial-gradient(600px 300px at 12% 20%,rgba(192,38,211,.14),transparent 60%),radial-gradient(520px 280px at 88% 78%,rgba(34,211,238,.10),transparent 60%),linear-gradient(135deg,#0A0E1C,#050810)}
/* Butter-smooth crossfade (was .8s). */
#page-home .hs-slide{transition:opacity .9s ease,visibility 0s linear .9s}
#page-home .hs-slide.active{transition:opacity .9s ease,visibility 0s}

/* ---------- HERO SLIDER: aurora hairline + glass chip ----------
   The hairline runs across the top of the full-bleed photo (above the
   v21 legibility overlay, z-index 2). The chip floats top-RIGHT,
   BELOW the fixed site header (59px desktop / 69px phone — probe
   21:00 UTC: header h=59/69, card top y=83/98). Desktop: top:72px,
   right:28px — clear of the header, the card (ends x=585) and the
   arrows (y=600). Phone: top:80px, right:16px — it straddles the
   card's top-right corner as a badge (card top y=98, chip y=80..116),
   clear of the pill/h1 which live at the card's top-left.
   NOTE: desktop renders ~11px higher than `top` says (probe:
   top:72px measured y=61 — cause unknown, mobile measures exact),
   so desktop top is 88px to keep a safe ~15px+ clearance under the
   59px header either way.
   (v1 put it bottom-left — it landed on the controls. v2 put it
   top-left at 16px — the fixed header covered it. Both wrong.) */
#page-home .hs-img::before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:var(--nx-aurora);z-index:2;opacity:.95}
#page-home .hs-chip{position:absolute;top:88px;right:28px;z-index:3;display:inline-flex;align-items:center;gap:8px;background:rgba(10,14,28,.84);border:1px solid rgba(139,124,255,.45);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-radius:999px;padding:9px 14px;font-size:12.5px;font-weight:800;color:#F2F4FA;box-shadow:0 12px 30px rgba(0,0,0,.4);letter-spacing:.02em;white-space:nowrap}
#page-home .hs-chip b{color:#C4B5FD}
#page-home .hs-live{width:8px;height:8px;flex:none;border-radius:50%;background:#22D3EE;animation:hmPulse 2.2s ease-out infinite}
@keyframes hmPulse{0%{box-shadow:0 0 0 0 rgba(34,211,238,.5)}70%{box-shadow:0 0 0 7px rgba(34,211,238,0)}100%{box-shadow:0 0 0 0 rgba(34,211,238,0)}}

/* ---------- HERO SLIDER: card text (fixed dark, both themes) ---------- */
#page-home .hs-card .pill{border-color:rgba(139,124,255,.5);background:rgba(109,93,240,.14);box-shadow:0 0 26px rgba(109,93,240,.28),inset 0 1px 0 rgba(255,255,255,.12)}
#page-home .hs-card .pill i{background:linear-gradient(135deg,#22D3EE,#C026D3);box-shadow:0 0 0 6px rgba(109,93,240,.22)}
#page-home .hs-card h1 em{background:var(--nx-word);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
#page-home .hs-card .hero-lead{color:#D8DCEB}
#page-home .hs-card .trust span{background:rgba(10,14,28,.55);border-color:rgba(255,255,255,.14);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
#page-home .hs-card .trust b{color:#C4B5FD}

/* ---------- HERO SLIDER: controls (dots / counter / arrows) ---------- */
/* Dots: 16px tap target, 4px track centred, aurora progress fill. */
#page-home .hs-dot{height:16px;background:linear-gradient(rgba(255,255,255,.28),rgba(255,255,255,.28)) center/100% 4px no-repeat}
#page-home .hs-dot.active{background:linear-gradient(rgba(255,255,255,.28),rgba(255,255,255,.28)) center/100% 4px no-repeat}
#page-home .hs-dot i{height:4px;margin-top:6px;background:var(--nx-aurora)}
/* Pause the fill on keyboard focus too (main.js pauses the timer on
   focusin; without this the fill runs ahead of the frozen slide). */
#page-home .hero-slider:focus-within .hs-dot.active i{animation-play-state:paused}
#page-home .hs-count #hsCount{background:var(--nx-word);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
#page-home .hs-arrow{background:rgba(10,14,28,.6);border:1px solid rgba(255,255,255,.22);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);box-shadow:0 10px 26px rgba(0,0,0,.35)}
#page-home .hs-arrow:hover{background:var(--nx-fill);border-color:transparent;transform:scale(1.06);box-shadow:0 12px 30px rgba(109,93,240,.5)}
#page-home .hs-arrow:focus-visible,#page-home .hs-dot:focus-visible{outline:2px solid #67E8F9;outline-offset:3px}
#page-home #heroSlider:focus-visible{outline:2px solid rgba(103,232,249,.65);outline-offset:-2px}

/* ---------- STATS BAR (fixed dark, both themes) ---------- */
#page-home .stats{border-top:1px solid rgba(139,124,255,.3)}
#page-home .stats::before{content:"";position:absolute;top:-1px;left:0;right:0;height:2px;background:var(--nx-aurora);opacity:.7;pointer-events:none}
#page-home .stat strong{background:var(--nx-word);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}

/* ---------- MARQUEE: dark aurora band, gradient keywords ---------- */
#page-home .marquee{background:linear-gradient(90deg,#070B14,#0B1030 50%,#070B14);border-block:1px solid rgba(139,124,255,.3)}
#page-home .marquee-track span{background:var(--nx-word);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}

/* ---------- SECTIONS: kickers, cards, icon tiles ---------- */
#page-home .kicker::before{background:var(--nx-aurora)}
html[data-theme="light"] #page-home .kicker{color:#4A3BC2!important}
@media(prefers-color-scheme:light){html:not([data-theme="dark"]) #page-home .kicker{color:#4A3BC2!important}}
/* Aurora icon tiles — white glyphs on the violet fill (worst stop
   #6D5DF0 at 4.69:1). Fixes the pre-existing #A78BFA tiles (2.72:1). */
#page-home .cap-ic{background:var(--nx-fill);color:#fff;box-shadow:0 10px 24px rgba(109,93,240,.4)}
#page-home .adv-icon{background:var(--nx-fill);color:#fff;box-shadow:0 8px 20px rgba(109,93,240,.35)}
#page-home .st-ic{background:var(--nx-fill)}
/* Aurora number chips — also fixes white-on-#8B7CFF (3.0:1) in dark. */
#page-home .svc-num{background:var(--nx-fill);color:#fff;box-shadow:0 8px 20px rgba(109,93,240,.4)}
#page-home .tag-pill{background:var(--nx-fill);box-shadow:0 8px 20px rgba(109,93,240,.4)}
#page-home .cap::after{background:var(--nx-aurora);opacity:.9}
#page-home .cap{transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease}
#page-home .cap:hover{transform:translateY(-4px);border-color:rgba(139,124,255,.45);box-shadow:0 24px 55px rgba(0,0,0,.45),0 0 0 1px rgba(139,124,255,.25),0 12px 40px rgba(139,124,255,.18)}
#page-home .eco-card.active{box-shadow:0 0 0 1px var(--lime),0 14px 34px rgba(109,93,240,.28)}
#page-home .show-tool:hover{border-color:rgba(139,124,255,.55);background:rgba(139,124,255,.14)}
#page-home details[open]{border-color:rgba(139,124,255,.45)}
#page-home summary::after{background:var(--nx-fill)}
#page-home .metrics div strong{white-space:nowrap}
#page-home .trusted span{transition:transform .2s ease,border-color .2s ease,color .2s ease}
#page-home .trusted span:hover{border-color:rgba(139,124,255,.5);color:var(--text);transform:translateY(-2px)}
#page-home .svc:focus-visible,#page-home .eco-card:focus-visible,#page-home .show-tool:focus-visible{outline:2px solid var(--nx-violet);outline-offset:2px}

/* ---------- TOOLS BAND + FINAL CTA: second aurora blob ---------- */
#page-home .tools-band{box-shadow:0 24px 60px rgba(0,0,0,.45),0 0 70px rgba(109,93,240,.20)}
#page-home .tools-band::before{content:"";position:absolute;width:320px;height:320px;border-radius:50%;background:#22D3EE;filter:blur(130px);opacity:.14;left:-110px;bottom:-170px;pointer-events:none}
#page-home .final::after{content:"";position:absolute;width:360px;height:360px;background:#C026D3;filter:blur(140px);opacity:.16;left:-120px;bottom:-190px;border-radius:50%;pointer-events:none}

/* ---------- MOBILE ---------- */
@media(max-width:899px){
  /* 5th stat spans the full row instead of sitting alone, half-width. */
  #page-home .stats-grid .stat:last-child{grid-column:1/-1;text-align:center;border-right:0}
}
@media(max-width:700px){
  #page-home .hs-chip{top:80px;right:16px;left:auto;padding:8px 12px;font-size:11.5px}
  #page-home .hs-controls{gap:12px}
}

/* ---------- REDUCED MOTION ---------- */
@media(prefers-reduced-motion:reduce){#page-home .hs-live,#page-home .hsv-live,#page-home .hsv-chip{animation:none}#page-home .hs-slide .hs-visual{opacity:1;transform:none;transition:none}}

/* ---------- v34.2.1: DARK-THEME CARD FIX ----------
   ROOT CAUSE (style.css:816-819): the light-theme card backgrounds
   (white gradient) live inside @media(prefers-color-scheme:light)
   with NO data-theme gate — so on a light OS with the site toggled
   dark (data-theme="dark"), the cards stay white while the headings
   switch to near-white (#F2F4FA, 1.09:1 measured in the pre-fix
   WeasyPrint repro, unreadable). The v34.2 contrast check assumed
   the dark card bg was #0D1220 and never checked headings, and the
   v34.2 harness dark cases emulated a dark OS — so the OS-light +
   site-dark combo was never rendered. The same OS-gated pattern
   also hits the card labels (.svc-cat, .work-tag, .arrow —
   style.css:89/107/114), which fall back to --lime-d #6D5DF0
   (3.86:1 on glass) when the OS is light.
   FIX: whenever the SITE is dark, restore the intended dark glass
   card backgrounds (the style.css:564 gradient) on every card class
   the home page uses, and force the three labels to --lime #8B7CFF.
   Specificity (1,2,1) beats the (0,1,0) media rules, and home.css
   loads after style.css. Only `background` is overridden here:
   border/box-shadow stay as-is, so the hover glow (.svc/.work/
   .eco-card:hover, .cap:hover) and the active eco-card ring keep
   working untouched — the light border left behind is ~invisible
   against the dark card (cosmetic only). Light mode untouched:
   data-theme="light" and OS-light-with-no-toggle still get the
   white cards from style.css:808/818. Contrast: home-3421/
   d3_contrast.py, 44 pairs, 0 failures, both themes. */
html[data-theme="dark"] #page-home .svc,
html[data-theme="dark"] #page-home .work,
html[data-theme="dark"] #page-home .step,
html[data-theme="dark"] #page-home .cap,
html[data-theme="dark"] #page-home .adv,
html[data-theme="dark"] #page-home .eco-card{background:linear-gradient(160deg,rgba(255,255,255,.055),rgba(255,255,255,.02))}
html[data-theme="dark"] #page-home .svc-cat,
html[data-theme="dark"] #page-home .work-tag,
html[data-theme="dark"] #page-home .arrow{color:var(--lime)}

/* ---------- v34.5: PREMIUM HERO SLIDER — fill the empty right side ----------
   USER ORDER 23 Nov 12:34 (laptop screenshot): the slider looked
   "khali khali" — the 660px glass card hugs the left edge (v22
   full-width content) and the entire right half of every slide was
   bare photo. Fix: the slide content becomes a 2-column grid (card
   left, floating glass visual right) at >=1080px; below that the
   visual stacks under the card as a compact panel + chip row.
   The hero is fixed-dark in BOTH themes (photo + dark overlay), so
   the visual uses fixed dark-glass colours — NO data-theme variants
   and NO prefers-color-scheme gating anywhere in this block (the
   v34.2.1 lesson: OS-gated rules + a site toggle = unreadable).
   All visual content is REAL: live tool/studio names and real counts
   (64 tools / 58 team / 8 studios / 13 node types / 8 templates) —
   no fake stats, no invented claims, no lorem. The visual is
   aria-hidden in the markup (decorative mock UI; the card carries
   the real message + CTAs).
   Geometry notes (probes in home-345/): the .hs-chip floats top-
   right (top:88px, ~38px tall) — the visual gets padding-top:40px
   so the panel top clears the chip's bottom on every slide; the
   floating chips sit top-LEFT / bottom-RIGHT of the panel so they
   never meet the hs-chip; the grid keeps padding-right:76px so the
   panel clears the bottom-right arrow pair (right:16-96px); the
   panel bottom stays 96px above the slide bottom (content padding),
   clear of the controls row (bottom:26px). */
@media(min-width:1080px){
  #page-home .hero-slider .hs-content{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:44px;align-items:center;padding-right:76px}
}
#page-home .hs-visual{position:relative;z-index:2;min-width:0}
@media(min-width:1080px){#page-home .hs-visual{padding-top:40px}}
/* Entrance: fades in with the card's staggered children (last delay
   .45s) — the visual lands just after, at .35s. */
#page-home .hs-slide .hs-visual{opacity:0;transform:translateY(18px);transition:opacity .7s ease .35s,transform .7s ease .35s}
#page-home .hs-slide.active .hs-visual{opacity:1;transform:none}
/* The panel: near-opaque dark glass (alpha .85-.9) so the photo
   behind it barely shifts the effective background — the text
   contrast in home-345/d4_contrast.py is computed against the
   composited colour over a worst-case bright photo area. */
#page-home .hsv-panel{position:relative;background:linear-gradient(150deg,rgba(13,18,32,.9),rgba(10,14,28,.85));border:1px solid rgba(139,124,255,.4);border-radius:22px;backdrop-filter:blur(16px) saturate(1.3);-webkit-backdrop-filter:blur(16px) saturate(1.3);box-shadow:0 30px 70px rgba(0,0,0,.5),0 0 60px rgba(109,93,240,.16);padding:20px 22px 16px}
#page-home .hsv-panel::before{content:"";position:absolute;top:0;left:22px;right:22px;height:2px;background:var(--nx-aurora);border-radius:2px;opacity:.9}
#page-home .hsv-head{display:flex;align-items:center;gap:9px;margin-bottom:14px}
#page-home .hsv-live{width:8px;height:8px;flex:none;border-radius:50%;background:#22D3EE;animation:hmPulse 2.2s ease-out infinite}
#page-home .hsv-title{font-size:12px;font-weight:800;letter-spacing:.14em;color:#F2F4FA}
#page-home .hsv-tag{margin-left:auto;font-size:11.5px;font-weight:800;color:#67E8F9;background:rgba(34,211,238,.12);border:1px solid rgba(34,211,238,.35);border-radius:999px;padding:4px 10px;white-space:nowrap}
#page-home .hsv-row,#page-home .hsv-step{display:flex;align-items:center;gap:12px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.09);border-radius:14px;padding:11px 12px}
#page-home .hsv-row+.hsv-row{margin-top:9px}
#page-home .hsv-flow-arrow{display:flex;justify-content:center;color:#8B7CFF;font-size:14px;line-height:1;padding:5px 0}
#page-home .hsv-ic{width:36px;height:36px;flex:none;display:grid;place-items:center;background:var(--nx-fill);color:#fff;border-radius:10px;box-shadow:0 6px 16px rgba(109,93,240,.4)}
#page-home .hsv-ic svg{width:19px;height:19px}
#page-home .hsv-txt{min-width:0;flex:1}
#page-home .hsv-txt b{display:block;font-size:14.5px;font-weight:800;color:#F2F4FA;line-height:1.25}
#page-home .hsv-txt small{display:block;font-size:12.5px;color:#A7AEC4;line-height:1.35;margin-top:1px}
#page-home .hsv-status,#page-home .hsv-kind{flex:none;font-size:11px;font-weight:800;letter-spacing:.06em;color:#6EE7B7;background:rgba(16,185,129,.14);border:1px solid rgba(110,231,183,.3);border-radius:999px;padding:4px 9px;white-space:nowrap}
#page-home .hsv-kind{color:#C4B5FD;background:rgba(139,124,255,.14);border-color:rgba(139,124,255,.35)}
#page-home .hsv-foot{margin-top:14px;padding-top:12px;border-top:1px solid rgba(255,255,255,.1);font-size:13px;color:#A7AEC4;text-align:center}
#page-home .hsv-foot strong{color:#F2F4FA}
#page-home .hsv-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
#page-home .hsv-tile{display:flex;flex-direction:column;align-items:flex-start;gap:8px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.09);border-radius:14px;padding:12px 11px;min-width:0}
#page-home .hsv-tic{width:32px;height:32px;display:grid;place-items:center;background:var(--nx-fill);color:#fff;border-radius:9px;box-shadow:0 6px 14px rgba(109,93,240,.35)}
#page-home .hsv-tic svg{width:17px;height:17px}
#page-home .hsv-tile b{font-size:12.5px;font-weight:800;color:#F2F4FA;line-height:1.25}
/* Floating chips: desktop they overlap the panel corners (top-LEFT
   and bottom-RIGHT — the hs-chip owns the top-right); the wrapper
   is display:contents so the chips position against .hs-visual. */
#page-home .hsv-chips{display:contents}
#page-home .hsv-chip{position:absolute;z-index:3;display:inline-flex;align-items:center;gap:7px;background:rgba(10,14,28,.92);border:1px solid rgba(139,124,255,.45);border-radius:999px;padding:9px 13px;font-size:12.5px;font-weight:800;color:#F2F4FA;box-shadow:0 14px 34px rgba(0,0,0,.45);white-space:nowrap;animation:hsvFloat 5.5s ease-in-out infinite}
#page-home .hsv-chip-a{top:25px;left:20px}
#page-home .hsv-chip-b{bottom:-15px;right:20px;animation-delay:1.4s}
#page-home .hsv-dot{width:7px;height:7px;flex:none;border-radius:50%;background:#22D3EE}
@keyframes hsvFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
/* ---------- v34.5: STACKED (below 1080px) ----------
   The visual stacks under the card; the chips become a plain
   wrapping row (no absolute positioning, no float — nothing can
   overlap or clip). At phone widths the second chip hides and the
   tools grid drops to 2 columns so the full tool names fit. */
@media(max-width:1079px){
  #page-home .hs-visual{margin-top:24px}
  #page-home .hsv-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
  #page-home .hsv-chip{position:static;animation:none}
}
@media(max-width:700px){
  #page-home .hsv-panel{padding:16px 16px 14px}
  #page-home .hsv-chip-b{display:none}
  #page-home .hsv-grid{grid-template-columns:repeat(2,1fr)}
}
