/* ============================================================
   Gatekeeper by HoneyWired — Design System
   ============================================================ */

:root {
  --bg: #FAF7F2;
  --bg-alt: #F5EFE6;
  --ink: #1A1915;
  --muted: #57534E;
  --faint: #A8A29E;
  --line: #E7E5E4;
  --line-soft: #F5F5F4;
  --accent: #D4963B;
  --burgundy: #6E1A2E;
  --forest: #3F5A4E;
  --shopify: #008060;
  --mint: #E8EEE9;
  --cream: #F5EFE6;
  --warning-bg: #FFF8EC;
  --warning-ink: #8B5A1E;
  --danger: #991B1B;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--ink); }
a:hover { opacity: 0.8; }

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 32px;
}

.container--wide {
  max-width: 1120px;
}

/* ---------- Draft banner (remove when legal finalized) ---------- */
.draft-banner {
  background: var(--warning-bg);
  border-bottom: 1px solid #F0D9A8;
  padding: 10px 0;
  font-size: 12px;
  text-align: center;
  color: var(--warning-ink);
}

/* ---------- Top bar ---------- */
.topbar {
  border-bottom: 1px solid rgba(231, 229, 228, 0.6);
  padding: 18px 0;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.logo__mark {
  width: 28px;
  height: 28px;
  background: var(--ink);
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.logo__mark::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 2px;
}
.logo__name {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
}
.logo__tagline {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 3px;
}
.nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.nav a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 120ms;
}
.nav a:hover { color: var(--ink); opacity: 1; }
.nav a.active { color: var(--ink); font-weight: 500; }
.nav .btn-install {
  background: var(--ink);
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 12px;
  transition: opacity 120ms;
}
.nav .btn-install:hover { opacity: 0.9; color: white; }

@media (max-width: 640px) {
  .nav a:not(.btn-install) { display: none; }
}

/* ---------- Type ---------- */
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 16px;
  font-weight: 500;
}
h1 { font-family: 'Fraunces', serif; font-weight: 380; letter-spacing: -0.025em; }
h2 { font-family: 'Fraunces', serif; font-weight: 400; letter-spacing: -0.02em; }
h3 { font-family: 'Fraunces', serif; font-weight: 500; letter-spacing: -0.01em; }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 48px;
}
.hero--bordered {
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  margin: 0 0 24px;
  max-width: 18ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--burgundy);
  font-weight: 400;
}
.hero p.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 32px;
}
.hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 120ms, opacity 120ms;
}
.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--ink);
  color: white;
}
.btn--secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn--secondary:hover { border-color: var(--ink); }
.btn--shopify {
  background: var(--shopify);
  color: white;
}

/* ---------- Sections ---------- */
section.content {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}
section.content:last-of-type { border-bottom: none; }

section.content h2 {
  font-size: 32px;
  margin: 0 0 20px;
  line-height: 1.15;
}
section.content > p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 16px;
  max-width: 64ch;
}
section.content > p.muted {
  color: var(--muted);
}
section.content h3 {
  font-size: 20px;
  margin: 32px 0 12px;
}
section.content h4 {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.005em;
  margin: 20px 0 8px;
}

/* ---------- Legal doc formatting ---------- */
.legal-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 0 96px;
}
.legal-body h2 {
  font-size: 26px;
  margin: 56px 0 16px;
  padding-top: 8px;
  line-height: 1.2;
}
.legal-body h2:first-of-type { margin-top: 16px; }
.legal-body h3 {
  font-size: 18px;
  margin: 32px 0 10px;
}
.legal-body h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 24px 0 8px;
  color: var(--ink);
}
.legal-body p {
  font-size: 15px;
  line-height: 1.72;
  margin: 12px 0;
  color: var(--ink);
}
.legal-body ul, .legal-body ol {
  padding-left: 24px;
  margin: 12px 0;
}
.legal-body li {
  font-size: 15px;
  line-height: 1.72;
  margin: 6px 0;
  color: var(--ink);
}
.legal-body strong {
  font-weight: 600;
}
.legal-body em {
  font-style: italic;
  color: var(--muted);
}
.legal-body .legal-meta {
  padding: 16px 20px;
  background: var(--cream);
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 40px;
}
.legal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}
.legal-body table th {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 500;
  text-align: left;
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--line);
}
.legal-body table td {
  padding: 14px 12px 14px 0;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  line-height: 1.55;
}
.legal-body table td:first-child {
  font-weight: 500;
}

/* ---------- Footer ---------- */
footer {
  padding: 64px 0 48px;
  border-top: 1px solid var(--line);
  margin-top: 48px;
  background: var(--bg-alt);
}
footer .container {
  max-width: 1120px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-col h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 16px;
  font-weight: 500;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li {
  margin-bottom: 10px;
}
.footer-col a {
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  transition: color 120ms;
}
.footer-col a:hover { color: var(--burgundy); opacity: 1; }
.footer-about p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 40ch;
}
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(110, 26, 46, 0.1);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.footer-bottom .updated {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--faint);
}

/* ---------- Subtle animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: rise 800ms cubic-bezier(0.2, 0.8, 0.3, 1) both; }
  .hero p.lede { animation: rise 800ms 120ms cubic-bezier(0.2, 0.8, 0.3, 1) both; }
  .hero__cta { animation: rise 800ms 240ms cubic-bezier(0.2, 0.8, 0.3, 1) both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
