/**
 * Contact: the build studio.
 * The form on the left, a live 3D build of what they asked for on the right
 * (above the form on phones, and it stays in view). Without JavaScript every
 * stage is a section of an ordinary form and the stage is hidden.
 */
.briefing { position: relative; isolation: isolate; overflow: clip; min-height: 100svh; display: flex; flex-direction: column; padding-top: var(--nav-h);
  background: radial-gradient(70% 70% at 78% 40%, rgba(47, 69, 255, 0.28), rgba(10, 12, 26, 0) 70%), #0A0C1A; color: var(--bone); }
.briefing__wrap { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; padding-top: clamp(14px, 2vw, 28px); }

.briefing__slate { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: clamp(12px, 1.6vw, 22px); }
.briefing__kicker { color: var(--bone); opacity: 0.9; margin-bottom: 6px; }
.briefing__title { font-size: clamp(1.05rem, 1.5vw, 1.5rem); font-stretch: 75%; line-height: 1.02; letter-spacing: 0.03em; max-width: 34ch; }
.briefing__meta { display: flex; gap: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.briefing__meta [data-meta-pct] { color: var(--accent); }

.briefing__grid { flex: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 3.4vw, 56px); align-items: stretch; min-height: 0; }
.briefing__left { position: relative; display: flex; flex-direction: column; justify-content: center; min-width: 0; padding-block: clamp(8px, 1.4vw, 20px); }

/* ── the stage ── */
.briefing__stage { position: relative; min-height: clamp(420px, 64svh, 760px); border: 1px solid rgba(237, 234, 226, 0.28); background: #0A0C1A; overflow: hidden; }
.stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.9s ease; touch-action: pan-y; cursor: grab; }
.briefing.has-gl .stage__canvas { opacity: 1; }
.stage__poster { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 24px; text-align: center; color: var(--cobalt-light);
  background: linear-gradient(rgba(112, 131, 255, 0.08) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(90deg, rgba(112, 131, 255, 0.08) 1px, transparent 1px) 0 0 / 32px 32px; transition: opacity 0.6s ease; }
.stage__poster svg { width: min(240px, 60%); height: auto; animation: poster-float 6s ease-in-out infinite; }
.stage__poster p { color: var(--bone); max-width: 30ch; }
.briefing.has-gl.has-model .stage__poster { opacity: 0; pointer-events: none; }
@keyframes poster-float { 50% { transform: translateY(-8px); } }
.stage__hud { position: absolute; top: 12px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 12px; pointer-events: none; z-index: 2; }
.stage__hud span:first-child { color: var(--bone); font-weight: 700; }
.stage__hud span:last-child { color: var(--accent); }
.stage__log { position: absolute; left: 14px; bottom: 34px; z-index: 2; display: flex; flex-direction: column; gap: 4px; pointer-events: none; list-style: none; margin: 0; padding: 0; max-width: 70%; }
.stage__log li { font-size: 0.72rem; color: rgba(237, 234, 226, 0.92); background: rgba(10, 12, 26, 0.72); padding: 4px 8px; width: max-content; max-width: 100%; }
.stage__log li::before { content: "› "; color: var(--accent); }
.stage__log li.is-done::after { content: "  ✓"; color: var(--accent); }
.stage__drag { position: absolute; right: 14px; bottom: 34px; z-index: 2; font-size: 0.7rem; color: rgba(237, 234, 226, 0.7); pointer-events: none; }
.briefing:not(.has-gl) .stage__drag { display: none; }
.stage__meter { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(237, 234, 226, 0.12); z-index: 2; }
.stage__meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cobalt), var(--cobalt-light)); transition: width 0.25s linear; }

/* ── stages of the form ── */
.briefing__form { position: relative; }
.briefing__form[hidden], .wrapscene[hidden] { display: none !important; }
.form__msg--err { margin-bottom: 16px; padding: 14px 18px; border: 1px solid var(--bone); background: rgba(10, 12, 26, 0.7); }
.scene { display: none; }
.scene.is-current, .scene.is-leaving { display: block; }
.scene.is-leaving { position: absolute; top: 0; left: 0; right: 0; }
.scene__kicker { color: var(--bone); margin-bottom: 12px; }
.scene__title { font-size: clamp(2.3rem, 4.6vw, 5.2rem); line-height: 0.88; text-wrap: balance; outline: none; }
.scene__hint { margin-top: 14px; max-width: 40ch; color: var(--bone); font-size: clamp(1rem, 1.08vw, 1.15rem); line-height: 1.4; }
.scene__body { margin-top: clamp(18px, 2.4vw, 32px); }
.scene__err { margin-top: 14px; padding: 10px 14px; background: var(--bone); color: var(--ink); }
.scene__err[hidden] { display: none; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 4px; align-items: baseline; padding: 13px 14px; overflow: hidden; cursor: pointer;
  border: 1px solid rgba(237, 234, 226, 0.45); background: rgba(10, 12, 26, 0.5); color: var(--bone); transition: color 0.3s, border-color 0.3s; }
