/* Hallmark · shape: app screen · genre: atmospheric · theme: Bloom (deal 1/3, seed personalized-song-gift-loved-c883·23c12a85·2026-11-20·r0)
 * nav: wordmark left, my songs and account right · signature: the song's two versions as clips on a roll, a rubber cap plays each · states: signed out, empty, in progress, ready, failed, shared
 * axes: light/grotesk-sans/warm · posture: committed · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P2 H2 E3 S3 R2 V2 · weakest: R, the home page leans on the roll alone, kept it honest with no fake audio and no invented proof */
:root {
  color-scheme: light;
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px; --space-4xl: 144px;
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.2rem; --text-xl: 1.44rem; --text-2xl: 1.728rem; --text-3xl: 2.074rem;
  --text-display-s: 1.44rem; --text-display: 1.728rem; --text-section: 1.2rem; --text-title: 1rem; --text-lead: 1rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-in: cubic-bezier(0.7, 0, 0.84, 0); --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 420ms;
  --color-error: oklch(52% 0.19 27); --color-success: oklch(50% 0.12 150);
  --container: 1440px; --gutter: 64px; --gap-columns: 32px; --section-gap-s: 120px; --section-gap: 144px; --section-gap-l: 176px;
  --z-base: 1; --z-raised: 10; --z-dropdown: 100; --z-sticky: 200; --z-sticky-nav: 300; --z-modal: 400; --z-toast: 500; --z-tooltip: 600;
  --color-paper: oklch(97% 0.010 72); --color-paper-2: oklch(94.6% 0.013 70); --color-paper-3: oklch(91.5% 0.016 66);
  --color-ink: oklch(21% 0.024 40); --color-ink-2: oklch(31% 0.022 46); --color-muted: oklch(49% 0.02 56);
  --color-rule: oklch(88% 0.014 64); --color-sheet: oklch(98.7% 0.007 78);
  --color-accent: oklch(53% 0.145 36); --color-accent-2: oklch(66% 0.10 55); --color-accent-soft: oklch(53% 0.145 36 / 0.11);
  --color-accent-ink: oklch(98.5% 0.008 72); --color-focus: oklch(53% 0.145 36);
  --lane-1: oklch(50% 0.04 55); --lane-2: oklch(48% 0.105 28); --lane-3: oklch(70% 0.115 72); --lane-4: oklch(65% 0.085 12);
  --grid-16: oklch(21% 0.024 40 / 0.035); --grid-beat: oklch(21% 0.024 40 / 0.075); --grid-bar: oklch(21% 0.024 40 / 0.15); --grid-row: oklch(21% 0.024 40 / 0.045);
  --rubber: oklch(55% 0.15 34); --rubber-hi: oklch(66% 0.125 42); --rubber-lo: oklch(43% 0.125 31);
  --umber: oklch(30% 0.03 45); --bezel: oklch(92.5% 0.014 68); --case: oklch(93.5% 0.012 70);
  --hi: oklch(99.6% 0.006 80 / 0.75); --shade-1: oklch(21% 0.024 40 / 0.08); --shade-2: oklch(21% 0.024 40 / 0.16); --shade-3: oklch(30% 0.06 40 / 0.28);
  --font-display: "Ranade", ui-sans-serif, system-ui, sans-serif; --font-body: var(--font-display);
  --font-outlier: "Gambarino", Georgia, serif; --font-code: "Geist Mono", ui-monospace, monospace;
  --radius-card: 18px; --radius-inner: 10px; --radius-clip: 6px; --radius-pill: 999px; --rule-hair: 1px;
  --shadow-card: 0 1px 2px oklch(21% 0.024 40 / 0.06), 0 18px 36px -18px oklch(21% 0.024 40 / 0.26);
  --shadow-lift: 0 2px 4px oklch(21% 0.024 40 / 0.07), 0 36px 72px -32px oklch(45% 0.1 40 / 0.34);
  --tracking-display: -0.024em; --display-weight: 600;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--color-muted) var(--color-paper); scroll-padding-top: var(--space-3xl); }
