/* Boabă, prăjitorie de cafea din Chișinău (v2 premium pass)
   Palette: Olive + Brick + Paper (kept from v1, deliberately not the beige/brass default)
   Type: Bitter 700/800/900 (slab display, full Cyrillic) / Manrope (body) / JetBrains Mono (data)
   Type system: wordmark 80-140px, section display 41-88px, body 16px, data 12-15px.
   Photo grade: one warm filter (slight warmth + lifted blacks) on every img.ph. */

:root{
  --paper: #EDEEE5;
  --paper-deep: #E2E3D2;
  --ink: #171A12;
  --ink-soft: #4B4F3E;
  --brick: #B23A17;
  --brick-deep: #8C2C10;
  --brick-bright: #E2603A;   /* accent for text/lines on the dark stage, AA vs --ink */
  --olive: #5C6B3F;
  --line: rgba(23,26,18,.16);
  --line-soft: rgba(23,26,18,.10);
  --paper-70: rgba(237,238,229,.78);

  --font-display: 'Bitter', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', 'Segoe UI', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;

  --max: 1180px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --grade: saturate(1.06) sepia(.14) contrast(.9) brightness(1.06);
}

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

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

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3{
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: normal;
  margin: 0 0 .6rem;
}

p{ margin: 0 0 1rem; max-width: 62ch; }

a{ color: var(--brick); }
a:hover{ color: var(--brick-deep); }

img{ max-width: 100%; display: block; }

/* One photographic grade for every photo on the page. */
.ph{ filter: var(--grade); }

