/* =========================================================
   ARTISAN BAKERY — warm European bakery editorial
   Palette: flour cream, parchment, toasted wheat, cocoa, espresso
   Type: Cormorant Garamond (display) + Cabin (UI/body)
   ========================================================= */

:root {
  --flour: #F8F3E4;
  --parchment: #EEE3C8;
  --wheat: #B58A53;
  --wheat-dark: #8E6839;
  --cocoa: #4C3420;
  --espresso: #2B1D10;
  --charcoal: #292621;
  --white: #FFFFFF;
  --ink: #2B1D10;
  --rule: rgba(75, 52, 32, .14);
  --rule-soft: rgba(75, 52, 32, .08);

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Cabin", system-ui, "Segoe UI", sans-serif;

  --maxw: 1300px;
  --gut: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--flour);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: 0; }
ul { list-style: none; padding: 0; }
input { font-family: inherit; }
:focus-visible { outline: 2px solid var(--wheat-dark); outline-offset: 3px; }

.vh, .skip {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip:focus { top: 8px; left: 8px; width: auto; height: auto; clip: auto; background: var(--espresso); color: var(--flour); padding: 10px 16px; z-index: 200; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--espresso); font-weight: 500; line-height: 1.08; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.6rem, 6.5vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
em { font-style: italic; color: var(--wheat-dark); }

.kicker {
  display: inline-block;
  font-family: var(--sans); font-weight: 600;
  font-size: .72rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--wheat-dark); margin-bottom: 1rem;
}

/* ---------- Header ---------- */
.hdr { position: sticky; top: 0; z-index: 80; background: var(--flour); border-bottom: 1px solid var(--rule-soft); transition: box-shadow .3s var(--ease); }
.hdr.is-scrolled { box-shadow: 0 1px 0 var(--rule), 0 8px 30px -20px rgba(43, 29, 16, .25); }
.hdr__bar { max-width: var(--maxw); margin: 0 auto; padding: 1.1rem var(--gut); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--gut); }
.brand { display: inline-flex; align-items: center; gap: .8rem; color: var(--espresso); }
.brand__wheat { width: 32px; height: 32px; color: var(--wheat); transition: transform .6s var(--ease); }
.brand:hover .brand__wheat { transform: rotate(8deg); }
.brand__name { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; line-height: 1; display: block; }
.brand__domain { display: block; font-size: .65rem; letter-spacing: .18em; text-transform: uppercase; color: var(--wheat-dark); margin-top: 2px; }

.nav { display: flex; gap: clamp(1.5rem, 2.5vw, 2.8rem); justify-content: center; }
.nav a {
  position: relative; padding: .4rem 0;
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  color: var(--charcoal); transition: color .3s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--wheat); transition: width .35s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--wheat-dark); }
.nav a:hover::after, .nav a.is-active::after { width: 100%; }

.utils { display: flex; gap: .25rem; justify-self: end; align-items: center; }
.util { width: 40px; height: 40px; display: grid; place-items: center; color: var(--espresso); border-radius: 50%; position: relative; transition: all .3s var(--ease); }
.util svg { width: 19px; height: 19px; }
.util:hover { background: rgba(181, 138, 83, .14); color: var(--wheat-dark); }
.util--bag span {
  position: absolute; top: 2px; right: 0;
  background: var(--wheat); color: var(--white);
  font-size: .65rem; font-weight: 700; min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center; border-radius: 10px;
  transform: scale(0); transition: transform .3s var(--ease);
}
.util--bag span.is-visible { transform: scale(1); }
.util--menu { display: none; flex-direction: column; gap: 5px; }
.util--menu span { width: 22px; height: 1.5px; background: var(--espresso); }

