/* ============================================================
   Rivvol Marketing Site — shared stylesheet
   Design tokens locked to Canonical Language v1.0 — do not
   introduce blue, gradients, or radii beyond --radius-sm.
   ============================================================ */

:root {
  /* Base */
  --rv-page: #EFEDE8;
  --rv-surface: #FAF9F7;
  --rv-surface-2: #F2EFE9;
  --rv-border: #EDEAE5;
  --rv-sidebar: #1A1917;

  /* Text */
  --rv-text-1: #1A1917;
  --rv-text-2: #8C8880;
  --rv-text-3: #A09D97;
  --rv-text-4: #C0BDB8;

  /* Semantic — signals only, never decoration */
  --rv-alert: #B91C1C;
  --rv-alert-bg: #FEECEC;
  --rv-warn: #92400E;
  --rv-warn-bg: #FEF3E2;
  --rv-ok: #166534;
  --rv-ok-bg: #E8F8F0;

  /* Type */
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Geometry — sharp corners only */
  --radius-sm: 3px;

  /* Layout */
  --max-width: 1120px;
  --nav-height: 72px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--rv-text-1);
  background: var(--rv-page);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-ui);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: var(--rv-text-1);
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 16px; color: var(--rv-text-2); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rv-text-3);
  margin: 0 0 12px;
  display: block;
}

.lede {
  font-size: 1.2rem;
  color: var(--rv-text-2);
  max-width: 60ch;
}

.mono { font-family: var(--font-mono); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--rv-sidebar);
  color: var(--rv-surface);
}
.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
  background: transparent;
  color: var(--rv-text-1);
  border-color: var(--rv-text-1);
}
.btn-secondary:hover { background: var(--rv-surface-2); }

.btn-block { width: 100%; }

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(239, 237, 232, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rv-border);
}

.nav .container {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--rv-text-1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--rv-text-2);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--rv-text-1); }

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta.mobile-visible { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rv-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--rv-text-1);
  margin: 4px 0;
}

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

section { padding: 88px 0; }
section.tight { padding: 56px 0; }

.section-head { max-width: 640px; margin: 0 0 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.surface {
  background: var(--rv-surface);
  border: 1px solid var(--rv-border);
  border-radius: var(--radius-sm);
}

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

.hero { padding: 96px 0 64px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

/* ---------- Brief-card mockup (CSS only, no imagery) ---------- */

.brief-card-mock {
  background: var(--rv-surface);
  border: 1px solid var(--rv-border);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.brief-card-mock .bc-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rv-border);
}

.brief-card-mock .bc-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--rv-text-3);
}

.brief-card-mock .bc-name {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--rv-text-1);
}

.bc-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rv-border);
}
.bc-row:last-child { border-bottom: none; }

.bc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  background: var(--rv-text-4);
}
.bc-dot.ok { background: var(--rv-ok); }
.bc-dot.warn { background: var(--rv-warn); }

.bc-body strong {
  display: block;
  font-size: 0.9rem;
  color: var(--rv-text-1);
  margin-bottom: 2px;
}
.bc-body span {
  font-size: 0.82rem;
  color: var(--rv-text-2);
}

/* ---------- Two-vertical section ---------- */

.vertical-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 820px) {
  .vertical-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}

.vertical-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vertical-card .tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rv-text-3);
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  counter-reset: step;
}
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.step { position: relative; padding-left: 44px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border: 1px solid var(--rv-text-1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

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

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 720px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) { .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px) { .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.card { padding: 28px; }

/* ---------- Pricing ---------- */

.price-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 900px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }

.price-card {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.price-card.featured { border-color: var(--rv-text-1); border-width: 2px; }

.price-amount {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--rv-text-1);
}
.price-amount small {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--rv-text-3);
}

.price-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}
.price-list li {
  font-size: 0.9rem;
  color: var(--rv-text-2);
  padding-left: 20px;
  position: relative;
}
.price-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border: 1px solid var(--rv-ok);
}

/* ---------- Placeholder / draft callouts ---------- */

