/* Bramble & Bun — demo site. Direction: the split stage (seed 674422584), type redrawn to Rokkitt / Literata. */
:root {
  --green: #1F3B2C;      /* the shopfront */
  --paper: #F1EDE5;      /* bone, from the sign and the walls */
  --flour: #FAF8F4;
  --wood: #7A4E27;       /* the tables */
  --bramble: #5A2847;    /* blackberry, used once as a field and once as a marker */
  --ink: #1E1B16;
  --muted: #5C5346;
  --tone: #E4DED2;       /* one step from paper */
  --marker: #E7CFDD;

  --font-display: "Rokkitt", Georgia, serif;
  --font-text: "Literata", Georgia, serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1.02rem + 0.2vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.25rem, 1.4rem + 3vw, 4rem);
  --step-display: clamp(4.5rem, 1rem + 15vw, 15rem);

  --gap: 12px;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --radius: 0px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-reveal: 800ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--green); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, video { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--bramble); outline-offset: 3px; }
::selection { background: var(--green); color: var(--paper); }
p { max-width: 46ch; text-wrap: pretty; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--paper); padding: 0.7rem 1rem; }
.skip:focus { top: 12px; }

h1, h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.92; text-wrap: balance; }
.head { font-size: var(--step-head); }

.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.22em; text-decoration-thickness: 0.08em; transition: text-decoration-color var(--t-hover) ease; }
.link-plain { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; }
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration-color: currentColor; } }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.6rem; background: var(--green); color: var(--paper); font-weight: 600; text-decoration: none; border-radius: var(--radius); transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.button:hover { background: #142A1E; }
.button:active { transform: scale(0.97); }
.button-paper { background: var(--paper); color: var(--ink); }
.button-paper:hover { background: var(--flour); }

/* ---------- the stage ---------- */
.stage { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); padding: var(--gap); }
.read { grid-column: 1; grid-row: 1; display: grid; gap: var(--gap); min-width: 0; }
.fixed { grid-column: 2; grid-row: 1; position: sticky; top: var(--gap); height: calc(100svh - 2 * var(--gap)); overflow: hidden; background: #2a2a24; }
.scenes, .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene { object-fit: cover; opacity: 0; transition: opacity 1.6s var(--ease-soft); }
.scene.is-on { opacity: 1; }
.hours-bar { position: absolute; left: 0; right: 0; bottom: 0; max-width: none; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 1.25rem; background: var(--paper); font-size: var(--step-small); font-weight: 600; }
.status::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 0.55rem; border-radius: 50%; background: var(--muted); vertical-align: 0.05em; }
.status[data-open="yes"]::before { background: #2E7D4F; }
.status[data-open="baking"]::before { background: #C77A1E; }
.video-ctrls { position: absolute; right: 1rem; bottom: calc(56px + 1rem); display: flex; gap: 8px; }
.sound { position: relative; min-height: 44px; padding: 0 1rem; background: var(--paper); color: var(--ink); font-size: var(--step-small); font-weight: 600; transition: transform var(--t-press) var(--ease-out), opacity 300ms ease; }
.sound:active { transform: scale(0.96); }
.sound[hidden] { display: none; }

.panel { background: var(--paper); padding: var(--pad); min-width: 0; }
.phone-only { display: none; }

/* hero sheet, set like a menu card */
.sheet { min-height: calc(100svh - 2 * var(--gap)); display: flex; flex-direction: column; text-align: center; }
.nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; font-size: var(--step-small); font-weight: 600; }
.nav-side { display: flex; gap: 1.25rem; }
.nav-side:first-child { justify-content: flex-start; }
.nav-side:last-child { justify-content: flex-end; }
.nav-side a { padding: 0.75rem 0; }
.wordmark { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: var(--step-lead); line-height: 1; text-decoration: none; color: var(--green); white-space: nowrap; }
.wordmark span { display: inline-block; margin: 0 0.2em; color: var(--bramble); }
.sheet-body { margin-top: auto; margin-bottom: auto; padding-block: 3rem 5rem; display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.hero-line { font-size: var(--step-head); color: var(--green); }
.hero-copy { max-width: 40ch; }

.lines .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.lines [data-line] { display: block; }

/* Rob's morning: the slip */
.mornings { background: var(--wood); color: var(--flour); display: grid; gap: 2.5rem; }
.mornings-intro { display: grid; gap: 1rem; }
.slip { background: var(--flour); color: var(--ink); padding: 2rem 1.75rem 2.75rem; max-width: 480px; width: 100%; justify-self: end; font-variant-numeric: tabular-nums; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), 95% 100%, 90% calc(100% - 12px), 85% 100%, 80% calc(100% - 12px), 75% 100%, 70% calc(100% - 12px), 65% 100%, 60% calc(100% - 12px), 55% 100%, 50% calc(100% - 12px), 45% 100%, 40% calc(100% - 12px), 35% 100%, 30% calc(100% - 12px), 25% 100%, 20% calc(100% - 12px), 15% 100%, 10% calc(100% - 12px), 5% 100%, 0 calc(100% - 12px)); }
.slip h3 { font-family: var(--font-text); font-size: var(--step-body); font-weight: 600; margin-top: 1.75rem; }
.slip h3:first-child { margin-top: 0; }
.slip-rows li { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.35rem 0; position: relative; transition: color 300ms ease; }
.slip-rows i { flex: 1; min-width: 1.5rem; height: 4px; align-self: center; margin-top: 0.3em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='4'%3E%3Ccircle cx='2' cy='2' r='1.6' fill='%235C5346'/%3E%3C/svg%3E") repeat-x; }
.slip-rows li.is-now { font-weight: 600; color: var(--bramble); }
.slip-rows li.is-now::before { content: ""; position: absolute; left: -1.1rem; top: 0.85em; width: 8px; height: 8px; border-radius: 50%; background: var(--bramble); }
.slip-rows li.is-done span { color: var(--muted); }
.slip-total { max-width: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.5rem; min-height: 44px; padding: 0 1rem; background: var(--ink); color: var(--flour); font-weight: 600; }
.slip-now { margin-top: 1.1rem; font-size: var(--step-small); color: var(--muted); min-height: 1.4em; }

/* bakes: square plate, spare text */
.bakes { display: grid; grid-template-columns: 1fr; gap: 2rem; padding-bottom: calc(var(--pad) * 1.5); }
.plate { aspect-ratio: 1; overflow: hidden; background: var(--tone); }
.plate img { width: 100%; height: 100%; object-fit: cover; transition: opacity 260ms ease, transform 900ms var(--ease-soft); }
.plate img.is-swapping { opacity: 0; transform: scale(1.03); }
.bake-text { display: flex; flex-direction: column; gap: 1.75rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; font-size: var(--step-body); }
.tabs button { min-height: 44px; color: var(--muted); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.3em; text-decoration-thickness: 2px; transition: color var(--t-hover) ease, text-decoration-color var(--t-hover) ease; }
.tabs button[aria-pressed="true"] { color: var(--ink); font-weight: 600; text-decoration-color: var(--bramble); }
.tabs button:hover { color: var(--ink); }
.bake-copy { display: grid; gap: 1rem; min-height: 13rem; align-content: start; }
.bake-copy.is-swapping { opacity: 0; }
.bake-copy { transition: opacity 220ms ease; }
.bake-price { font-weight: 600; font-variant-numeric: tabular-nums; }
.cells { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cell { display: flex; align-items: center; justify-content: center; min-height: 72px; padding: 0 1rem; text-align: center; font-weight: 600; text-decoration: none; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.cell:active { transform: scale(0.98); }
.cell-ink { background: var(--green); color: var(--paper); }
.cell-ink:hover { background: #142A1E; }
.cell-tone { background: var(--tone); color: var(--ink); }
.cell-tone:hover { background: #DCCFB8; }

/* menu: giant word, filled bars */
.menu { container-type: inline-size; }
.giant { font-size: 38cqw; line-height: 0.8; color: var(--green); margin-left: -0.04em; }
.bars { display: grid; gap: 6px; margin-top: 1.5rem; }
.bars details { background: var(--tone); }
.bars summary { display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 0 1.1rem; font-weight: 600; cursor: pointer; list-style: none; transition: background-color var(--t-hover) ease; }
.bars summary::-webkit-details-marker { display: none; }
.bars summary::after { content: "+"; font-family: var(--font-display); font-size: 1.6rem; line-height: 1; transition: transform var(--t-hover) var(--ease-out); }
.bars details[open] summary::after { transform: rotate(45deg); }
.bars summary:hover { background: #DCCFB8; }
.items { padding: 0.25rem 1.1rem 1.25rem; display: grid; gap: 0.6rem; font-variant-numeric: tabular-nums; }
.items li { display: flex; justify-content: space-between; gap: 1rem; }
.items-note { padding: 0 1.1rem 1.25rem; font-size: var(--step-small); color: var(--muted); }

/* Rob's letter */
.letter { padding-block: clamp(5rem, 12vw, 10rem); }
.letter-col { max-width: 520px; margin-inline: auto; display: grid; gap: 1.2rem; }
.portrait { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; margin-bottom: 0.6rem; }
mark { background: var(--marker); color: inherit; padding: 0 0.15em; }
.sign { font-style: italic; font-size: var(--step-lead); margin-top: 0.6rem; display: grid; }
.sign span { font-style: normal; font-size: var(--step-small); color: var(--muted); }

/* Mavis: full bleed, text on the calm side */
.mavis { position: relative; height: 92svh; min-height: 560px; overflow: hidden; background: var(--ink); }
.mavis img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; filter: brightness(0.62); }
.mavis-text { position: absolute; left: var(--pad); bottom: 12%; width: min(48%, 640px); color: var(--flour); display: grid; gap: 1.4rem; justify-items: start; }

/* cakes: bramble field with photo strip */
.cakes { background: var(--bramble); color: var(--flour); padding: 48px 0 clamp(4rem, 9vw, 8rem); overflow: hidden; }
.strip { overflow: hidden; }
.cakes { position: relative; }
.strip-pause { position: absolute; right: var(--pad); top: calc(48px + 150px + 12px); min-height: 44px; padding: 0 1rem; background: #6E3A5B; color: var(--flour); font-size: var(--step-small); font-weight: 600; transition: transform var(--t-press) var(--ease-out); }
.strip-pause:active { transform: scale(0.96); }
.strip.is-paused .strip-track { animation-play-state: paused; }
.strip-track { display: flex; gap: 8px; width: max-content; }
.strip-track img { height: 150px; width: auto; object-fit: cover; }
.strip-track img:nth-child(3n+1) { width: 112px; }
.strip-track img:nth-child(3n+2) { width: 150px; }
.strip-track img:nth-child(3n) { width: 225px; }
.cakes-body { padding: 72px var(--pad) 0; display: grid; gap: 1.4rem; }
.cakes-body p { max-width: 58ch; }
.cake-form { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 1.4rem; }
.cell-field { position: relative; background: #6E3A5B; transition: background-color var(--t-hover) ease; }
.cell-field:focus-within { background: #8A5274; }
.cell-field label { position: absolute; left: 1.1rem; top: 0.8rem; font-size: var(--step-small); font-weight: 600; }
.cell-field input { width: 100%; min-height: 96px; padding: 2.2rem 1.1rem 0.8rem; background: transparent; border: 0; color: var(--flour); font-size: var(--step-body); color-scheme: dark; }
.cell-field input:focus { outline: none; }
.cell-field:focus-within { outline: 3px solid var(--flour); outline-offset: 2px; }
.cell-field.has-error { outline: 3px solid #FFC9B8; outline-offset: 2px; }
.cell-submit { min-height: 96px; background: var(--flour); color: var(--bramble); font-weight: 600; font-size: var(--step-body); transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.cell-submit:hover { background: #fff; }
.cell-submit:active { transform: scale(0.98); }
.form-note { font-size: var(--step-small); }

/* footer: the name across the shopfront */
.foot { position: relative; min-height: 100svh; color: var(--flour); background: var(--ink); overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.foot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; filter: brightness(0.55); }
.foot-top, .foot-bottom { position: relative; padding: 32px var(--pad); }
.foot-top { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.foot-top > div { max-width: 26rem; display: grid; gap: 0.7rem; align-content: start; }
.foot-h { font-size: var(--step-lead); line-height: 1; }
.hours div { display: flex; justify-content: space-between; gap: 1.5rem; }
.hours dd { font-variant-numeric: tabular-nums; }
.foot-status { font-size: var(--step-small); }
.foot-bottom { padding-bottom: 32px; }
.foot-name { max-width: none; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 12.4vw; line-height: 0.8; letter-spacing: -0.02em; white-space: nowrap; margin-left: -0.03em; }
.legal { margin-top: 1rem; max-width: 70ch; font-size: var(--step-small); }

/* ---------- phone: its own composition ---------- */
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; }
  .fixed { grid-column: 1; grid-row: 1; position: relative; top: 0; height: 64svh; }
  .read { grid-row: 2; }
  .scene:not([data-scene="top"]) { display: none; }
  .hours-bar { top: 0; bottom: auto; }
  .video-ctrls { bottom: 1rem; }
  .phone-only { display: block; }
  .phone-photo { margin: 2rem calc(var(--pad) * -1) calc(var(--pad) * -1); aspect-ratio: 4 / 3; overflow: hidden; }
  .phone-photo img { width: 100%; height: 100%; object-fit: cover; }
  .sheet .phone-photo { display: none; }
  .phone-photo-top { margin: calc(var(--pad) * -1) calc(var(--pad) * -1) 2rem; }
  .sheet { min-height: 0; }
  .sheet-body { padding-block: 1.75rem 2.5rem; gap: 1.25rem; }
  .fixed { height: 48svh; }
  .nav { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 1.25rem; row-gap: 0; }
  .nav .nav-side { display: contents; }
  .nav-side a { order: 2; padding: 0.6rem 0; }
  .wordmark { order: 1; flex-basis: 100%; text-align: center; font-size: var(--step-lead); }
  .slip { justify-self: stretch; max-width: none; padding-inline: 1.4rem; }
  .slip-rows li.is-now::before { left: -0.9rem; }
  .bakes .plate { margin-inline: calc(var(--pad) * -1); }
  .mavis { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .mavis img { position: relative; height: 70svh; filter: none; }
  .mavis-text { position: static; width: auto; padding: 2rem var(--pad) 3rem; background: var(--ink); }
  .cake-form { grid-template-columns: 1fr; }
  .cell-field input, .cell-submit { min-height: 64px; }
  .cell-field input { padding-top: 2rem; }
  .strip-track img { height: 110px; }
  .strip-pause { top: calc(48px + 110px + 12px); }
  .strip-track img:nth-child(3n+1) { width: 83px; }
  .strip-track img:nth-child(3n+2) { width: 110px; }
  .strip-track img:nth-child(3n) { width: 165px; }
  .foot { min-height: 88svh; }
  .foot-top { flex-direction: column; }
  .foot-name { font-size: 12.2vw; }
}
@media (max-width: 420px) {
  .cells { grid-template-columns: 1fr; }
  .cell { min-height: 60px; }
  .hours-bar { font-size: 14px; padding: 0 1rem; }
}

/* ---------- motion (content stays visible without script) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(18px); animation: rise var(--t-reveal) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 300ms); }
  .js .lines [data-line] { transform: translateY(105%); animation: line-up 900ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 120ms + 150ms); }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .plate[data-reveal] { opacity: 1; transform: none; }
  .js .plate[data-reveal] img { clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--ease-in-out), opacity 260ms ease, transform 900ms var(--ease-soft); }
  .js .plate[data-reveal].is-in img { clip-path: inset(0); }
  .strip-track { animation: drift 70s linear infinite; }
  .strip:hover .strip-track { animation-play-state: paused; }
  .mavis img { transform: scale(1.06); transition: transform 2.4s var(--ease-soft); }
  .mavis.is-in img { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .scene { transition: none; }
  .strip { overflow-x: auto; }
  .strip-pause { display: none; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes line-up { to { transform: none; } }
@keyframes drift { to { transform: translateX(-50%); } }

button, a, summary, input, select, label { touch-action: manipulation; }
:target { scroll-margin-top: 5rem; }
