/* =========================================================================
   Sienna Bakehouse Cafe
   Direction: Venezuelan panaderia at cafe-con-leche hour.
   Espresso brown + guava (guayaba) rose. Piazzolla / Hanken Grotesk / DM Mono.
   ========================================================================= */

:root {
  --espresso:    #2E1B10;
  --cacao:       #6F4324;
  --caramel:     #A9743F;
  --caramel-lt:  #C99A6B;   /* caramel at text sizes on espresso (AA) */
  --guayaba:     #B14A5E;
  --guayaba-ink: #98384B;   /* accent at text sizes on light grounds (AA) */
  --guayaba-soft:#E0A0AF;   /* accent on dark espresso grounds */
  --masa:        #F3E9D8;   /* toasted-dough background (not amber) */
  --crema:       #FBF6EE;
  --crema-dim:   #E7D8C4;   /* warm light text on espresso */

  --line:        rgba(46, 27, 16, .14);
  --line-soft:   rgba(46, 27, 16, .08);
  --line-crema:  rgba(251, 246, 238, .18);

  --font-display: "Piazzolla", Georgia, "Times New Roman", serif;
  --font-body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono:    "DM Mono", ui-monospace, "Courier New", monospace;

  --h1: clamp(2.9rem, 7vw, 5.4rem);
  --h2: clamp(2rem, 4.4vw, 3.4rem);
  --h3: clamp(1.35rem, 2.2vw, 1.7rem);

  --maxw: 1180px;
  --pad:  clamp(1.25rem, 5vw, 4rem);
  --sect: clamp(4.5rem, 9vw, 8rem);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--masa);
  color: var(--espresso);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.04;
  margin: 0;
  letter-spacing: -.01em;
}

p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

::selection { background: var(--guayaba); color: var(--crema); }

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

/* ---- shared layout ---------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--guayaba-ink);
  margin: 0 0 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
}
.eyebrow .bean { width: 15px; height: 15px; color: var(--guayaba); }
.on-dark .eyebrow { color: var(--guayaba-soft); }
.on-dark .eyebrow .bean { color: var(--guayaba-soft); }

.section { padding-block: var(--sect); }

.bean { display: inline-block; }
.bean svg { width: 100%; height: 100%; display: block; }

/* ---- header ----------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem var(--pad);
  transition: background .4s var(--ease), border-color .4s var(--ease), padding .4s var(--ease);
  border-bottom: 1px solid transparent;
}
/* scrim so nav text stays legible over bright hero */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(46,27,16,.34), rgba(46,27,16,0));
  opacity: 1;
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
.site-header.scrolled {
  background: var(--espresso);
  border-bottom-color: var(--line-crema);
  padding-block: .55rem;
}
.site-header.scrolled::before { opacity: 0; }

.brand { display: flex; align-items: center; gap: .7rem; position: relative; z-index: 1; }
.brand img { width: 44px; height: 44px; transition: width .4s var(--ease); }
.site-header.scrolled .brand img { width: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: .14em;
  color: var(--crema);
}
.brand-text span {
  font-family: var(--font-mono);
  font-size: .54rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--crema-dim);
  margin-top: .28rem;
}

.nav { display: flex; align-items: center; gap: clamp(1.1rem, 2.4vw, 2.3rem); position: relative; z-index: 1; }
.nav-links { display: contents; }
.nav a {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--crema);
  position: relative;
  padding: .3rem 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1.5px;
  background: var(--guayaba-soft);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--espresso);
  background: var(--guayaba-soft);
  padding: .6rem 1rem;
  border: 1px solid transparent;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.nav-cta:hover, .nav-cta:focus-visible { background: var(--crema); color: var(--espresso); }

.nav-toggle { display: none; }
.mobile-panel { display: none; }

/* ---- hero ------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: clamp(8rem, 17vh, 11rem);
  padding-bottom: var(--sect);
  overflow: hidden;
}
.hero::after { /* hairline base for the whole hero band */
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-copy { max-width: 36ch; }
.hero h1 {
  font-size: var(--h1);
  letter-spacing: -.02em;
}
.hero h1 .light { display: block; font-weight: 200; color: var(--cacao); }
.hero .tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--guayaba-ink);
  margin: 1.1rem 0 0;
  position: relative;
  display: inline-block;
  padding-bottom: .5rem;
}
.hero .tagline::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  height: 2px; width: 100%;
  background: var(--guayaba);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1s var(--ease) .9s;
}
.js-ready .hero .tagline::after { transform: scaleX(0); }
.hero.in .tagline::after { transform: scaleX(1); }

