/* Deep Coffee Roasters — "Comptoir de torréfacteur"
   Chaux, acajou, laiton, vert bouteille. Le défilement suit une torréfaction : du clair au foncé. */

:root {
  --chaux: #F5F2EB;
  --pierre: #E7DCC6;
  --blond: #E2CCA6;
  --acajou: #7A3B22;
  --acajou-deep: #5E2C18;
  --brun: #3A2419;
  --vert: #1E4237;
  --laiton: #B8913F;
  --laiton-clair: #D9B66A;
  --espresso: #221A15;
  --nuit: #17110D;
  --grain: #5A4A3F;

  --f-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --f-mono: "Courier Prime", "Courier New", ui-monospace, monospace;
  --f-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 10vw, 8rem);
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--espresso);
  background: var(--chaux);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 500; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--laiton); outline-offset: 3px; border-radius: var(--radius); }

.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .75rem 1rem; background: var(--espresso); color: var(--chaux); }
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: .875rem;
  letter-spacing: .08em;
  margin: 0 0 1.25rem;
  color: var(--acajou);
  display: inline-flex; align-items: center; gap: .75rem;
}
.eyebrow::before { content: ""; width: 2rem; height: 1px; background: currentColor; }
.h2 {
  font-family: var(--f-display);
  font-size: clamp(2.1rem, 5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.h2 em, .hero__sub { font-style: italic; font-weight: 400; }
.h3 { font-family: var(--f-display); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; margin-bottom: 1rem; }
.muted { color: var(--grain); }
.src { font-family: var(--f-mono); font-size: .8em; white-space: nowrap; }
.note { font-family: var(--f-mono); font-size: .95rem; color: var(--acajou); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .8rem 1.5rem;
  font: 600 1rem/1.2 var(--f-body);
  text-decoration: none;
  background: var(--acajou); color: var(--chaux);
  border: 1px solid var(--acajou); border-radius: var(--radius);
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
  cursor: pointer;
}
.btn:hover { background: var(--acajou-deep); border-color: var(--acajou-deep); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--acajou); }
.btn--ghost:hover { background: var(--acajou); color: var(--chaux); }
.btn--small { min-height: 44px; padding: .55rem 1.1rem; font-size: .95rem; }
.btn--light { background: var(--laiton-clair); border-color: var(--laiton-clair); color: var(--espresso); }
.btn--light:hover { background: var(--chaux); border-color: var(--chaux); }
.btn--ghost-light { background: transparent; color: var(--chaux); border-color: rgba(245,242,235,.5); }
.btn--ghost-light:hover { border-color: var(--chaux); background: rgba(245,242,235,.08); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 242, 235, .92);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid rgba(122, 59, 34, .14);
}
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: baseline; gap: .6rem; text-decoration: none; color: var(--espresso); min-height: 44px; align-items: center; }
.brand__word { font-family: var(--f-display); font-weight: 600; font-size: 1.75rem; letter-spacing: .06em; line-height: 1; }
.brand__sub { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .06em; color: var(--acajou); }

.nav { margin-left: auto; }
.nav__list { display: flex; gap: .25rem; }
.nav__list a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .75rem;
  text-decoration: none; font-size: .95rem; font-weight: 500;
  background-image: linear-gradient(var(--laiton), var(--laiton));
  background-size: 0 1px; background-repeat: no-repeat; background-position: .75rem 70%;
  transition: background-size .25s var(--ease), color .2s;
}
.nav__list a:hover { color: var(--acajou); background-size: calc(100% - 1.5rem) 1px; }
.nav__toggle { display: none; }

@media (max-width: 899px) {
  .header-cta { display: none; }
  .nav__toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; background: none; border: 0; color: var(--espresso); cursor: pointer;
  }
  .nav__bars, .nav__bars::before, .nav__bars::after {
    display: block; width: 24px; height: 2px; background: currentColor; position: relative; transition: transform .25s var(--ease);
  }
  .nav__bars::before, .nav__bars::after { content: ""; position: absolute; left: 0; }
  .nav__bars::before { top: -7px; } .nav__bars::after { top: 7px; }
  .nav__toggle[aria-expanded="true"] .nav__bars { background: transparent; }
  .nav__toggle[aria-expanded="true"] .nav__bars::before { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] .nav__bars::after { transform: translateY(-7px) rotate(-45deg); }
  .nav__list {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; gap: 0; padding: .5rem var(--gutter) 1.25rem;
    background: var(--chaux); border-bottom: 1px solid rgba(122,59,34,.2);
    display: none;
  }
  .nav__list.is-open { display: flex; }
  .nav__list a { font-family: var(--f-display); font-size: 1.5rem; padding: .35rem 0; background-position: 0 80%; }
}

