/* Morgen — concept site for a café and bakery. Made by Nexus Digital. */
@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-italic-latin.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("fonts/Outfit-var-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --paper: #f5ecdf;     /* oat paper: page ground */
  --roast: #2b1a12;     /* dark roast: text */
  --clay: #a8542e;      /* terracotta: links, what is fresh */
  --crema: #e9d6bd;     /* crema: lines and quiet panels */
  --soft: #6e5546;      /* secondary text */
  --pad: clamp(1.25rem, 4vw, 4rem);
  --win: min(42vh, 32rem); /* height of the window the film plays in */
  --ease: cubic-bezier(0.25, 0.9, 0.3, 1);
  --serif: "Instrument Serif", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--roast); font: 400 1.0625rem/1.55 "Outfit", ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, ul, table { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }
.skip { position: fixed; left: -999rem; top: 0.75rem; z-index: 50; background: var(--roast); color: var(--paper); padding: 0.7rem 1rem; border-radius: 999px; }
.skip:focus { left: var(--pad); }

/* ── Top bar ──────────────────────────────────────────────────── */
.top { position: fixed; inset: 0 0 auto 0; z-index: 30; height: 4rem; display: flex; align-items: center; gap: 1.2rem; padding: 0 var(--pad); background: var(--paper); }
.mark { font-family: var(--serif); font-style: italic; font-size: 1.8rem; text-decoration: none; }
.status { display: none; font-size: 0.875rem; color: var(--soft); }
.status[data-open]::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.45rem; border-radius: 50%; background: #4d8a4b; }
.top-nav { margin-left: auto; display: flex; gap: clamp(0.9rem, 2.4vw, 2rem); font-weight: 500; }
.top-nav a { text-decoration: none; padding: 0.4rem 0; border-bottom: 1.5px solid transparent; }
.top-nav a:hover { border-bottom-color: var(--clay); }
@media (min-width: 800px) { .status { display: block; } }

/* ── The window: the film under a striped awning ─────────────── */
.window { position: fixed; z-index: 25; top: 4rem; left: var(--pad); right: var(--pad); height: calc(var(--win) + 1.6rem); }
.awning { height: 1.6rem; border-radius: 0.6rem 0.6rem 0 0; background: repeating-linear-gradient(90deg, var(--clay) 0 2.4rem, #f3e4cf 2.4rem 4.8rem); position: relative; }
/* the scalloped edge of the awning */
.awning::after { content: ""; position: absolute; left: 0; right: 0; bottom: -0.7rem; height: 0.7rem; background: radial-gradient(circle at 1.2rem 0, var(--clay) 1.2rem, transparent 1.25rem) 0 0 / 4.8rem 0.7rem repeat-x, radial-gradient(circle at 3.6rem 0, #f3e4cf 1.2rem, transparent 1.25rem) 0 0 / 4.8rem 0.7rem repeat-x; z-index: 2; }
.stage { position: relative; height: var(--win); overflow: hidden; border-radius: 0 0 1.2rem 1.2rem; background: var(--crema) center / cover no-repeat; box-shadow: 0 24px 50px -30px rgb(43 26 18 / 0.6); }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
/* a window frame bar across the glass */
.stage::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 6px; margin-left: -3px; background: rgb(43 26 18 / 0.75); z-index: 20; }
@media (max-width: 760px) { .stage::after { display: none; } }

/* ── Chapter rail ─────────────────────────────────────────────── */
.chapters { display: none; }
@media (min-width: 1000px) {
  .chapters { display: block; position: fixed; z-index: 26; left: var(--pad); right: var(--pad); top: calc(4rem + var(--win) + 2.4rem); pointer-events: none; }
  .chapters ol { list-style: none; margin: 0; padding: 0; display: flex; justify-content: flex-end; gap: 1.3rem; font-size: 0.8125rem; pointer-events: auto; }
  .chapters a { text-decoration: none; color: var(--soft); }
  .chapters a[aria-current="true"] { color: var(--clay); font-weight: 600; }
}

/* ── Chapters: everything sits below the window ───────────────── */
main { position: relative; z-index: 10; }
.ch { position: relative; min-height: 190vh; }
.ch--hero { min-height: 170vh; }
.pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; align-content: start; justify-items: start; gap: 1.1rem; padding: calc(4rem + var(--win) + 4.5rem) var(--pad) 2rem; }

.name { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(4.5rem, 12vw, 10rem); line-height: 0.85; letter-spacing: -0.02em; margin-left: -0.04em; }
.name span { display: inline-block; }
.js .name span { opacity: 0; transform: translateY(0.18em); animation: rise 1s var(--ease) forwards; animation-delay: calc(0.25s + var(--i) * 0.07s); }
@keyframes rise { to { opacity: 1; transform: none; } }

.say { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 4.6vw, 4rem); line-height: 1.02; letter-spacing: -0.015em; max-width: 22ch; text-wrap: balance; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); max-width: 40ch; color: var(--soft); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.1rem; padding: 0 1.6rem; border-radius: 999px; background: var(--roast); color: var(--paper); border: 1.5px solid var(--roast); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background 0.25s, color 0.25s, transform 0.25s var(--ease); }
.btn:hover { background: var(--clay); border-color: var(--clay); }
.btn--line { background: transparent; color: var(--roast); }
.btn--line:hover { color: var(--paper); }