.searchbar { max-width: var(--maxw); margin: 0 auto; padding: 1rem var(--gut) 1.2rem; border-top: 1px solid var(--rule-soft); animation: drop .3s var(--ease); }
.searchbar input {
  width: 100%; padding: .8rem 1rem;
  background: var(--white); border: 1px solid var(--rule);
  font-family: var(--serif); font-size: 1.1rem; color: var(--espresso);
}
.searchbar input:focus { outline: none; border-color: var(--wheat); }
.searchbar button { display: none; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Mobile menu ---------- */
.mnenu {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(82vw, 380px); background: var(--flour);
  transform: translateX(100%); transition: transform .4s var(--ease);
  display: flex; flex-direction: column;
  padding: 2rem;
}
.mnenu[data-open="true"] { transform: none; }
.mnenu__close { position: absolute; top: 1rem; right: 1.2rem; font-size: 2rem; color: var(--wheat-dark); }
.mnenu a { font-family: var(--serif); font-size: 1.8rem; color: var(--espresso); padding: .8rem 0; border-bottom: 1px solid var(--rule-soft); }
.veil { position: fixed; inset: 0; z-index: 90; background: rgba(43, 29, 16, .35); opacity: 0; transition: opacity .35s var(--ease); }
.veil.is-visible { opacity: 1; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: clamp(560px, 90vh, 880px); display: grid; place-items: center; text-align: center; overflow: hidden; background: var(--espresso); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 12, 6, .35) 0%, rgba(20, 12, 6, .25) 40%, rgba(20, 12, 6, .7) 100%); }
.hero__inner { position: relative; z-index: 1; max-width: 900px; padding: 0 var(--gut); color: var(--white); }
.hero__inner .kicker { color: var(--parchment); }
.hero__inner h1 { color: var(--white); text-shadow: 0 2px 30px rgba(0,0,0,.4); }
.hero__inner h1 em { color: var(--parchment); }
.btn-cream {
  display: inline-block; margin-top: 2rem;
  padding: 1rem 2.4rem; background: var(--flour); color: var(--espresso);
  font-weight: 600; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  border-radius: 0;
  transition: all .35s var(--ease);
}
.btn-cream:hover { background: var(--wheat); color: var(--white); transform: translateY(-2px); }
.scroll-cue { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 2; width: 24px; height: 40px; border: 2px solid rgba(248, 243, 228, .5); border-radius: 14px; }
.scroll-cue span { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 3px; height: 8px; background: var(--flour); border-radius: 2px; animation: cue 1.6s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 100% { opacity: 0; top: 22px; } }

/* ---------- Sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(70px, 9vw, 130px) var(--gut); }
.hd { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.hd--center { margin-left: auto; margin-right: auto; text-align: center; }
.hd--between { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }

/* ---------- Featured Collections ---------- */
.coll__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 1.6vw, 22px); }
.coll-card { position: relative; aspect-ratio: 3/4; overflow: hidden; display: block; background: var(--cocoa); }
.coll-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.coll-card:hover img { transform: scale(1.05); }
.coll-card__shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(20, 12, 6, .9) 100%); transition: opacity .4s var(--ease); }
.coll-card__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem; color: var(--white); }
.coll-card__body h3 { color: var(--white); font-size: 1.5rem; margin-bottom: .4rem; }
.coll-card__body p { color: rgba(248, 243, 228, .8); font-size: .85rem; max-width: 24ch; }
.coll-card__arrow {
  position: absolute; top: 1.2rem; right: 1.2rem;
  width: 36px; height: 36px; border: 1px solid rgba(248, 243, 228, .6); border-radius: 50%;
  display: grid; place-items: center; color: var(--flour);
  opacity: 0; transform: translateY(-6px); transition: all .4s var(--ease);
}
.coll-card:hover .coll-card__arrow { opacity: 1; transform: none; }

/* ---------- Heritage ---------- */
.heri { background: var(--parchment); padding: clamp(70px, 9vw, 130px) var(--gut); }
.heri__imgs { max-width: var(--maxw); margin: 0 auto clamp(2.5rem, 5vw, 4rem); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2vw, 28px); }
.heri__imgs figure { overflow: hidden; aspect-ratio: 4/3; }
.heri__imgs img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.heri__imgs figure:hover img { transform: scale(1.04); }
.heri__lede { max-width: 820px; margin: 0 auto; text-align: center; font-family: var(--serif); font-size: clamp(1.15rem, 1.5vw, 1.4rem); line-height: 1.6; color: var(--cocoa); }
.dropcap { float: left; font-size: 4.5em; line-height: .85; padding: .12em .12em 0 0; color: var(--wheat-dark); font-weight: 600; font-family: var(--serif); }