.tile::before { content: ""; position: absolute; inset: 0; background: var(--bone); transform: translateX(-101%); transition: transform 0.45s var(--ease); z-index: 0; }
.tile > * { position: relative; z-index: 1; }
.tile input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; margin: 0; }
.tile:hover, .tile.is-on { color: var(--ink); border-color: var(--bone); }
.tile:hover::before, .tile.is-on::before { transform: none; }
.tile:focus-within { outline: 3px solid var(--bone); outline-offset: 3px; }
.tile__n { grid-row: 1 / span 2; font-size: 0.72rem; }
.tile__t { font-family: var(--font-display); font-weight: 800; font-stretch: 75%; font-size: clamp(1.05rem, 1.35vw, 1.4rem); line-height: 1; text-transform: uppercase; }
.tile__note { font-size: 0.68rem; grid-column: 2; }
.tile.is-on .tile__n::after { content: " ✓"; color: var(--cobalt); font-weight: 700; }

.field--big textarea { width: 100%; min-height: clamp(150px, 24vh, 260px); padding: 16px 18px; resize: vertical; border: 1px solid rgba(237, 234, 226, 0.55); background: rgba(10, 12, 26, 0.5); color: var(--bone); font-size: clamp(1.05rem, 1.4vw, 1.4rem); line-height: 1.35; }
.field--big textarea::placeholder { color: rgba(237, 234, 226, 0.78); }
.field--big textarea:focus { outline: none; border-color: var(--bone); box-shadow: 0 0 0 3px rgba(237, 234, 226, 0.35); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; list-style: none; padding: 0; }
.chip { appearance: none; padding: 9px 12px; border: 1px solid rgba(237, 234, 226, 0.55); background: rgba(10, 12, 26, 0.5); color: var(--bone); cursor: pointer; font-size: 0.72rem; transition: background-color 0.25s, color 0.25s; }
.chip:hover, .chip:focus-visible { background: var(--bone); color: var(--ink); }

.cast { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2vw, 28px) clamp(18px, 2.4vw, 34px); }
.field--brand { grid-column: 1 / -1; }
.field--brand input { font-family: var(--font-display); font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: clamp(1.4rem, 2.4vw, 2.4rem) !important; }
.briefing .field > span { color: var(--bone); }
.briefing .field input { border-bottom: 2px solid rgba(237, 234, 226, 0.65); font-size: clamp(1.05rem, 1.35vw, 1.35rem); padding-block: 10px; }
.briefing .field input:focus { border-bottom-color: var(--bone); }

.sheet { display: grid; border-top: 1px solid rgba(237, 234, 226, 0.5); margin: 0; }
.sheet__row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid rgba(237, 234, 226, 0.3); }
.sheet dt { font-size: 0.7rem; color: var(--bone); opacity: 0.85; }
.sheet dd { margin: 0; font-weight: 700; font-size: clamp(0.98rem, 1.15vw, 1.15rem); overflow-wrap: anywhere; }
.sheet dd.is-empty { font-weight: 400; opacity: 0.7; }
.sheet__edit { appearance: none; background: none; border: 0; padding: 4px 2px; color: var(--bone); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 0.7rem; }
.form__foot { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.briefing .btn { --btn-bg: var(--bone); --btn-fg: var(--ink); }
.briefing__action { height: 64px; padding-inline: 32px; font-size: 0.95rem; }
.briefing .form__foot p { color: var(--bone); max-width: 40ch; }
.briefing.is-sending .briefing__action { opacity: 0.6; pointer-events: none; }

/* ── the bottom bar: back, the five stages, continue ── */
.briefing__bar { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(12px, 2vw, 28px); padding-block: 14px; margin-top: clamp(14px, 2vw, 24px); }
.briefing__bar::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); background: rgba(5, 6, 15, 0.92); border-top: 1px solid rgba(237, 234, 226, 0.3); }
.bar__back, .bar__skip { appearance: none; background: none; border: 0; color: var(--bone); cursor: pointer; text-transform: uppercase; padding: 10px 4px; }
.bar__back:hover, .bar__skip:hover { text-decoration: underline; text-underline-offset: 4px; }
.bar__go { display: flex; align-items: center; gap: 14px; }
.bar__back[hidden], .bar__skip[hidden], [data-next][hidden] { display: none; }
.steps { display: flex; justify-content: center; gap: 6px; list-style: none; padding: 0; margin: 0; }
.step { appearance: none; position: relative; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; justify-content: center; min-width: clamp(56px, 8.5vw, 140px); height: 52px; padding: 4px 12px 8px; cursor: pointer; overflow: hidden;
  border: 1px solid rgba(237, 234, 226, 0.4); background: transparent; color: var(--bone); transition: background-color 0.3s, color 0.3s; }
