/* Just Good Wine — site styles */

:root {
  --bg: #f5f0eb;
  --bg-alt: #ece4db;
  --surface: #ffffff;
  --ink: #2d1f1f;
  --muted: #6b6156;
  --wine: #6b2737;
  --wine-deep: #4a1c24;
  --wine-soft: #f3e4e7;
  --gold: #b8741a;
  --gold-bright: #e3b25c;
  --green: #5b8a4a;
  --line: rgba(45, 31, 31, 0.12);
  --shadow: 0 1px 2px rgba(45, 31, 31, 0.06), 0 12px 32px -12px rgba(74, 28, 36, 0.22);
  --radius: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #140d0f;
    --bg-alt: #1b1215;
    --surface: #21171a;
    --ink: #f5f0eb;
    --muted: #b9aba2;
    --wine: #d07f96;
    --wine-deep: #2d1015;
    --wine-soft: #32191f;
    --gold: #e3b25c;
    --green: #8fbd7c;
    --line: rgba(245, 240, 235, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 36px -14px rgba(0, 0, 0, 0.7);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--wine); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.6vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 40px, 780px); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--surface); color: var(--ink);
  padding: 10px 16px; border-radius: 10px; z-index: 100;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 3px; border-radius: 6px; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 2px 8px rgba(74, 28, 36, 0.3); }
.brand span { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding: 8px 14px; border-radius: 999px;
}
.nav a:hover { background: var(--wine-soft); color: var(--wine); }
.nav a[aria-current="page"] { background: var(--wine-soft); color: var(--wine); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--ink);
  width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  align-items: center; justify-content: center;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 20px 18px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
}

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

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 1rem var(--sans); text-decoration: none;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold-bright); color: #2d1f1f; box-shadow: 0 8px 22px -8px rgba(227, 178, 92, 0.7); }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-wine { background: #6b2737; color: #fff; }
.btn-outline { color: var(--wine); border-color: var(--wine); }
.btn-outline:hover { background: var(--wine-soft); }

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

