/* Morrow Coffee: tokens from Art_Direction_Brief_Coffee.md */
:root {
  --paper: #f3ebdd;
  --oat: #e2d3ba;
  --roast: #2b1d15;
  --daybreak: #d98a3d;
  --grove: #6d6a4b;
  --cascara: #7c3b27;
  --card: #f8f2e8;
  --line: rgba(43, 29, 21, 0.16);
  --rule: rgba(43, 29, 21, 0.4);
  --muted: rgba(43, 29, 21, 0.66);

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --progress: 0;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 84px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--roast);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
figure { margin: 0; }
h1, h2, h3, p { margin: 0; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--roast); color: var(--paper); padding: 10px 14px; z-index: 50; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--daybreak); outline-offset: 3px; }
main:focus { outline: none; }

/* Type */
.display { font-family: var(--serif); font-weight: 400; line-height: 0.95; letter-spacing: -0.01em; }
em { font-style: italic; }
.mono { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; }
.label { font: 600 0.72rem/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.lede { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.55; max-width: 34ch; }

/* Words lit by scroll (split in app.js) */
.word { display: inline-block; opacity: 0.16; transition: opacity 0.2s linear; }

/* The Morning Entry */
.entry {
  display: inline-flex; flex-wrap: wrap; gap: 0 0.9em;
  border-block: 1px solid currentColor; padding: 0.45em 0.1em;
  font: 400 0.78rem/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
}
.entry span + span::before { content: "·"; margin-right: 0.9em; opacity: 0.5; }
.entry--lg { font-size: clamp(0.85rem, 1.6vw, 1.15rem); }
.entry--light { color: var(--oat); }

.ruled { background-image: repeating-linear-gradient(to bottom, transparent 0 33px, var(--line) 33px 34px); }

/* Buttons */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px; border-radius: 2px;
  font: 500 0.95rem/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid var(--roast); transition: color 0.4s var(--ease);
}
/* A sun-coloured fill that rises from the baseline on hover */
.btn::before {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 140%; aspect-ratio: 1;
  border-radius: 50%; background: var(--daybreak); z-index: -1;
  transform: translate(-50%, 100%); transition: transform 0.55s var(--ease);
}
.btn:hover::before { transform: translate(-50%, 55%); }
.btn--dark { background: var(--roast); color: var(--paper); }
.btn--dark:hover { color: var(--roast); }
.btn--line { background: transparent; color: var(--roast); }
.btn--sun { background: var(--daybreak); border-color: var(--daybreak); color: var(--roast); }
.btn--sun::before { background: var(--paper); }

/* Lockup */
.lockup { display: inline-flex; align-items: flex-end; gap: 8px; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 3px; }
.lockup__sun { width: 34px; height: 26px; --rule: transparent; transform: translateY(5px); }
.lockup__word { font: 400 32px/0.8 var(--serif); letter-spacing: -0.01em; }
.lockup--lg .lockup__sun { width: 72px; height: 54px; transform: translateY(10px); }
.lockup--lg .lockup__word { font-size: 76px; }
.lockup__sun path { transform: translateY(6px); animation: rise 1.6s 0.2s var(--ease) forwards; }
@keyframes rise { to { transform: none; } }

/* Window light drifting across the page */
.lightshaft {
  position: fixed; inset: 0; z-index: 30; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 214, 160, 0.22) 44%, rgba(255, 226, 186, 0.08) 50%, transparent 56%) no-repeat;
  background-size: 300% 100%;
  background-position: calc(var(--progress) * 100%) 0;
  mix-blend-mode: soft-light;
}

/* Header + horizon progress */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(10px);
}
.nav { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.nav__links { display: flex; gap: 26px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav__links a { text-decoration: none; font-size: 0.95rem; position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__toggle { display: none; }
.horizon { position: relative; height: 1px; background: var(--line); }
.horizon::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--progress) * 100%); background: var(--roast); }
.horizon__sun {
  position: absolute; bottom: 0; left: calc(var(--progress) * (100% - 18px));
  width: 18px; height: 9px; border-radius: 18px 18px 0 0; background: var(--daybreak);
}
/* Phone menu drops over the page instead of pushing it down */
.mobile-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper); border-top: 1px solid var(--line);
  padding: 8px var(--gutter) 18px; box-shadow: 0 24px 40px -28px rgba(43, 29, 21, 0.5);
}
.mobile-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; font: 400 1.6rem/1.1 var(--serif); }

