/* ==========================================================================
   Agent4Everything touchscreen — grayscale wireframe
   Design baseline is a 1920 × 1080 stage. On other aspect ratios the stage
   grows (never shrinks) in logical pixels; the card row stays pinned to the
   bottom and the section panel absorbs the extra space. While a section is
   open the cards fold down to a strip (their bottom --card-strip pixels).
   ========================================================================== */

:root {
  /* Geometry (stage size is overridden at runtime by js/app.js) */
  --stage-w: 1920px;
  --stage-h: 1080px;
  --margin: 24px;
  --hdr-h: 90px;
  --panel-top: 90px;
  --card-strip: 80px;
  --card-gap: 16px;
  --region-gap: 16px;
  --panel-pad-y: 40px;
  --panel-pad-x: 48px;
  --col-narrative: 640px;
  --chapters-w: 274px;
  /* Industry text: two-line headline, one-sentence summary, four short points. */
  --col-industry: 540px;
  /* Right-hand columns start below the panel's close button. */
  --close-clear: 64px;
  --touch-min: 72px;

  /* SoftServe shape language: bevelled (cut) corners, see "Shapes" below.
     Without corner-shape support the same values fall back to small radii. */
  --cut-xs: 4px;
  --cut-sm: 8px;
  --cut-md: 12px;
  --cut-lg: 16px;
  --cut-xl: 24px;

  /* Colour tokens: smoked graphite with warm ivory text; contrast comes from tone, not from pure white. */
  --bg: #141416;
  --letterbox: #000000;
  --surface: #1e1f22;
  --surface-2: #25262a;
  --surface-3: #2e2f33;
  --line: #3a3b40;
  --line-soft: #2c2d31;
  --ink: #ecebe7;
  --ink-2: #aaa8a3;
  --ink-3: #75736f;
  --ph: #26272b;
  --ph-line: #393a3f;
  --accent: #e6e2da;
  --on-accent: #1c1c1e;
  --disabled-bg: #303135;
  --disabled-ink: #75736f;
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --fill: rgba(255, 255, 255, .05);
  --fill-2: rgba(255, 255, 255, .09);
  --glass: rgba(26, 27, 30, .8);
  --glass-line: rgba(255, 255, 255, .08);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 40px 110px rgba(0, 0, 0, .5);
  --veil: linear-gradient(180deg, rgba(6, 7, 9, .62) 0%, rgba(6, 7, 9, .45) 40%, rgba(6, 7, 9, .7) 100%);
  /* Brand accent (SoftServe orange) for the primary action, progress and selection.
     Industry sections swap --brand-rgb (see "Industry accents"). */
  --brand-rgb: 238 106 60;
  --on-brand: #ffffff;

  /* Type scale (sized for a 43-inch screen at 1–2 m) */
  --f-display: 76px;
  --f-h1: 64px;
  --f-h2: 30px;
  --f-lead: 22px;
  --f-hero-lead: 24px;
  /* Description under every section headline (Introduction, industries, Beverage, Proposal). */
  --f-panel-lead: 21px;
  --f-body: 19px;
  --f-small: 16px;
  --f-eyebrow: 14px;

  /* Motion */
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --t-press: 80ms;
  --t-fast: 140ms;
  --t-med: 280ms;
  --t-slow: 420ms;
}

/* Derived from --brand-rgb on #stage too, so a section can re-tint everything inside it. */
:root,
#stage {
  --brand: rgb(var(--brand-rgb));
  --brand-soft: rgb(var(--brand-rgb) / .16);
  --brand-line: rgb(var(--brand-rgb) / .55);
  --brand-hi: color-mix(in srgb, var(--brand) 35%, #fff);
  --brand-grad: linear-gradient(180deg, color-mix(in srgb, var(--brand) 88%, #fff) 0%, color-mix(in srgb, var(--brand) 92%, #000) 100%);
}
/* Industry accents: each business domain gets its own hue instead of orange. */
#stage[data-section="healthcare"] { --brand-rgb: 46 186 164; }
#stage[data-section="oilgas"] { --brand-rgb: 226 166 58; }
#stage[data-section="manufacturing"] { --brand-rgb: 84 146 232; }
#stage[data-section="finance"] { --brand-rgb: 142 118 240; }
#stage[data-section="retail"] { --brand-rgb: 232 84 136; }
#stage[data-section="samp"] { --brand-rgb: 132 204 92; }


/* --------------------------------------------------------------------------
   Base / kiosk hardening
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--letterbox);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

input {
  -webkit-user-select: text;
  user-select: text;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

h1, h2, h3, p { margin: 0; }

svg { display: block; }

:focus { outline: none; }
:focus-visible {
  outline: 4px solid var(--accent);
  outline-offset: 4px;
}

/* --------------------------------------------------------------------------
   Stage
   -------------------------------------------------------------------------- */

.viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.stage {
  /* Derived here (not on :root) so they follow the runtime stage size.
     Card images are landscape (about 4:3), capped so very wide screens keep room for the hero. */
  --card-count: 9;
  --card-w: calc((var(--stage-w) - var(--margin) * 2 - var(--card-gap) * (var(--card-count) - 1)) / var(--card-count));
  --card-media: min(calc((var(--card-w) - 16px) * .72), 180px);
  --card-h: calc(var(--card-media) + 8px + var(--card-strip));
  --card-top: calc(var(--stage-h) - var(--margin) - var(--card-h));
  --strip-top: calc(var(--stage-h) - var(--margin) - var(--card-strip));
  --hero-h: calc(var(--card-top) - var(--region-gap) - var(--panel-top));
  --panel-h: calc(var(--strip-top) - var(--region-gap) - var(--panel-top));

  position: absolute;
  left: 0;
  top: 0;
  width: var(--stage-w);
  height: var(--stage-h);
  background: var(--bg);
  overflow: hidden;
  transform-origin: 0 0;
  transform: translate(var(--tx, 0px), calc(var(--ty, 0px) + var(--kb-shift, 0px))) scale(var(--s, 1));
  transition: transform var(--t-med) var(--ease-out);
}
.stage.is-resizing { transition: none; }

/* Ambient backdrop: the current photo, pre-blurred and enlarged, behind every region.
   Darkened so the panel and cards read as the foreground. */
.ambient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0d1014;
}
.ambient__layer {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
  opacity: 0;
  transform: scale(1.35);
  transition: opacity 1.6s ease, transform 9s linear;
}
.ambient__layer.is-on { opacity: 1; transform: scale(1.5); }
.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    var(--veil),
    radial-gradient(90% 80% at 50% 45%, transparent 45%, rgba(0, 0, 0, .35) 100%);
}