.step__n { font-size: 0.66rem; }
.step__l { font-family: var(--font-display); font-weight: 800; font-stretch: 75%; font-size: 0.9rem; text-transform: uppercase; line-height: 1; }
.step__fill { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--cobalt-light); transition: width 0.4s var(--ease); }
.step.is-done .step__fill { width: 100%; }
.step.is-done .step__n::after { content: " ✓"; }
.step:hover:not(:disabled) { background: rgba(237, 234, 226, 0.14); }
.step[aria-current="step"] { background: var(--bone); color: var(--ink); }
.step:disabled { opacity: 0.45; cursor: not-allowed; }

.briefing__aside { display: flex; flex-wrap: wrap; gap: 4px 10px; padding-block: 10px 16px; font-size: 0.7rem; background: rgba(5, 6, 15, 0.92); margin-inline: calc(50% - 50vw); padding-inline: calc(50vw - 50%); }
.briefing__aside a { text-decoration: underline; text-underline-offset: 3px; margin-right: 8px; }
.briefing__plain { appearance: none; background: none; border: 0; padding: 0; color: var(--bone); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }

/* ── success ── */
.wrapscene__title { font-size: clamp(2.8rem, 6vw, 6.4rem); line-height: 0.88; outline: none; }
.wrapscene .lede { margin-top: 18px; color: var(--bone); }
.wrapscene__note { margin-top: 14px; color: var(--accent); max-width: 48ch; }
.wrapscene__row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.briefing.is-wrapped .briefing__bar, .briefing.is-wrapped .briefing__plain { display: none; }
.briefing.is-wrapped .briefing__form { display: none; }

/* ── before JavaScript, or in plain mode: an ordinary form, the stage hidden ── */
html:not(.js) .briefing .briefing__bar, html:not(.js) .briefing .briefing__stage, html:not(.js) .briefing [data-sheet], html:not(.js) .briefing .briefing__plain, html:not(.js) .briefing .briefing__meta,
.briefing.is-plain .briefing__bar, .briefing.is-plain .briefing__stage, .briefing.is-plain [data-sheet], .briefing.is-plain .briefing__meta { display: none; }
html:not(.js) .briefing .briefing__grid, .briefing.is-plain .briefing__grid { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
html:not(.js) .briefing .scene, .briefing.is-plain .scene { display: block; position: static; margin-bottom: clamp(36px, 5vw, 64px); }
html:not(.js) .briefing .scene__title, .briefing.is-plain .scene__title { font-size: clamp(1.8rem, 3.4vw, 3rem); }
html:not(.js) .briefing .scene[data-key="callsheet"] .scene__hint, .briefing.is-plain .scene[data-key="callsheet"] .scene__hint { display: none; }

.nextup .contact { align-items: start; }

@media (max-width: 1000px) {
  .briefing__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .briefing__stage { order: -1; position: sticky; top: var(--nav-offset); z-index: 4; min-height: 0; height: clamp(250px, 38svh, 380px); margin-inline: calc(var(--gutter) * -1); border-inline: 0; }
  .briefing__left { justify-content: flex-start; }
  .briefing__bar { position: sticky; bottom: 0; z-index: 6; }
  .step__l { display: none; }
  .step { min-width: 0; flex: 1; height: 44px; align-items: center; padding: 4px 2px 8px; }
  .steps { gap: 4px; }
  .briefing__aside { gap: 0 14px; }
  .briefing__aside a, .briefing__plain { display: inline-flex; align-items: center; min-height: 44px; margin-right: 0; }
  .stage__log { bottom: 14px; max-width: 64%; }
  .stage__log li:not(:last-child) { display: none; }
  .stage__drag { display: none; }
}
@media (max-width: 640px) {
  .briefing__kicker, .briefing__meta [data-meta-stage] { display: none; }
  .briefing__title { font-size: 0.95rem; max-width: 24ch; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 6px; }
  .tile { padding: 10px 10px; column-gap: 8px; }
  .tile__t { font-size: 0.98rem; }
  .cast { grid-template-columns: 1fr; }
  .sheet__row { grid-template-columns: 1fr auto; }
  .sheet dt { grid-column: 1 / -1; }
  .bar__skip { display: none; }
  .step.is-done .step__n::after { content: ""; }
  .bar__go .btn { height: 46px; padding: 0 14px; font-size: 0.75rem; }
  .bar__go .btn svg { display: none; }
  .bar__back { padding-inline: 0; font-size: 0.7rem; }
  .briefing__action { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .tile::before { transition: none; } .stage__poster svg { animation: none; } }