/* Hero */
.hero { position: relative; padding-block: clamp(32px, 5vw, 72px) clamp(72px, 8vw, 110px); }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero__copy { display: grid; gap: 28px; justify-items: start; position: relative; z-index: 2; }
.hero__title { font-size: clamp(4.4rem, 11vw, 10rem); }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero__title em { display: inline-block; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__stage {
  position: relative; aspect-ratio: 4 / 5; border-radius: 4px; overflow: hidden;
  background: radial-gradient(120% 90% at 30% 20%, #f8efe0 0%, #eadcc4 55%, #dcc9aa 100%);
  touch-action: pan-y; cursor: grab;
}
.hero__stage.is-dragging { cursor: grabbing; }
/* Turntable: two real photos stacked, the second blending in between angles */
.spin__poster, .spin__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.hero__stage.is-live .spin__poster { opacity: 0; }
/* Light shaft and sun glow behind the 3D cup */
.hero__glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(40% 30% at 22% 18%, rgba(255, 196, 120, 0.28), transparent 70%),
    linear-gradient(118deg, transparent 30%, rgba(255, 236, 205, 0.22) 42%, rgba(255, 236, 205, 0.05) 58%, transparent 66%);
  mix-blend-mode: soft-light;
  transform: translateY(calc(var(--hero, 0) * -60px));
}
.hero__hint { position: absolute; right: 16px; top: 16px; display: flex; gap: 8px; align-items: center; color: var(--muted); opacity: 0; transition: opacity 0.6s; }
.hero__stage.is-live .hero__hint { opacity: 1; }
.hero__hint span { display: inline-block; animation: nudge 2.4s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateX(4px); } }
.hours-card {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  display: grid; gap: 4px; background: var(--card); padding: 14px 18px;
  box-shadow: 0 18px 40px -24px rgba(43, 29, 21, 0.6);
}
.hours-card .mono { font-size: 0.95rem; }
.hours-card__state { font: italic 400 1.15rem/1 var(--serif); }
.scroll-cue {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 8px; text-decoration: none; color: var(--muted);
}
.scroll-cue span { width: 1px; height: 36px; background: linear-gradient(var(--roast), transparent); transform-origin: top; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Sunrise band */
.band { position: relative; height: 220vh; }
.band__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; align-items: start; }
.band__frame { position: absolute; inset: 0; clip-path: inset(46% 0 46% 0); will-change: clip-path; }
.band__frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); will-change: transform; }
.band__line {
  position: relative; z-index: 2; font-size: clamp(2.6rem, 6.4vw, 6rem); max-width: 11ch;
  margin: clamp(110px, 16vh, 170px) 0 0 max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  color: var(--paper); text-shadow: 0 2px 30px rgba(43, 29, 21, 0.45);
}

/* Sections */
.section { padding-block: clamp(64px, 9vw, 128px); position: relative; }
.section--oat { background: var(--oat); }
.section--roast { background: var(--roast); color: var(--paper); --line: rgba(243, 235, 221, 0.2); --muted: rgba(243, 235, 221, 0.68); }
.section__head {
  position: relative; display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
  padding-top: 14px; margin-bottom: clamp(28px, 4vw, 48px);
}
/* The rule draws itself in */
.section__head::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1.5px; background: currentColor; transform-origin: left; transform: scaleX(var(--draw, 1)); }
.section__no { color: var(--muted); }
.section__title { font: 400 clamp(2.4rem, 5vw, 3.6rem)/1 var(--serif); margin-right: auto; }
.section__intro { font-size: clamp(2rem, 4.6vw, 3.6rem); max-width: 18ch; margin-bottom: clamp(28px, 4vw, 48px); }

/* Media: images are framed, revealed and moved, never just dropped in */
.media { position: relative; overflow: hidden; border-radius: 3px; background: var(--oat); }
.media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 4; will-change: transform; }
.media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(118deg, transparent 35%, rgba(255, 232, 196, 0.28) 48%, transparent 60%);
  transform: translateX(var(--sheen, -120%)); transition: transform 1.1s var(--ease);
}
[data-tilt] { transform-style: preserve-3d; transition: transform 0.6s var(--ease); will-change: transform; }
[data-tilt]:hover .media::after, .media[data-tilt]:hover::after { --sheen: 120%; }