/* ---------- Roast gauge ---------- */
.roast { display: none; }
@media (min-width: 1360px) {
  .roast {
    display: flex; flex-direction: column; align-items: center; gap: .75rem;
    position: fixed; left: 1.25rem; top: 50%; transform: translateY(-50%); z-index: 40;
    font-family: var(--f-mono); font-size: .72rem; color: var(--grain);
    mix-blend-mode: multiply;
  }
  .roast__label { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .12em; }
  .roast__track { width: 2px; height: 180px; background: rgba(90,74,63,.2); position: relative; overflow: hidden; }
  .roast__fill {
    position: absolute; inset: 0; transform-origin: top; transform: scaleY(var(--p, 0));
    background: linear-gradient(#9AA77E, #D9BE93 33%, #9A5B34 66%, #221A15);
  }
  .roast__steps { display: flex; flex-direction: column; gap: .2rem; text-align: center; }
  .roast__steps li { opacity: .45; transition: opacity .3s; }
  .roast__steps li.is-on { opacity: 1; color: var(--acajou); font-weight: 700; }
  .roast.is-dark { mix-blend-mode: normal; color: var(--laiton-clair); }
  .roast.is-dark .roast__steps li.is-on { color: var(--laiton-clair); }
  .roast.is-dark .roast__track { background: rgba(245,242,235,.2); }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(1.5rem, 5vw, 4.5rem) 0 var(--section); }
@media (max-width: 899px) {
  .hero__deep { font-size: clamp(4.5rem, 24vw, 7rem); }
  .hero__sub { font-size: 1.6rem; }
  .hero__photo img { border-width: 6px; }
  .hero__photo figcaption { display: none; }
  .hero .eyebrow { margin-bottom: .9rem; font-size: .8rem; letter-spacing: .02em; }
  .hero .eyebrow::before { width: 1.25rem; }
}
.hero__grid { display: grid; gap: 1.75rem; grid-template-areas: "top" "photo" "rest"; }
.hero__top { grid-area: top; }
.hero__rest { grid-area: rest; }
.hero__photo { grid-area: photo; }
.eyebrow sup { font-size: .7em; line-height: 0; }
.hero__title { line-height: .9; margin: 0; }
.hero__deep {
  display: block;
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(5.5rem, 19vw, 11.5rem);
  letter-spacing: .02em; text-transform: uppercase;
  font-variation-settings: "opsz" 96;
}
.hero__sub {
  display: block; font-family: var(--f-display);
  font-size: clamp(1.75rem, 5vw, 2.75rem); color: var(--acajou); margin-top: .35rem;
}
.hero__lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 32ch; color: var(--espresso); margin-bottom: 2rem; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2rem; }
.hero__meta { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; font-size: .95rem; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 36px;
  padding: .35rem .9rem; border-radius: 999px;
  background: rgba(30, 66, 55, .1); color: var(--vert); font-weight: 600;
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--vert); }
.chip.is-closed { background: rgba(122,59,34,.1); color: var(--acajou); }
.chip.is-closed::before { background: var(--acajou); }
.rating { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; text-decoration: none; color: var(--grain); }
.rating:hover { color: var(--acajou); }
.rating__score { font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; color: var(--espresso); }
.rating__stars { color: var(--laiton); letter-spacing: .1em; }

.hero__photo { position: relative; }
.hero__photo img {
  width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: 50% 45%;
  border: 10px solid var(--acajou);
  box-shadow: 0 0 0 1px var(--laiton), 0 30px 60px -30px rgba(34,26,21,.5);
}
.hero__photo figcaption {
  font-family: var(--f-mono); font-size: .8rem; color: var(--grain); margin-top: .9rem;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.05fr .95fr; grid-template-rows: auto auto; grid-template-areas: "top photo" "rest photo"; column-gap: clamp(2.5rem, 5vw, 5rem); row-gap: 1.5rem; align-items: end; }
  .hero__rest { align-self: start; }
  .hero__photo { align-self: center; }
  .hero__photo img { aspect-ratio: 3 / 3.7; }
}

/* ---------- Section stages (the roast curve) ---------- */
section { position: relative; }
.stage-0, .stage-1 { background: var(--chaux); }
.stage-2 { background: var(--pierre); }
.stage-3 { background: var(--blond); }
.stage-4 { background: var(--acajou); color: var(--chaux); }
.stage-5 { background: var(--brun); color: var(--chaux); }
.stage-6 { background: var(--espresso); color: var(--chaux); }
.stage-4 .eyebrow, .stage-5 .eyebrow, .stage-6 .eyebrow { color: var(--laiton-clair); }
.maison, .origines, .comptoir, .galerie, .avis, .infos { padding: var(--section) 0; }

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head__lead { font-size: 1.1rem; color: var(--grain); }

