/* Clean & Minimal (master-plan.md Section 3a): soft neutral backgrounds, a
   single indigo accent color, generous whitespace, subtle shadows, rounded
   corners, no gradients or heavy decoration. Same design language and the
   same CSS-variable approach as the desktop app's styles.css, adapted for
   a marketing site (nav, hero, cards, footer) instead of an app shell. */

:root {
  --bg: #f5f6f8;
  /* Subtle alternating-section tint — same hue family as --surface-alt
     (not a fresh hardcoded color) so banded sections stay inside the
     established palette instead of introducing a new one. */
  --bg-alt: #eef0f5;
  --surface: #ffffff;
  --surface-alt: #f0f1f5;
  --border: #e2e5ee;
  --text: #1f2430;
  --text-muted: #667085;
  --text-faint: #8a93a6;
  --accent: #4c6ef5;
  --accent-hover: #3b5bdb;
  --accent-contrast: #ffffff;
  --shadow: rgba(20, 25, 40, 0.06);
  --danger: #e03131;
  --danger-bg: #fdecec;
  --danger-border: #f3b4b4;
}

:root[data-theme='dark'] {
  --bg: #15171d;
  --bg-alt: #1a1d24;
  --surface: #1d2027;
  --surface-alt: #24272f;
  --border: #2e323c;
  --text: #e7e9ee;
  --text-muted: #9aa2b1;
  --text-faint: #6b7280;
  --accent: #4c6ef5;
  --accent-hover: #6685f7;
  --accent-contrast: #ffffff;
  --shadow: rgba(0, 0, 0, 0.35);
  --danger: #ff6b6b;
  --danger-bg: rgba(224, 49, 49, 0.14);
  --danger-border: rgba(255, 107, 107, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  transition: background-color 200ms ease, color 200ms ease;
}

.hidden {
  display: none !important;
}

img {
  max-width: 100%;
}

a {
  color: var(--accent);
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3 {
  line-height: 1.25;
  margin: 0 0 12px 0;
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 18px;
}

p {
  margin: 0 0 16px 0;
  color: var(--text-muted);
  /* Comfortable reading width — most paragraphs already sit inside a
     narrower card/column, so this only visibly kicks in on the few
     paragraphs (e.g. .pricing-note) that would otherwise span the full
     container on a wide screen. */
  max-width: 640px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.site-header .site-logo {
  justify-self: start;
}

.site-header .site-nav {
  justify-self: center;
}

.site-header .theme-toggle-btn {
  justify-self: end;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
}

.site-logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 2px;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.theme-toggle-btn:hover {
  background: var(--border);
  color: var(--text);
}

.theme-toggle-btn svg {
  width: 16px;
  height: 16px;
}

.theme-toggle-btn .icon-moon {
  display: none;
}

:root[data-theme='dark'] .theme-toggle-btn .icon-sun {
  display: none;
}

:root[data-theme='dark'] .theme-toggle-btn .icon-moon {
  display: block;
}

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

.btn {
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  transition: background-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 2px 10px var(--shadow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--shadow);
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-small {
  font-size: 13px;
  padding: 8px 16px;
}

/* ---------- Cards / sections ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
  padding: 24px;
}

section {
  padding: 80px 0;
}

section.tight {
  padding: 56px 0;
}

/* A very slightly different shade from the page background, so
   consecutive sections read as distinct blocks instead of one
   continuous wall of content. */
section.section-alt {
  background: var(--bg-alt);
}

.section-heading {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 36px auto;
}

.section-heading h2 {
  margin-bottom: 8px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--accent);
  margin-bottom: 10px;
}

.step-icon svg {
  width: 24px;
  height: 24px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 12px;
}

/* ---------- The problem (Home) ---------- */

.section-solution {
  text-align: center;
  max-width: 560px;
  margin: 32px auto 0 auto;
  font-weight: 600;
  color: var(--text);
}

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

.hero {
  text-align: center;
  padding: 72px 0 56px 0;
}

.hero h1 {
  max-width: 640px;
  margin: 0 auto 16px auto;
  /* More visual weight/confidence than a regular heading. */
  font-size: 46px;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.hero .lede {
  max-width: 560px;
  margin: 0 auto 28px auto;
  font-size: 17px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.hero-note {
  font-size: 13px;
  color: var(--text-faint);
}

.hero-note a {
  font-weight: 600;
}

.hero-visual {
  max-width: 340px;
  margin: 40px auto 0 auto;
}

.hero-visual svg {
  width: 100%;
  height: auto;
  display: block;
}

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

.price-tag {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.price-sub {
  color: var(--text-faint);
  font-size: 13px;
  margin-bottom: 20px;
}

.plan-list {
  list-style: none;
  margin: 0 0 24px 0;
  padding: 0;
}

.plan-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}

.plan-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.plan-check svg {
  width: 11px;
  height: 11px;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-card .btn {
  margin-top: auto;
}

.card-featured {
  border-color: var(--accent);
  box-shadow: 0 8px 28px var(--shadow), 0 0 0 1px var(--accent) inset;
}

.plan-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.plan-list li:last-child {
  border-bottom: none;
}

.pricing-note {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 14px;
  color: var(--text-muted);
  margin-left: auto;
  margin-right: auto;
}

/* ---------- FAQ accordion ---------- */
/* Native <details>/<summary> — accessible and functional even if JS
   fails, no custom JS needed for the open/close behavior itself. */

.faq-entry {
  border-bottom: 1px solid var(--border);
}

.faq-entry:last-child {
  border-bottom: none;
}

.faq-entry summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.faq-entry summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  flex-shrink: 0;
  display: inline-flex;
  color: var(--accent);
  transition: transform 200ms ease;
}

.faq-icon svg {
  width: 18px;
  height: 18px;
}

/* The icon is drawn as a "+"; rotating it 45° on open turns it into an
   "×", signaling "click to close" without a second icon or any JS. */
.faq-entry[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 4px 18px 4px;
}

.faq-answer p {
  margin: 0;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 40px;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  color: var(--text-faint);
  font-size: 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  h1 {
    font-size: 27px;
  }

  h2 {
    font-size: 21px;
  }

  section {
    padding: 48px 0;
  }

  section.tight {
    padding: 40px 0;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .site-nav {
    gap: 4px 12px;
  }

  .hero {
    padding: 40px 0 32px 0;
  }

  .hero h1 {
    font-size: 30px;
  }
}

/* ---------- Forms (account deletion, and future forms) ---------- */
.field {
  margin-bottom: 16px;
  text-align: left;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-note {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 16px 0;
  text-align: left;
}

.form-error {
  font-size: 13px;
  color: var(--danger);
  margin: -8px 0 12px 0;
  text-align: left;
}

.danger-callout {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  text-align: left;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  filter: brightness(0.92);
}
