/* ==========================================================================
   Gua — shared site styles
   Palette + type mirror the iOS design system (calm olive).
   System fonts only (no third-party CDN — privacy/GDPR friendly).
   ========================================================================== */

:root {
  --primary: #6b7a3e;
  --primary-dark: #4e5a2c;
  --primary-light: #e8edda;
  --bg: #f5f2ec;
  --surface: #ffffff;
  --surface-elev: #fdfcf9;
  --text: #1c1c1e;
  --text-secondary: #6c6c70;
  --text-tertiary: #aeaeb2;
  --success: #4a7a3e;
  --divider: #e5e1d9;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1080px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(40, 44, 28, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; color: var(--text); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0 0 0.4em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: 0 0 0.5em; }
h3 { font-size: 1.25rem; margin: 0 0 0.4em; }
p { margin: 0 0 1em; color: var(--text-secondary); }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 600; color: var(--primary); margin: 0 0 0.8em; }
.lead { font-size: 1.2rem; color: var(--text-secondary); max-width: 60ch; }
.center { text-align: center; }

/* Skip link (accessibility) */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--primary-dark); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Visible focus for keyboard users */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 242, 236, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--divider);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.3rem; color: var(--text); }
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-secondary); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
/* The nav "Get Gua" button is a .btn-primary; without this, the more specific
   `.nav-links a` rule above overrides its white text and it looks faded. */
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover { color: #fff; }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; cursor: pointer;
  padding: 13px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--primary-dark); border-color: var(--divider); }
.btn-ghost:hover { background: var(--primary-light); }
.btn-block { width: 100%; }
.btn .badge { font-size: 0.7rem; font-weight: 700; background: rgba(255,255,255,0.25); padding: 2px 7px; border-radius: 999px; }
.btn-ghost .badge { background: var(--primary-light); color: var(--primary-dark); }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-tight { padding: 48px 0; }

/* Hero */
.hero { padding: 80px 0 64px; text-align: center; }
.hero-logo { width: 96px; height: 96px; margin: 0 auto 24px; }
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.hero .fine { margin-top: 16px; font-size: 0.85rem; color: var(--text-tertiary); }

/* Cards grid */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.card .icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--primary-light);
  display: grid; place-items: center; font-size: 24px; margin-bottom: 16px;
}
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; font-size: 0.97rem; }

/* Steps */
.steps { counter-reset: step; }
.step { display: flex; gap: 18px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--divider); }
.step:last-child { border-bottom: 0; }
.step .num {
  counter-increment: step; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 999px;
  background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--serif);
}
.step .num::before { content: counter(step); }

/* Philosophy band */
.band { background: var(--primary-dark); color: #fff; }
.band h2, .band p { color: #fff; }
.band p { color: rgba(255,255,255,0.85); }
.band .quote { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.2; max-width: 22ch; margin: 0 auto; }

/* Platforms */
.platforms { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .platforms { grid-template-columns: 1fr; } }
.platform { text-align: center; padding: 28px; background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius); }
.platform .emoji { font-size: 32px; }
.platform h3 { margin: 10px 0 4px; }
.platform .status { font-size: 0.8rem; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface-elev); border-top: 1px solid var(--divider); padding: 56px 0 32px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer-col h4 { font-family: var(--sans); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-tertiary); margin: 0 0 14px; }
.footer-col a { display: block; color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 8px; }
.footer-col a:hover { color: var(--text); }
.footer-brand { max-width: 280px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--divider); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: var(--text-tertiary); font-size: 0.85rem; }

/* ---------- Legal pages ---------- */
.legal { background: var(--surface); }
.legal-wrap { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.legal-wrap h1 { margin-bottom: 0.2em; }
.legal-wrap .updated { color: var(--text-tertiary); font-size: 0.9rem; margin-bottom: 2em; }
.legal-wrap h2 { font-size: 1.4rem; margin-top: 1.6em; }
.legal-wrap h3 { font-size: 1.1rem; }
.legal-wrap p, .legal-wrap li { color: var(--text-secondary); }
.legal-wrap a { text-decoration: underline; }
.callout { background: var(--primary-light); border-left: 4px solid var(--primary); padding: 16px 20px; border-radius: 8px; margin: 1.5em 0; }
.callout p { color: var(--primary-dark); margin: 0; }
.toc { background: var(--surface-elev); border: 1px solid var(--divider); border-radius: var(--radius); padding: 20px 24px; margin: 1.5em 0; }
.toc ul { margin: 0; padding-left: 20px; }
.toc a { text-decoration: none; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px; max-width: 560px; margin: 0 auto;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { font-size: 0.92rem; margin: 0 0 14px; color: var(--text-secondary); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions .btn { padding: 10px 16px; font-size: 0.92rem; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300; background: rgba(28, 28, 30, 0.55);
  display: grid; place-items: center; padding: 24px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--surface); border-radius: var(--radius); max-width: 420px; width: 100%;
  padding: 32px 28px; text-align: center; box-shadow: var(--shadow);
}
.modal .emoji { font-size: 40px; }
.modal h3 { margin: 12px 0 8px; font-size: 1.4rem; }
.modal p { margin: 0 0 18px; }
.modal .modal-close { margin-top: 4px; }
.modal-input {
  width: 100%; box-sizing: border-box; font-family: var(--sans); font-size: 1rem;
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--divider); background: var(--bg); color: var(--text);
}
.modal-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.modal-status { min-height: 1.2em; margin: 12px 0 0; font-size: 0.9rem; font-weight: 600; }
#soon-form[hidden] { display: none; }