.hero-lead {
  margin-top: 1.6rem;
  font-size: 1.12rem;
  color: var(--cacao);
  max-width: 34ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1.4rem 2rem; margin-top: 2rem; align-items: center; }

.link-cta {
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--espresso);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding-bottom: .35rem;
  border-bottom: 1.5px solid var(--espresso);
  transition: color .25s var(--ease), border-color .25s var(--ease), gap .25s var(--ease);
}
.link-cta svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.link-cta:hover, .link-cta:focus-visible { color: var(--guayaba-ink); border-color: var(--guayaba); gap: .85rem; }
.link-cta.ghost { border-color: var(--line); color: var(--cacao); }
.link-cta.ghost:hover, .link-cta.ghost:focus-visible { color: var(--guayaba-ink); border-color: var(--guayaba); }

/* hero image */
.hero-figure { position: relative; }
.hero-figure .frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--crema);
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero-figure .ring {
  position: absolute;
  width: 132px; height: 132px;
  left: -34px; top: -34px;
  color: var(--guayaba);
}
.hero-figure .ring circle {
  fill: none; stroke: currentColor; stroke-width: 1.4;
  stroke-dasharray: 408; stroke-dashoffset: 408;
}
.hero.in .hero-figure .ring circle { transition: stroke-dashoffset 1.6s var(--ease) .6s; stroke-dashoffset: 0; }
.hero-figure .stamp {
  position: absolute;
  right: -18px; bottom: -18px;
  width: 92px; height: 92px;
  background: var(--masa);
  padding: 9px;
  border: 1px solid var(--line);
}
.hero-figure .stamp img { width: 100%; height: 100%; object-fit: contain; }

/* hero load stagger */
.js-ready .hero [data-rise] { opacity: 0; transform: translateY(18px); }
.hero.in [data-rise] { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.hero.in [data-rise="1"] { transition-delay: .05s; }
.hero.in [data-rise="2"] { transition-delay: .15s; }
.hero.in [data-rise="3"] { transition-delay: .25s; }
.hero.in [data-rise="4"] { transition-delay: .35s; }
.hero.in [data-rise="5"] { transition-delay: .45s; }
.js-ready .hero-figure .frame { clip-path: inset(0 0 100% 0); }
.hero.in .hero-figure .frame { clip-path: inset(0 0 0 0); transition: clip-path 1.1s var(--ease) .3s; }

/* ---- story ------------------------------------------------------------ */
.story { background: var(--crema); border-block: 1px solid var(--line); }
.story-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.story-figure { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line); }
.story-figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.story-figure:hover img { transform: scale(1.04); }
.story h2 { font-size: var(--h2); margin-bottom: 1.4rem; }
.story p { color: var(--cacao); font-size: 1.1rem; max-width: 46ch; }
.story p + p { margin-top: 1rem; }
.story .sign {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--espresso);
  margin-top: 1.6rem;
}

/* ---- menu (signature panaderia board) --------------------------------- */
.menu { background: var(--espresso); color: var(--crema); }
.menu .menu-head { text-align: center; max-width: 40ch; margin: 0 auto clamp(2.5rem, 5vw, 4rem); }
.menu .menu-head .eyebrow { justify-content: center; }
.menu h2 { font-size: var(--h2); color: var(--crema); }
.menu .menu-head p { color: var(--crema-dim); margin-top: 1rem; }

.board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem) clamp(2.5rem, 6vw, 6rem);
}
.cat-title {
  display: flex; align-items: baseline; gap: .75rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--crema);
  padding-bottom: .9rem;
  margin-bottom: .4rem;
  border-bottom: 1px solid var(--line-crema);
}
.cat-title .es { font-weight: 600; }
.cat-title .en {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--guayaba-soft);
  margin-left: auto;
  transform: translateY(-2px);
}

