/* Hallmark · shape: Split Studio · genre: editorial · theme: brand · redesign: full
 * paper: oklch(17% 0.015 50) · accent: oklch(47% 0.17 24) · display: Fraunces · body: Inter · hero: Counter · nav: edge-aligned wordmark · footer: colophon · signature: Sint's portrait holds the left half on every step, the order happens beside him
 * axes: dark/roman-serif/warm · posture: Counter · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S4 R5 V4 · weakest: P, a form page argues little; let the portrait and Sint's own book page carry the voice instead of more copy */
/* Hallmark · finish-review: subagent · 8 findings · 8 resolved · gap: none */
/* Hallmark · waive 44c · Counter posture, the order panel starts right under the head and the portrait fills 100dvh beside it · the Sint portrait is the first screen's visual and the order form under the head is its action */
/* Hallmark · waive 78 · no h2 section heads exist, panel titles are form groups at --text-title · the order flow has no landing sections, only Sint's form panels and his book page */
/* Hallmark · waive 77 · section.book holds Sint's whole text, intro to goodbye, over 600px tall · the book page is the one object parents read before paying, it should stay a single page */
/* Hallmark · dismissed 77 · a three-step order flow (form, Sint's text, the video), not a landing page; more sections would be padding around the order */
@import url("./tokens.css");
@import url("./base.css");

/* ── Shell: the portrait beside the work ── */
.shell { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100dvh; }
.portrait { position: relative; margin: 0; height: 34svh; min-height: 240px; overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.portrait::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(180deg, var(--color-shade-0), var(--color-paper)); }

.pane { display: flex; flex-direction: column; min-width: 0; padding: 0 var(--space-md) calc(var(--space-4xl) + var(--space-md)); }
.pane-inner { width: 100%; max-width: 34rem; margin-inline: auto; }

.mast { position: absolute; top: 0; left: 0; right: 0; z-index: var(--z-raised); display: flex; align-items: center; gap: var(--space-md); min-height: 56px; padding-inline: var(--space-md); background: linear-gradient(180deg, var(--color-shade), var(--color-shade-0)); }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); color: var(--color-seal); text-decoration: none; }
.mast-note { font-size: var(--text-sm); color: var(--color-muted); }

.intro { position: relative; margin: calc(-1 * var(--space-2xl)) 0 var(--space-lg); }
.intro h1 { font-size: var(--text-display-s); line-height: 1.04; color: var(--color-ink); max-width: 22ch; text-wrap: pretty; }
.intro p { margin-top: var(--space-sm); font-size: var(--text-lead); color: var(--color-ink-2); max-width: 46ch; }

.colophon { margin-top: auto; padding-top: var(--space-xl); }
.colophon p { padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); font-size: var(--text-sm); color: var(--color-muted); }

