/* Maison Ardent: the first screen is composed for a 1440 x 852 viewport (the
   coverflow preview); the rest of the page and the phone layout follow it. */

:root {
  --cream: #f3ede3;
  --flour: #faf7f1;
  --crust: #8a5a33;
  --ink: #231d18;
  --ink-soft: #4a4038;
  --muted: #7b6f63;
  --rule: rgba(35, 29, 24, 0.14);
  --rule-strong: rgba(35, 29, 24, 0.24);

  --display: "Fraunces", "Newsreader", Georgia, serif;
  --ui: "Manrope", "Inter", system-ui, sans-serif;

  --gutter: 48px;
  --announce-h: 36px;
  --header-h: 80px;
  --rail-h: 148px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
p, h1, h2, h3, dl, dd, figure { margin: 0; }
img { display: block; max-width: 100%; }

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--crust); outline-offset: 3px; }
[id] { scroll-margin-top: 24px; }

/* Announcement bar */
.announce {
  height: var(--announce-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--gutter);
  background: var(--ink);
  color: #e8dece;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.announce__main { color: var(--flour); font-weight: 500; }
.announce__side { color: #b9ad9c; }
.announce__side--end { text-align: right; }

/* Header */
.site-header {
  position: relative;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--rule);
}

.nav ul,
.utils {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.utils { justify-content: flex-end; gap: 28px; }

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.logo__name {
  font-family: var(--display);
  font-size: 29px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
}
.logo__sub {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}

.utils__pickup {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-right: 28px;
  border-right: 1px solid var(--rule);
}
.utils__label { color: var(--muted); font-weight: 500; }
.utils__pickup svg { margin-left: 2px; color: var(--muted); }

.utils__bag { display: inline-flex; align-items: center; gap: 8px; }
.utils__count {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--flour);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}
.utils__count.is-bump { animation: bump 0.45s cubic-bezier(0.2, 0.7, 0.1, 1); }
@keyframes bump { 40% { transform: scale(1.35); background: var(--crust); } }

.menu-toggle { display: none; }

/* Hero: fills what the announcement, header and rail leave of the first screen */
.hero {
  height: clamp(480px, calc(100svh - var(--studio-bar-h, 0px) - var(--announce-h) - var(--header-h) - var(--rail-h)), 820px);
  display: grid;
  grid-template-columns: 40fr 60fr;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 62px 56px 40px var(--gutter);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--crust);
}
.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--crust);
}

.hero h1 {
  margin-top: 26px;
  font-family: var(--display);
  font-size: 64px;
  font-weight: 350;
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.hero h1 em { font-style: italic; font-weight: 300; }

.hero__lede {
  max-width: 436px;
  margin-top: 24px;
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink-soft);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 30px;
  background: var(--ink);
  color: var(--flour);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 2px;
}

.link {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: var(--rule-strong);
}
.link--small { font-size: 13px; }

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.facts dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd {
  margin-top: 6px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.hero__media {
  position: relative;
  min-height: 0;
  overflow: hidden;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.hero__media figcaption {
  position: absolute;
  right: 24px;
  bottom: 22px;
  padding: 7px 12px;
  background: rgba(35, 29, 24, 0.72);
  color: var(--flour);
  font-size: 12px;
  letter-spacing: 0.02em;
  border-radius: 2px;
}

/* Product rail */
.rail {
  height: var(--rail-h);
  display: grid;
  grid-template-columns: 220px 1fr;
  padding: 0 var(--gutter);
  background: var(--flour);
  border-top: 1px solid var(--rule);
}

.rail__intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.rail__intro h2 {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.rail__intro p { font-size: 13px; color: var(--muted); }
.rail__intro .link { margin-top: 10px; align-self: flex-start; }

.rail__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px 0 22px;
  border-left: 1px solid var(--rule);
}

.item__thumb {
  flex: none;
  width: 92px;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--cream);
}
.item__thumb img { width: 100%; height: 100%; object-fit: cover; }

.item__body { flex: 1; min-width: 0; }
.item__tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--crust);
}
.item__tag--quiet { color: var(--muted); }
.item__name {
  margin-top: 6px;
  font-size: 14.5px;
  white-space: nowrap;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}
.item__desc { margin-top: 1px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.item__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 10px;
}
.item__price { font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.item__add {
  min-width: 3.4em;
  text-align: right;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--rule-strong);
}

/* Narrower windows: keep the composition intact rather than reflowing */
@media (max-width: 1360px) {
  .rail__list li:nth-child(4) { display: none; }
  .rail__list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1200px) {
  :root { --gutter: 32px; }
  .nav li:nth-child(n + 4) { display: none; }
  .hero h1 { font-size: 52px; }
  .rail { grid-template-columns: 200px 1fr; }
}

/* Below the first screen */
.section-head h2,
.story h2 {
  margin-top: 18px;
  font-family: var(--display);
  font-size: 46px;
  font-weight: 350;
  line-height: 1.06;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.section-head h2 em,
.story h2 em { font-style: italic; font-weight: 300; }

/* How pre-ordering works */
.how {
  padding: 112px var(--gutter) 120px;
  border-top: 1px solid var(--rule);
}
.how .section-head { max-width: 640px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin: 64px 0 0;
  padding: 0;
  list-style: none;
}
.steps li { padding-top: 26px; border-top: 1px solid var(--rule-strong); }
.steps__num {
  display: block;
  font-family: var(--display);
  font-size: 15px;
  font-style: italic;
  color: var(--crust);
}
.steps h3 {
  margin-top: 18px;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.012em;
}
.steps p { max-width: 360px; margin-top: 12px; font-size: 15px; line-height: 1.65; color: var(--ink-soft); }

/* The bakery */
.story {
  display: grid;
  grid-template-columns: 50fr 50fr;
  background: var(--flour);
  border-top: 1px solid var(--rule);
}
.story__media { min-height: 640px; overflow: hidden; }
.story__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }

