/* ============================================================
   Yishii — /CES2027 page additions.
   Loads after styles.css (full system: tokens, fonts, components).
   Page-only classes are prefixed ces- / g- so nothing collides.
   No new colours, no new fonts. Plain scrolling document — no
   scene system, no scroll-hijacking (see docs/ces2027-spec.md §1.3).
   ============================================================ */

/* ---------- MODE FLAG (teaser -> launch is one attribute edit) ---------- */
body[data-mode="teaser"] .launch-only,
body:not([data-mode="launch"]) .launch-only { display: none; }
body[data-mode="launch"] .teaser-only { display: none; }

/* ---------- ANCHORS ---------- */
#why, #how, #usecases, #family, #trust, #media, #follow, #book { scroll-margin-top: 76px; }

/* ---------- HERO ---------- */
/* Short by design: a QR scan lands here on a phone and must see the CTA
   without scrolling (spec §7). Homepage .hero is reused for bg/type colour. */
.ces-hero { padding: 36px 24px 56px; }
.ces-hero-inner { max-width: 1080px; margin: 0 auto; display: grid; gap: 26px; justify-items: center; text-align: center; }
.ces-hero .ces-copy { display: grid; gap: 0; justify-items: center; }
.ces-hero .caption { color: var(--mint); display: block; margin-bottom: 16px; }
.ces-hero h1 { font-size: clamp(29px, 7.6vw, 62px); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; color: var(--white); text-wrap: balance; }
.ces-hero h1 .accent { color: var(--lilac-500); }
.ces-hero .lede { font-size: clamp(16px, 2.4vw, 19px); color: var(--on-dark-mut); max-width: 560px; margin: 18px auto 0; }
.ces-hero-ctas { display: grid; gap: 14px; justify-items: center; margin-top: 26px; }
/* Quiet text links in the CTA stack: 44px tall keeps them tappable on a phone. */
.ces-quiet { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: 14px; color: var(--on-dark-mut); }
.ces-quiet:hover, .ces-quiet:focus { color: var(--mint); }

/* Motif: paper plane nose-up, gold spark, two gantry bars (assets/img/gantry.svg).
   Inlined here so prefers-reduced-motion is honoured by the page stylesheet. */
.g-ship, .g-bars, .g-spark { transform-box: view-box; }
.g-spark { transform-origin: 166px 50px; }
.ces-motif { width: clamp(128px, 34vw, 280px); height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .g-ship  { animation: g-ship .9s var(--ease-em) both; }
  .g-bars  { animation: g-bars .78s var(--ease-em) .12s both; }
  .g-spark { animation: g-spark 3.2s var(--ease) .9s infinite; }
}
@keyframes g-ship { from { transform: translateY(32px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes g-bars { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes g-spark { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(1.25) rotate(12deg); opacity: .85; } }

/* Telemetry pill (static text, no countdown JS) */
.ces-tel { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-dark); border-radius: var(--radius-pill); padding: 9px 16px; }

/* ---------- TEASER VIDEO SLOT ---------- */
/* The 15s cut does not exist yet: this is the poster-only state. No <video>
   element is emitted until the file lands, so there is no 404 and no broken
   player. ces2027.js holds the injection point (CES_VIDEO). */
.ces-video { max-width: 880px; margin: 0 auto; }
.ces-video-slot {
  aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1px dashed rgba(255,255,255,.22);
  background: rgba(255,255,255,.04); display: grid; place-items: center; gap: 6px; padding: 24px; text-align: center;
}
.ces-video-slot .tag-mono { color: var(--on-dark-sub); }
.ces-video-cap { margin-top: 12px; font-size: 13px; color: var(--on-dark-mut); text-align: center; }

/* ---------- THE WHY ---------- */
.ces-head { max-width: 640px; margin-bottom: 34px; }
.ces-points { list-style: none; display: grid; gap: 22px; }
.ces-points li { display: grid; gap: 6px; }
.ces-points .num { font-family: var(--font-mono); font-size: 13px; color: var(--indigo-700); }
.ces-points h3 { font-size: 18px; font-weight: 600; color: var(--fg); }
.ces-points p { font-size: 15.5px; color: var(--fg-muted); }

/* Small print / accuracy statement (paired with any performance-flavoured copy).
   --fg-muted, not --fg-subtle: claims-critical, must pass 4.5:1. */
.ces-note { font-size: 12.5px; line-height: 1.6; color: var(--fg-muted); max-width: 640px; margin-top: 30px; }
.sec-dark .ces-note, .ces-dark .ces-note { color: var(--on-dark-mut); }

/* ---------- HOW THE LAUNCH WORKS ---------- */
.ces-cards { display: grid; gap: 14px; }
.ces-cards .ev-card { padding: 26px; }

/* ---------- FOUR USE CASES ---------- */
.ces-grid { display: grid; gap: 14px; }
.care-card .ces-k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-subtle); margin-top: 14px; }
.care-card .ces-v { font-size: 14px; color: var(--fg); line-height: 1.5; }
.care-card .ces-claims { font-family: var(--font-mono); font-size: 11px; color: var(--indigo-700); margin-top: 14px; }
.care-card .ces-link { font-size: 13px; font-weight: 600; color: var(--indigo-700); display: inline-block; margin-top: 10px; }
.care-card .ces-link:hover, .care-card .ces-link:focus { color: var(--indigo-900); text-decoration: underline; }

/* ---------- FAMILY SPOTLIGHT ---------- */
.ces-phones { display: grid; gap: 20px; max-width: 780px; margin: 34px auto 0; }
.ces-phones .phone { border-color: var(--line-dark); }
.ces-phones .phone-screen { min-height: 0; }
.ces-phones .a-action { margin-top: 4px; }
.ces-shared { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-mut); align-self: flex-start; }

