/* ==========================================================================
   ESPRESSO A MANO — "Crema Editorial" design system
   Warm-paper minimalism · Instrument Serif + DM Sans + DM Mono
   Edit the tokens below to re-theme the entire site.
   ========================================================================== */

:root {
  /* Palette */
  --paper:        #FAF6F0;   /* warm off-white page background */
  --paper-deep:   #F3EDE3;   /* slightly deeper paper for alt sections */
  --oat:          #EDE4D7;   /* section bands, cards */
  --espresso:     #2A1F1A;   /* ink — near-coffee brown */
  --espresso-soft:#5C4D41;   /* secondary text */
  --crema:        #B5793C;   /* caramel accent — graphics, hovers, rules */
  --crema-deep:   #8A5526;   /* accessible caramel for text & links (4.5:1 on paper) */
  --line:         rgba(42, 31, 26, 0.14);
  --line-soft:    rgba(42, 31, 26, 0.08);
  --white:        #FFFFFF;
  --success:      #3E6B4F;
  --error:        #A33A2A;

  /* Type */
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body:    "DM Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "DM Mono", "Courier New", monospace;

  /* Scale */
  --text-hero:    clamp(2.9rem, 7.5vw, 6rem);
  --text-h1:      clamp(2.6rem, 5.5vw, 4.4rem);
  --text-h2:      clamp(2rem, 3.6vw, 3rem);
  --text-h3:      clamp(1.35rem, 2vw, 1.7rem);
  --text-lead:    clamp(1.1rem, 1.5vw, 1.3rem);
  --text-body:    1.0625rem;
  --text-label:   0.8125rem;

  /* Rhythm */
  --space-section: clamp(5rem, 11vw, 9rem);
  --space-block:   clamp(2.5rem, 5vw, 4rem);
  --container:     1200px;
  --container-wide:1360px;
  --radius:        2px;
  --radius-img:    6px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur:  0.7s;

  /* Layers */
  --z-header: 100;
  --z-drawer: 200;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--espresso);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--crema-deep); outline-offset: 3px; }

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