/* Today */
.today { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(20px, 3vw, 40px); align-items: stretch; }
.today__entry { background-color: var(--card); padding: clamp(24px, 4vw, 48px); display: grid; align-content: space-between; gap: 32px; }
.today__line { font-size: clamp(2.2rem, 4.4vw, 3.8rem); }
.today__bar { display: grid; grid-template-columns: 1fr 1fr; background: var(--oat); perspective: 900px; }
.today__bar .media { border-radius: 0; }
.today__bar .media img { height: 100%; }
.today__bar-copy { padding: 24px; display: grid; align-content: space-between; gap: 18px; }
.today__bar-copy h3 { font-size: clamp(2.2rem, 3.6vw, 3.2rem); }

/* Menu */
.menu { display: grid; grid-template-columns: 1.2fr 0.9fr 0.6fr; gap: clamp(16px, 2.4vw, 28px); align-items: start; }
.menu__card { background: var(--card); padding: clamp(24px, 3.4vw, 44px); box-shadow: 0 1px 0 rgba(43, 29, 21, 0.12), 0 26px 50px -36px rgba(43, 29, 21, 0.6); }
.menu__group + .menu__group { margin-top: 28px; }
.menu__heading { font: italic 400 1.9rem/1 var(--serif); margin-bottom: 8px; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); position: relative; }
.menu li::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--daybreak); transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--ease); }
.menu li:hover::after { transform: scaleX(1); }
.menu__note { margin-top: 24px; color: var(--muted); text-transform: none; letter-spacing: 0.02em; }
.menu__photo--small { margin-top: clamp(40px, 10vw, 140px); }

/* Ticker */
.ticker { overflow: hidden; background: var(--roast); color: var(--paper); padding-block: 18px; }
.ticker__track { display: flex; align-items: center; gap: 36px; width: max-content; font: 400 clamp(1.6rem, 3vw, 2.6rem)/1 var(--serif); white-space: nowrap; will-change: transform; }
.ticker__sun { width: 26px; height: 13px; border-radius: 26px 26px 0 0; background: var(--daybreak); flex: none; }

/* The room: pinned, horizontal */
.room { position: relative; background: var(--paper); }
.room__pin { padding-block: clamp(64px, 8vw, 110px) clamp(48px, 6vw, 80px); overflow: hidden; }
.room__track {
  display: flex; align-items: flex-end; gap: clamp(14px, 2vw, 28px);
  padding-inline: var(--gutter) 12vw; width: max-content; will-change: transform;
}
.room__panel { width: clamp(240px, 26vw, 380px); flex: none; display: grid; gap: 10px; }
.room__panel--tall { width: clamp(280px, 32vw, 470px); }
.room__panel figcaption { color: var(--muted); }
.room__panel .media img { aspect-ratio: 4 / 5; }
.room__panel--tall .media img { aspect-ratio: 3 / 4; }
.room__end { flex: none; width: clamp(240px, 26vw, 360px); display: grid; gap: 20px; justify-items: start; align-self: center; }
.room__end .display { font-size: clamp(2.4rem, 4.6vw, 4rem); }

/* Regulars */
.regulars { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px, 1.6vw, 20px); perspective: 1200px; }
.regular:nth-child(even) { margin-top: clamp(24px, 4vw, 56px); }
.regular figcaption { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 12px; transform: translateZ(30px); }
.regular figcaption .mono { color: var(--daybreak); font-size: 0.72rem; }
.regular figcaption em { font: italic 400 1.3rem/1.15 var(--serif); }

/* Beans */
.beans { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; perspective: 1200px; }
.beans__copy { display: grid; gap: 22px; justify-items: start; }
.beans__title { font-size: clamp(3.4rem, 7vw, 6rem); }
.specs { margin: 0; width: 100%; border-top: 1px solid var(--line); }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-size: 0.95rem; }
.specs dd { margin: 0; text-align: right; }
.beans__buy { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.beans__price { font-size: 2.6rem; }

.loyalty {
  margin-top: clamp(56px, 8vw, 104px);
  display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(24px, 4vw, 64px); align-items: center;
  background: var(--oat); padding: clamp(24px, 4vw, 48px);
}
.loyalty__copy { display: grid; gap: 14px; }
.loyalty__copy h3 { font-size: clamp(2rem, 3.6vw, 3rem); }
.loyalty__stamps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px 8px; }
.stamp { display: grid; justify-items: center; gap: 6px; }
.stamp svg { width: 100%; max-width: 72px; overflow: visible; }
.stamp .mono { font-size: 0.66rem; color: var(--muted); }

