:root {
  --bg: #f7f5f0;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --text: #14141a;
  --text-soft: #3c3c46;
  --muted: #6a6a76;
  --border: #e6e2d8;
  --accent: #5b6cd4;
  --accent-2: #8a98e8;
  --accent-soft: #eef0fb;
  --amber: #d98b2b;
  --teal: #3aa493;
  --success: #3e9d6f;
  --radius: 18px;
  --max-w: 1120px;
  --device-bezel: #1a1c22;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d12;
    --bg-elev: #14161d;
    --surface: #181a22;
    --text: #f4f3ef;
    --text-soft: #d3d2cd;
    --muted: #8d8d98;
    --border: #262832;
    --accent: #8a98e8;
    --accent-2: #b3bdf0;
    --accent-soft: #1d2034;
    --device-bezel: #0a0b0f;
  }
}

/* Explicit theme overrides (toggle) — win over prefers-color-scheme. */
:root[data-theme="dark"] {
  --bg: #0c0d12;
  --bg-elev: #14161d;
  --surface: #181a22;
  --text: #f4f3ef;
  --text-soft: #d3d2cd;
  --muted: #8d8d98;
  --border: #262832;
  --accent: #8a98e8;
  --accent-2: #b3bdf0;
  --accent-soft: #1d2034;
  --device-bezel: #0a0b0f;
}
:root[data-theme="light"] {
  --bg: #f7f5f0;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --text: #14141a;
  --text-soft: #3c3c46;
  --muted: #6a6a76;
  --border: #e6e2d8;
  --accent: #5b6cd4;
  --accent-2: #8a98e8;
  --accent-soft: #eef0fb;
  --device-bezel: #1a1c22;
}

/* Theme toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
  line-height: 1;
  transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.theme-toggle svg { display: block; }
.theme-toggle .icon-sun { display: none; color: #f6b73a; }
.theme-toggle .icon-moon { display: block; color: #f6b73a; }
.theme-toggle:hover .icon-sun,
.theme-toggle:hover .icon-moon { color: #f5a623; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme]) .theme-toggle .icon-sun { display: block; }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(91,108,212,0.18), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 30%, rgba(217,139,43,0.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 10% 60%, rgba(58,164,147,0.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  padding: 22px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-header .theme-toggle {
  margin-left: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  box-shadow: 0 6px 16px -6px rgba(91,108,212,0.6);
  display: block;
  object-fit: cover;
}
.site-header nav a {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin-right: 22px;
}
.site-header nav a:last-child { margin-right: 0; }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 40px;
  text-align: center;
  position: relative;
}
.hero .eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.04;
  margin: 0 0 20px;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent) 10%, var(--amber) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 36px;
}
.hero-cta {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}
.hero-shot {
  margin-top: 64px;
  display: flex;
  justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 12px 28px -10px rgba(91,108,212,0.55);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 18px 36px -12px rgba(91,108,212,0.7);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn-ghost:hover { box-shadow: none; background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }

/* ---------- Device frame (phone bezel mock) ---------- */
.device {
  display: inline-block;
  padding: 11px;
  background: linear-gradient(160deg, #2c2e36, #0e0f14);
  border-radius: 46px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 50px 100px -30px rgba(0,0,0,0.55),
    0 30px 60px -30px rgba(91,108,212,0.35);
  position: relative;
}
.device::before {
  /* subtle highlight on the top edge */
  content: "";
  position: absolute;
  top: 1px; left: 11px; right: 11px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  border-radius: 999px;
  pointer-events: none;
}
.device > img,
.device > video,
.device > picture > img {
  display: block;
  border-radius: 36px;
  width: 280px;
  max-width: 100%;
  height: auto;
  background: #000;
}
.device.lg > img,
.device.lg > video,
.device.lg > picture > img { width: 320px; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
section h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
section p.section-lede {
  color: var(--muted);
  max-width: 660px;
  margin: 0 0 48px;
  font-size: 1.08rem;
}

/* ---------- Feature grid ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.feature {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  position: relative;
  overflow: hidden;
  transition: transform .15s ease, border-color .15s ease;
}
.feature:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}
.feature .icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.feature h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  letter-spacing: -0.005em;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

/* ---------- Showcase rows ---------- */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.showcase.reverse { direction: rtl; }
.showcase.reverse > * { direction: ltr; }
.showcase .device { justify-self: center; }
.showcase h2 { margin-top: 0; }
.showcase p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 480px;
}
.showcase .pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

@media (max-width: 800px) {
  .showcase, .showcase.reverse {
    grid-template-columns: 1fr;
    gap: 40px;
    direction: ltr;
  }
}

/* ---------- Pricing ---------- */
.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 12px;
}
.plan {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.plan-featured {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 24px 60px -32px rgba(91,108,212,0.5);
}
.plan .pill {
  align-self: flex-start;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 11px;
  border-radius: 999px;
}
.plan h3 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.plan .price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.plan .price .amount {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.plan .price .period {
  font-size: 0.92rem;
  color: var(--muted);
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plan ul li {
  color: var(--text-soft);
  font-size: 0.96rem;
  padding-left: 22px;
  position: relative;
}
.plan ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--success);
  font-weight: 700;
}
.pricing-note {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

/* ---------- CTA strip ---------- */
.cta-strip {
  text-align: center;
  padding: 80px 24px;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at top, rgba(255,255,255,0.18), transparent 60%),
    linear-gradient(135deg, var(--accent), #7a64d4);
  color: #fff;
  margin: 0 24px;
  box-shadow: 0 40px 80px -30px rgba(91,108,212,0.55);
}
.cta-strip h2 { color: #fff; margin-bottom: 8px; }
.cta-strip p { color: rgba(255,255,255,0.85); margin-bottom: 28px; }
.cta-strip .btn {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.4);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 48px 0 64px;
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 40px;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
.site-footer nav a { margin-left: 18px; color: var(--text-soft); }

/* ---------- Legal pages ---------- */
.legal {
  max-width: 740px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}
.legal h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.legal h2 { margin-top: 36px; font-size: 1.2rem; letter-spacing: -0.01em; }
.legal p, .legal li { color: var(--text-soft); }
.legal .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 28px; }
.legal .todo {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 28px;
  font-size: 0.94rem;
  color: var(--text);
}