body { margin: 0; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.55; -webkit-font-smoothing: antialiased; caret-color: var(--color-accent); }
::selection { background: color-mix(in oklab, var(--color-accent) 22%, transparent); color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight, 700); font-synthesis: none; letter-spacing: var(--tracking-display); line-height: 1.05; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
h1 { max-width: 20ch; font-size: var(--text-display); } h2 { max-width: 30ch; font-size: var(--text-section); } h3 { max-width: 40ch; font-size: var(--text-title); line-height: 1.2; }
.lead { font-size: var(--text-lead); line-height: 1.45; max-width: 52ch; }
p { margin: 0; text-wrap: pretty; }
p:not([class]) { max-width: 65ch; }
img, video { max-width: 100%; height: auto; display: block; }
svg { display: block; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); box-sizing: border-box; }
.num, .figure, td.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-slot] { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--color-paper-2, var(--color-paper)), var(--color-paper-3, var(--color-paper))); }
[data-slot] > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
[data-slot]:has(> img) > :not(img):not([data-keep]) { display: none !important; }
@media (max-width: 60rem) { :root { --gutter: 24px; --section-gap-s: 80px; --section-gap: 96px; --section-gap-l: 120px; } }
@media (max-width: 40rem) { :root { --gutter: 16px; --section-gap-s: 56px; --section-gap: 72px; --section-gap-l: 96px; --gap-columns: 16px; } }
@media (prefers-reduced-motion: reduce) { *:not(.keep-motion), *:not(.keep-motion)::before, *:not(.keep-motion)::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }
/* photographs: warm exp=4 */
[data-slot] > img { filter: sepia(0.28) saturate(0.94) brightness(1.04); }


/* answered: one Gambarino moment per page (the share page title, the home headline); everything else is Ranade */

:root {
  --lane-a: var(--lane-2); --lane-b: var(--lane-3);
  --bezel-2: var(--color-paper-3); --cap-ink: var(--color-accent-ink);
  --measure: 720px; --nav-h: 64px;
}

/* Shell */
.nav { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: color-mix(in oklab, var(--color-paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: var(--rule-hair) solid var(--color-rule); }
.nav .container { display: flex; align-items: center; gap: var(--space-md); min-height: var(--nav-h); }
.wordmark { font-weight: 600; font-size: var(--text-lg); letter-spacing: var(--tracking-display); text-decoration: none; margin-right: auto; display: inline-flex; align-items: center; gap: var(--space-xs); }
.wordmark i { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(120% 110% at 50% 18%, var(--rubber-hi), var(--rubber) 48%, var(--rubber-lo)); box-shadow: 0 2px 4px -1px var(--shade-3); }
.nav a:not(.wordmark), .nav button { font-size: var(--text-sm); text-decoration: none; color: var(--color-ink-2); }
.nav a:not(.wordmark):hover { color: var(--color-ink); text-decoration: underline; }
.nav form { margin: 0; }
main { display: block; }
.page { max-width: var(--measure); margin-inline: auto; padding: var(--space-2xl) var(--gutter) var(--space-3xl); display: grid; gap: var(--space-lg); }
.page--wide { max-width: 1040px; }
.foot { border-top: var(--rule-hair) solid var(--color-rule); color: var(--color-muted); font-size: var(--text-sm); }
.foot .container { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); align-items: center; padding-block: var(--space-lg); }
.foot .container > :first-child { margin-right: auto; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; color: var(--color-ink); }

/* Type */
.muted { color: var(--color-muted); }
.small { font-size: var(--text-sm); }
.serif { font-family: var(--font-outlier); font-weight: 400; letter-spacing: -0.01em; }
.prose { display: grid; gap: var(--space-md); }
.prose h2 { margin-top: var(--space-md); }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: var(--space-2xs); }
.warn { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-inner); background: var(--color-accent-soft); }
.error { color: var(--color-error); }

/* Controls */
.btn { appearance: none; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-lg);
  border-radius: var(--radius-pill); font: 500 var(--text-sm)/1 var(--font-body); color: var(--color-ink); background: var(--color-sheet); text-decoration: none; cursor: pointer;
  box-shadow: 0 0 0 1px var(--shade-1), 0 8px 18px -12px var(--shade-2), inset 0 1px 0 var(--hi);
  transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out); }