.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(227, 178, 92, 0.2), transparent 60%),
    radial-gradient(700px 600px at 0% 100%, rgba(160, 80, 104, 0.45), transparent 60%),
    linear-gradient(160deg, #4a1c24 0%, #6b2737 55%, #3a141b 100%);
}
.hero .wrap {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center;
  padding-block: clamp(56px, 9vw, 112px);
}
.eyebrow {
  display: inline-block; font: 600 0.78rem var(--sans); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.hero .eyebrow { color: var(--gold-bright); }
.hero h1 { color: #fff; }
.hero h1 em { font-style: italic; color: var(--gold-bright); }
.hero p.lead { font-size: 1.2rem; color: rgba(255, 255, 255, 0.86); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 22px; font-size: 0.92rem; color: rgba(255, 255, 255, 0.7); }

.page-hero { background: linear-gradient(160deg, #4a1c24 0%, #6b2737 70%, #3a141b 100%); color: #fff; }
.page-hero .wrap { padding-block: clamp(48px, 7vw, 84px); }
.page-hero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.3rem); max-width: 18em; }
.page-hero p { color: rgba(255, 255, 255, 0.86); font-size: 1.15rem; max-width: 38em; margin: 0; }
.page-hero .eyebrow { color: var(--gold-bright); }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
}

/* Illustrative batch card in the hero */
.batch-card {
  background: #fbf8f5; color: #2d1f1f; border-radius: 26px; padding: 22px;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.12);
  max-width: 420px; margin-inline: auto; transform: rotate(1.5deg);
}
.batch-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.batch-card h3 { font-size: 1.25rem; margin: 0; color: #2d1f1f; }
.batch-card small { color: #6b6156; font-size: 0.85rem; }
.pill {
  display: inline-block; font: 600 0.75rem var(--sans); padding: 5px 11px; border-radius: 999px;
  background: #f3e4e7; color: #6b2737; white-space: nowrap;
}
.batch-card svg { margin: 14px 0 10px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats div { background: #f1eae3; border-radius: 14px; padding: 10px 12px; }
.stats b { display: block; font: 600 1.15rem var(--serif); }
.stats span { font-size: 0.74rem; color: #6b6156; text-transform: uppercase; letter-spacing: 0.06em; }
.batch-card .reminder {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px;
  border: 1px dashed #d9cdc1; border-radius: 14px; font-size: 0.9rem; color: #4a3c3c;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: #c17f24; flex: none; }

/* ---------- Sections ---------- */

section { padding-block: clamp(56px, 8vw, 96px); }
section.alt { background: var(--bg-alt); }
.section-head { max-width: 42em; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.center { text-align: center; margin-inline: auto; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 8px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card p { color: var(--muted); }

.icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--wine-soft); color: var(--wine); margin-bottom: 16px;
}
.icon svg { width: 24px; height: 24px; }

/* Path cards */
.path {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  padding: 34px; border-radius: 24px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.path:hover { transform: translateY(-4px); }
.path::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, var(--wine-soft), transparent 70%);
}
.path h3 { font-size: 1.6rem; }
.path p { color: var(--muted); }
.path ul { margin: 0 0 22px; padding-left: 1.1em; color: var(--muted); }
.path .more { margin-top: auto; font-weight: 600; color: var(--wine); }

/* Journey */
.journey { counter-reset: step; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.journey li {
  list-style: none; counter-increment: step; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px;
}
.journey li::before {
  content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: #6b2737; color: #fff; font: 600 0.95rem var(--serif); margin-bottom: 12px;
}
.journey h4 { margin-bottom: 4px; }
.journey p { margin: 0; font-size: 0.93rem; color: var(--muted); }
ol.journey { padding: 0; margin: 0; }
@media (max-width: 980px) { .journey { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .journey { grid-template-columns: 1fr; } }

/* CTA band */
.band {
  border-radius: 28px; padding: clamp(32px, 5vw, 56px); color: #fff; text-align: center;
  background:
    radial-gradient(600px 300px at 80% 0%, rgba(227, 178, 92, 0.22), transparent 60%),
    linear-gradient(150deg, #4a1c24, #6b2737);
}
.band h2 { color: #fff; }
.band p { color: rgba(255, 255, 255, 0.85); max-width: 36em; margin-inline: auto; }
.band .hero-actions { justify-content: center; }

/* ---------- Article pages ---------- */

.prose h2 { margin-top: 2em; padding-top: 0.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose strong { color: var(--ink); }

.toc {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 40px; padding: 0; list-style: none;
}
.toc a {
  display: inline-block; padding: 8px 16px; border-radius: 999px; text-decoration: none; font-size: 0.93rem; font-weight: 500;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
}
.toc a:hover { border-color: var(--wine); color: var(--wine); }

.steps { counter-reset: s; list-style: none; padding: 0 !important; margin: 0 0 1.5em; }
.steps > li {
  counter-increment: s; position: relative; padding: 0 0 28px 64px; margin: 0;
  border-left: 2px solid var(--line); margin-left: 21px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(s); position: absolute; left: -22px; top: -4px;
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: #6b2737; color: #fff; font: 600 1.1rem var(--serif); box-shadow: 0 0 0 6px var(--bg);
}
.steps h3 { margin: 0 0 6px; }
.steps p { color: var(--muted); }

.callout {
  border-radius: var(--radius); padding: 20px 22px; margin: 1.6em 0;
  background: var(--wine-soft); border-left: 4px solid var(--wine);
}
.callout.tip { background: color-mix(in srgb, var(--gold-bright) 18%, var(--surface)); border-left-color: var(--gold); }
.callout.app { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green); }
.callout strong:first-child { display: block; font-family: var(--serif); font-size: 1.05rem; margin-bottom: 4px; }
.callout p:last-child { margin: 0; }

.table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
caption { text-align: left; padding: 14px 18px 0; font: 600 1rem var(--serif); }
th, td { text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font: 600 0.78rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.checklist { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; }
.checklist li { position: relative; padding-left: 30px; margin: 0; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--wine-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.6 2.6L13 6.6' fill='none' stroke='%23a05068' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
}
@media (max-width: 640px) { .checklist { grid-template-columns: 1fr; } }

dl.glossary { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
dl.glossary dt { font-weight: 600; font-family: var(--serif); }
dl.glossary dd { margin: 0; color: var(--muted); }
@media (max-width: 640px) { dl.glossary { grid-template-columns: 1fr; gap: 2px; } dl.glossary dd { margin-bottom: 12px; } }

/* ---------- Support ---------- */

.search {
  display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 8px 6px 20px; box-shadow: var(--shadow); max-width: 620px;
}
.search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search input {
  flex: 1; border: 0; background: transparent; color: var(--ink); font: 1.05rem var(--sans); padding: 12px 0; min-width: 0;
}
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--wine); }

.faq-group { margin-bottom: 44px; }
.faq-group h2 { font-size: 1.6rem; margin-bottom: 16px; }
details.faq {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; overflow: hidden;
}
details.faq[open] { border-color: color-mix(in srgb, var(--wine) 45%, var(--line)); box-shadow: var(--shadow); }
details.faq summary {
  cursor: pointer; list-style: none; padding: 18px 54px 18px 22px; font-weight: 600; position: relative;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -8px;
  border-right: 2px solid var(--wine); border-bottom: 2px solid var(--wine); transform: rotate(45deg); transition: transform 0.2s ease;
}
details.faq[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
details.faq .answer { padding: 0 22px 20px; color: var(--muted); }
details.faq .answer p:last-child, details.faq .answer ul:last-child, details.faq .answer ol:last-child { margin-bottom: 0; }
details.faq .answer ul, details.faq .answer ol { padding-left: 1.2em; }
.no-results { display: none; padding: 28px; text-align: center; color: var(--muted); }

.contact { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; align-items: center; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }

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

.site-footer { background: #2d1015; color: rgba(255, 255, 255, 0.75); padding-block: 48px 36px; font-size: 0.95rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .brand span { color: #fff; }
.site-footer .legal { border-top: 1px solid rgba(255, 255, 255, 0.14); margin-top: 32px; padding-top: 20px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }
@media (max-width: 700px) { .site-footer .cols { grid-template-columns: 1fr; } }

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