/* Regions that sit straight on the backdrop (header, start screen) use light-on-dark tokens. */
.hdr,
.hero {
  --ink: #f5f2ed;
  --ink-2: rgba(245, 242, 237, .72);
  --ink-3: rgba(245, 242, 237, .48);
  --line: rgba(255, 255, 255, .16);
  --surface: rgba(20, 20, 24, .38);
  --surface-3: rgba(255, 255, 255, .12);
  --ph: rgba(255, 255, 255, .04);
  --ph-line: rgba(255, 255, 255, .1);
  --accent: #f2eee8;
  --on-accent: #1f1d1a;
  --fill: rgba(255, 255, 255, .06);
  --fill-2: rgba(255, 255, 255, .1);
  color: var(--ink);
}
.hero .dia__node,
.hero .formula {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.hero .dia__pulse { box-shadow: 0 0 0 4px rgba(14, 17, 22, .6); }

/* Hide the mouse cursor while the screen is operated by touch. */
[data-input="touch"] .stage,
[data-input="touch"] .stage * { cursor: none !important; }

/* --------------------------------------------------------------------------
   Shared primitives
   -------------------------------------------------------------------------- */

.eyebrow {
  font-size: var(--f-eyebrow);
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-label__sep {
  width: 1px;
  height: 16px;
  background: var(--ink-3);
}

.headline {
  font-size: var(--f-h1);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -.02em;
}
/* Emphasis: a short brand-orange stroke under the phrase instead of a plain underline. */
.headline em,
.hero__title span:last-child {
  font-style: normal;
  text-decoration: none;
  padding-bottom: .08em;
  background: linear-gradient(90deg, var(--brand), rgb(var(--brand-rgb) / 0)) 0 100% / 100% calc(.085em - 2px) no-repeat;
}

.lead {
  font-size: var(--f-lead);
  line-height: 1.42;
  color: var(--ink-2);
}

.rule {
  width: 64px;
  height: 2px;
  background: var(--ink-3);
}

/* Image placeholder: crossed box with a caption */
.ph {
  position: relative;
  background-color: var(--ph);
  background-image:
    linear-gradient(to top right, transparent calc(50% - 1px), var(--ph-line) calc(50% - 1px), var(--ph-line) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(to bottom right, transparent calc(50% - 1px), var(--ph-line) calc(50% - 1px), var(--ph-line) calc(50% + 1px), transparent calc(50% + 1px));
  border-radius: var(--cut-md);
  overflow: hidden;
}
.ph--plain { background-image: none; }
.ph__label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 80%;
  padding: 8px 14px;
  border-radius: var(--cut-xs);
  background: var(--surface);
  color: var(--ink-3);
  font-size: var(--f-small);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Icon placeholder: circle with a neutral glyph */
.ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: var(--cut-sm);
  background: var(--fill);
  color: var(--ink);
}
.ico svg,
.ico .mi { width: 30px; height: 30px; }
.ico--sm { width: 44px; height: 44px; }
.ico--sm svg,
.ico--sm .mi { width: 24px; height: 24px; }
.ico--lg { width: 96px; height: 96px; }
.ico--lg svg,
.ico--lg .mi { width: 52px; height: 52px; }

/* Lucide icon drawn as a mask so it takes the text colour (the file is set inline). */
.mi {
  display: block;
  flex: none;
  background-color: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

/* "People + Data + Agents + Workflows = Business Outcomes" */
.formula {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: flex-start;
  gap: 4px 10px;
  padding: 12px 22px;
  border: 1px solid var(--line);
  border-radius: var(--cut-sm);
  background: var(--fill);
  font-size: var(--f-eyebrow);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
}
.formula__op { color: var(--ink-3); font-weight: 600; letter-spacing: 0; }

svg.i {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: var(--touch-min);
  min-width: 220px;
  padding: 0 36px;
  border-radius: var(--cut-sm);
  font-size: 20px;
  font-weight: 600;
  transition: transform var(--t-press) ease-out, background-color var(--t-fast), color var(--t-fast), opacity var(--t-fast);
}
.btn svg { width: 24px; height: 24px; }
.btn--primary {
  background: var(--brand-grad);
  color: var(--on-brand);
  letter-spacing: .01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 28px rgb(var(--brand-rgb) / .3);
}
.btn--ghost {
  border: 1px solid var(--line);
  background: var(--fill);
}
.btn:active:not(:disabled),
.btn.is-pressed:not(:disabled) { transform: scale(.96); }
.btn:disabled {
  background: var(--fill-2);
  color: var(--ink-3);
  border-color: transparent;
  box-shadow: none;
  cursor: default;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: var(--touch-min);
  height: var(--touch-min);
  border-radius: var(--cut-sm);
  transition: background-color var(--t-fast), transform var(--t-press) ease-out, opacity var(--t-med);
}
.icon-btn svg { width: 32px; height: 32px; }
.icon-btn:active,
.icon-btn.is-pressed { transform: scale(.92); background: var(--fill-2); }
/* Framed icon buttons (close, lightbox arrows): quiet fill and a hairline. */
.panel__close,
.lightbox__close,
.lightbox__nav,
.vp__close {
  border: 1px solid var(--line-soft);
  background: var(--fill);
  color: var(--ink);
}
.qa__chip.is-pressed { transform: scale(.96); }

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* Staggered reveal for panel content */
.rv {
  animation: rv-in var(--t-slow) var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes rv-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Shapes: every container, control and frame has cut corners (the radius sets the
   cut length). Dots, rings, the spinner and slider thumbs stay round.
   `--bevel: 1` goes with every `corner-shape: bevel`: js/bevel-fallback.js uses it to
   draw the same cuts where corner-shape is unsupported (Safari, Firefox). */
@property --bevel { syntax: "<number>"; inherits: false; initial-value: 0; }
.ph, .ph__label, .ico, .formula, .btn, .icon-btn, .hdr__brand,
.dia__node, .dia__core, .dia__core-ring, .panel,
.shot, .shot__expand, .vp__chapter, .vp__main, .vp__big, .vp__status,
.tpl-beverage__note, .tpl-beverage__error, .flow__step,
.field__input, .preset, .form__banner,
.card::before, .card__media, .card__arrow, .card__badge,
.idle__box, .lightbox__box, .osk__key, .toast,
.qa, .qa__chip, .qa__log { corner-shape: bevel; --bevel: 1; }
.bevel-fallback [data-bev-b]::before { clip-path: var(--bev-b-clip); border-image: var(--bev-b-bi); }
.bevel-fallback [data-bev-a]::after { clip-path: var(--bev-a-clip); border-image: var(--bev-a-bi); }
/* The rings' band of the clip would show these buttons' drop shadows as a dark frame. */
.bevel-fallback .vp__big { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.bevel-fallback .tpl-beverage__launch { box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(120, 96, 64, .18); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.hdr {
  position: absolute;
  left: var(--margin);
  right: var(--margin);
  top: 0;
  height: var(--hdr-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 8px;
}
.hdr__brand {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--touch-min);
  padding: 0 16px 0 0;
  border-radius: var(--cut-md);
  transition: opacity var(--t-fast), transform var(--t-press) ease-out;
}
.hdr__brand.is-pressed { opacity: .55; transform: scale(.98); }
.logo {
  display: block;
  height: 38px;
  width: auto;
  /* White on the dark backdrop (the file is the black wordmark). */
  filter: invert(1);
}
/* The wordmark's lowercase letters sit in the lower ~70% of its box (ascenders
   fill the top), so the label is centred on the x-height, not the box. */
.hdr__product {
  position: relative;
  top: 3px;
  line-height: 1;
}
.hdr__end {
  display: flex;
  align-items: center;
  gap: 24px;
}
/* Sits on the hit area of a 72px target but draws a quieter 52px glass frame. */
.hdr__fs {
  position: relative;
  isolation: isolate;
  margin-right: -10px;
  color: var(--ink-2);
}
.hdr__fs:active,
.hdr__fs.is-pressed { background: transparent; }
.hdr__fs:active::before,
.hdr__fs.is-pressed::before { background: var(--fill-2); }
.hdr__fs::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  border: 1px solid var(--line-soft);
  border-radius: var(--cut-sm);
  corner-shape: bevel;
  --bevel: 1;
  background: var(--fill);
}
.hdr__fs svg { width: 24px; height: 24px; }
.hdr__fs[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Hero (default state)
   -------------------------------------------------------------------------- */

.hero {
  position: absolute;
  left: var(--margin);
  top: var(--panel-top);
  width: calc(var(--stage-w) - var(--margin) * 2);
  height: var(--hero-h);
  display: grid;
  grid-template-columns: 700px 1fr;
  gap: 56px;
  padding: 24px 8px 24px 8px;
  transition: opacity var(--t-med) ease, transform var(--t-slow) var(--ease-out);
}
[data-mode="open"] .hero {
  opacity: 0;
  transform: scale(.985);
  pointer-events: none;
}
.hero__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}
.hero__title {
  font-size: var(--f-display);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -.025em;
}
.hero__title span { display: block; }
.hero__title span:last-child { justify-self: start; width: fit-content; }
.hero__text .lead { font-size: var(--f-hero-lead); }
.hero__text .lead + .lead { margin-top: -10px; }
.hero__support { font-size: var(--f-body); }
.hero__text .formula { margin-top: 8px; }
/* Background image with the animated diagram layered on top. */
.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 32px;
}
/* A quiet glass stage for the diagram: faint grid, warm glow behind the core. */
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(38% 46% at 50% 50%, rgb(var(--brand-rgb) / .16), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px) 0 0 / 48px 48px;
  /* The grid is strongest behind the core and dissolves well before the edges. */
  -webkit-mask-image: radial-gradient(closest-side at 50% 50%, #000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%);
  mask-image: radial-gradient(closest-side at 50% 50%, #000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%);
}

/* --------------------------------------------------------------------------
   Orchestration diagram (hero + introduction)
   -------------------------------------------------------------------------- */

.dia {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 72px;
}
.dia__label { padding-left: 4px; color: var(--ink-3); }
/* One dot per connector, travelling in the direction of the flow (see drawLines). */
.dia__pulses {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.dia__pulse {
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgb(var(--brand-rgb) / .2), 0 0 14px rgb(var(--brand-rgb) / .8);
  offset-rotate: 0deg;
  opacity: 0;
  animation: pulse-move 2.4s var(--ease-out) infinite;
}
@keyframes pulse-move {
  0% { offset-distance: 0%; opacity: 0; }
  12% { opacity: 1; }
  85% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}
/* Own layer: the dash animation repaints only the lines, not the nodes below. */
.dia__lines {
  will-change: transform;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.dia__lines path {
  fill: none;
  stroke: rgb(var(--brand-rgb) / .55);
  stroke-width: 1.5;
  stroke-dasharray: 6 8;
  animation: flow 1.6s linear infinite;
}
@keyframes flow { to { stroke-dashoffset: -28; } }
.dia__col {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.dia__col > .dia__label { margin-bottom: -16px; }
.dia__node {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--cut-md);
}
/* Node icons: glass tile tinted with the node's own hue and a gradient glyph. */
.dia__node .ico {
  width: 52px;
  height: 52px;
  border-color: rgb(var(--hue) / .32);
  background:
    radial-gradient(120% 120% at 0% 0%, rgb(var(--hue) / .38), transparent 62%),
    linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 18px rgb(var(--hue) / .18);
}
.dia__node .ico svg,
.dia__node .ico .mi { width: 28px; height: 28px; }
.dia__node .ico .mi { background: linear-gradient(160deg, color-mix(in srgb, rgb(var(--hue)) 35%, #fff), rgb(var(--hue))); }
.dia__node .ico svg { color: rgb(var(--hue)); }
.dia__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.dia__desc {
  margin-top: 4px;
  font-size: 15px;
  color: var(--ink-2);
}
.dia__core-wrap {
  position: relative;
  z-index: 1;
}
.dia__core {
  width: 260px;
  height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--cut-xl);
  background:
    radial-gradient(70% 60% at 50% 35%, rgb(var(--brand-rgb) / .28), transparent 70%),
    rgba(18, 19, 23, .62);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 24px 60px rgba(0, 0, 0, .35);
}
.dia__spark {
  width: 64px;
  height: 74px;
  color: var(--ink);
  filter: drop-shadow(0 0 18px rgb(var(--brand-rgb) / .6));
}
.dia__core-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
}
.dia__core-label small {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--ink-2);
  white-space: nowrap;
}
.dia__core-ring {
  position: absolute;
  inset: -18px;
  border: 1px solid rgb(var(--brand-rgb) / .45);
  border-radius: 32px;
  animation: breathe 3.2s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: .35; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

/* --------------------------------------------------------------------------
   Section panel
   -------------------------------------------------------------------------- */

.panel {
  position: absolute;
  left: var(--margin);
  top: var(--panel-top);
  width: calc(var(--stage-w) - var(--margin) * 2);
  height: var(--panel-h);
  background: var(--glass);
  -webkit-backdrop-filter: blur(30px) saturate(1.15);
  backdrop-filter: blur(30px) saturate(1.15);
  border: 1px solid var(--glass-line);
  border-radius: var(--cut-lg);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity var(--t-med) ease, transform var(--t-slow) var(--ease-out);
}
[data-mode="open"] .panel {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.panel__content {
  position: absolute;
  inset: 0;
  padding: var(--panel-pad-y) var(--panel-pad-x);
  transition: opacity var(--t-fast) ease;
}
.panel__content.is-leaving { opacity: 0; pointer-events: none; }
.panel__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
}
.panel__close svg { width: 28px; height: 28px; }
.panel[data-section="beverage"] { border-color: rgba(255, 255, 255, .1); }
/* Over the full-bleed Beverage photo the close button sits on dark glass. */
.panel[data-section="beverage"] .panel__close {
  border-color: rgba(255, 255, 255, .2);
  background: rgba(14, 12, 10, .45);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #f5f2ed;
}
.panel.is-loading .panel__content:not(.is-leaving) { opacity: .45; }

.narrative {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Introduction */
.tpl-intro {
  height: 100%;
  display: grid;
  grid-template-columns: var(--col-narrative) 1fr;
  gap: 56px;
}
.tpl-intro .narrative { gap: 64px; }
.tpl-intro .headline { margin-top: 18px; }
.tpl-intro__value {
  margin-top: 14px;
  font-size: var(--f-h2);
  line-height: 1.2;
  font-weight: 600;
}
.tpl-intro .lead { margin-top: 16px; font-size: var(--f-panel-lead); line-height: 1.38; }
.intro-groups {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.intro-group__label { margin-bottom: 10px; color: var(--ink-3); }
.intro-group__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.intro-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}
/* Four Accelerator screens (2 × 2) with the formula underneath; each opens the lightbox. */
.tpl-intro__visual {
  min-height: 0;
  margin-top: var(--close-clear);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.shots {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}
.shots > li { min-height: 0; display: flex; }
.shot {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--cut-md);
  background: var(--fill);
  text-align: left;
  transition: transform var(--t-press) ease-out, background-color var(--t-fast), border-color var(--t-fast);
}
.shot.is-pressed { transform: scale(.98); background: var(--surface-3); }
.shot__media { flex: 1; min-height: 0; border-radius: var(--cut-sm); }
.media {
  background: #111214 center top / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
/* Process diagrams: show the whole graphic instead of cropping the sides. */
.media--contain {
  background-size: contain;
  background-position: center;
  background-color: #111823;
}
.shot .media { transition: transform var(--t-slow) var(--ease-out); }
.shot__media .ph__label { font-size: 12px; }
.shot__meta {
  display: grid;
  grid-template-columns: auto 1fr 48px;
  align-items: center;
  gap: 12px;
  padding: 10px 6px 2px 8px;
}
.shot__num { font-size: 14px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.shot__title { font-size: 18px; font-weight: 600; }
.shot__expand {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--cut-sm);
  background: var(--fill);
}
.shot__expand svg { width: 20px; height: 20px; }
.tpl-intro__visual .formula { align-self: center; }

/* Industry */
.tpl-industry {
  height: 100%;
  display: grid;
  grid-template-columns: var(--col-industry) 1fr;
  column-gap: 32px;
  position: relative;
  isolation: isolate;
}
/* The industry's own scene, pre-blurred (assets/ambient), drifting slowly behind the
   panel. Only transform and opacity animate, so it stays on the compositor. */
.tpl-industry__bg {
  position: absolute;
  inset: calc(var(--panel-pad-y) * -1) calc(var(--panel-pad-x) * -1);
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* The image is set inline (so its URL resolves against the page) and drawn by ::before. */
  background-size: 0 0;
  background-repeat: no-repeat;
}
.tpl-industry__bg::before {
  content: "";
  position: absolute;
  inset: -12%;
  background: inherit;
  background-size: cover;
  background-position: center;
  filter: saturate(1.2) brightness(1.15);
  animation: ind-drift 28s ease-in-out infinite alternate, ind-in 1.2s ease both;
  will-change: transform;
}
/* Readable text side, a soft floor, and a slow light sweep across the scene. */
.tpl-industry__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55% 75% at 0% 0%, rgb(var(--brand-rgb) / .16), transparent 70%),
    radial-gradient(60% 80% at 100% 100%, rgb(var(--brand-rgb) / .14), transparent 70%),
    linear-gradient(rgb(var(--brand-rgb) / .05), rgb(var(--brand-rgb) / .05)),
    linear-gradient(90deg, rgba(14, 15, 18, .86) 0%, rgba(14, 15, 18, .6) 28%, rgba(14, 15, 18, .12) 58%, rgba(14, 15, 18, .3) 100%),
    linear-gradient(0deg, rgba(14, 15, 18, .55) 0%, rgba(14, 15, 18, 0) 32%);
}
@keyframes ind-drift {
  0% { transform: scale(1) translate3d(0, 0, 0); }
  50% { transform: scale(1.08) translate3d(-2.5%, 1.5%, 0); }
  100% { transform: scale(1.04) translate3d(2%, -1.5%, 0); }
}
@keyframes ind-in { from { opacity: 0; } }
.tpl-industry .narrative { min-width: 0; }
.tpl-industry .headline { margin-top: 16px; font-size: 54px; }
.tpl-industry .lead { margin-top: 16px; font-size: var(--f-panel-lead); }
.usecases,
.values {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.usecase {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}
/* Use-case tiles: glass with a warm glow in the corner and a brand-tinted glyph. */
.usecase .ico,
.intro-item .ico {
  position: relative;
  width: 64px;
  height: 64px;
  border-color: rgba(255, 255, 255, .1);
  background:
    radial-gradient(120% 120% at 0% 0%, rgb(var(--brand-rgb) / .22), transparent 55%),
    linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 8px 20px rgba(0, 0, 0, .25);
}
.usecase .ico svg,
.usecase .ico .mi { width: 30px; height: 30px; }
.usecase .ico .mi,
.intro-item .ico .mi { background: linear-gradient(160deg, var(--brand-hi) 0%, var(--brand) 100%); }
.usecase .ico svg,
.intro-item .ico svg { color: var(--brand-hi); }
.intro-item .ico { flex: none; width: 48px; height: 48px; }
.intro-item .ico svg,
.intro-item .ico .mi { width: 24px; height: 24px; }
/* Thin rail joining the tiles, so the list reads as one set. */
.usecase + .usecase .ico::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 1px;
  height: 32px;
  background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, .14));
}
.usecase__title,
.usecase__desc,
.flow__name,
.flow__desc { display: block; }
.usecase__title {
  font-size: 21px;
  font-weight: 600;
}
.usecase__desc {
  margin-top: 6px;
  font-size: var(--f-small);
  color: var(--ink-2);
}

/* Video player (mock): chapter list on the left, screen and controls on the right.
   Both live in .vp so the chapters stay available in full screen. */
.vp {
  position: relative;
  height: calc(100% - var(--close-clear));
  margin-top: var(--close-clear);
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  color: var(--ink);
}
/* Chapters are a presenter tool for full screen only. */
.vp__chapters {
  display: none;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.vp__chapter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vp__chapter {
  width: 100%;
  min-height: 80px;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  text-align: left;
  border: 1px solid var(--line-soft);
  border-radius: var(--cut-md);
  background: var(--fill);
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-press) ease-out;
}
.vp__chapter-time {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.vp__chapter-title { font-size: 18px; font-weight: 600; line-height: 1.25; }
.vp__chapter.is-pressed { transform: scale(.97); background: var(--fill-2); }
.vp__chapter[aria-current="true"] {
  background: var(--brand-soft);
  border-color: var(--brand-line);
}
.vp__chapter[aria-current="true"] .vp__chapter-time { color: var(--brand); }
/* The picture area is always 16:9, as large as the column allows, so the video
   and its poster fill the frame edge to edge. Inline the frame is only a poster
   with the play button; the control bar exists in full screen, below the picture. */
.vp { container-type: size; --vp-bar: 0px; }
.vp:not(:fullscreen):not(.is-fs-fallback) .vp__bar { display: none; }
/* Inline, the poster frame fills the column (kept between 4:3 and 2:1). The photo's
   subject sits on the right, so the crop takes the dark left side first, and the
   title is page text (.vp__cover) so it never gets cropped. */
.vp:not(:fullscreen):not(.is-fs-fallback) .vp__main {
  width: min(100cqw, 100cqh * 2);
  height: min(100cqh, 100cqw * 3 / 4);
}
.vp:not(:fullscreen):not(.is-fs-fallback) .vp__video { object-position: 100% 50%; }
.vp__main { container-type: size; }
.vp__cover {
  position: absolute;
  inset: 0 0 var(--vp-bar);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: max(28px, 7cqh) max(28px, 5cqw);
  isolation: isolate;
  color: #fff;
  pointer-events: none;
  transition: opacity var(--t-med);
}
.vp__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(8, 20, 36, .55), rgba(8, 20, 36, 0) 55%);
}
.vp:not([data-state="idle"]):not([data-state="ended"]) .vp__cover { opacity: 0; }
.vp__cover-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .88);
}
.vp__cover-brand .mi { width: 26px; height: 30px; }
.vp__cover-title {
  display: flex;
  flex-direction: column;
  font-size: clamp(32px, 4.6cqw, 56px);
  line-height: 1.1;
  letter-spacing: -.01em;
}
.vp__cover-title strong { font-weight: 700; }
.vp__cover-title > span:last-child { font-weight: 300; }
.vp__cover-label {
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .24em;
  line-height: 1;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
}
.vp__cover-label::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-bottom: 18px;
  border-radius: 2px;
  background: var(--brand);
}
.vp__main {
  --vp-w: min(100cqw, (100cqh - var(--vp-bar)) * 16 / 9);
  justify-self: center;
  align-self: start;
  width: var(--vp-w);
  height: calc(var(--vp-w) * 9 / 16 + var(--vp-bar));
  position: relative;
  min-width: 0;
  min-height: 0;
  --ink: #f3f0ea;
  --ink-2: rgba(243, 240, 234, .7);
  --ink-3: rgba(243, 240, 234, .45);
  --line: rgba(255, 255, 255, .14);
  --line-soft: rgba(255, 255, 255, .1);
  --fill: rgba(255, 255, 255, .06);
  --fill-2: rgba(255, 255, 255, .12);
  --surface: rgba(18, 19, 22, .86);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--cut-md);
  overflow: hidden;
  background: #0c0d0f;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
/* Ends above the control bar so no part of the picture is hidden behind it. */
.vp__video {
  position: absolute;
  inset: 0 0 var(--vp-bar);
  width: 100%;
  height: calc(100% - var(--vp-bar));
  object-fit: cover;
  background: #000;
}
.vp__big {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 128px;
  height: 128px;
  margin: -64px 0 0 -64px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: var(--cut-xl);
  background: rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 18px 50px rgba(0, 0, 0, .35);
  transition: transform var(--t-press) ease-out, opacity var(--t-med), background-color var(--t-fast);
}
.vp__big svg { width: 52px; height: 52px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .3)); }
/* Slow ring so the play button reads as the first touch. */
.vp__big::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: calc(var(--cut-xl) + 6px);
  corner-shape: bevel;
  --bevel: 1;
  pointer-events: none;
  animation: bev-pulse 2.8s var(--ease-out) infinite;
}
.vp__big:active,
.vp__big.is-pressed { transform: scale(.92); }
.vp__status {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 28px 36px;
  border: 1px solid var(--line);
  border-radius: var(--cut-md);
  background: var(--surface);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  font-size: var(--f-lead);
  font-weight: 600;
  text-align: center;
}
.vp__status p { font-size: var(--f-small); font-weight: 400; color: var(--ink-2); }
.vp__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--vp-bar);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: linear-gradient(180deg, #16171a, #111214);
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.vp__bar .icon-btn svg { width: 28px; height: 28px; }
.vp__time {
  min-width: 132px;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.vp__track {
  position: relative;
  flex: 1;
  min-width: 0;
  margin: 0 12px;
}
/* Chapter dots, offset by half the thumb so they line up with seek positions. */
.vp__mark {
  position: absolute;
  top: 50%;
  left: calc(14px + (100% - 28px) * var(--m));
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .7);
  box-shadow: 0 0 0 3px #121316;
  pointer-events: none;
}
.vp__seek {
  display: block;
  width: 100%;
  height: var(--touch-min);
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  touch-action: none;
}
.vp__seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--brand) var(--p, 0%), rgba(255, 255, 255, .16) var(--p, 0%));
}
.vp__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 5px rgb(var(--brand-rgb) / .28), 0 4px 10px rgba(0, 0, 0, .4);
}
.vp__seek::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .16); }
.vp__seek::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--brand); }
.vp__seek::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; }