.btn:hover { background: var(--color-paper-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--color-paper-2); color: var(--color-muted); box-shadow: none; cursor: not-allowed; }
.btn.primary { background: var(--color-ink); color: var(--color-paper); box-shadow: 0 10px 22px -14px var(--shade-3); }
.btn.primary:hover { background: color-mix(in oklab, var(--color-ink) 86%, var(--color-accent)); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--color-muted); }
.btn.ghost:hover { color: var(--color-ink); background: var(--color-paper-2); }
.linkbtn { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 4px; }
.row { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; }
.stack { display: grid; gap: var(--space-sm); margin: 0; }
label { display: grid; gap: var(--space-2xs); font-size: var(--text-sm); color: var(--color-ink-2); }
input[type="email"], input[type="password"], input[type="text"], input[type="url"] { min-height: 44px; padding: 0 var(--space-sm); border: 0; border-radius: var(--radius-inner); background: var(--color-sheet); color: var(--color-ink);
  box-shadow: inset 0 0 0 1px var(--color-rule); transition: box-shadow var(--dur-micro) var(--ease-out); }
input:hover { box-shadow: inset 0 0 0 1px var(--color-muted); }
input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
input[readonly] { color: var(--color-ink-2); }
details > summary { cursor: pointer; width: max-content; color: var(--color-muted); font-size: var(--text-sm); }
details > summary:hover { color: var(--color-ink); }
details > summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 4px; }
details[open] > summary { margin-bottom: var(--space-sm); }

/* Sheet: the one raised surface per page */
.sheet { background: var(--color-sheet); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: var(--space-lg); display: grid; gap: var(--space-md); }
@media (max-width: 40rem) { .sheet { padding: var(--space-md); } }

/* Consent */
.narrow { max-width: 480px; margin-inline: auto; padding: var(--space-3xl) var(--gutter); display: grid; gap: var(--space-md); }
.auth .review { margin-top: var(--space-lg); }
.auth .brand { font-weight: 600; }
.auth .stack .btn { width: 100%; }

/* The roll: two clips on a faint grid, one per version */
.roll { border-radius: var(--radius-inner); padding: var(--space-xs); display: grid; gap: var(--space-xs); background-color: var(--color-paper);
  background-image: linear-gradient(to right, var(--grid-bar) 1px, transparent 1px), linear-gradient(to right, var(--grid-beat) 1px, transparent 1px), linear-gradient(to right, var(--grid-16) 1px, transparent 1px);
  background-size: 160px 100%, 40px 100%, 10px 100%; box-shadow: inset 0 0 0 1px var(--shade-1); }
.lane { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; }
.lane audio { grid-column: 1 / -1; width: 100%; }
.lane.enhanced audio { display: none; }
.clip { --c: var(--lane-a); position: relative; height: 48px; border-radius: var(--radius-clip); overflow: hidden; cursor: pointer;
  background: linear-gradient(color-mix(in oklab, var(--c) 16%, var(--color-sheet)), color-mix(in oklab, var(--c) 28%, var(--color-sheet)));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 42%, transparent), inset 0 1px 0 var(--hi); }
