/* Embercraft — warm editorial one-pager. Design DNA: 18 Kenya Hara anchor. */
:root {
  --paper: #FAF6F0;
  --surface: #F1E9DE;
  --ink: #2B211B;
  --muted: #6B5A4E;
  --ember: #C25E33;
  --ember-deep: #8A3B1F;
  --shadow: 0 10px 30px rgba(43, 33, 27, 0.10);
  --radius: 14px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

[id] { scroll-margin-top: 5rem; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1080px, calc(100% - 2.5rem)); margin-inline: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 0.5rem 1rem; border-radius: 0 0 8px 8px; text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 4px; }

/* ---------- signature: the ember line ---------- */
/* Fonts: self-hosted Fraunces 600 + Inter 400/500/600 (see @font-face below). */
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

.ember-line {
  display: block; width: 72px; height: 2px; margin-bottom: 0.9rem;
  background: linear-gradient(90deg, var(--ink), var(--ember) 55%, transparent);
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 240, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(43, 33, 27, 0.08);
}
.header-row { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.25rem;
  color: var(--ink); text-decoration: none;
}
.brand-mark {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--ember), var(--ember-deep));
}
.site-nav { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }
.site-nav ul { display: flex; gap: 1.25rem; list-style: none; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--ember-deep); text-decoration: underline; text-underline-offset: 4px; }
.nav-cta { padding: 0.5rem 1.1rem; }

.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid rgba(43,33,27,0.2);
  border-radius: 8px; padding: 0.85rem; cursor: pointer; min-width: 44px; min-height: 44px;
}
.nav-toggle-bar { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; }
.nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink);
}
.nav-toggle-bar::before { top: -6px; } .nav-toggle-bar::after { top: 6px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border-radius: 999px; padding: 0.7rem 1.5rem;
  font-weight: 600; text-decoration: none; font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-solid { background: var(--ember-deep); color: #fff; box-shadow: var(--shadow); } /* white on #8A3B1F = 7.16:1 AA */
.btn-solid:hover { background: #6F2F17; }
.btn-ghost { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: flex-end; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(250,246,240,0.08) 30%, rgba(250,246,240,0.82) 68%, var(--paper) 100%);
}
.hero-content { position: relative; padding-block: 6rem 4.5rem; }
.hero-content h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1.08; max-width: 14ch;
}
.hero-content h1::after {
  content: ""; display: block; width: 110px; height: 3px; margin-top: 1.1rem;
  background: linear-gradient(90deg, var(--ember), transparent);
}
.hero-sub { max-width: 46ch; margin-top: 1rem; color: var(--ink); font-size: 1.1rem; }
.hero-cta { display: flex; gap: 0.9rem; margin-top: 1.8rem; flex-wrap: wrap; }

/* ---------- story ---------- */
.story { padding-block: 5.5rem 4rem; }
.story-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3.5rem; align-items: center; }
.story-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.story-copy h2, .beans h2, .visit-copy h2, .footer-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem); line-height: 1.15;
}

.eyebrow {
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--muted); margin-bottom: 0.7rem;
}
.eyebrow-dark { color: rgba(250, 246, 240, 0.66); }
.story-copy p + p { margin-top: 1rem; }
.stat-strip {
  display: flex; gap: 2.5rem; margin-top: 2rem; padding-top: 1.4rem;
  border-top: 1px solid rgba(43,33,27,0.12);
}
.stat-strip dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.stat-strip dd { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; }

/* ---------- beans ---------- */
.beans { background: var(--surface); padding-block: 5rem; }
.section-sub { color: var(--muted); margin-top: 0.4rem; }
.card-grid {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; margin-top: 2.5rem;
}
.bean-card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 4px 14px rgba(43,33,27,0.07);
  border-top: 3px solid transparent;
  display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.bean-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-top-color: var(--ember); }
