/* ==========================================================================
   Cella — cellawine.com design system
   "Sommelier's Scrapbook": warm cream + burgundy, editorial, zero snobbery.
   No 1px section dividers — boundaries via surface color shifts only.
   ========================================================================== */

:root {
  --cream: #FAF6F1;
  --surface: #FDF9F4;
  --surface-low: #F7F3EE;
  --white: #FFFFFF;
  --burgundy: #5E1628;
  --burgundy-2: #7B2D3E;
  --ink: #1C1007;
  --ink-soft: #6B5744;
  --green: #3A6648;
  --green-bg: #F0F8F4;
  --gold: #C4922A;
  --border-warm: #EDE4D8;
  --blush: #F7EDF0;

  --font-display: "Plus Jakarta Sans", "Nunito", sans-serif;
  --font-body: "Nunito", "Plus Jakarta Sans", sans-serif;

  --radius: 1.5rem;
  --radius-sm: 0.875rem;
  --shadow-cloud: 0 24px 40px -4px rgba(28, 16, 7, 0.08);
  --shadow-soft: 0 8px 24px rgba(28, 16, 7, 0.06);
  --maxw: 72rem;
}

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

html { scroll-behavior: smooth; }

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

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

a { color: var(--burgundy-2); }
a:hover { color: var(--burgundy); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2.25rem, 5.5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

p { margin: 0 0 1rem; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.narrow { max-width: 46rem; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 241, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand-link { display: inline-flex; align-items: center; }
.brand-link img { width: 118px; height: auto; }

.site-nav { display: flex; align-items: center; gap: 1.5rem; }

.site-nav a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
}
.site-nav a:hover { color: var(--burgundy); }

.nav-cta {
  background: linear-gradient(135deg, var(--burgundy), var(--burgundy-2));
  color: var(--white) !important;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.nav-cta:hover { opacity: 0.92; }

.nav-toggle { display: none; }

@media (max-width: 760px) {
  .site-nav a:not(.nav-cta) { display: none; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: 3.5rem 0 4.5rem;
  background: var(--surface);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.25rem; }
}

.hero-wordmark { width: 190px; margin-bottom: 1.75rem; }

.hero h1 { margin-bottom: 1rem; }

.hero .lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 32rem;
  margin-bottom: 1.75rem;
}

.hero-visual img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-cloud);
}

/* --------------------------------------------------------------------------
   Store badges
   -------------------------------------------------------------------------- */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem;
  margin: 0.5rem 0 1rem;
}

.store-badges a { display: inline-flex; }
.store-badges img { height: 52px; width: auto; }

/* Hidden until googlePlayUrl is set in js/config.js */
a[data-store="android"] { display: none !important; }
a[data-store="android"].cella-play-visible { display: inline-flex !important; }
.sticky-cta a[data-store="android"].cella-play-visible { display: inline-flex !important; }

.badge-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.25rem;
}

/* Sticky mobile CTA */
.sticky-cta {
  display: none;
}

@media (max-width: 700px) {
  .sticky-cta {
    display: flex;
    justify-content: center;
    gap: 0.65rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom));
    background: rgba(253, 249, 244, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 -8px 24px rgba(28, 16, 7, 0.08);
  }
  .sticky-cta img { height: 42px; width: auto; }
  body { padding-bottom: 4.5rem; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: 4.5rem 0; }
.section.alt { background: var(--surface-low); }
.section.blush { background: var(--blush); }

.section-kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.section-intro {
  color: var(--ink-soft);
  font-size: 1.125rem;
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

/* How it works steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  counter-reset: step;
}

@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.step {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-soft);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--burgundy), var(--burgundy-2));
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  margin-bottom: 1rem;
}

.step h3 { font-size: 1.15rem; }
.step p { color: var(--ink-soft); font-size: 0.975rem; margin: 0; }

/* Use case cards */
.usecases {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) { .usecases { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .usecases { grid-template-columns: 1fr; } }

.usecase {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.usecase img {
  width: 96px;
  height: 96px;
  margin: 0 auto 1rem;
  border-radius: var(--radius-sm);
}

.usecase h3 { font-size: 1.1rem; }
.usecase p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* Proof / screenshot gallery */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) { .proof-grid { grid-template-columns: repeat(2, 1fr); } }

.proof-grid figure { margin: 0; }

.proof-grid img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
}

.proof-grid figcaption {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
  text-align: center;
}

/* Why Cella */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 700px) { .why-grid { grid-template-columns: 1fr; } }

.why-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
}

.why-card h3 { font-size: 1.15rem; }
.why-card p { color: var(--ink-soft); margin: 0; }