.lane + .lane .clip { --c: var(--lane-b); }
.clip svg { position: absolute; left: 8px; right: 8px; top: 20px; bottom: 4px; width: calc(100% - 16px); height: calc(100% - 24px); }
.clip rect { fill: color-mix(in oklab, var(--c) 70%, var(--color-ink)); opacity: 0.55; }
.clip .played { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 0)); background: color-mix(in oklab, var(--c) 24%, transparent); pointer-events: none; }
.clip .label { position: absolute; z-index: 1; left: 10px; top: 4px; font-size: var(--text-xs); font-weight: 600; color: color-mix(in oklab, var(--c) 60%, var(--color-ink)); }
.clip--still { cursor: default; }
.clip--pending .sweep { position: absolute; inset: 0; width: 30%; background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--c) 32%, transparent), transparent); animation: sweep 2.4s var(--ease-out) infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.time { font-family: var(--font-code); font-size: var(--text-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; min-width: 4.5ch; text-align: right; }
.lane .dl { font-size: var(--text-sm); color: var(--color-muted); }
.lane .dl:hover { color: var(--color-ink); }

/* The rubber cap in its bezel: the play control */
.cap { appearance: none; border: 0; padding: 0; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none;
  background: radial-gradient(circle at 50% 30%, var(--bezel), var(--bezel-2)); box-shadow: inset 0 2px 3px var(--shade-2), 0 1px 0 var(--hi); }
.cap i { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; transition: transform var(--dur-micro) var(--ease-out);
  background: radial-gradient(120% 110% at 50% 18%, var(--rubber-hi), var(--rubber) 48%, var(--rubber-lo)); box-shadow: inset 0 1px 0.5px var(--hi), 0 5px 10px -4px var(--shade-3); }
.cap svg { width: 14px; height: 14px; fill: var(--cap-ink); }
.cap:hover i { transform: translateY(-1px); }
.cap:active i { transform: translateY(1px); }
.cap:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.cap[aria-busy="true"] i { animation: breathe 1.2s ease-in-out infinite; }
.cap--still { cursor: default; }
.cap--still i { background: var(--color-paper-3); box-shadow: none; }
@keyframes breathe { 50% { opacity: 0.7; } }

/* Song head */
.songhead { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-md); align-items: center; }
.cover { width: 88px; height: 88px; border-radius: var(--radius-inner); object-fit: cover; background: radial-gradient(120% 100% at 30% 20%, var(--color-accent-soft), var(--color-paper-2)); box-shadow: inset 0 0 0 1px var(--shade-1); }
.songhead h1 { font-size: var(--text-2xl); }
.lyrics { white-space: pre-wrap; font: var(--text-md)/1.7 var(--font-body); margin: 0; }

/* Song list */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-md); align-items: center; padding: var(--space-sm) 0; }
.rows li + li { border-top: var(--rule-hair) solid var(--color-rule); }
.rows .t { min-width: 0; }
.rows .t a { font-weight: 500; text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .t a:hover { text-decoration: underline; }
.rows .cap { width: 40px; height: 40px; }
.rows .cap i { width: 30px; height: 30px; }
.rows audio { display: none; }

/* Home */
.hero { max-width: 1040px; margin-inline: auto; padding: var(--space-3xl) var(--gutter) var(--space-2xl); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-2xl); align-items: center; }
.hero h1 { font-family: var(--font-outlier); font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -0.02em; max-width: 12ch; }
.hero .lead { margin-top: var(--space-md); color: var(--color-ink-2); }
.hero .row { margin-top: var(--space-lg); }
.hero .sheet { transform: rotate(-1deg); }
@media (max-width: 52rem) { .hero { grid-template-columns: minmax(0, 1fr); padding-top: var(--space-2xl); gap: var(--space-xl); } .hero .sheet { transform: none; } }
.band { max-width: 1040px; margin-inline: auto; padding: var(--space-2xl) var(--gutter); display: grid; gap: var(--space-lg); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); counter-reset: s; }
.steps li { display: grid; gap: var(--space-xs); align-content: start; counter-increment: s; }
.steps li::before { content: counter(s); font-family: var(--font-code); font-size: var(--text-sm); color: var(--color-accent); }
@media (max-width: 44rem) { .steps { grid-template-columns: minmax(0, 1fr); } }
.occasions { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin: 0; padding: 0; list-style: none; }
.occasions li { padding: var(--space-xs) var(--space-md); border-radius: var(--radius-pill); background: var(--color-paper-2); font-size: var(--text-sm); }

/* Share page: the moment the gift is opened */
.gift { max-width: 640px; margin-inline: auto; padding: var(--space-3xl) var(--gutter); display: grid; gap: var(--space-lg); justify-items: center; text-align: center; }
.gift .cover { width: min(280px, 70vw); height: auto; aspect-ratio: 1; border-radius: var(--radius-card); box-shadow: var(--shadow-lift); }
.gift h1 { font-family: var(--font-outlier); font-weight: 400; font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.02; letter-spacing: -0.02em; max-width: 16ch; }
.gift .roll { width: 100%; text-align: left; }
.gift details { width: 100%; text-align: left; }
.gift .made { margin-top: var(--space-lg); }

@media (prefers-reduced-motion: reduce) { .clip--pending .sweep, .cap[aria-busy="true"] i { animation: none; } .cap i, .btn { transition: none; } }