/* ---------- Maison ---------- */
.maison__grid { display: grid; gap: 3rem; align-items: center; }
.maison__text > p { max-width: 58ch; }
.pillars { margin-top: 2rem; border-top: 1px solid rgba(122,59,34,.25); }
.pillars li {
  display: flex; gap: 1rem; align-items: baseline;
  padding: .9rem 0; border-bottom: 1px solid rgba(122,59,34,.25);
  font-weight: 500;
}
.pillars__k { font-family: var(--f-mono); color: var(--acajou); font-size: .9rem; }
.maison__photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
@media (min-width: 900px) {
  .maison__grid { grid-template-columns: 1fr 1.1fr; gap: 5rem; }
  .maison__photo { margin-right: calc(-1 * var(--gutter)); }
}

/* ---------- Origines: typewritten tickets ---------- */
.tickets { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: clamp(3rem, 7vw, 5.5rem); }
.ticket {
  position: relative;
  background: var(--chaux);
  padding: 1.5rem 1.5rem 1.25rem;
  font-family: var(--f-mono);
  border-top: 6px solid var(--vert);
  box-shadow: 0 1px 0 rgba(34,26,21,.08), 0 18px 30px -24px rgba(34,26,21,.45);
}
.ticket::after { /* perforation */
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px;
  background: radial-gradient(circle at 6px -1px, transparent 5px, var(--chaux) 5.5px) repeat-x;
  background-size: 12px 6px;
}
.ticket__no { font-size: .8rem; color: var(--grain); margin-bottom: .5rem; letter-spacing: .08em; }
.ticket__origin { font-family: var(--f-display); font-size: 2rem; line-height: 1.05; margin-bottom: .25rem; }
.ticket__farm { color: var(--acajou); font-weight: 700; margin-bottom: .75rem; }
.ticket__rows { margin: 1rem 0 0; border-top: 1px dashed rgba(34,26,21,.3); }
.ticket__rows div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed rgba(34,26,21,.3); font-size: .9rem; }
.ticket__rows dt { color: var(--grain); }
.ticket__rows dd { margin: 0; text-align: right; }
.ticket--feature { border-top-color: var(--acajou); }
.ticket--feature .ticket__origin { font-size: clamp(2.4rem, 5vw, 3.4rem); }
@media (max-width: 699px) {
  .ticket:not(.ticket--feature) { display: flex; align-items: baseline; gap: 1rem; padding: 1rem 1.25rem; }
  .ticket:not(.ticket--feature) .ticket__no { margin: 0; flex: none; }
  .ticket:not(.ticket--feature) .ticket__origin { font-size: 1.6rem; margin: 0; }
  .ticket:not(.ticket--feature) .ticket__rows { display: none; }
}
@media (min-width: 700px) {
  .tickets { grid-template-columns: repeat(3, 1fr); }
  .ticket--feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; column-gap: 3rem; align-items: end; }
  .ticket--feature .ticket__rows { grid-column: 2; grid-row: 1 / span 3; margin: 0; align-self: center; }
}
@media (min-width: 1000px) {
  .tickets { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .ticket--feature { grid-column: auto; display: block; }
  .ticket--feature .ticket__rows { margin-top: 1rem; }
}

.grain { display: grid; gap: 2rem; align-items: center; }
.grain__photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); }
.grain__text p { max-width: 50ch; }
@media (min-width: 900px) {
  .grain { grid-template-columns: .8fr 1fr; gap: 5rem; }
  .grain__photo img { aspect-ratio: 3/4; max-height: 560px; }
}

/* ---------- Comptoir ---------- */
.comptoir__grid { display: grid; gap: 3rem; }
.comptoir__head > p { max-width: 40ch; }
.comptoir__photo { margin-top: 2rem; }
.comptoir__photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); }
.menu { display: grid; gap: 2.5rem; align-content: start; }
.menu__title {
  font-family: var(--f-mono); font-weight: 700; font-size: .95rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--acajou); padding-bottom: .75rem; border-bottom: 2px solid var(--espresso); margin-bottom: .25rem;
}
.menu__list li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem 1rem;
  padding: 1rem 0; border-bottom: 1px solid rgba(34,26,21,.2);
}
.menu__item { font-family: var(--f-display); font-size: clamp(1.45rem, 2.5vw, 1.9rem); line-height: 1.15; }
.menu__desc { color: var(--grain); font-size: .98rem; }
.menu__foot { font-family: var(--f-mono); font-size: .9rem; color: var(--grain); margin-top: -1rem; }
@media (min-width: 900px) {
  .comptoir__grid { grid-template-columns: .85fr 1fr; gap: 6rem; align-items: start; }
  .menu { padding-top: 4.5rem; }
  .menu__list li { justify-content: space-between; }
  .menu__desc { text-align: right; }
}