.story__copy {
  align-self: center;
  max-width: 560px;
  padding: 96px var(--gutter) 96px 88px;
}
.story__copy h2 + p { margin-top: 30px; }
.story__copy p:not(.eyebrow) { font-size: 16px; line-height: 1.7; color: var(--ink-soft); }
.story__copy p + p { margin-top: 16px; }

.story__stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 40px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.story__stats dt {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 350;
  line-height: 1;
  letter-spacing: -0.02em;
}
.story__stats dd { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--muted); max-width: 130px; }

/* Visit */
.visit {
  padding: 112px var(--gutter) 120px;
  border-top: 1px solid var(--rule);
}
.visit__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-top: 56px;
}
.visit__grid > div { padding-top: 22px; border-top: 1px solid var(--rule-strong); }
.visit h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.visit__grid p { margin-top: 12px; font-family: var(--display); font-size: 19px; line-height: 1.45; letter-spacing: -0.005em; }
.visit__grid .link { display: inline-block; margin-top: 16px; }

/* Footer */
.footer {
  padding: 72px var(--gutter) 40px;
  background: var(--ink);
  color: #e8dece;
}
.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(250, 247, 241, 0.14);
}
.footer__brand .logo__name { font-size: 34px; color: var(--flour); }
.footer__brand p { margin-top: 14px; font-size: 14px; color: #b9ad9c; }
.footer__links { display: grid; gap: 12px; align-content: start; font-size: 14px; }
.footer__links a { color: #e8dece; transition: color 0.2s; }
.footer__links a:hover { color: var(--flour); text-decoration: underline; text-underline-offset: 5px; }
.footer__fine { margin-top: 28px; font-size: 12.5px; color: #9c907f; }

/* Tablet and phone: one column, everything reflows */
@media (max-width: 960px) {
  :root { --gutter: 20px; }

  .announce { height: auto; display: block; padding: 9px var(--gutter); text-align: center; }
  .announce__side { display: none; }

  .site-header { height: 64px; grid-template-columns: 1fr auto 1fr; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 10px; justify-self: start; font-size: 13.5px; font-weight: 500; }
  .menu-toggle__bars { display: grid; gap: 5px; width: 18px; }
  .menu-toggle__bars i { display: block; height: 1.5px; background: currentColor; transition: transform 0.3s; }
  .is-open .menu-toggle__bars i:first-child { transform: translateY(3.25px) rotate(45deg); }
  .is-open .menu-toggle__bars i:last-child { transform: translateY(-3.25px) rotate(-45deg); }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 8px var(--gutter) 20px;
    background: var(--cream);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 24px 40px -28px rgba(35, 29, 24, 0.4);
  }
  .is-open .nav { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; font-size: 17px; }
  .nav li, .nav li:nth-child(n + 4) { display: block; }
  .nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--rule); }

  .logo__name { font-size: 23px; }
  .logo__sub { font-size: 8.5px; }
  .utils li:not(:last-child) { display: none; }

  .hero { height: auto; grid-template-columns: 1fr; }
  .hero__media { order: -1; aspect-ratio: 4 / 3; }
  .hero__media figcaption { right: 12px; bottom: 12px; font-size: 11px; }
  .hero__copy { padding: 36px var(--gutter) 32px; gap: 36px; }
  .hero h1 { margin-top: 18px; font-size: 44px; }
  .hero__lede { margin-top: 18px; font-size: 15.5px; }
  .hero__actions { flex-wrap: wrap; gap: 20px 26px; margin-top: 28px; }
  .facts { gap: 14px; }
  .facts dd { font-size: 16px; }

  .rail { height: auto; display: block; padding: 28px 0 32px; }
  .rail__intro { padding: 0 var(--gutter); }
  .rail__list {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: minmax(260px, 76%);
    gap: 12px;
    margin-top: 20px;
    padding: 0 var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .rail__list::-webkit-scrollbar { display: none; }
  .rail__list li:nth-child(4) { display: flex; }
  .item { padding: 14px; border: 1px solid var(--rule); background: var(--cream); scroll-snap-align: start; }
  .item__thumb { width: 84px; }

  .section-head h2, .story h2 { font-size: 34px; }
  .how, .visit { padding: 72px var(--gutter) 80px; }
  .steps { grid-template-columns: 1fr; gap: 32px; margin-top: 40px; }

  .story { grid-template-columns: 1fr; }
  .story__media { min-height: 0; aspect-ratio: 4 / 3; }
  .story__copy { max-width: none; padding: 56px var(--gutter) 72px; }
  .story__stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .story__stats dt { font-size: 28px; }

  .visit__grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; margin-top: 40px; }

  .footer { padding: 56px var(--gutter) 40px; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 36px 20px; padding-bottom: 40px; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .menu-toggle__label { display: none; }
  .hero h1 { font-size: 40px; }
  .facts { grid-template-columns: repeat(3, auto); justify-content: space-between; }
  .facts dt { font-size: 10px; letter-spacing: 0.1em; }
  .visit__grid { grid-template-columns: 1fr; }
}