.item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: .9rem;
  padding: .72rem .4rem .72rem 0;
  border-bottom: 1px solid rgba(251,246,238,.07);
  position: relative;
}
.item .tick { color: var(--guayaba-soft); width: 16px; height: 16px; margin-top: .28rem; opacity: 0; transform: translateX(-6px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.item:hover .tick { opacity: 1; transform: translateX(0); }
.item .name { font-family: var(--font-body); font-weight: 600; font-size: 1.02rem; color: var(--crema); transition: color .25s var(--ease); }
.item:hover .name { color: var(--guayaba-soft); }
.item .desc { display: block; font-size: .9rem; color: var(--crema-dim); font-weight: 400; margin-top: .15rem; }
.item .opts { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; color: var(--caramel-lt); margin-top: .35rem; }

.advisory {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-crema);
  font-size: .82rem;
  line-height: 1.6;
  color: var(--crema-dim);
  max-width: 70ch;
}
.advisory b { color: var(--crema); font-weight: 600; letter-spacing: .02em; }

/* ---- gallery ---------------------------------------------------------- */
.gallery .g-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 2.4rem; flex-wrap: wrap; }
.gallery h2 { font-size: var(--h2); }
.gallery .g-head p { color: var(--cacao); max-width: 34ch; margin: 0; }
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(.6rem, 1.4vw, 1rem);
}
.tile { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--line); background: var(--crema); }
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; transition: transform 1.3s var(--ease); }
.tile:hover img { transform: scale(1.05); }
.tile figcaption {
  position: absolute; left: 0; bottom: 0; right: 0;
  font-family: var(--font-mono);
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--crema);
  padding: 1.6rem .9rem .8rem;
  background: linear-gradient(to top, rgba(46,27,16,.78), rgba(46,27,16,0));
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.tile:hover figcaption, .tile:focus-within figcaption { opacity: 1; transform: none; }
.tile.wide { grid-column: span 2; aspect-ratio: 8 / 5; }

/* ---- visit ------------------------------------------------------------ */
.visit { background: var(--crema); border-top: 1px solid var(--line); }
.visit-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.visit h2 { font-size: var(--h2); margin-bottom: 1.8rem; }

.hours { width: 100%; border-collapse: collapse; }
.hours caption { text-align: left; }
.hours tr { border-bottom: 1px solid var(--line-soft); transition: background .25s var(--ease); }
.hours tr:hover { background: rgba(177,74,94,.07); }
.hours th, .hours td { text-align: left; padding: .7rem .4rem; font-weight: 400; }
.hours th { font-family: var(--font-body); font-weight: 500; color: var(--espresso); }
.hours td { font-family: var(--font-mono); font-size: .86rem; color: var(--cacao); text-align: right; letter-spacing: -.01em; }
.hours tr.today th { color: var(--guayaba-ink); font-weight: 700; }
.hours tr.today td { color: var(--guayaba-ink); }
.hours tr.today th::before {
  content: "";
  display: inline-block; width: 7px; height: 7px;
  background: var(--guayaba); margin-right: .6rem; vertical-align: middle;
}

.contact { display: flex; flex-direction: column; gap: 1.6rem; }
.contact .row { display: grid; grid-template-columns: 22px 1fr; gap: .9rem; align-items: start; }
.contact .row svg { width: 19px; height: 19px; color: var(--guayaba); margin-top: .2rem; }
.contact .label { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--cacao); display: block; margin-bottom: .25rem; }
.contact .row a, .contact .row span { color: var(--espresso); font-size: 1.05rem; }
.contact .row a { border-bottom: 1px solid var(--line); transition: color .25s var(--ease), border-color .25s var(--ease); }
.contact .row a:hover, .contact .row a:focus-visible { color: var(--guayaba-ink); border-color: var(--guayaba); }
.map-btn {
  margin-top: .4rem;
  align-self: start;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--crema); background: var(--espresso);
  padding: .85rem 1.4rem; border: 1px solid var(--espresso);
  display: inline-flex; align-items: center; gap: .6rem;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.map-btn:hover, .map-btn:focus-visible { background: var(--guayaba); border-color: var(--guayaba); color: var(--crema); }
.map-btn svg { width: 15px; height: 15px; }