/* ---------- Seasonal ledger ---------- */
.ledger { max-width: 920px; margin: 0 auto; border-top: 1px solid var(--rule); }
.ledger li { border-bottom: 1px solid var(--rule); }
.ledger-row { display: grid; grid-template-columns: 88px 1fr auto auto; align-items: center; gap: 1.4rem; padding: 1.3rem .6rem; transition: padding-left .35s var(--ease), background .35s var(--ease); }
.ledger-row:hover { background: rgba(181, 138, 83, .08); padding-left: 1.2rem; }
.ledger-row__thumb { width: 72px; height: 72px; object-fit: cover; }
.ledger-row__name { font-family: var(--serif); font-size: 1.45rem; color: var(--espresso); display: block; }
.ledger-row__from { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--wheat-dark); }
.ledger-row__desc { display: block; font-size: .88rem; color: var(--charcoal); margin-top: .15rem; }
.ledger-row__price { font-family: var(--serif); font-size: 1.6rem; color: var(--cocoa); white-space: nowrap; }
.ledger-row__arrow { color: var(--wheat); transition: transform .35s var(--ease); }
.ledger-row:hover .ledger-row__arrow { transform: translateX(6px); }

/* ---------- Testimonials ---------- */
.testi { background: var(--parchment); padding: clamp(70px, 9vw, 120px) var(--gut); }
.testi__inner { max-width: var(--maxw); margin: 0 auto; }
.testi__rail { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2vw, 30px); }
.testi-card { background: var(--flour); padding: 2.4rem 2rem 3.4rem; position: relative; text-align: center; }
.testi-card__quote { font-family: var(--serif); font-size: 1.2rem; line-height: 1.5; color: var(--cocoa); font-style: italic; }
.testi-card__mark { font-family: var(--serif); font-size: 4rem; color: var(--wheat); line-height: 0; height: 1rem; display: block; margin-bottom: 1.4rem; }
.testi-card__person { margin-top: 1.4rem; }
.testi-card__avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin: 0 auto .6rem; border: 3px solid var(--flour); box-shadow: 0 0 0 1px var(--rule); display: block; }
.testi-card__name { font-family: var(--serif); font-size: 1.2rem; color: var(--espresso); }
.testi-card__city { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--wheat-dark); margin-top: .2rem; }
.testi__dots { display: flex; justify-content: center; gap: .5rem; margin-top: 2rem; }
.testi__dots button { width: 8px; height: 8px; border-radius: 50%; background: var(--rule); transition: all .3s var(--ease); }
.testi__dots button.is-active { background: var(--wheat); transform: scale(1.3); }

/* ---------- Gallery ---------- */
.gallery__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.gal-item { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--cocoa); cursor: pointer; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .4s var(--ease); }
.gal-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(20, 12, 6, .5) 100%); opacity: 0; transition: opacity .35s var(--ease); }
.gal-item:hover img { transform: scale(1.06); }
.gal-item:hover::after { opacity: 1; }
.gal-item__icon { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; color: var(--flour); opacity: 0; transform: scale(.8); transition: all .35s var(--ease); }
.gal-item:hover .gal-item__icon { opacity: 1; transform: scale(1); }