/* Pill accents ("wax seal" chips) */
.pill {
  display: inline-block;
  background: var(--blush);
  color: var(--burgundy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-right: 0.4rem;
}

.pill.green { background: var(--green-bg); color: var(--green); }

/* Download band */
.download-band {
  background: linear-gradient(135deg, var(--burgundy), var(--burgundy-2));
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--white);
}

.download-band h2 { color: var(--white); }
.download-band p { color: rgba(255, 255, 255, 0.85); max-width: 34rem; margin: 0 auto 1.5rem; }
.download-band .store-badges { justify-content: center; }
.download-band .badge-note { color: rgba(255, 255, 255, 0.7); }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq-list { max-width: 46rem; }

details.faq-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  margin-bottom: 0.875rem;
  padding: 0;
  overflow: hidden;
}

details.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 1.15rem 3rem 1.15rem 1.35rem;
  position: relative;
}

details.faq-item summary::-webkit-details-marker { display: none; }

details.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--burgundy-2);
}

details.faq-item[open] summary::after { content: "\2013"; }

details.faq-item .faq-answer {
  padding: 0 1.35rem 1.25rem;
  color: var(--ink-soft);
}

.faq-links { margin-top: 1.75rem; }
.faq-links a { font-weight: 700; }

/* --------------------------------------------------------------------------
   Guide / article pages
   -------------------------------------------------------------------------- */
.article-hero {
  background: var(--surface);
  padding: 3rem 0 2.5rem;
}

.breadcrumbs {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--burgundy); text-decoration: underline; }

.article-body { padding: 3rem 0 4rem; }

.article-body h2 { margin-top: 2.75rem; }
.article-body h3 { margin-top: 1.9rem; }

.article-body figure { margin: 2rem 0; }
.article-body figure img { border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.article-body figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.6rem; }

.article-body ul, .article-body ol { padding-left: 1.4rem; margin-bottom: 1.25rem; }
.article-body li { margin-bottom: 0.5rem; }

.callout {
  background: var(--blush);
  border-radius: var(--radius-sm);
  padding: 1.35rem 1.5rem;
  margin: 1.75rem 0;
}
.callout p:last-child { margin-bottom: 0; }

.definition-box {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  padding: 1.35rem 1.5rem;
  margin: 1.75rem 0;
}
.definition-box p:last-child { margin-bottom: 0; }

.article-cta {
  background: var(--surface-low);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  margin: 3rem 0 0;
}
.article-cta .store-badges { justify-content: center; }

/* Comparison table */
.compare-wrap { overflow-x: auto; margin: 1.75rem 0; }

table.compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  font-size: 0.975rem;
}

table.compare th, table.compare td {
  padding: 0.9rem 1.1rem;
  text-align: left;
  vertical-align: top;
}

table.compare thead th {
  background: var(--blush);
  font-family: var(--font-display);
  font-weight: 800;
}

table.compare tbody tr:nth-child(even) { background: var(--surface-low); }

/* --------------------------------------------------------------------------
   Legal pages
   -------------------------------------------------------------------------- */
.legal-body { padding: 2.5rem 0 4rem; }
.legal-body h2 { font-size: 1.5rem; margin-top: 2.5rem; }
.legal-body h3 { font-size: 1.15rem; margin-top: 1.75rem; }
.legal-body .last-updated { color: var(--ink-soft); font-size: 0.95rem; }
.legal-body table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.95rem; }
.legal-body table th, .legal-body table td { padding: 0.7rem 0.9rem; text-align: left; vertical-align: top; }
.legal-body table thead th { background: var(--blush); font-family: var(--font-display); font-weight: 700; }
.legal-body table tbody tr:nth-child(even) { background: var(--surface-low); }
.legal-body ul, .legal-body ol { padding-left: 1.4rem; }
.legal-body li { margin-bottom: 0.45rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--surface-low);
  padding: 3.5rem 0 2.5rem;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.25rem;
}

@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer .footer-logo { width: 128px; margin-bottom: 1rem; }

.site-footer h4 {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.85rem;
}

.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer a { color: var(--ink); text-decoration: none; font-size: 0.975rem; }
.site-footer a:hover { color: var(--burgundy); }

.footer-note {
  color: var(--ink-soft);
  font-size: 0.875rem;
  max-width: 44rem;
}

.footer-legal-line {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  background: transparent;
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.notfound {
  min-height: 55vh;
  display: flex;
  align-items: center;
  text-align: center;
}
.notfound .container { max-width: 34rem; }
.notfound img { width: 110px; margin: 0 auto 1.5rem; border-radius: 1.6rem; }

/* Utility */
.mt-2 { margin-top: 2rem; }
.center { text-align: center; }
