/* ===========================================================
   VINN COFFEE — Design System
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700;9..144,900&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Color */
  --ink: #16181A;
  --ink-soft: #3A3D3F;
  --paper: #F7F6F2;
  --paper-dim: #EDEBE4;
  --emerald: #0E7C52;
  --emerald-deep: #0A4A36;
  --clay: #A85C32;
  --sand: #C9B79C;
  --line: rgba(22, 24, 26, 0.12);
  --line-on-dark: rgba(247, 246, 242, 0.16);

  /* Type */
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Layout */
  --max-width: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.75rem, 7vw, 5.5rem); font-weight: 900; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); }

p { margin: 0 0 1rem; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.eyebrow::before {
  content: '';
  width: 1.5rem;
  height: 1px;
  background: var(--emerald);
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  max-width: 46ch;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.95rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--emerald);
  color: var(--paper);
}
.btn-primary:hover { background: var(--emerald-deep); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }

.btn-outline-light {
  background: transparent;
  color: var(--paper);
  border-color: var(--line-on-dark);
}
.btn-outline-light:hover { background: var(--paper); color: var(--ink); transform: translateY(-2px); }

.btn-arrow { transition: transform 0.2s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.1rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}
.wordmark span { color: var(--emerald); }

.nav-links {
  display: flex;
  gap: 2.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links a {
  position: relative;
  padding-block: 0.25rem;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--emerald);
  transition: width 0.2s ease;
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--emerald); }

.nav-cta { display: flex; align-items: center; gap: 1.25rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: all 0.2s ease;
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--paper);
    padding: 1.5rem var(--gutter) 1.75rem;
    gap: 1.25rem;
    font-size: 1rem;
    max-height: 70vh;
    overflow-y: auto;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 28px -18px rgba(0, 0, 0, 0.25);
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-toggle { display: block; }
  .nav-cta .btn-outline { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(5rem, 12vw, 9rem) clamp(4rem, 9vw, 7rem);
}

.hero-inner { position: relative; z-index: 1; max-width: 760px; }

.hero-slogan {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald-deep);
  margin: 0.5rem 0 2rem;
}

.hero-copy { margin-bottom: 1.4rem; max-width: 58ch; }

.hero .btn { margin-top: 1rem; }

/* ---------- Contour motif ---------- */

.contour-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.contour-field svg { width: 100%; height: 100%; }

.divider-contour {
  width: 100%;
  height: 48px;
  display: block;
}

/* ---------- Section rhythm ---------- */

section { position: relative; }

.section-pad { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section-pad-sm { padding-block: clamp(2.5rem, 5vw, 4rem); }

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}

.site-footer a:hover { color: var(--emerald); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  padding-block: clamp(3rem, 6vw, 5rem);
  position: relative;
  z-index: 1;
}

.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 1.1rem;
  font-weight: 500;
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.6rem; color: var(--paper-dim); }

.footer-bottom {
  border-top: 1px solid var(--line-on-dark);
  padding-block: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--sand);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Page hero (interior pages) ---------- */

.page-hero {
  padding-block: clamp(3.5rem, 8vw, 5.5rem) clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
.page-hero .lede { margin-top: 1rem; }

/* ---------- Media placeholder (swap for real photos) ---------- */

.media-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ar, 4 / 3);
  background:
    repeating-linear-gradient(135deg, var(--paper-dim) 0 2px, transparent 2px 14px),
    var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.media-placeholder img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.media-placeholder .ph-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  max-width: 80%;
}

/* ---------- Content split (image + text) ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.split.reverse .split-text { order: 1; }

@media (max-width: 780px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media,
  .split.reverse .split-text { order: initial; }
}

.split-text .btn { margin-top: 0.75rem; }

/* ---------- Cards / grids ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.bean-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.bean-card:hover { border-color: var(--emerald); transform: translateY(-3px); }

.bean-card .eyebrow { font-size: 0.68rem; margin-bottom: 0.6rem; }
.bean-card h3 { margin-bottom: 0.6rem; }
.bean-card p { font-size: 0.92rem; margin-bottom: 0; }

.bean-card .tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-top: 1rem;
}
.bean-card .tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
}

.section-alt { background: var(--paper-dim); }

/* ---------- Order form ---------- */

.order-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
@media (max-width: 900px) {
  .order-layout { grid-template-columns: 1fr; }
}

.order-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  background: var(--paper);
}

@media (max-width: 560px) {
  .order-table { min-width: 480px; }
}

table.order-table { width: 100%; border-collapse: collapse; }

.order-table thead th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink-soft);
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper-dim);
}

.order-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.order-table tr:last-child td { border-bottom: none; }

.order-table .prod-name { font-weight: 600; }
.order-table .prod-notes { font-size: 0.78rem; color: var(--ink-soft); }
.order-table .prod-price { font-family: var(--font-mono); font-size: 0.82rem; white-space: nowrap; }

.qty-input {
  width: 3.4rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  background: var(--paper);
  color: var(--ink);
}
.qty-input:focus { border-color: var(--emerald); }

.summary-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--paper-dim);
  position: sticky;
  top: 96px;
}
.summary-card h3 { margin-bottom: 1.25rem; }

.summary-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--line);
}
.summary-row.total {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--emerald-deep);
  border-bottom: none;
  padding-top: 0.9rem;
}

.form-field { margin-bottom: 1.1rem; }
.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--emerald); }
.form-field textarea { resize: vertical; min-height: 90px; }

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 480px) { .form-row-2 { grid-template-columns: 1fr; } }

.form-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 0.75rem;
}

.delivery-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(14, 124, 82, 0.12);
  color: var(--emerald-deep);
  display: inline-block;
  margin-top: 0.4rem;
}

/* ---------- Utility ---------- */

.text-center { text-align: center; margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

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

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
