:root {
  color-scheme: light;
  --forest: #153f2c;
  --forest-dark: #0c2d20;
  --green-mid: #2d6547;
  --cream: #f3edda;
  --paper: #faf8f1;
  --ink: #1d2b23;
  --muted: #64736a;
  --line: #d7ddcf;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
}

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: absolute;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  transform: translateY(-160%);
  border-radius: 0.25rem;
  color: white;
  background: var(--forest-dark);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 clamp(1.25rem, 5vw, 5rem);
  background: var(--paper);
}

.wordmark {
  flex: 0 0 auto;
  color: var(--forest);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-decoration: none;
}

.main-nav, .header-actions, .language-switch {
  display: flex;
  align-items: center;
}

.main-nav { gap: clamp(1rem, 3vw, 2.8rem); }

.main-nav a {
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.main-nav a { color: #43544a; }
.main-nav a:hover { color: var(--green-mid); }
.header-actions { gap: 1.25rem; }
.language-switch { gap: 0.15rem; }

.language-switch button {
  border: 0;
  border-radius: 50px;
  padding: 0.45rem 0.5rem;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.67rem;
  font-weight: 700;
  cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
  color: var(--forest);
  background: #e6ecdf;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(690px, calc(100svh - 82px));
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.84fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  overflow: hidden;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 10vw, 10rem);
  color: var(--cream);
  background: var(--forest);
}

.hero::before {
  position: absolute;
  top: -25%;
  left: 48%;
  width: 64vw;
  height: 64vw;
  border: 1px solid rgb(243 237 218 / 11%);
  border-radius: 50%;
  content: "";
}

.hero-copy, .hero-art { position: relative; z-index: 1; }
.hero-copy { max-width: 660px; }

.eyebrow {
  margin: 0 0 1.1rem;
  color: var(--green-mid);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.55;
  text-transform: uppercase;
}

.hero .eyebrow { color: #c4d2b8; }

h1, h2, h3, p { margin-top: 0; }

h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.hero h1 {
  max-width: 720px;
  margin-bottom: 1.4rem;
  font-size: clamp(3rem, 6vw, 5.8rem);
  letter-spacing: -0.035em;
  line-height: 0.99;
}

.hero-intro {
  max-width: 520px;
  margin-bottom: 2rem;
  color: #e0e5d7;
  font-size: clamp(1rem, 1.4vw, 1.17rem);
  line-height: 1.75;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  padding: 0.95rem 1.2rem;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.button-cream { color: var(--forest); background: var(--cream); }
.button-cream:hover { background: white; }
.hero-art {
  justify-self: center;
  width: min(100%, 520px);
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
}

.section-wrap { padding: clamp(4.5rem, 8vw, 7rem) clamp(1.5rem, 10vw, 10rem); }
.section-heading { max-width: 720px; margin: 0 auto 2.5rem; text-align: center; }
.section-heading h2, .brew-heading h2, .origin-heading h2 { margin-bottom: 1rem; color: var(--forest); font-size: clamp(2.4rem, 4.5vw, 4.4rem); line-height: 1.05; }
.section-heading > p:last-child { margin-bottom: 0; color: var(--muted); line-height: 1.75; }

.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.product-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--cream);
}

.blend-details { max-width: 620px; margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem); }
.blend-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.blend-title-row .eyebrow { margin-bottom: 0.55rem; }
.blend-title-row h3 { margin-bottom: 1rem; color: var(--forest); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.5rem, 2vw, 2rem); font-weight: 400; line-height: 1.1; }
.ratio { display: flex; height: 52px; overflow: hidden; margin: 1.5rem 0 0; color: white; font-size: 0.78rem; font-weight: 700; }
.ratio span { display: flex; align-items: center; gap: 0.4rem; padding: 0 0.8rem; }
.ratio small { font-size: 0.67rem; font-weight: 500; }
.ratio-arabica { width: 80%; background: var(--forest); }
.ratio-robusta { width: 20%; justify-content: center; padding: 0 0.4rem !important; background: var(--green-mid); }