/* ---------- Type helpers ---------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); line-height: 1.25; }
em, .accent-i { font-style: italic; color: var(--crema-deep); }

.kicker {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--crema-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}
.kicker::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--crema);
}
.lead { font-size: var(--text-lead); line-height: 1.6; color: var(--espresso-soft); max-width: 38em; }
.muted { color: var(--espresso-soft); }

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--espresso-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  display: inline-block;
  white-space: nowrap;
}

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }
.container--wide { max-width: var(--container-wide); }
.section { padding: var(--space-section) 0; }
.section--oat { background: var(--oat); }
.section--deep { background: var(--paper-deep); }
.section-head { max-width: 44em; margin-bottom: var(--space-block); }
.section-head .kicker { margin-bottom: 1.1rem; }
.section-head p { margin-top: 1.1rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 2.5vw, 2rem); }

hr.rule { border: 0; border-top: 1px solid var(--line); margin: var(--space-block) 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 52px;
  padding: 0.9rem 2.1rem;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
  touch-action: manipulation;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--espresso); color: var(--paper); }
.btn--primary:hover { background: var(--crema-deep); }
.btn--ghost { border: 1px solid var(--espresso); color: var(--espresso); }
.btn--ghost:hover { background: var(--espresso); color: var(--paper); }
.btn--cream { background: var(--paper); color: var(--espresso); }
.btn--cream:hover { background: var(--crema); color: var(--espresso); }

.link-arrow {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--crema-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--crema);
  transition: gap 0.25s var(--ease), color 0.25s var(--ease);
}
.link-arrow:hover { gap: 0.9rem; color: var(--espresso); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  background: rgba(250, 246, 240, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line-soft); }
.header-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.01em;
}
.brand-name em { color: var(--crema-deep); }
.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--espresso-soft);
  margin-top: 2px;
}
.main-nav { display: flex; align-items: center; gap: clamp(1.2rem, 2.5vw, 2.2rem); }
.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--espresso-soft);
  padding: 0.4rem 0;
  position: relative;
  transition: color 0.25s var(--ease);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--crema);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--espresso); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-dropdown { position: relative; }
.nav-dropdown > button {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--espresso-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0;
  transition: color 0.25s var(--ease);
}
.nav-dropdown > button:hover, .nav-dropdown.is-open > button { color: var(--espresso); }
.nav-dropdown > button svg { transition: transform 0.25s var(--ease); }
.nav-dropdown.is-open > button svg { transform: rotate(180deg); }
.dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 230px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-img);
  box-shadow: 0 18px 50px rgba(42, 31, 26, 0.12);
  padding: 0.6rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.nav-dropdown.is-open .dropdown-panel { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown-panel a {
  display: block;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.dropdown-panel a:hover { background: var(--oat); }
.dropdown-panel a span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--espresso-soft);
  margin-top: 2px;
}
.header-cta { display: inline-flex; }
.header-cta .btn { min-height: 44px; padding: 0.6rem 1.4rem; }

/* Mobile drawer toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 48px; height: 48px;
  align-items: center;
}
.nav-toggle span {
  width: 24px; height: 1.5px;
  background: var(--espresso);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  background: var(--paper);
  padding: 6.5rem clamp(1.5rem, 6vw, 3rem) 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease);
  overflow-y: auto;
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer a {
  font-family: var(--font-display);
  font-size: 2rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.mobile-drawer a span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--crema-deep);
  display: block;
  margin-bottom: 0.2rem;
}
.mobile-drawer .drawer-cta { margin-top: 2rem; border-bottom: 0; }
.drawer-close {
  position: absolute;
  top: 1.1rem; right: clamp(1.25rem, 4vw, 2.5rem);
  width: 48px; height: 48px;
  display: grid; place-items: center;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: calc(76px + clamp(4rem, 9vw, 7rem)) 0 clamp(3.5rem, 7vw, 5.5rem);
}
.page-hero .kicker { margin-bottom: 1.3rem; }
.page-hero h1 { max-width: 12em; }
.page-hero .lead { margin-top: 1.5rem; }
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--espresso-soft);
  margin-bottom: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.breadcrumbs a:hover { color: var(--crema-deep); }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.6rem; color: var(--line); }

/* ---------- Quick answer (AEO) ---------- */
.quick-answer {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--crema);
  border-radius: var(--radius-img);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  margin: 0 0 var(--space-block);
}
.quick-answer .qa-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--crema-deep);
  display: block;
  margin-bottom: 0.8rem;
}
.quick-answer p { font-size: 1.1rem; line-height: 1.65; max-width: 60em; }

/* ---------- Key facts table ---------- */
.facts-table { width: 100%; border-collapse: collapse; }
.facts-table th, .facts-table td {
  text-align: left;
  padding: 0.85rem 1rem 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.facts-table th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--espresso-soft);
  white-space: nowrap;
  width: 11rem;
}
.facts-table td { font-variant-numeric: tabular-nums; }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-img);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(42, 31, 26, 0.1); }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.card:hover .card-media img { transform: scale(1.045); }
.card-body { padding: clamp(1.4rem, 2.5vw, 2rem); }
.card-body h3 { margin-bottom: 0.6rem; }
.card-body .mono-tag { margin-bottom: 1rem; }
.card-body p { color: var(--espresso-soft); font-size: 0.98rem; }
.card-body .link-arrow { margin-top: 1.3rem; }

/* ---------- Figure ---------- */
.figure { border-radius: var(--radius-img); overflow: hidden; position: relative; }
.figure img { width: 100%; height: 100%; object-fit: cover; }
.figure--tall { aspect-ratio: 3 / 4; }
.figure--wide { aspect-ratio: 16 / 9; }
.figure--square { aspect-ratio: 1 / 1; }
.figure-caption {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--espresso-soft);
  margin-top: 0.9rem;
}