/* ---------- Galerie ---------- */
.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); grid-auto-flow: dense; }
.g { overflow: hidden; border-radius: var(--radius); }
.g img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .6s var(--ease); }
.g--tall { grid-row: span 2; }
.g--tall img { aspect-ratio: auto; }
.g:hover img { transform: scale(1.03); }
@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
}

/* ---------- Avis ---------- */
.big-score { font-weight: 600; color: var(--laiton-clair); }
.quotes { display: grid; gap: 1.5rem; }
.quote { margin: 0; padding: 2rem 0 0; border-top: 1px solid rgba(217,182,106,.45); }
.quote p { font-family: var(--f-display); font-style: italic; font-size: clamp(1.4rem, 2.4vw, 1.85rem); line-height: 1.3; margin-bottom: 1.25rem; }
.quote footer { font-family: var(--f-mono); font-size: .95rem; color: var(--laiton-clair); }
.quote footer span { color: rgba(245,242,235,.75); }
@media (min-width: 900px) { .quotes { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }

/* ---------- Infos ---------- */
.infos__grid { display: grid; gap: 3rem; }
.info-block { padding: 1.5rem 0; border-top: 1px solid rgba(245,242,235,.18); }
.info-block__t { font-family: var(--f-mono); font-weight: 700; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--laiton-clair); margin-bottom: .75rem; }
.infos .muted { color: rgba(245,242,235,.75); }
.hours { width: 100%; max-width: 26rem; border-collapse: collapse; }
.hours th, .hours td { padding: .4rem 0; text-align: left; font-weight: 400; border-bottom: 1px dotted rgba(245,242,235,.2); }
.hours td { text-align: right; font-family: var(--f-mono); }
.hours tr.is-today th, .hours tr.is-today td { color: var(--laiton-clair); font-weight: 700; }
.link { color: var(--laiton-clair); text-decoration-thickness: 1px; text-underline-offset: 4px; display: inline-flex; min-height: 44px; align-items: center; font-family: var(--f-mono); font-size: 1.15rem; }
.link:hover { color: var(--chaux); }
.infos__ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.map { position: relative; min-height: 360px; }
.map iframe {
  background:
    linear-gradient(rgba(34,26,21,.0), rgba(34,26,21,.0)),
    repeating-linear-gradient(35deg, rgba(217,182,106,.07) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(-55deg, rgba(217,182,106,.07) 0 1px, transparent 1px 42px),
    #2C221C;
}
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; border-radius: var(--radius); filter: sepia(.25) saturate(.85); }
.map__link { display: inline-flex; align-items: center; min-height: 44px; margin-top: .5rem; color: var(--laiton-clair); font-family: var(--f-mono); font-size: .9rem; }
@media (min-width: 900px) {
  .infos__grid { grid-template-columns: 1fr 1.1fr; gap: 5rem; align-items: stretch; }
  .map { display: flex; flex-direction: column; }
  .map iframe { flex: 1; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--nuit); color: var(--chaux); padding: 3rem 0 3rem; font-size: .92rem; }
.site-footer__inner { display: grid; gap: 1.5rem; }
.site-footer .muted { color: rgba(245,242,235,.7); }
.brand--footer { color: var(--chaux); margin-bottom: .5rem; }
.brand--footer .brand__sub { color: var(--laiton-clair); }
.site-footer__small p { margin: 0 0 .35rem; color: rgba(245,242,235,.7); font-size: .85rem; }
@media (min-width: 900px) { .site-footer__inner { grid-template-columns: 1fr auto; align-items: end; } .site-footer__small { text-align: right; } }

/* ---------- Mobile action bar ---------- */
.actionbar { display: none; }
@media (max-width: 899px) {
  .site-footer { padding-bottom: calc(3rem + 68px + env(safe-area-inset-bottom)); }
  .actionbar {
    display: grid; grid-template-columns: repeat(3, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--espresso); border-top: 2px solid var(--laiton);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .actionbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
    min-height: 64px; color: var(--chaux); text-decoration: none; font-size: .85rem; font-weight: 600;
  }
  .actionbar a + a { border-left: 1px solid rgba(245,242,235,.15); }
  .actionbar svg { width: 22px; height: 22px; fill: none; stroke: var(--laiton-clair); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .actionbar a:active { background: var(--brun); }
  .actionbar a.is-primary { background: var(--acajou); }
  .actionbar a.is-primary svg { stroke: var(--chaux); }
}

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