.wrap{ max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

.sr-only{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link{
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus{ left: .75rem; top: .75rem; }

:focus-visible{
  outline: 3px solid var(--brick);
  outline-offset: 2px;
}

/* ---------- Top info strip ---------- */
.topbar{
  background: var(--ink);
  color: var(--paper);
  font-size: .82rem;
}
.topbar__inner{
  max-width: var(--max);
  margin: 0 auto;
  padding: .45rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .6rem;
}
.topbar a{ color: var(--paper); text-decoration: underline; text-underline-offset: 2px; }
.topbar a:hover{ color: #fff; }
@media (max-width: 639px){
  .topbar{ font-size: .76rem; }
  /* clean stacked rows: address / hours / tel + ig, no orphan separators */
  .topbar__inner > span[aria-hidden]{ display: none; }
  .topbar__inner span{ white-space: nowrap; }
}

/* ---------- Nav ---------- */
.nav{
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav__inner{
  max-width: var(--max);
  margin: 0 auto;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
}
.nav__brand{
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.nav__links{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
}
.nav__links a{
  display: inline-block;
  /* padding grows the tap target to >=40px tall; the equal negative
     margin cancels it back out of the flex row's own sizing, so the
     nav bar's visible height/wrap pattern is unchanged (the tap area
     simply overlaps into the row gap above/below). */
  padding: .625rem 0;
  margin: -.625rem 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
}
.nav__links a:hover{ color: var(--brick); }
@media (max-width: 639px){
  /* compact 2-row header: brand + lang on top, links in one swipeable row */
  .nav__links{
    order: 3;
    flex-basis: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1.2rem;
    scrollbar-width: none;
  }
  .nav__links::-webkit-scrollbar{ display: none; }
  .nav__links a{ white-space: nowrap; font-size: .9rem; }
}

.nav__lang{ display: flex; gap: .25rem; }
.lang-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: .3rem .55rem;
  cursor: pointer;
}
.lang-btn.is-active{
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: .85rem 1.5rem;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn--primary{
  background: var(--brick);
  color: #fff;
}
.btn--primary:hover{ background: var(--brick-deep); color: #fff; }

/* ---------- Hero: full-bleed scene, wordmark-as-headline ---------- */
.hero{
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  /* fill the viewport minus the header stack (topbar+nav), so the CTA
     stays visible without scroll. The header wraps taller on phones. */
  min-height: calc(100vh - 210px);
  min-height: calc(100svh - 210px);
}
@media (min-width: 640px){
  .hero{
    min-height: min(calc(100vh - 102px), 880px);
    min-height: min(calc(100svh - 102px), 880px);
  }
}
.hero__img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__scrim{
  position: absolute; inset: 0;
  background: linear-gradient(190deg, rgba(23,26,18,.16) 8%, rgba(23,26,18,.86) 94%);
}
.hero__content{
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 7rem 1.5rem 2.75rem;
}
.hero__wordmark{
  font-size: clamp(5rem, 18vw, 8.75rem);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 1.5rem;
}

/* ---------- Marquee ticker ---------- */
.marquee{
  background: var(--olive);
  color: var(--paper);
  overflow: hidden;
  padding: .8rem 0;
}
.marquee__track{
  display: flex;
  width: max-content;
}
.marquee__seg{
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding-right: .75ch;
}
@media (prefers-reduced-motion: no-preference){
  .marquee__track{ animation: marquee-scroll 36s linear infinite; }
}
@keyframes marquee-scroll{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }  /* 4 identical segments: -50% = 2 segments, seamless */
}

/* ---------- Section rhythm ---------- */
section{ padding: 5rem 0; }
@media (max-width: 639px){
  section{ padding: 3.5rem 0; }
}
.hero{ padding: 0; }
/* Clearance under the sticky nav for anchor jumps. Single row from
   640px up; wraps to taller rows below that. */
#meniu, #despre, #boabe, #livrare, #contact, #specialitati{ scroll-margin-top: 85px; }
@media (max-width: 639px){
  #meniu, #despre, #boabe, #livrare, #contact, #specialitati{ scroll-margin-top: 130px; }
}

.sig{ background: var(--paper); }
.menu{ background: var(--paper-deep); }
.roast{ background: var(--ink); color: var(--paper); }   /* the one dark color-block */
.boabe{ background: var(--paper); }
.livrare{ background: var(--paper-deep); }
.contact{ background: var(--paper); }

/* Display tier: every section headline sits in the 41-88px band. */
h2{
  font-size: clamp(2.6rem, 6.5vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -.015em;
  margin-bottom: 1.4rem;
}

/* ---------- Scroll reveals (JS-gated: page complete without JS) ---------- */
@media (prefers-reduced-motion: no-preference){
  html.js .reveal{
    opacity: 0;
    transform: translateY(22px);
  }
  html.js .reveal.is-in{
    opacity: 1;
    transform: none;
    transition: opacity .7s var(--ease), transform .7s var(--ease);
    transition-delay: var(--d, 0s);
  }
}

/* ---------- Shared media hover (zoom inside fixed crop) ---------- */
.media-zoom{ overflow: hidden; }
/* height:auto beats the height="" attribute hint, letting aspect-ratio size the box */
.media-zoom img{ width: 100%; height: auto; object-fit: cover; }
@media (prefers-reduced-motion: no-preference){
  .media-zoom img{ transition: transform .7s var(--ease); }
  .media-zoom{ transition: box-shadow .4s ease; }
}
.sig-card:hover .media-zoom img,
.origin-card:hover .media-zoom img{ transform: scale(1.04); }
.sig-card:hover .media-zoom,
.origin-card:hover .media-zoom{ box-shadow: 0 16px 38px rgba(23,26,18,.18); }

/* ---------- Signature drinks: product-as-hero cards ---------- */
.sig__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2.5rem;
  align-items: start;
}
@media (min-width: 800px){
  .sig__grid{ grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .sig-card:nth-child(2){ margin-top: 3rem; }  /* offset breaks the equal-row grid */
}
.sig-card .media-zoom img{ aspect-ratio: 4 / 5; }
.sig-card__row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 1.1rem;
}
.sig-card__row h3{ font-size: 1.35rem; margin: 0; }
.sig-card__price{
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
}
.sig-card > p{
  color: var(--ink-soft);
  font-size: .92rem;
  margin: .35rem 0 0;
}

/* ---------- Menu ---------- */
.menu-jump{
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 1.2rem 0 2.6rem;
}
.menu-jump a{
  font-family: var(--font-mono);
  font-size: .8rem;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: .4rem .8rem;
}
.menu-jump a:hover{ border-color: var(--brick); color: var(--brick); }

.menu-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem 4rem;
}
@media (min-width: 800px){
  .menu-grid{ grid-template-columns: 1fr 1fr; }
}

/* Oversized display heads over quiet lists: the fine-dining register. */
.menu-cat h3{
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-bottom: .7rem;
}

.menu-list{ list-style: none; margin: 0; padding: 0; }
/* Grid, not flex: a flex row wraps whole items, so a long name pushed
   the leader+price pair onto their own left-aligned line. Grid columns
   let the name's own track shrink/wrap while price keeps its column. */
.menu-item{
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(24px, 1fr) auto;
  align-items: baseline;
  gap: .3rem;
  padding: .55rem 0;
}
.menu-item .mi-name{ font-weight: 600; min-width: 0; }
.menu-item .mi-vol{
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--ink-soft);
  margin-left: .35rem;
}
.menu-item .mi-leader{
  border-bottom: 1px dotted var(--line);
  margin: 0 .3rem;
  transform: translateY(-.3em);
}
.menu-item .mi-price{
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
}
.menu-item .mi-desc{
  grid-column: 1 / -1;
  font-size: .85rem;
  color: var(--ink-soft);
  margin: .1rem 0 0;
  max-width: 60ch;
}

.menu__photos{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 3.5rem;
}
.menu__photos img{
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ---------- Roast stage: dark color-block, sticky curve ---------- */
.roast__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 900px){
  .roast__grid{ grid-template-columns: 1.05fr .95fr; gap: 4.5rem; }
  .roast__stage{ position: sticky; top: 5.5rem; align-self: start; }
}
.roast h2{ color: #fff; }
.roast__lead{
  color: var(--paper-70);
  font-size: 1.05rem;
  max-width: 52ch;
}

.roast-curve{ margin: 1.5rem 0 0; }
.roast-curve__svg{ width: 100%; height: auto; overflow: visible; }
.roast-curve__axis{ stroke: rgba(237,238,229,.25); stroke-width: 1; }
.roast-curve__path{
  fill: none;
  stroke: var(--brick-bright);
  stroke-width: 3;
  stroke-linecap: round;
}
.roast-curve__marker circle{
  fill: var(--ink);
  stroke: var(--paper);
  stroke-width: 2;
}
/* markers hidden until the draw-in only when JS runs; complete without JS */
html.js .roast-curve:not(.is-drawn) .roast-curve__marker circle{ opacity: 0; }
@media (prefers-reduced-motion: no-preference){
  .roast-curve__marker circle{ transition: opacity .4s ease; }
  .roast-curve__marker{ transition: transform .35s var(--ease); }
  .roast-curve__path{ transition: stroke-dashoffset 1.6s var(--ease); }
}
.roast-curve__marker{ transform-box: fill-box; transform-origin: center; }
.roast-curve[data-active="start"] .roast-curve__marker[data-point="start"],
.roast-curve[data-active="crack"] .roast-curve__marker[data-point="crack"],
.roast-curve[data-active="drop"]  .roast-curve__marker[data-point="drop"]{
  transform: scale(1.45);
}
.roast-curve[data-active="start"] .roast-curve__marker[data-point="start"] circle,
.roast-curve[data-active="crack"] .roast-curve__marker[data-point="crack"] circle,
.roast-curve[data-active="drop"]  .roast-curve__marker[data-point="drop"]  circle{
  fill: var(--brick-bright);
  stroke: #fff;
}
.roast-curve__note{
  font-size: .8rem;
  color: var(--paper-70);
  margin: .8rem 0 0;
}

.roast__steps{
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
}
.milestone{
  border-top: 1px solid rgba(237,238,229,.18);
  padding: 1.6rem 0 1.2rem;
}
.milestone__data{
  display: block;
  font-family: var(--font-mono);
  font-size: .85rem;
  color: rgba(237,238,229,.55);
  margin-bottom: .45rem;
}
.milestone h3{
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  color: rgba(237,238,229,.62);
  margin-bottom: .4rem;
}
.milestone p{
  color: var(--paper-70);
  margin: 0;
  max-width: 48ch;
}
@media (prefers-reduced-motion: no-preference){
  .milestone h3, .milestone__data{ transition: color .4s ease; }
}
.milestone.is-current h3{ color: #fff; }
.milestone.is-current .milestone__data{ color: var(--brick-bright); }

/* ---------- Boabele noastre ---------- */
.boabe__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
}
@media (min-width: 700px){
  .boabe__grid{ grid-template-columns: 1fr 1fr; }
}
.origin-card .media-zoom img{ aspect-ratio: 3 / 2; }
.origin-card h3{ font-size: 1.35rem; margin: 1.1rem 0 .2rem; }
.origin-card__meta{
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--brick);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .5rem;
}

/* ---------- Livrare ---------- */
.livrare__badges{
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.2rem;
}
.badge{
  border: 2px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  padding: .8rem 1.4rem;
}
.badge:hover{ background: var(--ink); color: var(--paper); }

/* ---------- Contact ---------- */
.contact__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 860px){
  .contact__grid{ grid-template-columns: .9fr 1.1fr; }
}
.contact__info p{ margin: 0 0 .4rem; }
.contact__tel{
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  margin: .9rem 0 .3rem;
}
.contact__tel:hover{ color: var(--brick); }
.contact__cta{ margin-top: 1rem; }
.contact__alt{ margin-top: .8rem; font-size: .9rem; }
.contact__map{
  position: relative;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  min-height: 360px;
}
.contact__map-fallback{
  position: absolute;
  inset: 0;
  margin: 0;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: .9rem;
  color: var(--ink-soft);
}
.contact__map iframe{ position: relative; z-index: 1; width: 100%; border: 1px solid var(--line); }

/* ---------- Footer ---------- */
.footer{
  background: var(--ink);
  color: var(--paper);
  padding: 3rem 0 2.5rem;
  font-size: .9rem;
}
.footer a{ color: var(--paper); }
.footer__brand{
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 10vw, 6.5rem);
  line-height: 1;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: var(--paper);
  margin-bottom: 1rem;
}
.footer__copy{ color: rgba(237,238,229,.55); margin-top: 1rem; }