/* ---------- Wholesale ---------- */
.whole { display: grid; grid-template-columns: 1fr 1fr; min-height: 600px; }
.whole__media img { width: 100%; height: 100%; object-fit: cover; }
.whole__copy { background: var(--espresso); color: var(--flour); padding: clamp(50px, 6vw, 90px) clamp(40px, 5vw, 70px); display: flex; flex-direction: column; justify-content: center; }
.whole__copy .kicker { color: var(--wheat); }
.whole__copy h2 { color: var(--white); margin-bottom: 1.2rem; }
.whole__copy > p { color: rgba(248, 243, 228, .85); margin-bottom: 1.8rem; max-width: 44ch; }
.whole__form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--wheat); font-weight: 600; }
.field input { background: transparent; border: 0; border-bottom: 1px solid rgba(248, 243, 228, .3); color: var(--flour); padding: .6rem 0; font-size: 1rem; }
.field input:focus { outline: none; border-color: var(--wheat); }
.field input.invalid { border-color: #d77b5a; }
.btn-dark {
  margin-top: .8rem; padding: 1rem 2rem; background: var(--wheat); color: var(--white);
  font-weight: 600; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  transition: background .35s var(--ease);
}
.btn-dark:hover { background: var(--white); color: var(--espresso); }
.whole__msg { font-size: .9rem; padding-top: .5rem; }
.whole__msg.ok { color: #c7e8c0; }
.whole__msg.err { color: #f3b3a0; }

/* ---------- Footer ---------- */
.ft { background: var(--espresso); color: rgba(248, 243, 228, .8); padding: clamp(60px, 7vw, 100px) var(--gut) 2rem; }
.ft__top { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr; gap: clamp(28px, 3vw, 48px); padding-bottom: 2.5rem; border-bottom: 1px solid rgba(248, 243, 228, .12); }
.ft .brand { color: var(--white); margin-bottom: 1.4rem; }
.ft__addr { font-size: .92rem; line-height: 1.7; margin-bottom: .8rem; }
.ft__contact a { color: var(--wheat); font-size: .92rem; }
.ft__col h3 { color: var(--wheat); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 1rem; font-family: var(--sans); font-weight: 600; }
.ft__col a { display: block; font-size: .92rem; padding: .25rem 0; color: rgba(248, 243, 228, .8); transition: color .3s var(--ease); }
.ft__col a:hover { color: var(--white); }
.ft__social { display: flex; gap: .5rem; margin-bottom: 1rem; }
.ft__social a { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(248, 243, 228, .25); border-radius: 50%; color: var(--flour); transition: all .3s var(--ease); }
.ft__social a:hover { background: var(--wheat); border-color: var(--wheat); }
.ft__social svg { width: 16px; height: 16px; }
.ft__newsletter { color: var(--wheat) !important; display: inline-block !important; padding-top: .4rem !important; }
.ft__legal { max-width: var(--maxw); margin: 1.4rem auto 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .82rem; color: rgba(248, 243, 228, .55); }
.ft__legal ul { display: flex; gap: 1.4rem; }

/* ---------- Bag drawer ---------- */
.bag { position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(92vw, 420px); background: var(--flour); transform: translateX(100%); transition: transform .4s var(--ease); display: flex; flex-direction: column; box-shadow: -30px 0 80px -30px rgba(0,0,0,.4); }
.bag[data-open="true"] { transform: none; }
.bag__head { display: flex; align-items: baseline; justify-content: space-between; padding: 1.4rem 1.5rem 1rem; border-bottom: 1px solid var(--rule-soft); }
.bag__head h2 { font-size: 1.6rem; }
.bag__close { font-size: 1.8rem; color: var(--wheat-dark); }
.bag__items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.bag__empty { color: var(--wheat); font-style: italic; text-align: center; margin-top: 2rem; font-family: var(--serif); font-size: 1.1rem; }
.bag-line { display: grid; grid-template-columns: 60px 1fr auto; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--rule-soft); align-items: center; }
.bag-line img { width: 60px; height: 60px; object-fit: cover; }
.bag-line h4 { font-family: var(--serif); font-size: 1.1rem; }
.bag-line .price { font-family: var(--serif); color: var(--cocoa); }
.bag__foot { padding: 1.2rem 1.5rem; background: var(--parchment); border-top: 1px solid var(--rule); }
.bag__sum { display: flex; justify-content: space-between; font-family: var(--serif); font-size: 1.3rem; color: var(--espresso); margin-bottom: .8rem; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 30px; left: 50%; transform: translate(-50%, 30px); background: var(--espresso); color: var(--flour); padding: .9rem 1.4rem; font-size: .85rem; z-index: 200; opacity: 0; transition: all .35s var(--ease); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .coll__grid { grid-template-columns: repeat(2, 1fr); }
  .ft__top { grid-template-columns: 1fr 1fr 1fr; }
  .ft__brand { grid-column: 1 / -1; margin-bottom: 1.5rem; }
}
@media (max-width: 860px) {
  .hdr__bar { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .util--menu { display: flex; }
  .util:not(.util--menu):not(.util--bag) { display: none; }
  .testi__rail { grid-template-columns: 1fr; }
  .whole { grid-template-columns: 1fr; }
  .whole__media { aspect-ratio: 16/10; }
}
@media (max-width: 620px) {
  :root { --gut: 20px; }
  .brand__domain { display: none; }
  .hero h1 { line-height: 1.04; }
  .coll__grid { grid-template-columns: 1fr; }
  .heri__imgs { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .ledger-row { grid-template-columns: 64px 1fr; gap: .8rem; padding: 1rem .3rem; }
  .ledger-row__desc, .ledger-row__from-line { display: none; }
  .ledger-row__price { grid-column: 2; font-size: 1.2rem; padding-top: .3rem; }
  .ledger-row__arrow { display: none; }
  .ft__top { grid-template-columns: 1fr 1fr; }
  .ft__brand { grid-column: 1 / -1; }
  .ft__legal { flex-direction: column; text-align: center; }
  .hd--between { flex-direction: column; align-items: flex-start; }
}