@media (min-width: 60rem) {
  .shell { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .portrait { position: sticky; top: 0; height: 100dvh; }
  .portrait::after { inset: 0 0 0 auto; width: 30%; height: auto; background: linear-gradient(90deg, var(--color-shade-0), var(--color-paper)); }
  .pane { padding: 0 var(--space-xl) calc(var(--space-4xl) + var(--space-lg)); }
  .mast { position: static; min-height: 64px; padding-inline: 0; background: none; }
  .intro { margin: var(--space-lg) 0 var(--space-lg); }
  .pane:has(#progress) > .pane-inner { margin-block: auto; }
  .pane:has(#progress) > .colophon { margin-top: 0; }
  /* A shorter video with its two actions side by side, so Download stays in the 1280x800 fold */
  .panel.film video { max-height: min(44dvh, 380px); }
  .panel.film .actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Focus rings per band: gold on the dark study, velvet red on parchment */
:focus-visible { outline-color: var(--color-seal); }
.panel :focus-visible, .book :focus-visible { outline-color: var(--color-focus); }

/* ── Panels: parchment on the dark study, one level only ── */
.panel { background: var(--color-field); color: var(--color-field-ink); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: var(--space-lg); margin-bottom: var(--space-md); }
.panel h2 { font-size: var(--text-title); color: var(--color-field-ink); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-md); }

.field { margin-top: var(--space-md); }
.field label, .label { display: block; font-weight: 600; font-size: var(--text-md); margin-bottom: var(--space-xs); }
.opt { font-weight: 400; color: var(--color-field-muted); font-size: var(--text-sm); }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-sm); align-items: end; }

input[type=text], input[type=email], textarea {
  width: 100%; min-height: 48px; padding: var(--space-sm) var(--space-md); color: var(--color-field-ink); background: var(--color-field);
  border: 1px solid var(--color-field-muted); border-radius: var(--radius-control);
  transition: border-color var(--dur-micro) var(--ease-out);
}
textarea { min-height: 80px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--color-field-muted); }
input:hover, textarea:hover { border-color: var(--color-field-ink); }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; border-color: var(--color-focus); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--color-field-muted); border-radius: var(--radius-control); background: var(--color-field); }
.stepper button { width: 44px; height: 48px; border: 0; background: none; color: var(--color-accent); font-size: var(--text-lg); cursor: pointer; border-radius: var(--radius-control); }
.stepper button:hover { background: var(--color-field-2); }
.stepper button:active { background: var(--color-field-rule); }
.stepper input { width: 40px; min-height: 44px; padding: 0; text-align: center; border: 0; background: none; font-weight: 600; font-size: var(--text-lg); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-xs); }
.chip {
  min-height: 44px; padding: var(--space-xs) var(--space-md); border: 1.5px solid var(--color-field-rule); border-radius: var(--radius-pill);
  background: none; color: var(--color-field-ink); font-size: var(--text-sm); cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.chip:hover { border-color: var(--color-field-muted); background: var(--color-field-2); }
.chip:active { background: var(--color-field-rule); }
.chip[aria-pressed="true"] { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }

details.more { margin-top: var(--space-md); }
details.more summary { cursor: pointer; color: var(--color-accent); font-weight: 600; font-size: var(--text-sm); list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+ "; }
details.more[open] summary::before { content: "− "; }
details.more summary:hover { text-decoration: underline; }

label.check { display: flex; gap: var(--space-sm); align-items: flex-start; margin-top: var(--space-md); font-weight: 400; cursor: pointer; }
label.check input { width: 20px; height: 20px; margin: var(--space-3xs) 0 0; accent-color: var(--color-accent); flex: none; }
label.check span { font-size: var(--text-sm); color: var(--color-field-muted); }

.text-btn { border: 0; background: none; padding: var(--space-xs); font-size: var(--text-sm); font-weight: 600; color: var(--color-field-muted); cursor: pointer; border-radius: var(--radius-control); }
.text-btn:hover { color: var(--color-accent); text-decoration: underline; }

/* ── Buttons: one primary style ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); width: 100%; min-height: 52px;
  padding: var(--space-sm) var(--space-lg); border: 0; border-radius: var(--radius-control); cursor: pointer; text-decoration: none;
  font-size: var(--text-md); font-weight: 600; white-space: nowrap;
  transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--color-accent); color: var(--color-accent-ink); }
.btn-primary:hover { background: var(--color-focus); }
.btn-quiet { background: none; color: var(--color-field-ink); border: 1.5px solid var(--color-field-muted); }
.btn-quiet:hover { background: var(--color-field-2); }
.btn-line { background: none; color: var(--color-seal); border: 1.5px dashed var(--color-rule); margin-bottom: var(--space-md); }
.btn-line:hover { border-color: var(--color-seal); }
.btn[aria-busy="true"], .btn:disabled { background: var(--color-paper-3); color: var(--color-ink-2); cursor: progress; }
.spin { width: 16px; height: 16px; border: 2px solid var(--color-rule); border-top-color: var(--color-ink); border-radius: var(--radius-pill); animation: spin 0.8s linear infinite; }

/* ── The bar with the price and the action ── */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky); padding: var(--space-sm) var(--space-md) calc(var(--space-sm) + env(safe-area-inset-bottom)); background: var(--color-paper-2); border-top: var(--rule-hair) solid var(--color-rule); }
.bar-inner { display: flex; gap: var(--space-md); align-items: center; max-width: 34rem; margin-inline: auto; }
.total { flex: none; line-height: 1.15; font-size: var(--text-sm); color: var(--color-muted); }
.total b { display: block; font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-seal); font-variant-numeric: tabular-nums; }
.bar .btn { flex: 1; }
@media (min-width: 60rem) { .bar { left: 54.5%; } }
@media (max-width: 22rem) { .bar-inner { gap: var(--space-sm); } .bar .btn { padding-inline: var(--space-sm); } }