.vp[data-state="playing"] .vp__big,
.vp[data-state="loading"] .vp__big,
.vp[data-state="error"] .vp__big { opacity: 0; pointer-events: none; }
.vp[data-state="loading"] .vp__status--loading,
.vp[data-state="error"] .vp__status--error { display: flex; }
.vp[data-state="error"] .vp__bar,
.vp[data-state="error"] .vp__chapters { opacity: .4; pointer-events: none; }
.vp__close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  display: none;
}
/* Sits on the moving picture, so it gets its own dark glass to stay legible on any frame. */
.vp .vp__close {
  border-color: rgba(255, 255, 255, .28);
  background: rgba(10, 11, 13, .6);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.vp .vp__close.is-pressed { background: rgba(10, 11, 13, .8); }
.vp__close svg { width: 30px; height: 30px; }
.vp:fullscreen .vp__close,
.vp.is-fs-fallback .vp__close { display: grid; }
.vp:fullscreen,
.vp.is-fs-fallback {
  --vp-bar: 80px;
  height: 100%;
  margin: 0;
  padding: 24px;
  grid-template-columns: var(--chapters-w) 1fr;
  --ink: #f3f0ea;
  --ink-2: rgba(243, 240, 234, .7);
  --ink-3: rgba(243, 240, 234, .45);
  --line: rgba(255, 255, 255, .14);
  --line-soft: rgba(255, 255, 255, .08);
  --fill: rgba(255, 255, 255, .05);
  --fill-2: rgba(255, 255, 255, .1);
  color: var(--ink);
  background: radial-gradient(80% 70% at 60% 40%, #1a1b1f, #0b0c0e);
}
.vp:fullscreen .vp__chapters,
.vp.is-fs-fallback .vp__chapters { display: flex; }
.vp:fullscreen .vp__main,
.vp.is-fs-fallback .vp__main { width: auto; height: auto; align-self: stretch; justify-self: stretch; }
.vp.is-fs-fallback {
  position: fixed;
  inset: 0;
  z-index: 50;
}
/* Containment, a backdrop filter or a transform would make the panel the containing
   block of the fixed player and trap it inside the panel. */
.has-fs-fallback .panel,
.has-fs-fallback .panel__content {
  contain: none;
  transform: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.has-fs-fallback .panel__close { display: none; }

/* Beverage suggestion: a full-bleed bar photograph behind the whole panel.
   The screen uses light-on-dark tokens because the photo is low-key. */
.tpl-beverage {
  --ink: #ffffff;
  --ink-2: rgba(255, 255, 255, .74);
  --ink-3: rgba(255, 255, 255, .5);
  --line: rgba(255, 255, 255, .2);
  --surface: rgba(16, 13, 11, .58);
  --surface-3: rgba(255, 255, 255, .16);
  --accent: #ffffff;
  --on-accent: #111111;
  position: relative;
  isolation: isolate;
  height: 100%;
  display: grid;
  grid-template-columns: 600px 1fr;
  gap: 48px;
  color: var(--ink);
}
.tpl-beverage__photo {
  position: absolute;
  inset: calc(var(--panel-pad-y) * -1) calc(var(--panel-pad-x) * -1);
  z-index: -1;
  background: #0b0908 center 58% / cover no-repeat;
  /* Slight zoom gives room to nudge the glass left without exposing the right edge
     (bev-in ends on this same transform). */
  transform: scale(1.08) translateX(-50px);
  animation: bev-in 1.6s var(--ease-out) both;
}
/* Shadow on the text side, a soft floor under the CTA, and a light vignette. */
.tpl-beverage__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 6, 5, .94) 0%, rgba(8, 6, 5, .82) 26%, rgba(8, 6, 5, .28) 46%, rgba(8, 6, 5, 0) 62%),
    linear-gradient(0deg, rgba(8, 6, 5, .7) 0%, rgba(8, 6, 5, 0) 30%),
    radial-gradient(120% 90% at 62% 55%, transparent 55%, rgba(0, 0, 0, .45) 100%);
}
@keyframes bev-in {
  from { opacity: 0; transform: scale(1.12) translateX(-50px); }
  to { opacity: 1; transform: scale(1.08) translateX(-50px); }
}
.tpl-beverage .headline { margin-top: 16px; }
.tpl-beverage .lead { margin-top: 16px; font-size: var(--f-panel-lead); }
.tpl-beverage .ico { border-color: rgba(255, 255, 255, .42); color: #fff; }
/* Flow steps sit on the right of the photo; the quote and Start share the open middle. */
.tpl-beverage__hero {
  position: relative;
  min-height: 0;
  margin-top: var(--close-clear);
}
.tpl-beverage__quote {
  position: absolute;
  left: 8px;
  top: 0;
  max-width: 340px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-style: italic;
  line-height: 1.18;
  color: rgba(255, 255, 255, .88);
  text-shadow: 0 2px 18px rgba(0, 0, 0, .5);
}
/* Concierge card: how it works, then Start — one frosted panel on the right of the photo. */
.concierge {
  position: absolute;
  top: 50%;
  right: 0;
  width: 420px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  padding: 24px 24px 24px;
  border: 1.5px solid rgba(255, 255, 255, .16);
  border-radius: var(--cut-lg);
  background: rgba(16, 12, 10, .5);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}
.concierge__label { color: rgba(255, 255, 255, .6); margin-bottom: 6px; }
.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
/* Steps read as a timeline: number, icon on a thin rail, then the text. */
.flow__step {
  position: relative;
  display: grid;
  grid-template-columns: 30px 44px 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}
.flow__step + .flow__step { border-top: 1px solid rgba(255, 255, 255, .1); }
.flow__step + .flow__step::before {
  content: "";
  position: absolute;
  left: calc(30px + 14px + 22px);
  top: -14px;
  width: 1.5px;
  height: 28px;
  background: linear-gradient(rgba(242, 107, 58, .0), rgba(242, 107, 58, .8), rgba(242, 107, 58, .0));
}
.flow__num {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .45);
}
.flow__step .ico { background: rgba(255, 255, 255, .06); }
.flow__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.flow__desc { margin-top: 4px; font-size: 15px; color: var(--ink-2); }
.tpl-beverage__cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 18px;
}
.tpl-beverage__launch {
  position: relative;
  width: 100%;
  min-height: 88px;
  justify-content: space-between;
  padding: 0 12px 0 32px;
  border: 1px solid rgba(255, 255, 255, .7);
  background:
    radial-gradient(120% 140% at 0% 0%, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, #faf7f2 0%, #e9e2d6 100%);
  color: #1b1916;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -.005em;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -2px 0 rgba(120, 96, 64, .18),
    0 2px 4px rgba(0, 0, 0, .25),
    0 18px 44px rgba(0, 0, 0, .45);
}
.tpl-beverage__launch-go {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: var(--cut-sm);
  corner-shape: bevel;
  --bevel: 1;
  background: linear-gradient(180deg, #2a2622, #15130f);
  color: #f5f2ed;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 4px 10px rgba(0, 0, 0, .25);
}
.tpl-beverage__launch-go svg { width: 26px; height: 26px; animation: launch-nudge 2.6s var(--ease-out) infinite; }
@keyframes launch-nudge {
  0%, 60%, 100% { transform: translateX(0); }
  75% { transform: translateX(4px); }
}
.tpl-beverage__launch:disabled {
  justify-content: center;
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .8);
}
/* Slow "tap me" pulse around Start. */
.tpl-beverage__launch::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: calc(var(--cut-sm) + 4px);
  corner-shape: bevel;
  --bevel: 1;
  pointer-events: none;
  animation: bev-pulse 2.6s var(--ease-out) infinite;
}
@keyframes bev-pulse {
  0% { opacity: .9; transform: scale(.98); }
  70%, 100% { opacity: 0; transform: scale(1.06); }
}
.tpl-beverage__launch:disabled::after { display: none; }
.tpl-beverage__note {
  align-self: center;
  padding: 4px 12px;
  border-radius: var(--cut-xs);
  font-size: 15px;
  color: var(--ink-2);
}
.tpl-beverage__error {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 10px 10px 10px 20px;
  border: 1px solid var(--brand-line);
  border-radius: var(--cut-md);
  background: var(--brand-soft);
  font-size: var(--f-small);
  font-weight: 600;
}
.tpl-beverage__error .btn { min-width: 0; padding: 0 24px; font-size: 18px; margin-left: auto; }
.tpl-beverage.has-error .tpl-beverage__error { display: flex; }
.tpl-beverage.has-error .tpl-beverage__launch { display: none; }
.tpl-beverage__error svg { width: 22px; height: 22px; }
.form__banner svg { flex: none; width: 22px; height: 22px; }

