/* Morrow — coffee shop. Fraunces + DM Sans. Oat cream, espresso, terracotta, sage. */
:root {
  --bg: #f3ebde;
  --soft: #e9decb;
  --ink: #2a1c13;
  --muted: #77675a;
  --line: rgba(42, 28, 19, 0.16);
  --accent: #c2512c;
  --sage: #7f8b6b;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.9, 0.25, 1);
  --pad: clamp(20px, 5vw, 76px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: 10px 16px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }
.wrap { width: 100%; max-width: 1400px; margin: 0 auto; padding-inline: var(--pad); }

.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.h2 { font-family: var(--serif); font-weight: 340; font-size: clamp(38px, 5.4vw, 82px); line-height: 1.02; letter-spacing: -0.03em; font-variation-settings: 'opsz' 144; max-width: 14ch; }
em { font-style: italic; font-weight: 300; color: var(--accent); }

/* Motion primitives */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease) var(--d, 0ms), transform 1.2s var(--ease) var(--d, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="clip"] { opacity: 1; transform: none; background: none; }
.js [data-reveal="clip"] > img { clip-path: inset(100% 0 0 0); transition: clip-path 1.5s var(--ease) var(--d, 0ms) !important; }
.js [data-reveal="clip"].is-in > img { clip-path: inset(0); }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.w-i { display: inline-block; transform: translateY(112%); transition: transform 1.15s var(--ease); }
.is-in .w-i { transform: none; }