/* Visit */
.visit { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.visit__copy { display: grid; gap: 24px; justify-items: start; }
.visit__copy .section__head { width: 100%; margin-bottom: 0; }
.visit__address { font-size: clamp(2.4rem, 5vw, 4.4rem); }
.hours { width: 100%; border-collapse: collapse; }
.hours caption { text-align: left; padding-bottom: 8px; }
.hours th, .hours td { padding: 12px 0; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 400; }
.hours td { text-align: right; }

/* Footer: the sun sets as you reach the end */
.footer { position: relative; overflow: hidden; background: var(--roast); color: var(--paper); padding-block: clamp(200px, 22vw, 300px) 32px; --line: rgba(243, 235, 221, 0.2); --muted: rgba(243, 235, 221, 0.66); }
.footer__sunset { position: absolute; left: 0; right: 0; top: 0; height: clamp(150px, 17vw, 230px); pointer-events: none; }
.footer__sun {
  position: absolute; left: 50%; bottom: 0; width: clamp(140px, 18vw, 260px); aspect-ratio: 1; margin-left: calc(clamp(140px, 18vw, 260px) / -2);
  border-radius: 50%; background: radial-gradient(circle, #e9a35a 0%, var(--daybreak) 60%, rgba(217, 138, 61, 0) 72%);
  transform: translateY(calc(50% + var(--set, 0) * 50%)); opacity: 0.9;
}
.footer__line { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(243, 235, 221, 0.3); }
.footer__sunset { clip-path: inset(0 0 0 0); }
.footer__grid { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: end; }
.footer__sign { font-size: clamp(3rem, 7vw, 6rem); margin-bottom: 40px; }
.footer .lockup__sun { --rule: transparent; }
.signup { display: grid; gap: 12px; }
.signup__row { display: flex; gap: 8px; flex-wrap: wrap; }
.signup input {
  flex: 1 1 220px; min-height: 46px; padding: 0 14px; border-radius: 2px;
  border: 1px solid rgba(243, 235, 221, 0.4); background: transparent; color: var(--paper); font: inherit;
}
.signup input::placeholder { color: rgba(243, 235, 221, 0.5); }
.signup__msg { color: var(--daybreak); min-height: 1.2em; text-transform: none; }
.footer__legal { max-width: 62ch; font-size: 0.85rem; line-height: 1.5; }
.footer__base a { color: var(--paper); }
.footer__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }

/* No-JS / reduced motion: everything visible and still */
html:not(.motion) .word { opacity: 1; }
html:not(.motion) .band { height: auto; }
html:not(.motion) .band__sticky { position: relative; height: clamp(360px, 56vw, 760px); }
html:not(.motion) .band__frame { clip-path: none; }
html:not(.motion) .band__frame img { transform: none; }
html:not(.motion) .room__track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
html:not(.motion) .room__panel, html:not(.motion) .room__end { scroll-snap-align: start; }
@media (prefers-reduced-motion: reduce) {
  .lockup__sun path, .hero__hint span, .scroll-cue span { animation: none; transform: none; }
  .lightshaft { display: none; }
}

/* Responsive */
@media (max-width: 1020px) {
  .menu { grid-template-columns: 1fr 1fr; }
  .menu__photo--small { display: none; }
  .regulars { grid-template-columns: repeat(3, 1fr); }
  .regular:nth-child(even) { margin-top: 0; }
  .today { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav__links, .nav__cta { display: none; }
  .nav { justify-content: space-between; }
  .nav__toggle { display: grid; gap: 6px; width: 44px; height: 44px; place-content: center; background: none; border: 0; cursor: pointer; }
  .nav__toggle span:not(.sr-only) { width: 24px; height: 1.5px; background: var(--roast); display: block; }
  .hero__grid, .beans, .visit, .loyalty, .footer__grid, .menu { grid-template-columns: 1fr; }
  .hero__stage { max-width: 560px; width: 100%; }
  .scroll-cue { display: none; }
  .band { height: 160vh; }
  .regulars { grid-template-columns: 1fr 1fr; }
  .regular:last-child { grid-column: 1 / 3; }
  .regular:last-child .media img { aspect-ratio: 4 / 3; }
  .lockup--lg .lockup__word { font-size: 56px; }
  .lockup--lg .lockup__sun { width: 54px; height: 40px; transform: translateY(8px); }
  /* On phones the room scrolls sideways under your thumb instead of pinning */
  .room__track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; -webkit-overflow-scrolling: touch; }
  .room__panel, .room__panel--tall { width: 78vw; scroll-snap-align: center; }
  .room__end { width: 70vw; scroll-snap-align: center; }
}
@media (max-width: 480px) {
  .today__bar { grid-template-columns: 1fr; }
  .loyalty__stamps { gap: 14px 4px; }
}