/* Request a proposal */
.tpl-proposal {
  height: 100%;
  display: grid;
  grid-template-columns: 520px 1fr;
  gap: 56px;
}
.tpl-proposal .headline { margin-top: 16px; }
.tpl-proposal .lead { margin-top: 16px; font-size: var(--f-panel-lead); }
/* The form starts at the top of its column, on the line just below the close button. */
.tpl-proposal .form {
  align-self: start;
  margin-top: var(--close-clear);
}

.form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: var(--f-eyebrow); }
.field__label b { color: var(--ink); }
.field__input {
  width: 100%;
  height: 64px;
  padding: 0 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--cut-sm);
  background: var(--fill);
  color: var(--ink);
  font: inherit;
  font-size: 20px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
}
.field__input::placeholder { color: var(--ink-3); }
.field__input:focus {
  border-color: var(--brand-line);
  background: var(--fill-2);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.field__input[readonly] { opacity: .6; }
.field__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 20px;
  font-size: 15px;
  color: var(--ink-3);
}
.field__error {
  display: none;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 600;
}
.field__error svg { width: 18px; height: 18px; }
.field.has-error .field__error { display: flex; }
.field.has-error .field__input {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.field__error { color: var(--brand); }
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.presets {
  min-width: 0;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
}
.presets legend {
  display: flex;
  align-items: baseline;
  width: 100%;
  margin-bottom: 10px;
  padding: 0;
}
.presets__hint {
  margin-left: auto;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
}
.presets__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.preset {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 0 20px 0 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--cut-sm);
  background: var(--fill);
  font-size: 18px;
  font-weight: 600;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-press) ease-out;
}
/* The icon slot never changes size: selecting swaps the icon for a check, so chips don't reflow. */
.preset__icon {
  flex: none;
  width: 26px;
  height: 26px;
  background-color: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}
