/* trycellar.app — marketing + legal site.
   Brand tokens mirror the app's Theme.swift (warm cream canvas, wine-red accent,
   peach gradient). Plain HTML/CSS, no build step. */

:root {
  --canvas: #ffffff;
  --cream: #faf6f0;
  --peach: #f5d5da;
  --peach-deep: #eec4cc;
  --ink: #1c1a17;
  --ink-secondary: #6f675d;
  --ink-tertiary: #b7afa4;
  --accent: #a0243c;
  --accent-deep: #86192f;
  --accent-soft: #edd4d9;
  --hairline: rgba(0, 0, 0, 0.08);
  --card-shadow: 0 12px 22px rgba(0, 0, 0, 0.08);
  --card-shadow-lg: 0 30px 60px rgba(120, 20, 40, 0.16);
  --radius-card: 28px;
  --radius-pill: 999px;
  --gutter: 24px;
  --maxw: 1080px;
  --maxw-read: 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%; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }

/* ── Shared layout ── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--read { max-width: var(--maxw-read); }

/* ── Header ── */
header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.header-row {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.wordmark { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
nav.site a {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-secondary);
  text-decoration: none;
  margin-left: 20px;
}
nav.site a:hover { color: var(--accent); }
nav.site a[aria-current="page"] { color: var(--accent); }
@media (max-width: 560px) { nav.site a { margin-left: 14px; font-size: 14px; } .header-row { padding: 12px 18px; } }

/* ── Buttons ── */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 30px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}
.pill:active { transform: scale(0.96); opacity: 0.94; }
.pill--filled { background: var(--accent); color: #fff; box-shadow: 0 10px 20px rgba(160, 36, 60, 0.24); }
.pill--filled:hover { background: var(--accent-deep); box-shadow: 0 14px 26px rgba(160, 36, 60, 0.3); }
.pill--white { background: #fff; color: var(--ink); box-shadow: 0 5px 14px rgba(0, 0, 0, 0.08); border: 1px solid var(--hairline); }

/* App Store badge (coming soon before launch) */
.appstore {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 24px 0 22px;
  border-radius: 14px;
  background: #111;
  color: #fff;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease;
}
.appstore:hover { transform: translateY(-1px); background: #000; }
.appstore svg { width: 26px; height: 26px; flex: none; }
.appstore .as-eyebrow { font-size: 11px; opacity: 0.85; line-height: 1; }
.appstore .as-main { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }

/* ── Hero ── */
.hero {
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(255, 255, 255, 0.6), transparent 60%),
    linear-gradient(180deg, var(--peach-deep) 0%, var(--peach) 28%, var(--cream) 70%, var(--canvas) 100%);
  overflow: hidden;
}
.hero-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px var(--gutter) 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-copy { animation: appear 0.7s ease both; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0 0 16px;
}
.hero p.lead {
  font-size: clamp(17px, 2.1vw, 20px);
  color: var(--ink-secondary);
  max-width: 30em;
  margin: 0 0 28px;
}
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-note { font-size: 13px; color: var(--ink-tertiary); margin-top: 14px; }
.hero-visual { display: flex; justify-content: center; animation: appear 0.9s ease 0.08s both; }
.hero-visual img {
  width: auto;
  max-height: 620px;
  filter: drop-shadow(0 40px 60px rgba(120, 20, 40, 0.22));
}
@keyframes appear { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-copy, .hero-visual { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; padding-top: 40px; gap: 28px; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-visual img { max-height: 460px; }
}

/* ── Sections ── */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 40em; margin: 0 auto 44px; }
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.section-head p { color: var(--ink-secondary); font-size: 17px; margin: 0; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  background: var(--cream);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 30px 26px;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 16px;
  margin-bottom: 16px;
}
.step h3 { font-size: 19px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.01em; }
.step p { color: var(--ink-secondary); font-size: 15.5px; margin: 0; }

/* Feature grid */
.features { background: var(--cream); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 22px;
  padding: 26px 24px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}
.feature .ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { font-size: 17.5px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.01em; }
.feature p { color: var(--ink-secondary); font-size: 15px; margin: 0; }

@media (max-width: 860px) {
  .steps, .feature-grid { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
}

/* FAQ */
.faq-list { max-width: var(--maxw-read); margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
details.faq {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 4px 22px;
}
details.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  padding: 16px 0;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .plus { flex: none; width: 20px; height: 20px; color: var(--ink-tertiary); transition: transform 0.2s ease; }
details.faq[open] summary .plus { transform: rotate(45deg); color: var(--accent); }
details.faq .answer { color: var(--ink-secondary); font-size: 15.5px; padding: 0 0 18px; margin: 0; }

/* Final CTA */
.final {
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(255, 255, 255, 0.45), transparent 55%),
    linear-gradient(180deg, var(--peach) 0%, var(--peach-deep) 100%);
  text-align: center;
}
.final h2 { font-size: clamp(28px, 4.2vw, 46px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin: 0 0 12px; }
.final p { color: var(--ink-secondary); font-size: 18px; margin: 0 0 26px; }
.final .hero-cta { justify-content: center; }

/* ── Footer ── */
footer.site {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  padding: 56px 0 40px;
}
footer.site .foot-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
}
footer.site .brand .wordmark { color: #fff; }
footer.site .foot-tag { font-size: 14px; margin: 12px 0 0; max-width: 26em; }
footer.site h4 { color: #fff; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 12px; }
footer.site ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
footer.site a { color: rgba(255, 255, 255, 0.72); text-decoration: none; font-size: 15px; }
footer.site a:hover { color: #fff; }
footer.site .legalnote {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding: 22px var(--gutter) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}
@media (max-width: 720px) {
  footer.site .foot-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  footer.site .brand { grid-column: 1 / -1; }
}

/* ── Legal (privacy / terms) documents ── */
.doc { max-width: var(--maxw-read); margin: 0 auto; padding: 48px var(--gutter) 72px; }
.doc h1 { font-size: clamp(30px, 5vw, 40px); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.doc .updated {
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-tertiary); margin: 0 0 28px;
}
.doc h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin: 34px 0 10px; scroll-margin-top: 80px; }
.doc h3 { font-size: 17px; font-weight: 600; margin: 22px 0 6px; }
.doc p, .doc li { font-size: 16px; color: var(--ink); }
.doc p { margin: 0 0 14px; }
.doc ul { padding-left: 22px; margin: 0 0 16px; }
.doc li { margin-bottom: 8px; }
.doc .lead { font-size: 17px; color: var(--ink-secondary); }
.doc hr { border: none; border-top: 1px solid var(--hairline); margin: 34px 0; }
.doc .callout { background: var(--accent-soft); border-radius: 16px; padding: 16px 18px; margin: 18px 0; font-size: 15px; }
.doc .callout strong { color: var(--accent); }
.toc { background: var(--cream); 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); }

/* Skip link for a11y */
.skip { position: absolute; left: -9999px; top: 0; background: #fff; color: var(--accent); padding: 10px 16px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 12px; top: 12px; }