.alert { padding: var(--space-md); border-radius: var(--radius-control); background: var(--color-field); color: var(--color-error); margin-bottom: var(--space-md); border: var(--rule-hair) solid var(--color-error); }
.alert ul { margin: 0; padding-left: var(--space-md); }

/* ── Sint's book page ── */
.book { background: var(--color-field); color: var(--color-field-ink); border-radius: var(--space-2xs) var(--radius-card) var(--radius-card) var(--space-2xs); box-shadow: var(--shadow-card); padding: var(--space-lg); border: var(--rule-hair) solid var(--color-field-rule); }
.part + .part { margin-top: var(--space-md); padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-field-rule); }
.part-label { font-size: var(--text-sm); font-weight: 600; color: var(--color-field-muted); margin-bottom: var(--space-2xs); }
.part-label.kid { color: var(--color-accent); }
.speech { white-space: pre-line; font-family: var(--font-display); font-weight: 400; font-size: var(--text-lg); line-height: 1.55; }
.speech.fixed { color: var(--color-field-muted); font-style: italic; }
.after-book { text-align: center; margin-top: var(--space-xs); }
.after-book button { border: 0; background: none; padding: var(--space-sm); color: var(--color-seal); font-size: var(--text-sm); font-weight: 600; cursor: pointer; border-radius: var(--radius-control); }
.after-book button:hover { text-decoration: underline; }

/* ── Progress and the finished video ── */
.steps { list-style: none; padding: 0; margin: var(--space-md) 0 0; }
.steps li { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs) 0; color: var(--color-field-muted); }
.steps li .dot { width: 24px; height: 24px; border-radius: var(--radius-pill); border: 2px solid var(--color-field-rule); flex: none; display: grid; place-items: center; }
.steps li.done { color: var(--color-field-ink); }
.steps li.done .dot { background: var(--color-accent); border-color: var(--color-accent); }
.steps li.done .dot::after { content: ""; width: 8px; height: 4px; border: solid var(--color-accent-ink); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.steps li.now { color: var(--color-field-ink); font-weight: 600; }
.steps li.now .dot { border-top-color: var(--color-accent); animation: spin 0.9s linear infinite; }

.film video { width: auto; max-width: 100%; max-height: min(56dvh, 520px); margin-inline: auto; border-radius: var(--radius-control); background: var(--color-paper); }
.actions { display: grid; gap: var(--space-sm); margin-top: var(--space-md); }
.note { font-size: var(--text-sm); color: var(--color-muted); text-align: center; }

/* Coming-soon page: the three steps of ordering */
.how { margin: var(--space-sm) 0 0; padding-left: var(--space-md); }
.how li { padding-left: var(--space-2xs); line-height: 1.5; }
.how li + li { margin-top: var(--space-xs); }
.how li::marker { color: var(--color-accent); font-weight: 600; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: var(--z-toast); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-control); background: var(--color-field); color: var(--color-field-ink); font-size: var(--text-sm); font-weight: 600; box-shadow: var(--shadow-card); opacity: 0; transition: opacity var(--dur-short) var(--ease-out); pointer-events: none; }
.toast.show { opacity: 1; }

@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin, .steps li.now .dot { animation: none; } }
