/* Mail Service — landing page styles.
   Tokens mirror the product baseline (PLAN §6 + apps/web/src/index.css) so the
   landing and the app share a design language. Agent 09 owns the design
   system (design/); when tokens.css lands there, these values get replaced by
   09's — same names, same roles. Nothing here is a new invention.

   Zero JS needed for layout. Dark mode via prefers-color-scheme. */

:root {
  /* tokens — PLAN §6 baseline */
  --surface: #f8fafd;
  --sidebar: #f6f8fc;
  --accent: #1a73e8;
  --accent-strong: #1558b0;
  --danger: #d93025;
  --text: #202124;
  --text-2: #444746;
  --text-3: #5f6368;
  --border: #dadce0;
  --card: #ffffff;
  --chip: #e8f0fe;
  --chip-text: #174ea6;
  --ok: #1e8e3e;
  --radius: 16px; /* rounded-2xl */
  --radius-s: 10px;
  --shadow-1: 0 1px 2px rgba(60, 64, 67, 0.16), 0 1px 3px 1px rgba(60, 64, 67, 0.08);
  --shadow-2: 0 1px 3px rgba(60, 64, 67, 0.18), 0 4px 8px 3px rgba(60, 64, 67, 0.1);
  --maxw: 1080px;
  --font:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* mirrors Gmail's dark palette (PLAN §6 dark-mode note) */
    --surface: #131314;
    --sidebar: #1b1b1c;
    --accent: #8ab4f8;
    --accent-strong: #aecbfa;
    --danger: #f28b82;
    --text: #e3e3e3;
    --text-2: #c4c7c5;
    --text-3: #9aa0a6;
    --border: #3c4043;
    --card: #1e1f20;
    --chip: #2d3c54;
    --chip-text: #aecbfa;
    --ok: #81c995;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-2: 0 1px 3px rgba(0, 0, 0, 0.6);
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  max-width: 100%;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
  font-size: 1.05rem;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 0.95rem;
}
.nav a {
  color: var(--text-2);
}
.nav .nav-cta {
  color: var(--accent);
  font-weight: 600;
}
@media (max-width: 640px) {
  .nav a:not(.nav-cta) {
    display: none;
  }
}

/* ---------- hero ---------- */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  background:
    radial-gradient(1200px 400px at 50% -80px, color-mix(in srgb, var(--accent) 14%, transparent), transparent),
    var(--surface);
}
.hero h1 {
  font-size: clamp(2rem, 5.2vw, 3.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 auto 14px;
  max-width: 18ch;
  font-weight: 700;
}
.hero .sub {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--text-2);
  max-width: 54ch;
  margin: 0 auto 26px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 30px;
  padding: 0;
  list-style: none;
}
.chips li {
  background: var(--chip);
  color: var(--chip-text);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.86rem;
  font-weight: 500;
}

/* ---------- waitlist form ---------- */
.waitlist {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 560px;
  margin: 0 auto;
}
.waitlist input[type="email"] {
  flex: 1 1 240px;
  min-width: 220px;
  font: inherit;
  padding: 13px 16px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}
.waitlist button {
  font: inherit;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: var(--radius-s);
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-1);
}
.waitlist button:hover {
  background: var(--accent-strong);
  color: #fff;
  text-decoration: none;
}
.form-note {
  font-size: 0.84rem;
  color: var(--text-3);
  margin-top: 12px;
}
.form-status {
  margin: 14px auto 0;
  max-width: 560px;
  font-size: 0.95rem;
  border-radius: var(--radius-s);
  padding: 12px 16px;
  display: none;
}
.form-status.show {
  display: block;
}
.form-status.ok {
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  color: var(--ok);
}
.form-status.err {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}
.waitlist-result {
  display: none;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.waitlist-result.show {
  display: flex;
}
.waitlist-result .pos {
  font-size: 1.6rem;
  font-weight: 700;
}
.share-link {
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  background: var(--sidebar);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 8px 12px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.share-link button {
  font: inherit;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
}
.cf-turnstile {
  margin: 14px auto 0;
  display: flex;
  justify-content: center;
}

/* ---------- sections ---------- */
section {
  padding: 64px 0;
}
.section-alt {
  background: var(--sidebar);
  border-block: 1px solid var(--border);
}
h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--text-2);
  max-width: 60ch;
  margin: 0 auto 40px;
}

/* how it works */
.steps {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-1);
}
.steps .n {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--chip);
  color: var(--chip-text);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.steps h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.steps p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.95rem;
}

/* value props */
.props {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  padding: 0;
  list-style: none;
}
.props li {
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--border);
  background: var(--card);
}
.props svg {
  color: var(--accent);
  margin-bottom: 8px;
}
.props h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.props p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.95rem;
}

/* ---------- pricing ---------- */
.pricing-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  align-items: stretch;
  list-style: none;
  padding: 0;
  margin: 0 auto 26px;
  max-width: 920px;
}
.tier {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-1);
}
.tier.founding {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-2);
  position: relative;
}
.tier .badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.tier h3 {
  margin: 2px 0 2px;
  font-size: 1.15rem;
}
.tier .blurb {
  color: var(--text-3);
  font-size: 0.9rem;
  margin: 0 0 14px;
}
.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}
.price .amt {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.price .per {
  color: var(--text-3);
  font-size: 0.9rem;
}
.price-strike {
  color: var(--text-3);
  font-size: 0.85rem;
  margin: 0 0 14px;
}
.tier ul {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  flex: 1;
}
.tier li {
  padding: 6px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  font-size: 0.93rem;
  color: var(--text-2);
  display: flex;
  gap: 8px;
}
.tier li:last-child {
  border-bottom: none;
}
.tier li::before {
  content: "✓";
  color: var(--ok);
  font-weight: 700;
}
.tier a.cta {
  text-align: center;
  font-weight: 600;
  border-radius: var(--radius-s);
  padding: 11px 18px;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.tier.founding a.cta {
  background: var(--accent);
  color: #fff;
}
.tier a.cta:hover {
  text-decoration: none;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.tier.founding a.cta:hover {
  background: var(--accent-strong);
}
.founding-counter {
  text-align: center;
  max-width: 62ch;
  margin: 0 auto 10px;
  font-size: 0.95rem;
}
.founding-counter strong {
  color: var(--accent);
}
.pricing-notes {
  text-align: center;
  color: var(--text-3);
  font-size: 0.85rem;
  max-width: 72ch;
  margin: 10px auto 0;
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 760px;
  margin: 0 auto;
}
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 4px 18px;
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 10px;
  font-size: 1.3rem;
  color: var(--text-3);
  font-weight: 400;
}
.faq details[open] summary::after {
  content: "–";
}
.faq details p {
  color: var(--text-2);
  margin: 0 0 14px;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--sidebar);
  padding: 40px 0 32px;
  font-size: 0.9rem;
  color: var(--text-2);
}
.foot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
}
.foot-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}
.foot-col h4 {
  margin: 0 0 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
}
.foot-col a {
  color: var(--text-2);
}
.foot-note {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  color: var(--text-3);
  font-size: 0.82rem;
}

/* inline SVG icon sizing */
.ic {
  width: 22px;
  height: 22px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--card);
  color: var(--accent);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-s) 0;
  z-index: 20;
}
.skip-link:focus {
  left: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