/* ── Fresh-from-the-oven board: chalk on a dark board ─────────── */
.board { width: min(100%, 40rem); padding: 1.4rem 1.6rem 1.5rem; border-radius: 0.9rem; background: #2d2622; color: #f3eadc; box-shadow: inset 0 0 0 6px #6b4a35, 0 20px 40px -24px rgb(43 26 18 / 0.7); }
.board-h { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.board ul { list-style: none; margin: 0.8rem 0 0; padding: 0; }
.bake { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px dashed rgb(243 234 220 / 0.25); font-size: 1.05rem; }
.bake-state { font-size: 0.9375rem; color: #cbbba6; white-space: nowrap; }
.bake-state.is-fresh { color: #ffb38a; font-weight: 600; }
.bake-state.is-fresh::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.45rem; border-radius: 50%; background: #ff8a4c; box-shadow: 0 0 0 0 rgb(255 138 76 / 0.6); animation: steam 1.8s ease-out infinite; }
@keyframes steam { 70% { box-shadow: 0 0 0 0.55rem rgb(255 138 76 / 0); } 100% { box-shadow: 0 0 0 0 rgb(255 138 76 / 0); } }
.board-note { margin-top: 0.9rem; font-size: 0.8125rem; color: #cbbba6; }

/* ── Menu ─────────────────────────────────────────────────────── */
.ch--list { min-height: 0; padding: calc(4rem + var(--win) + 5rem) var(--pad) 30vh; }
.sheet { width: min(100%, 46rem); display: grid; gap: 0.6rem; }
.group { margin-top: 2.2rem; }
.group h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.8rem; padding-bottom: 0.4rem; border-bottom: 1.5px solid var(--roast); }
.group ul { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 1.5rem; padding: 0.8rem 0; border-bottom: 1px solid var(--crema); }
.item-name { font-weight: 600; }
.item-price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.item-desc { grid-column: 1 / -1; color: var(--soft); font-size: 0.9375rem; }
.note { margin-top: 1.4rem; color: var(--soft); font-size: 0.9375rem; }

/* ── Hours ────────────────────────────────────────────────────── */
.hours { width: min(100%, 24rem); }
.hours h3 { font-size: 0.875rem; font-weight: 600; color: var(--soft); }
.hours table { width: 100%; margin-top: 0.4rem; border-collapse: collapse; font-variant-numeric: tabular-nums; border-top: 1.5px solid var(--roast); }
.hours td { padding: 0.6rem 0; border-bottom: 1px solid var(--crema); }
.hours td:last-child { text-align: right; }
.hours tr[data-today] td { font-weight: 700; color: var(--clay); }

/* ── Order ────────────────────────────────────────────────────── */
.ch--book { min-height: 0; padding: calc(4rem + var(--win) + 5rem) var(--pad) 0; display: flex; flex-direction: column; }
.book { display: grid; gap: 1rem; width: min(100%, 40rem); padding-bottom: 5rem; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-top: 0.8rem; padding: clamp(1.1rem, 3vw, 1.6rem); border-radius: 1.1rem; background: #fbf5ec; border: 1px solid var(--crema); }
.form label { display: grid; gap: 0.35rem; font-size: 0.875rem; font-weight: 600; min-width: 0; }
.form input, .form select { width: 100%; min-height: 3rem; padding: 0 0.85rem; border: 1.5px solid rgb(43 26 18 / 0.3); border-radius: 0.7rem; background: #fff; color: var(--roast); font: inherit; font-weight: 400; }
.form input:focus, .form select:focus { outline: 3px solid rgb(168 84 46 / 0.3); border-color: var(--clay); }
.form [aria-invalid="true"] { border-color: #b3261e; }
.wide { grid-column: 1 / -1; }
.form-note { padding: 0.9rem 1rem; border-radius: 0.7rem; background: var(--crema); font-size: 0.9375rem; }
.find { margin-top: 1rem; font-style: normal; line-height: 1.8; }
.find h3 { font-size: 0.875rem; font-weight: 600; color: var(--soft); }
.find a { margin-right: 1rem; }
.foot { margin: auto calc(var(--pad) * -1) 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; padding: 1.4rem var(--pad); background: var(--paper); border-top: 1px solid var(--crema); font-size: 0.875rem; color: var(--soft); position: relative; z-index: 27; }

/* ── Phones: a shorter window ─────────────────────────────────── */
@media (max-width: 760px) {
  :root { --win: 34vh; --pad: 1rem; }
  .pin { padding-top: calc(4rem + var(--win) + 3.5rem); gap: 0.9rem; }
  .ch { min-height: 170vh; }
  .form { grid-template-columns: 1fr; }
  .top-nav a:first-child { display: none; }
}
/* content that scrolls up passes behind the window, not through it */
.ch--list .sheet, .ch--book .book { position: relative; }
.ch--list::before, .ch--book::before { content: ""; position: sticky; display: block; top: 0; height: calc(4rem + var(--win) + 2.2rem); margin: calc((4rem + var(--win) + 5rem) * -1) calc(var(--pad) * -1) 2.8rem; background: var(--paper); z-index: 4; }

/* ── No film: reduced motion, or no script. The window shows a still. ── */
.static .stage video, .no-js .stage video { display: none; }
.static .stage, .no-js .stage { background-image: url("films/m3-pastry-poster.webp"); }
.static .ch, .no-js .ch { min-height: 0; }
.static .pin, .no-js .pin { position: relative; height: auto; min-height: 0; padding-bottom: 4rem; }
.static .ch--hero .pin, .no-js .ch--hero .pin { min-height: 100vh; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .name span { animation: none !important; opacity: 1; transform: none; }
  .bake-state.is-fresh::before { animation: none; }
  .btn { transition: none; }
}