/* ---------- TRUST ---------- */
/* .module is dark on the homepage; on the lav trust section it flips light. */
.ces-mod { background: var(--white); border: 1px solid var(--line-light); color: var(--fg); }
.ces-mod .m-code { color: var(--indigo-700); }
.ces-mod .m-desc { color: var(--fg-muted); }

/* ---------- MEDIA ---------- */
.ces-media-row { display: grid; gap: 18px; justify-items: start; }
.ces-media-contact a { font-weight: 600; color: var(--indigo-700); text-decoration: underline; text-underline-offset: 3px; }
.ces-media-contact a:hover, .ces-media-contact a:focus { color: var(--indigo-900); }

/* ---------- BOOK ---------- */
/* Modest top padding so #book lands with heading + first fields in view (spec §1.4). */
.ces-book { padding: 48px 0 76px; }
.ces-form { max-width: 640px; margin: 0 auto; text-align: left; }
.ces-field { display: grid; gap: 6px; }
.ces-field label { font-size: 13.5px; font-weight: 600; color: var(--on-dark); }
.ces-field label .req { color: var(--gold); font-weight: 500; }
.ces-field input, .ces-field select {
  padding: 14px 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06); color: var(--white); font-size: 16px; font-family: inherit;
  width: 100%; min-height: 52px;
}
.ces-field select option { color: var(--fg); }
.ces-field input:focus, .ces-field select:focus { outline: 2px solid var(--mint); outline-offset: 1px; }
.ces-field input[aria-invalid="true"], .ces-field select[aria-invalid="true"] { border-color: #ffb4b4; }
.ces-fieldset { border: 0; padding: 0; margin: 0; }
.ces-fieldset legend { font-size: 13.5px; font-weight: 600; color: var(--on-dark); padding: 0; margin-bottom: 10px; }

/* Pills: native radio/checkbox, visually hidden input, styled span.
   Keyboard + screen-reader semantics stay native; zero JS. */
.ces-picker, .ces-chip { position: relative; display: inline-flex; cursor: pointer; }
.ces-picker input, .ces-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ces-picker span, .ces-chip span {
  display: inline-flex; align-items: center; min-height: 48px; padding: 11px 18px;
  border-radius: var(--radius-pill); border: 1px solid var(--line-dark);
  background: rgba(255,255,255,.06); color: var(--white); font-size: 15px; font-weight: 500;
  transition: background .2s, border-color .2s, color .2s;
}
.ces-picker:hover span, .ces-chip:hover span { border-color: rgba(255,255,255,.4); }
.ces-picker input:checked + span, .ces-chip input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--indigo-900); font-weight: 600; }
.ces-picker input:focus-visible + span, .ces-chip input:focus-visible + span { outline: 2px solid var(--mint); outline-offset: 2px; }
.ces-row { display: flex; flex-wrap: wrap; gap: 10px; }
.ces-fine { font-size: 13px; color: var(--on-dark-mut); margin-top: 10px; }

/* Track: radios and the two slot fieldsets are siblings of one parent, so the
   show/hide is pure CSS (:checked ~) and works with JavaScript disabled. */
.ces-track-wrap { position: relative; display: grid; gap: 14px; }
.ces-track-wrap > .ces-in { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ces-track-wrap > .ces-in:checked + .ces-picker span { background: var(--gold); border-color: var(--gold); color: var(--indigo-900); font-weight: 600; }
.ces-track-wrap > .ces-in:focus-visible + .ces-picker span { outline: 2px solid var(--mint); outline-offset: 2px; }
.ces-slot { display: none; border: 0; padding: 0; margin: 0; }
.ces-slot .ces-row { margin-top: 10px; }
#track-booth:checked ~ .ces-slot-booth { display: block; }
#track-virtual:checked ~ .ces-slot-virtual { display: block; }

/* Honeypot: real-looking field, out of the way of humans and keyboards. */
.ces-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ces-submit { width: 100%; margin-top: 6px; }
.form-success h3 { font-size: 20px; margin-bottom: 8px; }
.ces-retry {
  margin-top: 10px; background: transparent; border: 1px solid var(--line-dark); color: var(--white);
  font-weight: 600; font-size: 14px; padding: 10px 20px; border-radius: var(--radius-pill); cursor: pointer; min-height: 44px;
}
.ces-retry:hover, .ces-retry:focus { border-color: var(--mint); color: var(--mint); }

/* ---------- FOOTER ADDITIONS ---------- */
.ces-back { color: rgba(255,255,255,.6); font-size: 14.5px; transition: color .2s; }
.ces-back:hover, .ces-back:focus { color: var(--mint); }

/* ---------- RESPONSIVE ---------- */
@media (min-width: 720px) {
  .ces-points { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .ces-cards { grid-template-columns: repeat(3, 1fr); }
  .ces-grid { grid-template-columns: 1fr 1fr; }
  .ces-phones { grid-template-columns: 1fr 1fr; gap: 24px; }
  .ces-media-row { grid-template-columns: auto auto; justify-content: start; align-items: center; }
  .ces-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .ces-fieldset .ces-row { gap: 12px; }
}
@media (min-width: 980px) {
  .ces-hero { padding: 84px 24px 88px; }
  .ces-hero-inner { grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; justify-items: start; text-align: left; }
  .ces-hero .ces-copy { justify-items: start; }
  .ces-hero .lede { margin-left: 0; }
  .ces-hero-ctas { justify-items: start; }
  .ces-motif { width: 280px; justify-self: end; }
}

/* Touch/kiosk: bigger pills, nothing hover-only */
@media (hover: none) {
  .ces-picker span, .ces-chip span { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .g-ship, .g-bars, .g-spark { animation: none !important; }
  .ces-picker span, .ces-chip span { transition: none; }
}
