/* Cellar — legal site. Brand tokens mirror the app's Theme.swift. */

:root {
  --canvas: #ffffff;
  --peach: #f5d5da;
  --peach-deep: #eec4cc;
  --ink: #1c1a17;
  --ink-secondary: #8c8378;
  --ink-tertiary: #b7afa4;
  --accent: #a0243c;
  --accent-soft: #edd4d9;
  --hairline: rgba(0, 0, 0, 0.08);
  --card-shadow: 0 12px 22px rgba(0, 0, 0, 0.08);
  --radius-card: 28px;
  --radius-pill: 999px;
  --gutter: 24px;
  --maxw: 760px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.5), transparent 60%),
    linear-gradient(180deg, var(--peach-deep) 0%, var(--peach) 22%, var(--canvas) 60%, var(--canvas) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Header ── */
header.site {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px var(--gutter) 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.wordmark {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

nav.site a {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-secondary);
  text-decoration: none;
  margin-left: 18px;
}
nav.site a:hover { color: var(--accent); }
nav.site a[aria-current="page"] { color: var(--accent); }

/* ── Main card ── */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--gutter) 64px;
}

.card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: clamp(28px, 5vw, 56px);
}

h1 {
  font-size: clamp(32px, 6vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.updated {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin: 0 0 28px;
}

h2 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 36px 0 10px;
  scroll-margin-top: 24px;
}

h3 { font-size: 17px; font-weight: 600; margin: 22px 0 6px; }

p, li { font-size: 16px; color: var(--ink); }
p { margin: 0 0 14px; }

a { color: var(--accent); text-underline-offset: 2px; }

ul { padding-left: 22px; margin: 0 0 16px; }
li { margin-bottom: 8px; }

strong { font-weight: 600; }

.lead {
  font-size: 17px;
  color: var(--ink-secondary);
}

hr {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 36px 0;
}

.callout {
  background: var(--accent-soft);
  border-radius: 16px;
  padding: 16px 18px;
  margin: 18px 0;
  font-size: 15px;
}
.callout strong { color: var(--accent); }

/* ── Landing hub ── */
.hub { text-align: center; }
.hub .tagline { color: var(--ink-secondary); font-size: 18px; margin-bottom: 32px; }
.hub-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.pill:active { transform: scale(0.96); opacity: 0.92; }
.pill--filled { background: var(--accent); color: #fff; box-shadow: 0 10px 18px rgba(160, 36, 60, 0.22); }
.pill--white { background: #fff; color: var(--ink); box-shadow: 0 5px 12px rgba(0, 0, 0, 0.08); }

/* ── TOC ── */
.toc {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 16px 20px;
  margin: 0 0 28px;
}
.toc-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin: 0 0 8px;
}
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 4px; }
.toc a { color: var(--ink-secondary); text-decoration: none; font-size: 15px; }
.toc a:hover { color: var(--accent); }

/* ── Footer ── */
footer.site {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter) 48px;
  color: var(--ink-tertiary);
  font-size: 13px;
  text-align: center;
}
footer.site a { color: var(--ink-secondary); text-decoration: none; }
footer.site a:hover { color: var(--accent); }
footer.site .row { margin-bottom: 8px; }

@media (max-width: 520px) {
  header.site { padding-top: 28px; }
  nav.site a { margin-left: 14px; }
}
