:root {
  --night: #0d0d2b;
  --indigo: #1b1b4d;
  --fig: #5b2a4e;
  --fig-deep: #3d1b36;
  --flesh: #c9466b;
  --apricot: #e98a64;
  --gold: #f2c46d;
  --cream: #faf6eb;
  --paper: #f6ecd8;
  --kraft: #c9a277;
  --ink: #2a1a14;
  --brown: #6e4b2c;
  --crust: #a8743f;
  --leaf: #5f7a43;
  --sans: "Figtree", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --shadow-text: 0 1px 2px rgb(0 0 0 / .55), 0 4px 22px rgb(0 0 0 / .35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
.calm { scroll-behavior: auto; }
body { margin: 0; font: 500 1.125rem/1.65 var(--sans); color: var(--cream); background: var(--night); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(2.2rem, 6vw, 4rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
em { font-style: italic; font-weight: 500; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--cream); color: var(--ink); padding: 10px 14px; }
.skip:focus { left: 8px; }

/* ---------- Sky: a tall gradient moved with transform, stars fade, sun rises ---------- */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sky-grad { position: absolute; left: 0; right: 0; top: 0; height: 600vh; will-change: transform;
  background: linear-gradient(180deg, #0d0d2b 0%, #1b1b4d 18%, #33285e 34%, #5b2a4e 50%, #a24f68 62%, #d9735f 72%, #ec9a66 82%, #f4c27a 91%, #f8dfa8 100%); }
.stars { position: absolute; inset: 0; will-change: opacity; }
.stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: .8; }
.stars i:nth-child(3n) { width: 3px; height: 3px; opacity: .5; }
.sun { position: absolute; left: 50%; bottom: 0; width: 120vmax; height: 120vmax; margin-left: -60vmax; border-radius: 50%;
  background: radial-gradient(circle, rgb(255 226 150 / .75) 0, rgb(255 196 120 / .35) 18%, rgb(255 170 110 / 0) 45%);
  transform: translateY(80%); will-change: transform, opacity; opacity: 0; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px 20px;
  background: rgb(13 13 43 / .82); border-bottom: 1px solid rgb(250 246 235 / .12); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.15rem var(--display); white-space: nowrap; }
.brand img { width: 44px; height: 44px; }
.brand i { font-style: italic; font-weight: 500; }
.top nav { display: flex; gap: 4px; margin-left: auto; }
.top nav a { text-decoration: none; padding: 12px 12px; border-radius: 999px; font-weight: 700; font-size: 1rem; }
.top nav a:hover { background: rgb(250 246 235 / .12); }
.chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; padding: 6px 14px; border-radius: 999px;
  background: rgb(250 246 235 / .14); color: inherit; margin: 0; }
.chip::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #e0796b; flex: none; }
.chip.open::before { background: #7fd08a; box-shadow: 0 0 0 4px rgb(127 208 138 / .25); }
.chip:empty { display: none; }
.chip.big { font-size: 1.05rem; padding: 10px 18px; margin: 4px 0 22px; background: rgb(250 246 235 / .16); }

.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--gold); color: var(--ink); font: 700 1.05rem var(--sans); text-decoration: none; border: 2px solid var(--gold); cursor: pointer; }
.btn:hover { background: #ffd98b; }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn.small { min-height: 44px; padding: 0 18px; font-size: .95rem; }
.btn svg { width: 20px; height: 20px; }

.kicker { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.hour { font: italic 500 1.05rem var(--display); letter-spacing: 0; text-transform: none; padding: 2px 12px; border-radius: 999px; border: 1.5px solid currentColor; }
section { position: relative; padding: clamp(72px, 12vw, 140px) clamp(16px, 5vw, 64px); max-width: 1240px; margin: 0 auto; }
.sec-head { max-width: 720px; margin-bottom: 36px; }
.sec-head p:last-child { font-size: 1.15rem; }
.fine { font-size: .95rem; margin-top: 18px; }

/* light text over the night sky gets the two-layer shadow */
.hero, .today .sec-head, .bread .sec-head, .bread .extras, .bread .fine { text-shadow: var(--shadow-text); }
/* by 7 a.m. the sky is light: switch to ink */
.ahead, .story, .coffee, .visit, footer { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { min-height: calc(100svh - 66px); display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; padding-top: 56px; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); margin-bottom: 20px; }
.hero h1 em { color: var(--gold); display: block; }
.lede { font-size: 1.2rem; max-width: 34ch; }
.hero-photo { position: relative; margin: 0; }
.hero-photo img { border-radius: 200px 200px 22px 22px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; box-shadow: 0 30px 60px rgb(0 0 0 / .45); }
.hero-fig { position: absolute; width: 26%; left: -9%; bottom: 8%; transform: rotate(-14deg); }
.hero-photo figcaption { font-size: .85rem; margin-top: 10px; opacity: .8; text-align: right; }

/* ---------- Fresh today: paper tags pinned to baker's linen ---------- */
.linen { position: relative; border-radius: 22px; padding: clamp(22px, 4vw, 44px); color: var(--ink);
  background:
    linear-gradient(90deg, transparent 0 22px, #b8463c 22px 30px, transparent 30px 38px, #b8463c 38px 42px, transparent 42px) left top / 100% 100% no-repeat,
    repeating-linear-gradient(0deg, rgb(110 75 44 / .045) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(90deg, rgb(110 75 44 / .045) 0 2px, transparent 2px 5px),
    #f3ead8;
  padding-left: clamp(60px, 7vw, 84px); box-shadow: 0 30px 70px rgb(0 0 0 / .35); }
.board { display: grid; gap: 30px; }
.board h3 { font-size: 1.45rem; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.board h3 svg { width: 22px; height: 26px; }
.tags { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px 18px; }
.tag { position: relative; background: #e2c39a; border-radius: 6px 6px 14px 14px; padding: 26px 16px 16px; transform-origin: 50% 0;
  clip-path: polygon(14% 0, 86% 0, 100% 12%, 100% 100%, 0 100%, 0 12%); box-shadow: inset 0 0 0 1px rgb(110 75 44 / .25); }
.tag:nth-child(even) { background: #ead2ad; }
.tag::before { content: ""; position: absolute; top: 9px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #f3ead8; box-shadow: inset 0 0 0 2px rgb(110 75 44 / .5); }
.tag b { display: block; font: 600 1.2rem/1.2 var(--display); }
.tag span { display: block; font-size: 1rem; line-height: 1.5; margin-top: 6px; }
.tag img { border-radius: 8px; margin: 0 0 12px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.tag.photo { grid-row: span 2; }
.js .tag { opacity: 0; transform: rotate(-7deg) translateY(-10px); transition: opacity .4s, transform .7s cubic-bezier(.3, 1.6, .5, 1); }
.js .tag.in { opacity: 1; transform: rotate(var(--tilt, 0deg)); }
.tag:hover { --tilt: 0deg !important; }
.coming { margin: 26px 0 0; font: italic 500 1.2rem var(--display); }

/* ---------- Bread ---------- */
.loaves { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.loaf-card { background: var(--paper); color: var(--ink); border-radius: 18px; padding: 18px 18px 20px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-content: start; }
.loaf-card svg { grid-column: 1 / -1; width: 100%; height: 110px; margin-bottom: 8px; }
.loaf-photo { grid-column: 1 / -1; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; margin-bottom: 10px; }
.js .loaf-photo { opacity: 0; transform: translateY(14px) scale(.97); transition: opacity .7s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .in .loaf-photo { opacity: 1; transform: none; }
.loaf-card b { font: 600 1.25rem/1.2 var(--display); }
.loaf-card .price { font-weight: 700; font-size: 1.15rem; }
.loaf-card span:not(.price) { grid-column: 1 / -1; font-size: 1rem; line-height: 1.5; margin-top: 4px; }
.score { fill: none; stroke: #f6e3c0; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .score { stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s cubic-bezier(.6, 0, .2, 1); }
.js .in .score { stroke-dashoffset: 0; }
.loaf-card .kind { grid-column: 1 / -1; font: 700 .8rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--fig); }
.extras { margin-top: 26px; font-size: 1.1rem; max-width: 760px; }

/* ---------- Order ahead: a kraft bag and an order slip ---------- */
.ahead { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 5vw, 70px); align-items: start; }
.bag { position: sticky; top: 110px; max-width: 360px; margin: 0 auto; width: 100%; }
.bag-top { height: 46px; background: linear-gradient(180deg, #b48b5f, #c9a277); clip-path: polygon(0 100%, 0 30%, 6% 0, 12% 30%, 18% 0, 24% 30%, 30% 0, 36% 30%, 42% 0, 48% 30%, 54% 0, 60% 30%, 66% 0, 72% 30%, 78% 0, 84% 30%, 90% 0, 96% 30%, 100% 0, 100% 100%); }
.bag-body { background: linear-gradient(90deg, #b88f62 0 4%, #cfa97c 4% 96%, #b88f62 96%); padding: 30px 24px 40px; text-align: center; border-radius: 0 0 10px 10px; box-shadow: 0 30px 60px rgb(60 30 10 / .3); }
.bag-body img { width: 62%; margin: 0 auto 18px; border-radius: 50%; }
.bag-stamp { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; margin: 0; }
.bag-name { font: italic 500 2rem/1.2 var(--display); margin: 4px 0 0; min-height: 1.2em; overflow-wrap: anywhere; }
.ahead-copy > p { font-size: 1.15rem; }
.slip { background: var(--cream); border-radius: 16px; padding: 22px; margin-top: 20px; box-shadow: 0 20px 50px rgb(60 30 10 / .18);
  background-image: repeating-linear-gradient(180deg, transparent 0 35px, rgb(91 42 78 / .1) 35px 36px); }
.slip fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.slip legend { font-weight: 700; margin-bottom: 8px; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.picks label { position: relative; }
.picks input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.picks span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--fig); color: var(--fig); font-weight: 700; font-size: 1rem; background: #fff; }
.picks input:checked + span { background: var(--fig); color: var(--cream); }
.picks input:focus-visible + span { outline: 3px solid var(--apricot); outline-offset: 2px; }
.slip .name { display: grid; gap: 6px; font-weight: 700; margin-bottom: 14px; }
.slip input[type=text] { font: 500 1.1rem var(--sans); min-height: 48px; padding: 0 14px; border-radius: 10px; border: 2px solid rgb(42 26 20 / .3); background: #fff; color: var(--ink); max-width: 320px; }
.msg { background: #fff; border-left: 5px solid var(--fig); padding: 14px 16px; border-radius: 8px; font-size: 1.05rem; }
.slip .btn.ghost { color: var(--fig); }

/* ---------- Story ---------- */
.story { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 70px); align-items: center; }
.story-copy > p { font-size: 1.15rem; }
.timeline { list-style: none; padding: 0; margin: 26px 0; border-left: 3px solid var(--fig); }
.timeline li { padding: 6px 0 12px 22px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 13px; width: 15px; height: 15px; border-radius: 50%; background: var(--fig); }
.timeline li:last-child::before { background: var(--cream); box-shadow: inset 0 0 0 3px var(--fig); }
.timeline b { display: block; font: 600 1.1rem var(--display); color: var(--fig); }
.press a { font-weight: 700; }
.story-photos { position: relative; height: clamp(440px, 52vw, 640px); }
.sp { position: absolute; margin: 0; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 50px rgb(60 30 10 / .3); background: var(--paper); padding: 8px; }
.sp img { border-radius: 12px; width: 100%; height: 100%; object-fit: cover; }
.sp.a { width: 58%; height: 78%; left: 0; top: 0; transform: rotate(-3deg); }
.sp.b { width: 44%; height: 56%; right: 0; top: 10%; transform: rotate(4deg); }
.sp.c { width: 40%; height: 46%; right: 12%; bottom: 0; transform: rotate(-2deg); }

/* ---------- Coffee ---------- */
.coffee { display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: center; max-width: 980px; }
.cup { width: 100%; }
.steam { fill: none; stroke: var(--fig); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .steam { stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s ease-out; }
.js .in .steam, .js .coffee.in .steam { stroke-dashoffset: 0; }
.coffee p { font-size: 1.15rem; }
.drinks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.drinks li { background: var(--cream); border: 2px solid var(--fig); color: var(--fig); padding: 6px 16px; border-radius: 999px; font-weight: 700; }

.soon { margin-top: 28px; }
.soon h3 { font-size: 1.35rem; color: var(--fig); margin-bottom: .3em; }
.soon p { font-size: 1.05rem; margin: 0 0 12px; }
.soon .drinks li { background: transparent; border-style: dashed; }

/* ---------- Visit ---------- */
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card { background: rgb(250 246 235 / .92); border-radius: 20px; padding: 26px; box-shadow: 0 20px 50px rgb(60 30 10 / .15); }
.card h3 { color: var(--fig); }
.ask { grid-column: 1 / -1; }
.ask-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 8px; }
.ask-form label { display: grid; gap: 6px; font-weight: 700; font-size: 1rem; }
.ask-form .wide { grid-column: 1 / -1; }
.ask-form input, .ask-form textarea { font: 500 1.05rem var(--sans); min-height: 48px; padding: 10px 14px; border-radius: 10px; border: 2px solid rgb(42 26 20 / .3); background: #fff; color: var(--ink); width: 100%; box-sizing: border-box; }
.ask-form .fine { margin-top: 0; }
@media (max-width: 600px) { .ask-form { grid-template-columns: 1fr; } }
address { font-style: normal; font-size: 1.3rem; font-weight: 700; margin-bottom: 14px; }
.card .chip { background: var(--fig); color: var(--cream); margin-bottom: 18px; }
.card .btn.ghost { color: var(--fig); }
.hours { width: 100%; border-collapse: collapse; font-size: 1.1rem; }
.hours th, .hours td { text-align: left; padding: 9px 10px; border-bottom: 1px solid rgb(42 26 20 / .12); }
.hours td { text-align: right; }
.hours tr.today { background: var(--gold); font-weight: 700; }
.hours tr.closed td { opacity: .7; }

footer { text-align: center; padding: 60px 16px 120px; }
footer img { width: 160px; margin: 0 auto 18px; border-radius: 50%; }
footer p { margin: 0 0 8px; font-weight: 700; }
.credit { font-weight: 500 !important; font-size: .9rem; opacity: .8; }

/* ---------- Scroll clock ---------- */
.dial { position: fixed; left: 18px; bottom: 18px; z-index: 15; width: 96px; text-align: center; pointer-events: none; }
.dial svg { width: 96px; height: 96px; display: block; }
.dial .face { fill: rgb(13 13 43 / .55); stroke: rgb(250 246 235 / .7); stroke-width: 2; }
.dial .ticks line { stroke: rgb(250 246 235 / .7); stroke-width: 2; stroke-linecap: round; }
.dial .horizon { fill: rgb(13 13 43 / .55); }
.dial-sun { fill: var(--gold); will-change: transform; }
.hand-h, .hand-m { stroke: var(--cream); stroke-linecap: round; transform-origin: 50px 50px; will-change: transform; }
.hand-h { stroke-width: 4.5; }
.hand-m { stroke-width: 2.5; }
.pin { fill: var(--gold); }
.dial-time { display: inline-block; white-space: nowrap; margin-top: 6px; font: italic 500 .95rem var(--display); color: var(--cream); background: rgb(13 13 43 / .7); padding: 2px 10px; border-radius: 999px; }

/* ---------- Mobile call bar ---------- */
.callbar { display: none; }

/* ---------- Intro ---------- */
.splash { position: fixed; inset: 0; z-index: 100; background: var(--night); display: grid; place-items: center; animation: lift .6s cubic-bezier(.7, 0, .3, 1) 2.9s forwards; will-change: transform; }
.splash.done { animation: lift .35s ease-in forwards; }
.splash-in { position: relative; width: 260px; height: 300px; display: grid; justify-items: center; align-content: center; }
.loaf { position: absolute; top: 40px; width: 240px; animation: loafout .5s ease-in 1.9s forwards; will-change: transform, opacity; }
.loaf .baked { opacity: 0; animation: fade .7s ease-out 1.15s forwards; }
.cut { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .7s cubic-bezier(.6, 0, .3, 1) .45s forwards; }
.flour { position: absolute; left: 50%; top: 120px; width: 0; height: 0; }
.flour i { position: absolute; width: var(--s); height: var(--s); margin: calc(var(--s) / -2); border-radius: 50%; background: #fbf4e4; opacity: 0;
  transform: translate(var(--x0), var(--y0)); animation: dust 2.5s cubic-bezier(.3, 0, .2, 1) var(--d) forwards; will-change: transform, opacity; }
.splash-badge { position: absolute; top: 34px; width: 200px; height: 200px; opacity: 0; transform: scale(.7); animation: badge .7s cubic-bezier(.2, 1.4, .4, 1) 2s forwards; will-change: transform, opacity; }
.splash-line { position: absolute; bottom: 0; margin: 0; font: italic 500 1.5rem var(--display); color: var(--gold); opacity: 0; animation: fade .6s ease-out 1.3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes loafout { to { opacity: 0; transform: scale(.85); } }
@keyframes badge { to { opacity: 1; transform: scale(1); } }
@keyframes lift { to { transform: translateY(-100%); } }
@keyframes dust {
  0% { opacity: 0; transform: translate(var(--x0), var(--y0)); }
  12% { opacity: .95; }
  62% { opacity: .9; transform: translate(var(--x0), var(--y0)); }
  100% { opacity: 0; transform: translate(var(--x1), var(--y1)); }
}
.calm .splash, .no-splash .splash { display: none; }

@media (max-width: 860px) {
  html { scroll-padding-top: 64px; }
  .top { padding: 8px 12px; gap: 8px; }
  .top nav { display: none; }
  .brand span { display: none; }
  .brand img { width: 46px; height: 46px; }
  .top .chip { display: none; }
  .top .btn.small { margin-left: auto; }
  .hero, .ahead, .story, .coffee, .visit-grid { grid-template-columns: 1fr; }
  .hero { min-height: 0; padding-top: 34px; gap: 30px; }
  .hero-photo { max-width: 460px; width: 92%; margin: 0 auto; }
  .hero-fig { left: -6%; width: 24%; }
  .linen { padding: 22px 16px 22px 50px; background-size: auto, auto, auto; }
  .tags { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .tag { padding: 24px 12px 14px; }
  .tag b { font-size: 1.08rem; }
  .tag span { font-size: .95rem; }
  .tag.photo { grid-column: span 2; grid-row: auto; }
  .tag.photo img { aspect-ratio: 16 / 10; }
  .loaves { grid-template-columns: 1fr 1fr; gap: 12px; }
  .loaf-card { padding: 14px 12px 16px; }
  .loaf-card svg { height: 80px; }
  .loaf-card b { font-size: 1.08rem; }
  .loaf-card span:not(.price) { font-size: .95rem; }
  .bag { position: relative; top: 0; max-width: 260px; }
  .story-photos { height: 460px; }
  .coffee .cup { width: 140px; }
  .dial { left: 66px; top: 9px; bottom: auto; width: auto; z-index: 25; display: flex; align-items: center; gap: 6px; }
  .dial svg { width: 44px; height: 44px; }
  .dial-time { margin: 0; font-size: .95rem; }
  .callbar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--night); border-top: 1px solid rgb(250 246 235 / .15); }
  .callbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; color: var(--cream); text-decoration: none; font-weight: 700; font-size: .9rem; }
  .callbar a:first-child { background: var(--gold); color: var(--ink); }
  .callbar svg { width: 20px; height: 20px; }
  footer { padding-bottom: 110px; }
}
@media (max-width: 380px) { .tags, .loaves { grid-template-columns: 1fr; } .tag.photo { grid-column: auto; } }
@media (prefers-reduced-motion: reduce) {
  .js .tag, .js .score, .js .steam, .js .loaf-photo { transition: none; }
}