.placeholder-block {
  background: var(--rv-surface-2);
  border: 1px dashed var(--rv-text-4);
  border-radius: var(--radius-sm);
  padding: 20px;
  color: var(--rv-text-3);
  font-size: 0.88rem;
}
.placeholder-block .tag-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rv-warn);
  display: block;
  margin-bottom: 8px;
}

.draft-banner {
  background: var(--rv-surface-2);
  color: var(--rv-text-2);
  font-size: 0.78rem;
  padding: 8px 0;
  text-align: center;
  border-bottom: 1px solid var(--rv-border);
}
.draft-banner .container { max-width: 760px; }

/* ---------- Forms (waitlist) ---------- */

.form-row { display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.form-row.inline { flex-direction: row; flex-wrap: wrap; max-width: none; }
.form-row.inline .field { flex: 1 1 200px; }

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rv-text-1);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  border: 1px solid var(--rv-text-4);
  border-radius: var(--radius-sm);
  background: var(--rv-surface);
  color: var(--rv-text-1);
}
.field input:focus {
  outline: none;
  border-color: var(--rv-text-1);
}

.form-note { font-size: 0.78rem; color: var(--rv-text-3); margin-top: 4px; }

.form-success {
  display: none;
  background: var(--rv-ok-bg);
  color: var(--rv-ok);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.9rem;
}
.form-success.visible { display: block; }

/* ---------- Footer CTA band ---------- */

.cta-band {
  background: var(--rv-sidebar);
  color: var(--rv-surface);
  padding: 72px 0;
  text-align: center;
}
.cta-band h2 { color: var(--rv-surface); }
.cta-band p { color: var(--rv-text-4); }
.cta-band .btn-primary { background: var(--rv-surface); color: var(--rv-sidebar); }
.cta-band .btn-secondary { border-color: var(--rv-text-4); color: var(--rv-surface); }
.cta-band .form-note { color: var(--rv-text-4); }
.cta-band .field label { color: var(--rv-surface); }

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

footer.site-footer {
  background: var(--rv-page);
  border-top: 1px solid var(--rv-border);
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }

.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rv-text-3);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.88rem; color: var(--rv-text-2); }
.footer-col a:hover { color: var(--rv-text-1); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--rv-border);
  font-size: 0.8rem;
  color: var(--rv-text-3);
}
.footer-bottom .legal-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Cookie consent ---------- */

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  max-width: 640px;
  margin: 0 auto;
  background: var(--rv-sidebar);
  color: var(--rv-surface);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  display: none;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}
.cookie-banner.visible { display: flex; }
.cookie-banner p { color: var(--rv-text-4); font-size: 0.85rem; margin: 0; flex: 1 1 260px; }
.cookie-banner .btn-primary { background: var(--rv-surface); color: var(--rv-sidebar); padding: 9px 16px; font-size: 0.85rem; }
.cookie-banner .btn-secondary { border-color: var(--rv-text-4); color: var(--rv-surface); padding: 9px 16px; font-size: 0.85rem; }

/* ---------- Sticky mobile CTA ---------- */

.mobile-sticky-cta { display: none; }

/* ---------- Legal page body ---------- */

.legal-body h2 { margin-top: 40px; font-size: 1.25rem; }
.legal-body p, .legal-body li { color: var(--rv-text-2); }
.legal-body { max-width: 760px; }
.updated-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--rv-text-3); }

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

.center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ---------- Mobile nav ---------- */

@media (max-width: 719px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--rv-page);
    border-bottom: 1px solid var(--rv-border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--rv-border); }
  .nav-cta { display: none; }
  .nav-cta.mobile-visible { display: flex; padding: 16px 0 4px; width: 100%; }

  .mobile-sticky-cta {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    background: var(--rv-page);
    border-top: 1px solid var(--rv-border);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }
  .mobile-sticky-cta .btn { width: 100%; }
  body:has(.mobile-sticky-cta) .cookie-banner { bottom: 76px; left: 12px; right: 12px; }
}
