/* PostOnly marketing site — shared stylesheet
   System font stack, no external fonts/CDNs, light/dark via prefers-color-scheme. */

:root {
  color-scheme: light dark;

  --brand-1: #8B94F2;     /* periwinkle — sampled from the app icon's waves */
  --brand-2: #3A4CF0;     /* indigo — the waves' deep stop */
  --accent: #4B45D6;      /* the waves' hue, darkened for AA contrast on white */
  --accent-strong: #37339F;
  --accent-tint: #EDEBFE;

  --bg: #FBFAF9;
  --bg-raised: #FFFFFF;
  --bg-sunken: #F1EFED;
  --text: #17181A;
  --text-muted: #55585E;
  --border: #E4E1DD;
  --shadow: 0 1px 2px rgb(20 20 20 / 0.04), 0 8px 24px rgb(20 20 20 / 0.06);

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --maxw: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #8B94F2;      /* the waves' periwinkle reads natively on dark */
    --accent-strong: #CAC0FD;
    --accent-tint: #1E1F3D;

    --bg: #121214;
    --bg-raised: #1B1B1F;
    --bg-sunken: #0C0C0E;
    --text: #F2F1EF;
    --text-muted: #A7A6AC;
    --border: #2A2A2F;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.35);
  }
}

* { box-sizing: border-box; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-strong); text-decoration-color: color-mix(in srgb, var(--accent-strong) 40%, transparent); }
a:hover { text-decoration-color: currentColor; }

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

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--text-muted); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-tint);
  padding: 0.3em 0.75em;
  border-radius: 999px;
  margin-bottom: 1em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.4em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  box-shadow: 0 6px 20px rgb(58 76 240 / 0.28);
}
.btn-secondary {
  background: var(--bg-raised);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.96rem;
}
.nav-links a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; display: block; }

@media (max-width: 760px) {
  .nav-links {
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-toggle { display: inline-flex; }
  .nav-actions .btn-secondary-desktop { display: none; }
}

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

.hero {
  padding-block: 72px 56px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

.hero h1 { margin-bottom: 0.4em; }
.hero .sub { font-size: 1.15rem; max-width: 46ch; }
.hero-ctas { display: flex; align-items: center; gap: 16px; margin-top: 1.6em; flex-wrap: wrap; }

.badge-store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.6em 1.1em;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  background: var(--bg-raised);
}
.badge-store strong { color: var(--text); display: block; font-size: 0.95rem; }
.badge-store svg { width: 22px; height: 22px; }

/* ---------- App window illustration ---------- */

.app-window {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.app-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-sunken);
}
.app-window-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #EF6A5F; }
.dot.yellow { background: #F3BF4C; }
.dot.green { background: #61C554; }
.app-window-bar .title {
  margin-inline: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.app-window-body {
  display: grid;
  grid-template-columns: 34% 66%;
  min-height: 320px;
}
@media (max-width: 520px) {
  .app-window-body { grid-template-columns: 1fr; }
  .aw-sidebar { display: none; }
}

.aw-sidebar {
  border-right: 1px solid var(--border);
  padding: 16px 14px;
  background: var(--bg-sunken);
}
.aw-sidebar h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 10px;
}
.aw-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.aw-group.active { background: var(--accent-tint); color: var(--accent-strong); font-weight: 600; }
.aw-group .swatch { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.aw-group .count {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.aw-composer { padding: 18px 20px; }
.aw-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.aw-toolbar span {
  width: 26px;
  height: 20px;
  border-radius: 6px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
}
.aw-line {
  height: 10px;
  border-radius: 5px;
  background: var(--bg-sunken);
  margin-bottom: 10px;
}
.aw-line.thread-marker {
  position: relative;
  background: none;
  border-top: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--border));
  height: 0;
  margin-block: 16px;
}
.aw-line.thread-marker::after {
  content: "thread break";
  position: absolute;
  top: -9px;
  left: 8px;
  background: var(--bg-raised);
  padding: 0 6px;
  font-size: 0.62rem;
  color: var(--accent-strong);
  letter-spacing: 0.03em;
}
.aw-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.aw-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.aw-chip .led { width: 6px; height: 6px; border-radius: 50%; }
.aw-chip.ok .led { background: #4CAF7D; }
.aw-chip.warn .led { background: #E0A63E; }
.aw-chip.infinite .led { background: var(--accent); }

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

section { padding-block: 64px; }
.section-head { max-width: 62ch; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- Features ---------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}
.feature-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-tint);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-card .icon svg { width: 20px; height: 20px; }
.feature-card h3 { margin-bottom: 0.35em; }
.feature-card p { margin: 0; font-size: 0.94rem; }

/* ---------- How it works ---------- */

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

.step {
  position: relative;
  padding: 28px 22px 22px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

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

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 860px) { .pricing-grid { grid-template-columns: 1fr; } }

.price-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
  position: relative;
}
.price-card .tag {
  position: absolute;
  top: -12px;
  left: 26px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.price-card .amount {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 10px 0 4px;
}
.price-card .amount small { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); }
.price-card ul { list-style: none; margin: 18px 0 24px; padding: 0; flex-grow: 1; }
.price-card li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--text-muted);
  padding: 6px 0;
}
.price-card li svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--accent-strong); }
.price-card .btn { justify-content: center; width: 100%; }

/* ---------- FAQ ---------- */

.faq-list { max-width: 760px; margin-inline: auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin-top: 12px; margin-bottom: 0; }

/* ---------- CTA banner ---------- */

.cta-banner {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  color: #fff;
  text-align: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgb(255 255 255 / 0.9); }
.cta-banner .hero-ctas { justify-content: center; }
.cta-banner .btn-secondary { background: #fff; color: var(--brand-2); border-color: transparent; }

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

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 40px;
  margin-top: 40px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.9rem; }
.footer-brand img { width: 22px; height: 22px; border-radius: 6px; }

/* ---------- Stub pages (privacy / terms / support) ---------- */

.doc-page { padding-block: 56px 80px; }
.doc-page .wrap { max-width: 780px; }
.draft-banner {
  background: var(--accent-tint);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent-strong);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 32px;
}
.doc-page h2 { margin-top: 1.6em; }
.doc-page section { padding: 0; }

.support-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 32px;
}