.preset.is-pressed { transform: scale(.96); }
.preset[aria-pressed="true"] {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--ink);
}
.preset[aria-pressed="true"] .preset__icon { color: var(--brand); }
.preset[aria-pressed="true"] .preset__icon {
  -webkit-mask-image: url("../assets/icons/check.svg") !important;
  mask-image: url("../assets/icons/check.svg") !important;
}

.preset:disabled { opacity: .6; }
/* Three already chosen: the rest stay visible but read as inactive. */
.preset[aria-disabled="true"] {
  opacity: .38;
  cursor: default;
}
.presets__error { margin-top: 8px; font-size: 15px; }
.presets.has-error .presets__error { display: flex; }
.form__actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}
.form__hint {
  order: -1;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: var(--ink-3);
}
.form__hint::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
}
.form__submit {
  min-width: 300px;
  justify-content: space-between;
  padding: 0 14px 0 28px;
}
.form__submit svg {
  box-sizing: content-box;
  padding: 12px;
  border-radius: var(--cut-xs);
  corner-shape: bevel;
  --bevel: 1;
  background: rgba(0, 0, 0, .18);
}
.form__submit:disabled {
  border: 1px solid var(--line-soft);
  background: var(--fill);
}
.form__submit:disabled svg { background: var(--fill); }
.form__submit:not(:disabled) + .form__hint::before {
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.form__banner {
  display: none;
  align-items: center;
  gap: 16px;
  padding: 12px 12px 12px 20px;
  border: 1px solid var(--brand-line);
  border-radius: var(--cut-md);
  background: var(--brand-soft);
  font-size: var(--f-small);
  font-weight: 600;
}
.form__banner .btn { flex: none; min-width: 0; padding: 0 24px; font-size: 18px; margin-left: auto; }
.form[data-status="failure"] .form__banner { display: flex; }
.form[data-status="failure"] .form__actions { display: none; }
.form__success {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  text-align: center;
  border: 1px solid var(--glass-line);
  border-radius: var(--cut-lg);
  corner-shape: bevel;
  --bevel: 1;
  background:
    radial-gradient(60% 50% at 50% 30%, rgb(var(--brand-rgb) / .14), transparent 70%),
    linear-gradient(180deg, rgba(30, 31, 35, .96), rgba(20, 21, 24, .96));
}
.form__success .ico {
  margin-bottom: 8px;
  border: 0;
  background: var(--brand-grad);
  color: var(--on-brand);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 14px 36px rgb(var(--brand-rgb) / .35);
}
.form__success .btn { min-width: 240px; margin-top: 8px; }
.form__success h3 { font-size: 40px; line-height: 1.1; }
.form__success p { font-size: var(--f-body); line-height: 1.45; color: var(--ink-2); max-width: 480px; }
.form__success small { font-size: 15px; color: var(--ink-3); }
.form[data-status="success"] .form__success { display: flex; animation: rv-in var(--t-slow) var(--ease-out) both; }
.form[data-status="success"] > :not(.form__success) { visibility: hidden; }

/* Unavailable section */
.tpl-unavailable {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
}
.tpl-unavailable .headline { font-size: 44px; }
.tpl-unavailable .lead { max-width: 640px; }

/* --------------------------------------------------------------------------
   Card row
   -------------------------------------------------------------------------- */

.cards {
  position: absolute;
  left: var(--margin);
  top: var(--card-top);
  width: calc(var(--stage-w) - var(--margin) * 2);
  height: var(--card-h);
  display: grid;
  grid-template-columns: repeat(var(--card-count), 1fr);
  gap: var(--card-gap);
}
/* The card's visible box is drawn by ::before so it can fold down to the
   strip without relayout; clip-path also removes the folded part from hit-testing,
   so taps there reach the panel. */
.cards { pointer-events: none; }
.card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: var(--card-h);
  text-align: left;
  pointer-events: auto;
  clip-path: inset(0 0 0 0);
  transition: transform var(--t-press) ease-out, clip-path var(--t-slow) var(--ease-out), opacity var(--t-med);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.15);
  backdrop-filter: blur(24px) saturate(1.15);
  border: 1px solid var(--glass-line);
  border-radius: var(--cut-md);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
  transition: top var(--t-slow) var(--ease-out), background-color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