/* ---- footer ----------------------------------------------------------- */
.site-footer { background: var(--espresso); color: var(--crema-dim); padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.footer-top { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.2rem; }
.site-footer .badge {
  width: 132px; height: 132px;
  background: var(--crema);
  border-radius: 50%;
  padding: 12px;
  box-shadow: 0 0 0 1px var(--line-crema), 0 14px 34px rgba(0,0,0,.28);
}
.site-footer .badge img { width: 100%; height: 100%; }
.site-footer .f-tag { font-family: var(--font-display); font-style: italic; font-size: clamp(1.6rem, 3.5vw, 2.4rem); color: var(--crema); }
.site-footer .f-sub { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: var(--guayaba-soft); }
.footer-bot {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-crema);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; color: var(--crema-dim);
}
.footer-bot a { color: var(--crema-dim); transition: color .25s var(--ease); }
.footer-bot a:hover { color: var(--guayaba-soft); }
.footer-bot .f-links { display: flex; gap: 1.4rem; }

/* ---- reveals ---------------------------------------------------------- */
.js-ready .reveal { opacity: 0; transform: translateY(26px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js-ready .stagger > * { opacity: 0; transform: translateY(20px); }
.stagger.in > * { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.stagger.in > *:nth-child(2) { transition-delay: .07s; }
.stagger.in > *:nth-child(3) { transition-delay: .14s; }
.stagger.in > *:nth-child(4) { transition-delay: .21s; }

/* ========================================================================
   Responsive
   ======================================================================== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-figure { max-width: 420px; }
  .hero-copy { max-width: none; }
  .story-grid { grid-template-columns: 1fr; gap: 2rem; }
  .story-figure { order: -1; aspect-ratio: 16 / 10; }
  .board { grid-template-columns: 1fr; gap: 2.5rem; }
  .visit-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .tile.wide { grid-column: span 2; aspect-ratio: 16 / 9; }
}

@media (max-width: 720px) {
  .nav .nav-links, .nav-cta { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--line-crema);
    color: var(--crema); cursor: pointer; position: relative; z-index: 1;
  }
  .nav-toggle svg { width: 22px; height: 22px; }

  .mobile-panel {
    position: fixed; inset: 0;
    background: var(--espresso);
    z-index: 60;
    display: flex; flex-direction: column;
    padding: 5.5rem var(--pad) 2rem;
    transform: translateX(100%);
    transition: transform .4s var(--ease);
  }
  .mobile-panel.open { transform: none; }
  .mobile-panel a {
    font-family: var(--font-display);
    font-size: 2rem; color: var(--crema);
    padding: .9rem 0; border-bottom: 1px solid var(--line-crema);
    display: flex; align-items: center; justify-content: space-between;
  }
  .mobile-panel a .idx { font-family: var(--font-mono); font-size: .8rem; color: var(--guayaba-soft); letter-spacing: .1em; }
  .mobile-panel .m-call {
    margin-top: auto;
    font-family: var(--font-mono); font-size: .9rem; letter-spacing: .08em;
    color: var(--espresso); background: var(--guayaba-soft);
    text-align: center; padding: 1rem; border-bottom: none;
  }
  .mobile-close {
    position: absolute; top: 1rem; right: var(--pad);
    width: 44px; height: 44px; background: transparent; border: none; color: var(--crema); cursor: pointer;
  }
  .mobile-close svg { width: 26px; height: 26px; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .grid { grid-template-columns: 1fr; }
  .tile.wide { grid-column: span 1; aspect-ratio: 4 / 5; }
  .hero { padding-top: 7.5rem; }
  .hero-figure .stamp { width: 72px; height: 72px; right: -10px; bottom: -10px; }
  .hero-figure .ring { width: 100px; height: 100px; left: -20px; top: -20px; }
  .footer-bot { flex-direction: column; text-align: center; }
  .cat-title .en { margin-left: 0; }
  .gallery .g-head { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* ---- reduced motion --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js-ready .reveal, .js-ready .stagger > *, .js-ready .hero [data-rise] { opacity: 1 !important; transform: none !important; }
  .js-ready .hero-figure .frame { clip-path: none !important; }
  .hero-figure .ring circle { stroke-dashoffset: 0 !important; }
  .hero .tagline::after { transform: scaleX(1) !important; }
}