.bean-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.bean-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.bean-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.bean-card h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.spec-row {
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips li {
  background: var(--surface); color: var(--ink); font-size: 0.75rem; font-weight: 500;
  padding: 0.22rem 0.6rem; border-radius: 999px;
}
.fresh-badge { font-size: 0.75rem; color: var(--muted); }
.fresh-badge span { color: var(--ember); font-size: 0.6rem; vertical-align: 1px; }
.price { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; }
.btn-card { display: block; text-align: center; margin-top: auto; }

/* ---------- subscribe (dark band) ---------- */
.subscribe { background: var(--ink); color: var(--paper); padding-block: 5rem; }
.subscribe h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem); line-height: 1.15;
}
.section-sub-dark { color: rgba(250, 246, 240, 0.72); }
.sub-grid {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem; margin-top: 2.2rem;
}
.sub-card {
  border: 1px solid rgba(250, 246, 240, 0.18); border-radius: var(--radius);
  padding: 1.4rem 1.3rem; background: rgba(250, 246, 240, 0.04);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.sub-card:hover { border-color: var(--ember); transform: translateY(-3px); }
.sub-cadence { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.sub-desc { color: rgba(250, 246, 240, 0.72); font-size: 0.92rem; margin-top: 0.45rem; }
.sub-price { color: #E89463; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 0.6rem; }
.roast-form { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2.2rem; }
.roast-form input[type="email"], .roast-form select {
  background: rgba(250, 246, 240, 0.07); color: var(--paper);
  border: 1px solid rgba(250, 246, 240, 0.25); border-radius: 999px;
  padding: 0.7rem 1.2rem; font-family: var(--font-body); font-size: 0.95rem;
}
.roast-form input[type="email"] { flex: 1 1 240px; }
.roast-form input::placeholder { color: rgba(250, 246, 240, 0.5); }
.roast-form select { cursor: pointer; }
.roast-form select option { color: var(--ink); background: var(--paper); }
.form-fallback { margin-top: 1rem; }
.form-fallback a, .form-note a { color: #E89463; }
.form-note { margin-top: 1.1rem; color: rgba(250, 246, 240, 0.6); font-size: 0.85rem; max-width: 60ch; }

/* ---------- visit ---------- */
.visit { padding-block: 5.5rem; }
.visit-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3.5rem; align-items: center; }
.visit-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.hours { margin-top: 1.6rem; border-collapse: collapse; width: 100%; max-width: 380px; }
.hours tr { border-bottom: 1px solid rgba(43,33,27,0.10); }
.hours th, .hours td { text-align: left; padding: 0.65rem 0; }
.hours th { font-weight: 600; width: 40%; }
.hours td { color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { border-top: 2px solid; border-image: linear-gradient(90deg, var(--ink), var(--ember) 55%, transparent) 1; padding-block: 3rem 2.5rem; }
.footer-line { margin-top: 0.6rem; }
.footer-line a { color: var(--ember-deep); font-weight: 600; }
.footer-line a:hover { color: var(--ink); }
.footer-fine { margin-top: 2rem; color: var(--muted); font-size: 0.85rem; }
.footer-fine a { color: inherit; }

/* ---------- reveal animation (hidden state only when JS is present) ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .story-grid, .visit-grid { grid-template-columns: 1fr; gap: 2rem; }
  .card-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid rgba(43,33,27,0.12);
    flex-direction: column; align-items: flex-start; gap: 0.4rem;
    padding: 1rem 1.5rem 1.4rem; display: none; box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; max-height: 70vh; overflow-y: auto; }
  .site-nav ul { flex-direction: column; gap: 0.4rem; width: 100%; }
  .site-nav ul a { display: block; padding: 0.5rem 0; }
  .nav-cta { margin-top: 0.6rem; }
  .hero-content { padding-block: 4rem 3rem; }
  .stat-strip { gap: 1.6rem; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .hero { min-height: 74vh; }
  .hero-cta .btn { width: 100%; text-align: center; }
}