.origin-section { padding: clamp(4rem, 7vw, 6rem) clamp(1.5rem, 10vw, 10rem); color: var(--cream); background: var(--forest); }
.origin-heading { max-width: 900px; margin: 0 auto 2rem; }
.origin-heading .eyebrow { color: #c4d2b8; }
.origin-heading h2 { margin: 0; color: var(--cream); }
.origin-map-panel { position: relative; display: grid; min-height: 470px; max-width: 900px; grid-template-columns: minmax(230px, 0.8fr) minmax(250px, 1fr); align-items: center; margin: 0 auto; overflow: hidden; border: 1px solid rgb(243 237 218 / 25%); background: #1c4a34; }
.vietnam-map { display: block; width: min(100%, 245px); height: 420px; justify-self: center; object-fit: contain; }
.robusta-marker, .robusta-dot { fill: #4a78a8; background: #4a78a8; }
.arabica-marker, .arabica-dot { fill: #c3784a; background: #c3784a; }
.map-legend { display: grid; gap: 1.5rem; padding: 2rem clamp(1.5rem, 4vw, 3rem); }
.map-label { display: flex; align-items: flex-start; gap: 0.8rem; }
.map-label p { margin: 0; color: #e0e5d7; font-size: 0.85rem; line-height: 1.55; }
.map-label strong { color: var(--cream); font-size: 1rem; }
.map-dot { display: block; width: 11px; height: 11px; flex: 0 0 auto; margin-top: 0.3rem; border: 2px solid var(--cream); border-radius: 50%; }
.map-source { max-width: 900px; margin: 0.75rem auto 0; color: #c4d2b8; font-size: 0.68rem; text-align: right; }
.map-source a { color: var(--cream); }
.brew-section { padding: clamp(4rem, 7vw, 6rem) clamp(1.5rem, 10vw, 10rem); background: #e9eee4; }
.brew-heading { max-width: 680px; margin-bottom: 3rem; }
.brew-heading h2 { font-size: clamp(2.5rem, 4vw, 4rem); }
.brew-methods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #c7d1c4; border-bottom: 1px solid #c7d1c4; }
.brew-methods article { min-height: 170px; padding: 1.5rem 1.2rem 1.3rem 0; border-right: 1px solid #c7d1c4; }
.brew-methods article + article { padding-left: 1.2rem; }
.brew-methods article:last-child { border-right: 0; }
.brew-icon { display: block; width: auto; height: 84px; max-width: 100%; margin-bottom: 1rem; }
.brew-methods h3 { margin: 0; color: var(--forest); font-size: 0.95rem; }

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(4.5rem, 8vw, 7rem) clamp(1.5rem, 10vw, 10rem);
  background: var(--paper);
}
.contact-heading h2 { margin-bottom: 1rem; color: var(--forest); font-size: clamp(2.5rem, 4vw, 4rem); line-height: 1.05; }
.contact-heading > p:last-child { max-width: 400px; margin-bottom: 0; color: var(--muted); line-height: 1.75; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-content: start; }
.field { display: grid; gap: 0.4rem; }
.field-wide { grid-column: 1 / -1; }
.field label { color: var(--forest); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; }
.field input, .field textarea {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 1px solid #b9c4b4;
  border-radius: 0.25rem;
  color: var(--ink);
  background: white;
  font: inherit;
  font-size: 0.95rem;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field textarea:focus { border-color: var(--forest); outline: 2px solid var(--forest); outline-offset: 0; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #a63d2f; }
.hp-field { position: absolute; left: -9999px; }
.form-note { margin: 0; color: var(--muted); font-size: 0.78rem; line-height: 1.6; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.button-forest { border: 0; color: var(--cream); background: var(--forest); cursor: pointer; font: inherit; font-size: 0.84rem; font-weight: 700; }
.button-forest:hover { background: var(--green-mid); }
.button-forest:disabled { cursor: progress; opacity: 0.6; }
.form-status { margin: 0; font-size: 0.88rem; line-height: 1.5; }
.form-status.is-success { color: var(--green-mid); font-weight: 700; }
.form-status.is-error { color: #a63d2f; }

.site-footer {
  display: flex;
  min-height: 105px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1.5rem, 5vw, 5rem);
  color: #d8e0d4;
  background: var(--forest-dark);
}

.footer-wordmark { color: var(--cream); }
.site-footer p { margin: 0; font-size: 0.7rem; }
.footer-meta { color: #aabbab; }

:focus-visible { outline: 3px solid #7aa7d3; outline-offset: 3px; }

@media (max-width: 900px) {
  .site-header { gap: 1rem; padding-inline: 1.5rem; }
  .main-nav { gap: 1rem; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(250px, 0.7fr); gap: 2rem; padding-inline: 6vw; }
  .hero h1 { font-size: clamp(3rem, 7vw, 4.6rem); }
  .product-grid { grid-template-columns: 1fr; }
  .origin-map-panel { grid-template-columns: minmax(220px, 0.8fr) minmax(220px, 1fr); }
  .contact-section { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .site-header { min-height: 70px; flex-wrap: wrap; gap: 0.5rem; padding: 0.8rem 1rem; }
  .wordmark { font-size: 1rem; }
  .main-nav { order: 3; width: 100%; justify-content: space-between; padding-top: 0.35rem; }
  .main-nav a { font-size: 0.71rem; }
  .header-actions { gap: 0.4rem; }
  .language-switch button { padding: 0.4rem; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 2rem; padding: 4rem 1.25rem; }
  .hero h1 { font-size: clamp(3rem, 13vw, 4.5rem); }
  .hero-art { width: min(90%, 520px); }
  .section-wrap, .brew-section, .origin-section, .contact-section { padding: 4rem 1.25rem; }
  .contact-form { grid-template-columns: 1fr; }
  .section-heading { margin-bottom: 2rem; text-align: left; }
  .section-heading h2, .brew-heading h2, .origin-heading h2 { font-size: clamp(2.4rem, 11vw, 3.6rem); }
  .blend-details { padding: 1.5rem; }
  .origin-map-panel { min-height: 620px; grid-template-columns: 1fr; grid-template-rows: 420px auto; padding-bottom: 3.2rem; }
  .vietnam-map { width: 245px; height: 400px; justify-self: center; align-self: center; }
  .map-source { text-align: left; }
  .map-legend { grid-row: 2; grid-template-columns: 1fr 1fr; gap: 0.8rem; padding: 0 1.2rem; }
  .map-label p { font-size: 0.76rem; }
  .map-label strong { font-size: 0.9rem; }
  .brew-methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brew-methods article { min-height: 140px; padding: 1rem 0.8rem 1rem 0; border-bottom: 0; }
  .brew-methods article + article { padding-left: 0.8rem; }
  .brew-methods article:nth-child(2) { border-right: 0; }
  .brew-methods article:nth-child(3) { padding-left: 0; }
  .brew-methods article:nth-child(3), .brew-methods article:nth-child(4) { border-top: 1px solid #c7d1c4; padding-top: 1.2rem; }
  .brew-methods article:nth-child(4) { border-right: 0; }
  .ratio span { gap: 0.1rem; }
  .ratio-robusta { font-size: 0.6rem; }
  .ratio-robusta small { font-size: 0.56rem; }
  .site-footer { flex-wrap: wrap; justify-content: flex-start; gap: 0.6rem 1.2rem; padding: 1.4rem 1.25rem; }
  .site-footer p:nth-child(2) { flex: 1 1 100%; order: 3; }
  .footer-meta { margin-left: auto !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