/* ---------- Reviews ---------- */
.review-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-img);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  height: 100%;
}
.review-stars { color: var(--crema); letter-spacing: 0.2em; font-size: 0.9rem; }
.review-card blockquote {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.45;
}
.review-card cite {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--espresso-soft);
  margin-top: auto;
}

/* ---------- FAQ accordion ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  text-align: left;
  padding: 1.4rem 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
}
.faq-q .faq-icon {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease);
}
.faq-item.is-open .faq-icon { transform: rotate(45deg); background: var(--oat); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease);
}
.faq-a > div { padding: 0 0 1.5rem; color: var(--espresso-soft); max-width: 60em; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-field { display: flex; flex-direction: column; gap: 0.45rem; }
.form-field--full { grid-column: 1 / -1; }
.form-field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--espresso-soft);
}
.form-field label .req { color: var(--error); }
.form-field input,
.form-field select,
.form-field textarea {
  font: inherit;
  color: var(--espresso);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1.1rem;
  min-height: 52px;
  transition: border-color 0.25s var(--ease);
  width: 100%;
}
.form-field textarea { min-height: 150px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--crema-deep);
}
.form-field .field-error {
  font-size: 0.85rem;
  color: var(--error);
  display: none;
}
.form-field.has-error input, .form-field.has-error textarea { border-color: var(--error); }
.form-field.has-error .field-error { display: block; }
.form-note { font-size: 0.875rem; color: var(--espresso-soft); }
.form-success {
  display: none;
  background: var(--white);
  border: 1px solid var(--success);
  border-left: 3px solid var(--success);
  border-radius: var(--radius-img);
  padding: 1.6rem;
  color: var(--success);
}
form.is-sent .form-success { display: block; }
form.is-sent .form-grid, form.is-sent .form-actions { display: none; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--espresso);
  color: var(--paper);
  border-radius: var(--radius-img);
  padding: clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: var(--paper); }
.cta-band h2 em { color: var(--crema); }
.cta-band p { color: rgba(250, 246, 240, 0.75); margin-top: 1rem; max-width: 32em; }
.cta-band .cta-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--espresso);
  color: rgba(250, 246, 240, 0.78);
  margin-top: var(--space-section);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: clamp(2rem, 4vw, 4rem);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 3rem;
}
.footer-brand .brand-name { color: var(--paper); font-size: 1.7rem; }
.footer-brand .brand-sub { color: rgba(250, 246, 240, 0.5); }
.footer-brand p { margin-top: 1.2rem; font-size: 0.95rem; max-width: 26em; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--crema);
  margin-bottom: 1.2rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a { font-size: 0.95rem; transition: color 0.25s var(--ease); }
.footer-col a:hover { color: var(--paper); }
.footer-col address { font-style: normal; font-size: 0.95rem; line-height: 1.7; }
.footer-social { display: flex; gap: 0.8rem; margin-top: 1.6rem; }
.footer-social a {
  width: 44px; height: 44px;
  border: 1px solid rgba(250, 246, 240, 0.25);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.footer-social a:hover { border-color: var(--crema); background: rgba(181, 121, 60, 0.18); }
.footer-bottom {
  border-top: 1px solid rgba(250, 246, 240, 0.12);
  padding: 1.6rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250, 246, 240, 0.45);
}

/* ---------- Scroll reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

/* ---------- Map embed ---------- */
.map-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius-img);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -100px; left: 1rem;
  z-index: 999;
  background: var(--espresso);
  color: var(--paper);
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius);
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1fr; }
  .cta-band .cta-actions { justify-content: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .footer-top { grid-template-columns: 1fr; }
  .facts-table th { width: 8rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- QA mode (?qa) — force-reveal everything for screenshots ---------- */
body.qa-mode .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