[data-mode="open"] .card { clip-path: inset(calc(var(--card-h) - var(--card-strip)) 0 0 0); }
[data-mode="open"] .card::before { top: calc(var(--card-h) - var(--card-strip)); }
.card__media {
  height: var(--card-media);
  margin: 8px 8px 0;
  border-radius: var(--cut-sm);
  transition: opacity var(--t-med) ease, transform var(--t-slow) var(--ease-out);
}
/* Photo cards: the image fills the whole card and the label sits on a dark fade,
   like the video posters. Folded into the strip, the card is plain glass again. */
.card__media--photo {
  position: absolute;
  inset: 0;
  z-index: -1;
  height: auto;
  margin: 0;
  border-radius: var(--cut-md);
  background: #0d1014 center / cover no-repeat;
  overflow: hidden;
}
.card__media--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 14, 0) 38%, rgba(8, 10, 14, .55) 68%, rgba(8, 10, 14, .9) 100%);
}
.card--photo .card__meta { flex: none; margin-top: auto; }
:not([data-mode="open"]) > .cards .card--photo {
  --ink: #f5f2ed;
  --ink-3: rgba(245, 242, 237, .6);
  --line: rgba(255, 255, 255, .28);
  --fill: rgba(255, 255, 255, .12);
  color: var(--ink);
}
:not([data-mode="open"]) > .cards .card--photo::before {
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .35);
}
:not([data-mode="open"]) > .cards .card--photo .card__arrow {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
[data-mode="open"] .card__media { opacity: 0; transform: translateY(16px) scale(.96); }
.card__media .ph__label { font-size: 11px; padding: 4px 8px; letter-spacing: .06em; }
.card__meta {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 52px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px 14px;
}
.card__num {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.card__title {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 600;
}
.card__arrow {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--cut-sm);
  background: var(--fill);
  transition: background-color var(--t-fast), color var(--t-fast), transform var(--t-med) var(--ease-out);
}
.card__arrow svg { width: 22px; height: 22px; }
.card__badge {
  position: absolute;
  left: 16px;
  top: 16px;
  display: none;
  padding: 5px 10px;
  border-radius: var(--cut-xs);
  background: rgba(14, 15, 18, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #f5f2ed;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.card.is-pressed { transform: scale(.965); }
.card.is-pressed::before { background: var(--surface-3); }
.card[aria-current="true"]::before,
.card.is-loading::before {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 18px 50px rgba(0, 0, 0, .22);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
/* Selected strip: a soft brand light pooled behind the arrow, fading to the left. */
[data-mode="open"] .card[aria-current="true"]::before {
  background:
    radial-gradient(70% 120% at 82% 60%, rgb(var(--brand-rgb) / .42), transparent 75%),
    radial-gradient(120% 100% at 30% 0%, color-mix(in srgb, var(--brand-hi) 10%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(48, 40, 38, .9), rgba(28, 26, 27, .9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent),
    inset 0 -12px 24px -12px rgb(var(--brand-rgb) / .35);
}
.card[aria-current="true"] .card__arrow,
.card.is-loading .card__arrow {
  background: var(--brand-grad);
  color: var(--on-brand);
  border-color: transparent;
  box-shadow: 0 6px 16px rgb(var(--brand-rgb) / .35);
  transform: rotate(-90deg);
}

.card.is-unavailable .card__media,
.card.is-unavailable .card__meta { opacity: .45; }
.card.is-unavailable .card__badge { display: inline-block; }

/* --------------------------------------------------------------------------
   Idle countdown: shown after 30 s without a touch; any touch dismisses it
   -------------------------------------------------------------------------- */

.idle {
  position: absolute;
  inset: 0;
  z-index: 42;
  display: grid;
  place-items: center;
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(6, 7, 9, .55), rgba(6, 7, 9, .85));
  -webkit-backdrop-filter: blur(14px) saturate(.8);
  backdrop-filter: blur(14px) saturate(.8);
  animation: fade-in var(--t-med) ease both;
}
.idle[hidden] { display: none; }
.idle__box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 680px;
  padding: 64px 56px 56px;
  border: 1px solid var(--glass-line);
  border-radius: var(--cut-xl);
  background:
    radial-gradient(70% 45% at 50% 0%, rgb(var(--brand-rgb) / .14), transparent 70%),
    linear-gradient(180deg, rgba(34, 35, 39, .92), rgba(20, 21, 24, .92));
  box-shadow: var(--glass-shadow);
  text-align: center;
  animation: idle-in var(--t-slow) var(--ease-out) both;
}
@keyframes idle-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.idle__ring {
  position: relative;
  width: 168px;
  height: 168px;
  margin-bottom: 36px;
}
.idle__ring svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}
.idle__ring circle {
  fill: none;
  stroke: rgba(255, 255, 255, .08);
  stroke-width: 4;
}
.idle__ring .idle__arc {
  stroke: var(--brand);
  stroke-linecap: round;
  stroke-dasharray: 339.3;
  filter: drop-shadow(0 0 6px rgb(var(--brand-rgb) / .55));
  animation: idle-arc var(--idle-ms, 15s) linear both;
}
@keyframes idle-arc { to { stroke-dashoffset: 339.3; } }
@keyframes fade-in { from { opacity: 0; } }
.idle__count {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 72px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.idle__title { font-size: 44px; line-height: 1.1; letter-spacing: -.01em; }
.idle__text { margin-top: 14px; max-width: 520px; font-size: var(--f-lead); line-height: 1.45; text-wrap: balance; color: var(--ink-2); }
.idle__stay { margin-top: 40px; min-width: 320px; }

/* --------------------------------------------------------------------------
   Screenshot lightbox (Introduction): tap outside the box or Close to dismiss
   -------------------------------------------------------------------------- */

.lightbox {
  position: absolute;
  inset: 0;
  z-index: 41;
  display: grid;
  place-items: center;
  padding: 40px 48px;
  background: rgba(6, 7, 9, .55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fade-in var(--t-med) ease both;
}
.lightbox[hidden] { display: none; }
.lightbox__box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px 28px 16px;
  border: 1px solid var(--glass-line);
  border-radius: var(--cut-xl);
  background: var(--surface);
  box-shadow: var(--glass-shadow);
  animation: rv-in var(--t-slow) var(--ease-out) both;
}
.lightbox__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 0 4px 0 12px;
}
.lightbox__title { margin-top: 8px; font-size: 36px; line-height: 1.1; }
.lightbox__caption { margin-top: 8px; font-size: var(--f-body); color: var(--ink-2); }
.lightbox__close { flex: none; }
.lightbox__stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--touch-min) 1fr var(--touch-min);
  align-items: center;
  gap: 20px;
}
.lightbox__media { height: 100%; border-radius: var(--cut-md); }
.lightbox__media.media { background-size: contain; background-position: center; background-color: transparent; box-shadow: none; }
.lightbox__media .ph__label { font-size: var(--f-lead); }

.lightbox__dots { display: flex; justify-content: center; }
.lightbox__dot {
  display: grid;
  place-items: center;
  width: var(--touch-min);
  height: 56px;
}
.lightbox__dot span {
  width: 14px;
  height: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
  transition: background-color var(--t-fast), width var(--t-med) var(--ease-out);
}
.lightbox__dot[aria-current="true"] span { width: 32px; border-radius: 5px; background: var(--brand); }

/* Screens that carry their own title: the image takes the whole box and Close
   stays top right, above the Next arrow's column so it never covers the image. */
.lightbox--bare { padding: 24px; }
.lightbox--bare .lightbox__box { position: relative; gap: 12px; padding: 16px; }
.lightbox--bare .lightbox__head > div {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.lightbox--bare .lightbox__head { display: contents; }
.lightbox--bare .lightbox__close { position: absolute; z-index: 1; right: 16px; top: 16px; }
.lightbox--bare .lightbox__stage { gap: 12px; }
/* The box carries the diagrams' own navy gradient and the image edges are
   feathered into it, so the slide and the box read as one surface. */
.lightbox--bare .lightbox__box {
  border-color: rgba(255, 255, 255, .06);
  background: linear-gradient(135deg, #141b25 0%, #121925 45%, #0d111a 100%);
}
.lightbox--bare .lightbox__stage { container-type: size; }
.lightbox--bare .lightbox__media {
  justify-self: center;
  width: min(100%, 100cqh * 16 / 9);
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0, #000 2%, #000 98%, transparent 100%),
    linear-gradient(180deg, transparent 0, #000 3%, #000 97%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0, #000 2%, #000 98%, transparent 100%),
    linear-gradient(180deg, transparent 0, #000 3%, #000 97%, transparent 100%);
  mask-composite: intersect;
}
.lightbox--bare .lightbox__nav { background: rgba(255, 255, 255, .04); }

/* --------------------------------------------------------------------------
   On-screen touch keyboard (Request a Proposal fields)
   Docked to the bottom of the stage over the card row; the fields it edits
   sit at the top of the form, so they stay visible above it.
   -------------------------------------------------------------------------- */

.osk {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  display: flex;
  justify-content: center;
  padding: 16px var(--margin) 20px;
  border-top: 1px solid var(--glass-line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(30px) saturate(1.15);
  backdrop-filter: blur(30px) saturate(1.15);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .25);
  animation: osk-in var(--t-med) var(--ease-out) both;
}
.osk[hidden] { display: none; }
@keyframes osk-in { from { transform: translateY(100%); } }
.osk__rows { display: flex; flex-direction: column; gap: 8px; }
.osk__row { display: flex; justify-content: center; gap: 8px; }
.osk__key {
  display: grid;
  place-items: center;
  width: 88px;
  height: var(--touch-min);
  border: 1px solid var(--line-soft);
  border-radius: var(--cut-sm);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
  font-size: 26px;
  font-weight: 600;
  transition: transform var(--t-press) ease-out, background-color var(--t-fast), color var(--t-fast);
}
.osk__key svg { width: 30px; height: 30px; }
.osk__key.is-pressed { transform: scale(.94); background: var(--fill-2); }
.osk.is-upper .osk__key--char { text-transform: uppercase; }
.osk__key--wide { width: 136px; font-size: 20px; }
.osk__key--space { width: 640px; font-size: 18px; color: var(--ink-2); }
.osk__key--action {
  background: var(--brand-grad);
  border-color: transparent;
  color: var(--on-brand);
}
.osk__shift[aria-pressed="true"] {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */

.toast {
  position: absolute;
  left: 50%;
  top: 22px;
  z-index: 40;
  max-width: 900px;
  padding: 14px 24px;
  border-radius: var(--cut-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 18px;
  font-weight: 600;
  opacity: 0;
  transform: translate(-50%, -12px);
  pointer-events: none;
  transition: opacity var(--t-med), transform var(--t-med) var(--ease-out);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   QA tools
   -------------------------------------------------------------------------- */

.qa-grid {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}
.qa-grid__box {
  position: absolute;
  border: 1.5px dashed #ff2d55;
}
.qa-grid__box span {
  position: absolute;
  left: 4px;
  top: 4px;
  padding: 2px 6px;
  background: #ff2d55;
  color: #fff;
  font: 600 12px/1.3 ui-monospace, Menlo, Consolas, monospace;
  white-space: nowrap;
}
.qa {
  position: absolute;
  right: 40px;
  top: 100px;
  z-index: 45;
  width: 440px;
  max-height: calc(var(--stage-h) - 140px);
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 20px;
  border: 1.5px solid var(--ink);
  border-radius: var(--cut-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 16px;
}
.qa h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 18px;
}
.qa__handle {
  margin: -20px -20px 10px !important;
  padding: 8px 12px 8px 20px;
  border-bottom: 1px solid var(--line-soft);
  cursor: grab;
  touch-action: none;
}
.qa__handle::after {
  content: "";
  order: 1;
  flex: 1;
  height: 10px;
  margin: 0 16px;
  background: radial-gradient(circle, var(--ink-3) 1.2px, transparent 1.6px) 0 0 / 8px 5px;
  opacity: .6;
}
.qa__handle .icon-btn { order: 2; }
.qa.is-dragging { box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.qa.is-dragging .qa__handle { cursor: grabbing; }
.qa h3 .icon-btn { width: 56px; height: 56px; }
.qa h3 .icon-btn svg { width: 24px; height: 24px; }
.qa__row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  border-top: 1px solid var(--line-soft);
  cursor: pointer;
}
.qa__row input { width: 24px; height: 24px; accent-color: var(--ink); }
.qa__sub { padding: 10px 0; border-top: 1px solid var(--line-soft); }
.qa__sub p { margin-bottom: 8px; color: var(--ink-2); }
.qa__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qa__meta { margin: 10px 0 0 !important; font: 12px/1.4 ui-monospace, Menlo, Consolas, monospace; color: var(--ink-3) !important; }
.qa__chip {
  min-height: 44px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--cut-xs);
  font-size: 14px;
}
.qa__chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.qa__actions { display: flex; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.qa__actions .btn { min-width: 0; min-height: 56px; padding: 0 20px; font-size: 16px; flex: 1; }
.qa__log {
  margin-top: 10px;
  max-height: 110px;
  overflow: auto;
  padding: 8px;
  border-radius: var(--cut-xs);
  background: var(--surface-2);
  font: 12px/1.4 ui-monospace, Menlo, Consolas, monospace;
  color: var(--ink-2);
  white-space: pre-wrap;
  -webkit-user-select: text;
  user-select: text;
  touch-action: pan-y;
}

/* --------------------------------------------------------------------------
   Performance
   -------------------------------------------------------------------------- */

/* Each region repaints on its own; animating one never invalidates another. */
.hero,
.panel,
.card,
.vp__main { contain: layout paint; }

/* Only the visible region keeps its looping animations running. */
[data-mode="open"] .hero *,
[data-mode="default"] .panel *,
.panel__content.is-leaving *,
.stage.is-paused * { animation-play-state: paused !important; }

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
}
[data-motion="reduced"] *, [data-motion="reduced"] *::before, [data-motion="reduced"] *::after {
  animation-duration: 1ms !important;
  animation-iteration-count: 1 !important;
  animation-delay: 0ms !important;
  transition-duration: 1ms !important;
}