.media { position: relative; overflow: hidden; border-radius: 22px; }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.media img[data-parallax] { position: absolute; left: 0; top: -8%; height: 116%; transition: none; will-change: transform; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 15px 28px; border-radius: 999px; font-size: 15px; font-weight: 500; border: 1px solid transparent; cursor: pointer; transition: background 0.45s var(--ease), color 0.45s var(--ease), transform 0.45s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn--dark { background: var(--ink); color: var(--bg); padding: 11px 22px; font-size: 14px; }
.btn--dark:hover { background: var(--accent); }
.btn--accent { background: var(--accent); color: #fff7ec; }
.btn--accent:hover { background: var(--ink); }
.link { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; padding-bottom: 4px; border-bottom: 1px solid var(--ink); }
.link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform 0.5s var(--ease); }
.link:hover svg { transform: translateX(5px); }

/* Header */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 20px var(--pad);
  transition: padding 0.5s var(--ease), background 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.header.is-scrolled { padding-block: 12px; background: rgba(243, 235, 222, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.brand { font-family: var(--serif); font-size: 32px; font-weight: 400; font-style: italic; letter-spacing: -0.03em; line-height: 1; }
.nav { display: flex; gap: clamp(16px, 2.4vw, 36px); }
.nav a { position: relative; font-size: 15px; font-weight: 500; padding: 4px 0; }
.nav a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.header__right { display: flex; align-items: center; justify-content: flex-end; gap: 22px; }
.open { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); }
.open i { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 0 rgba(127, 139, 107, 0.5); animation: pulse 2.6s ease-out infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 9px rgba(127, 139, 107, 0); } }
.burger { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative; justify-self: end; }
.burger span { position: absolute; left: 10px; right: 10px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 0.5s var(--ease), top 0.5s var(--ease); }
.burger span:first-child { top: 18px; }
.burger span:last-child { top: 26px; }
.nav-open .burger span:first-child { top: 22px; transform: rotate(45deg); }
.nav-open .burger span:last-child { top: 22px; transform: rotate(-45deg); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 100px); align-items: center; min-height: 100svh; padding-top: 130px; padding-bottom: clamp(48px, 7vw, 100px); }
.hero__title { font-family: var(--serif); font-weight: 320; font-size: clamp(52px, 8.2vw, 136px); line-height: 0.94; letter-spacing: -0.045em; font-variation-settings: 'opsz' 144; }
.hero__lede { margin-top: 34px; max-width: 44ch; color: var(--muted); font-size: 19px; }
.hero__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; margin-top: 40px; }
.hero__visual { position: relative; justify-self: center; width: min(100%, 500px); }
.arch { position: relative; overflow: hidden; aspect-ratio: 4 / 5.4; border-radius: 999px 999px 22px 22px; }
.arch img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; will-change: transform; }
.hero__small { position: absolute; left: -17%; bottom: 7%; width: 40%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 8px solid var(--bg); }
.hero__small img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; right: -9%; top: 5%; width: 138px; height: 138px; border-radius: 50%; background: var(--accent); color: #fff7ec; display: grid; place-items: center; }
.badge > svg:first-child { position: absolute; inset: 0; animation: spin 26s linear infinite; }
.badge text { font-family: var(--sans); font-size: 15px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; fill: currentColor; }
.badge__cup { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Marquee */
.marquee { overflow: hidden; background: var(--ink); color: var(--bg); padding: 20px 0; }
.marquee__track { display: flex; align-items: center; gap: 40px; width: max-content; animation: marquee 46s linear infinite; padding-left: 40px; }
.marquee span { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(22px, 2.4vw, 32px); white-space: nowrap; }
.marquee i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Menu */
.section-head { margin-bottom: clamp(44px, 6vw, 84px); }
.section-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.section-head__aside { max-width: 34ch; color: var(--muted); }
.menu { padding-block: clamp(90px, 12vw, 170px); }
.menu__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 64px); }
.icon { width: 46px; height: 46px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.menu__col h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; letter-spacing: -0.02em; margin: 18px 0 14px; }
.menu__col li { display: flex; align-items: baseline; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); transition: color 0.4s var(--ease), padding 0.5s var(--ease); }
.menu__col li:last-child { border-bottom: 1px solid var(--line); }
.menu__col li::after { content: ''; order: 2; flex: 1; border-bottom: 1px dotted rgba(42, 28, 19, 0.35); transform: translateY(-4px); }
.menu__col li span { order: 1; }
.menu__col li b { order: 3; font-family: var(--serif); font-weight: 400; font-size: 19px; }
.menu__col li:hover { color: var(--accent); padding-left: 8px; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 7vw, 120px); align-items: center; padding-bottom: clamp(90px, 12vw, 170px); }
.split__a { aspect-ratio: 4 / 5; }
.split__copy > p:not(.eyebrow) { margin-top: 28px; color: var(--muted); max-width: 46ch; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.stats dt { font-family: var(--serif); font-weight: 320; font-size: clamp(42px, 4.6vw, 70px); line-height: 1; letter-spacing: -0.04em; }
.stats dt small { font-size: 0.4em; margin-left: 4px; color: var(--accent); letter-spacing: 0; }
.stats dd { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* Beans */
.beans { background: var(--soft); padding-block: clamp(90px, 12vw, 170px); border-radius: clamp(28px, 4vw, 56px); margin-inline: clamp(8px, 1.4vw, 20px); }
.bags { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); }
.bag { border-radius: 26px; padding: clamp(22px, 2.4vw, 34px); display: flex; flex-direction: column; justify-content: space-between; min-height: 480px; transition: transform 0.8s var(--ease), box-shadow 0.8s var(--ease); }
.bag:hover { transform: translateY(-8px); box-shadow: 0 30px 50px -30px rgba(42, 28, 19, 0.45); }
.bag--a { background: var(--accent); color: #fff7ec; }
.bag--b { background: var(--sage); color: #f7f4e8; }
.bag--c { background: var(--ink); color: var(--bg); }
.bag__origin { font-size: 13px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.8; }
.bag h3 { font-family: var(--serif); font-weight: 340; font-size: clamp(30px, 3vw, 44px); line-height: 1.05; letter-spacing: -0.03em; margin-top: 8px; }
.bag__label svg { width: 116px; height: 116px; margin: 36px 0 28px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; opacity: 0.9; transition: transform 1.2s var(--ease); }
.bag:hover .bag__label svg { transform: rotate(8deg) scale(1.04); }
.bag__notes { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 21px; }
.bag__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.28); }
.roast { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.roast span { margin-right: 6px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.roast i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; }
.roast i.on { background: currentColor; }
.bag__buy { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 26px; }
.bag__buy svg { width: 40px; height: 40px; padding: 10px; border-radius: 50%; border: 1px solid currentColor; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform 0.6s var(--ease), background 0.4s var(--ease); }
.bag__buy:hover svg { transform: rotate(90deg); background: rgba(255, 255, 255, 0.18); }

/* Craft */
.craft { padding-block: clamp(90px, 12vw, 170px); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 48px); counter-reset: step; }
.steps li { padding-top: 22px; border-top: 1px solid var(--ink); }
.steps__no { font-size: 13px; font-weight: 500; letter-spacing: 0.14em; color: var(--accent); }
.steps h3 { font-family: var(--serif); font-weight: 360; font-size: clamp(28px, 2.8vw, 40px); letter-spacing: -0.03em; margin: 34px 0 10px; }
.steps p { color: var(--muted); font-size: 16px; }
.craft__media { display: grid; grid-template-columns: 1.7fr 1fr; gap: clamp(16px, 2vw, 28px); margin-top: clamp(48px, 7vw, 96px); }
.craft__media .media { aspect-ratio: auto; height: clamp(260px, 36vw, 520px); }

/* Visit */
.visit { padding-bottom: clamp(90px, 12vw, 170px); }
.shops { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 28px); }
.shop .media { aspect-ratio: 4 / 3; }
.shop:hover .media img { transform: scale(1.04); }
.shop__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-top: 20px; }
.shop h3 { font-family: var(--serif); font-weight: 380; font-size: 30px; letter-spacing: -0.02em; }
.shop p { color: var(--muted); font-size: 15px; }
.shop__hours { text-align: right; }

