/* CaseDesk website — design system derived from the app itself:
   primary blue (Tailwind blue-600 family), slate surfaces (app sidebar
   #1e293b), Inter type, amber/cyan accents from the product icon.
   Light + dark themes via [data-theme] on <html>; toggle in theme.js. */

:root {
  --bg: #f8fafc;
  --bg-deep: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --text-faint: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --on-primary: #ffffff;
  --amber: #d97706;
  --cyan: #0891b2;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 4px 12px rgba(15, 23, 42, .08), 0 24px 64px rgba(15, 23, 42, .12);
  --header-bg: rgba(248, 250, 252, .85);
  --hero-glow: radial-gradient(60% 55% at 50% 40%, rgba(37, 99, 235, .12), transparent 70%);
  --frame-bg: #e2e8f0;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-deep: #0b1120;
  --surface: #16213a;
  --surface-2: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-faint: #7c8ba1;
  --border: rgba(148, 163, 184, .16);
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-soft: rgba(59, 130, 246, .12);
  --on-primary: #ffffff;
  --amber: #fbbf24;
  --cyan: #22d3ee;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, .4), 0 24px 64px rgba(0, 0, 0, .5);
  --header-bg: rgba(11, 17, 32, .8);
  --hero-glow: radial-gradient(60% 55% at 50% 40%, rgba(59, 130, 246, .16), transparent 70%);
  --frame-bg: #1e293b;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

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

img { max-width: 100%; height: auto; display: block; }

/* ---------- header ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

header.site .inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }

.beta {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--amber);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

nav.site {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: .92rem;
  font-weight: 500;
}
nav.site a { color: var(--text-muted); margin-left: 0; }
nav.site a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  background: var(--primary);
  color: var(--on-primary) !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--primary-hover); text-decoration: none; }

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
}
.theme-toggle:hover { color: var(--text); border-color: var(--text-faint); }
.theme-toggle svg { width: 18px; height: 18px; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
.icon-sun { display: none; }
.icon-moon { display: block; }

@media (max-width: 760px) {
  nav.site a:not(.nav-cta) { display: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  padding: 88px 24px 40px;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-glow);
  pointer-events: none;
}
.hero > * { position: relative; }

.kicker {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -.03em;
  margin: 0 0 20px;
  font-weight: 800;
}

.hero .lead {
  max-width: 720px;
  margin: 0 auto 30px;
  font-size: 1.13rem;
  color: var(--text-muted);
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.cta {
  display: inline-block;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.cta:hover { background: var(--primary-hover); text-decoration: none; }

.cta.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.cta.secondary:hover { background: var(--surface-2); }

.cta-note { display: block; font-size: .85rem; color: var(--text-faint); }

/* framed screenshot */
.window {
  margin: 48px auto 0;
  max-width: 1040px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--frame-bg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.window .bar {
  display: flex;
  gap: 6px;
  padding: 11px 14px;
}
.window .bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--text-faint);
  opacity: .45;
}
.window img { border-top: 1px solid var(--border); }

.shot-caption {
  text-align: center;
  font-size: .8rem;
  color: var(--text-faint);
  margin-top: 14px;
}

/* ---------- stats ---------- */

.stats {
  max-width: 1140px;
  margin: 64px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 18px;
  text-align: center;
}
.stat b {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--primary);
}
.stat span { font-size: .88rem; color: var(--text-muted); }
.stats.five { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 960px) { .stats, .stats.five { grid-template-columns: repeat(2, 1fr); } }

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

section.band, .pillars-wrap, .features-grid-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 72px 24px 0;
}

.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  letter-spacing: -.02em;
  line-height: 1.2;
  margin: 0 0 12px;
  font-weight: 800;
}
.section-head p { color: var(--text-muted); margin: 0; font-size: 1.04rem; }

/* pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 24px;
}
.pillar h3 { margin: 12px 0 8px; font-size: 1.08rem; letter-spacing: -.01em; }
.pillar p { margin: 0; color: var(--text-muted); font-size: .94rem; }
.pillar .glyph {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
}
.pillar .glyph svg { width: 20px; height: 20px; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }

/* alternating feature rows */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 48px;
  align-items: center;
  max-width: 1140px;
  margin: 0 auto;
  padding: 72px 24px 0;
}
.feature-row.flip .copy { order: 2; }
.feature-row.flip .media { order: 1; }
.feature-row .eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 10px;
}
.feature-row h3 {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  letter-spacing: -.02em;
  line-height: 1.22;
  margin: 0 0 14px;
  font-weight: 750;
}
.feature-row p { color: var(--text-muted); margin: 0 0 14px; }
.feature-row ul {
  margin: 0; padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: .94rem;
}
.feature-row li {
  padding-left: 24px;
  position: relative;
  margin-bottom: 8px;
}
.feature-row li::before {
  content: "";
  position: absolute;
  left: 2px; top: .5em;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--cyan);
}
.feature-row .media .window { margin: 0; }
@media (max-width: 900px) {
  .feature-row { grid-template-columns: 1fr; gap: 26px; }
  .feature-row.flip .copy { order: 1; }
  .feature-row.flip .media { order: 2; }
}

/* what's inside grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.fcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.fcard b { display: block; margin-bottom: 6px; font-size: .98rem; letter-spacing: -.01em; }
.fcard p { margin: 0; font-size: .88rem; color: var(--text-muted); }
@media (max-width: 900px) { .features-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .features-grid { grid-template-columns: 1fr; } }

/* integrations chips */
.chips-wrap { max-width: 1140px; margin: 0 auto; padding: 72px 24px 0; text-align: center; }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 26px;
}
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
}
.chips-note { margin-top: 18px; font-size: .85rem; color: var(--text-faint); }

/* security band */
.security {
  margin-top: 80px;
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.security .inner-band {
  max-width: 1140px;
  margin: 0 auto;
  padding: 72px 24px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: start;
}
.security h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -.02em; margin: 0 0 16px; font-weight: 800; }
.security p { color: var(--text-muted); }
.sec-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.sec-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: .92rem;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.sec-list b { color: var(--text); }
.sec-list svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--cyan); }
@media (max-width: 900px) { .security .inner-band { grid-template-columns: 1fr; } }

.disclaimer {
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: .92rem;
  color: var(--text-muted);
}
.disclaimer strong { color: var(--text); }

/* pricing */
.price-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 34px;
  text-align: center;
  box-shadow: var(--shadow);
}
.price-card .amount {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 6px 0 2px;
}
.price-card .amount small { font-size: 1rem; font-weight: 600; color: var(--text-faint); }
.price-card p { color: var(--text-muted); font-size: .96rem; }
.price-card .cta { margin-top: 10px; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; padding: 72px 24px 0; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 20px;
  margin-bottom: 12px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 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: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-weight: 500;
  font-size: 1.2rem;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--text-muted); font-size: .94rem; }

/* final CTA */
.final-cta {
  text-align: center;
  padding: 88px 24px 96px;
}
.final-cta h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); letter-spacing: -.02em; margin: 0 0 14px; font-weight: 800; }
.final-cta p { color: var(--text-muted); max-width: 560px; margin: 0 auto 26px; }

/* ---------- legal / article pages ---------- */

main { min-height: 55vh; }

article.legal {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}
article.legal h1 { font-size: 2rem; letter-spacing: -.02em; line-height: 1.2; margin: 10px 0 6px; }
article.legal h2 { font-size: 1.2rem; letter-spacing: -.01em; margin: 2em 0 8px; }
article.legal p, article.legal li { color: var(--text-muted); font-size: .96rem; }
article.legal strong { color: var(--text); }
.updated { font-size: .85rem; color: var(--text-faint); margin-bottom: 24px; }

.draft-banner {
  background: var(--primary-soft);
  border: 1px dashed var(--primary);
  color: var(--primary);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: .85rem;
  font-weight: 600;
  margin: 20px 0 24px;
}

/* ---------- footer ---------- */

footer.site {
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  margin-top: 48px;
}
footer.site .inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 34px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  font-size: .88rem;
  color: var(--text-faint);
}
footer.site a { color: var(--text-muted); }
footer.site .foot-note { flex-basis: 100%; font-size: .8rem; }