/* Subscribe */
.subscribe { background: var(--accent); color: #fff7ec; padding-block: clamp(80px, 10vw, 150px); border-radius: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px) 0 0; }
.subscribe__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 7vw, 120px); align-items: end; }
.subscribe__title { font-family: var(--serif); font-weight: 320; font-size: clamp(38px, 5.4vw, 84px); line-height: 1; letter-spacing: -0.035em; }
.subscribe em { color: var(--ink); }
.signup { position: relative; margin-top: 28px; }
.signup input { width: 100%; padding: 20px 76px 20px 26px; border-radius: 999px; border: 1.5px solid rgba(255, 247, 236, 0.55); background: transparent; color: #fff7ec; font-size: 17px; transition: border-color 0.4s var(--ease), background 0.4s var(--ease); }
.signup input::placeholder { color: rgba(255, 247, 236, 0.7); }
.signup input:focus { outline: none; border-color: #fff7ec; background: rgba(255, 247, 236, 0.1); }
.signup button { position: absolute; right: 7px; top: 7px; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); cursor: pointer; display: grid; place-items: center; transition: transform 0.5s var(--ease); }
.signup button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.signup button:hover { transform: scale(1.08); }
.signup__note { margin-top: 14px; font-family: var(--serif); font-style: italic; font-size: 19px; min-height: 1.6em; opacity: 0; transition: opacity 0.6s var(--ease); }
.signup__note.is-shown { opacity: 1; }

/* Footer */
.footer { background: var(--ink); color: var(--bg); padding-top: clamp(56px, 7vw, 96px); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; padding-bottom: clamp(48px, 6vw, 80px); }
.footer__brand { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(56px, 8vw, 120px); line-height: 0.9; letter-spacing: -0.04em; }
.footer h3 { font-size: 13px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.footer__grid a { display: block; padding: 3px 0; opacity: 0.75; transition: opacity 0.4s var(--ease); }
.footer__grid a:hover { opacity: 1; }
.footer__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 22px; border-top: 1px solid rgba(243, 235, 222, 0.16); font-size: 14px; opacity: 0.7; }

/* Responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 120px; }
  .hero__visual { width: min(78%, 420px); margin-top: 20px; }
  .menu__grid, .bags { grid-template-columns: 1fr; }
  .bag { min-height: 0; }
  .split, .subscribe__inner { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .open { display: none; }
}
@media (max-width: 820px) {
  .header { grid-template-columns: 1fr auto; }
  .brand { grid-column: 1; grid-row: 1; z-index: 2; }
  .burger { display: block; z-index: 2; }
  .header__right { display: none; }
  .nav {
    position: fixed; inset: 0; background: var(--bg);
    flex-direction: column; justify-content: center; gap: 4px; padding: var(--pad);
    opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease), visibility 0.5s;
  }
  .nav a { font-family: var(--serif); font-size: 46px; font-weight: 320; letter-spacing: -0.03em; }
  .nav-open .nav { opacity: 1; visibility: visible; }
  .nav-open { overflow: hidden; }
}
@media (max-width: 600px) {
  .shops, .craft__media { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps h3 { margin-top: 14px; }
  .shop__row { flex-direction: column; gap: 8px; }
  .shop__hours { text-align: left; }
  .badge { width: 104px; height: 104px; right: -6%; }
  .badge__cup { width: 30px; height: 30px; }
  .stats { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
