/* DigitLLM — shared site stylesheet. Palette sampled directly from the
   app's own icon artwork (branding/icon-master.png), not guessed. */

:root {
  --bg: #0E1033;
  --surface: #171A45;
  --surface-alt: #1F234F;
  --border: #2E3266;
  --primary: #2F8FF8;
  --accent: #9761F8;
  --text: #F3F4FA;
  --text-muted: #A9ACC8;
  --success: #4ADE9C;
  --warning: #F8B84C;
  --danger: #F8617A;
  --shadow: 0 1px 0 rgba(0,0,0,0.4);
  --max: 1120px;
}
:root[data-theme="light"] {
  --bg: #F6F7FC;
  --surface: #FFFFFF;
  --surface-alt: #ECEEFA;
  --border: #DBDEF2;
  --primary: #2166D6;
  --accent: #7B3FE4;
  --text: #14173E;
  --text-muted: #5A5E85;
  --success: #1F9D66;
  --warning: #B4790F;
  --danger: #C22B48;
  --shadow: 0 1px 0 rgba(20,23,62,0.04);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F6F7FC;
    --surface: #FFFFFF;
    --surface-alt: #ECEEFA;
    --border: #DBDEF2;
    --primary: #2166D6;
    --accent: #7B3FE4;
    --text: #14173E;
    --text-muted: #5A5E85;
    --success: #1F9D66;
    --warning: #B4790F;
    --danger: #C22B48;
    --shadow: 0 1px 0 rgba(20,23,62,0.04);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }
img { max-width: 100%; display: block; }
.mono { font-family: ui-monospace, "SF Mono", "Menlo", "Cascadia Code", monospace; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header / nav ---------- */
header.site {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }
nav.links {
  display: flex;
  align-items: center;
  gap: 6px;
}
nav.links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
}
nav.links a:hover { color: var(--text); background: var(--surface); }
nav.links a[aria-current="page"] { color: var(--text); background: var(--surface-alt); }
.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 9px 16px !important;
  border-radius: 999px !important;
}

#nav-toggle { display: none; }
.nav-toggle-label { display: none; }
@media (max-width: 780px) {
  nav.links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  nav.links a { padding: 12px 8px; }
  #nav-toggle:checked ~ nav.links { max-height: 400px; }
  .nav-toggle-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid var(--border);
    border-radius: 9px;
    cursor: pointer;
    color: var(--text);
    font-size: 18px;
  }
  header.site { position: sticky; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -200px; right: -160px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  position: relative;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 260px; margin: 0 auto; }
}
.kicker {
  font-family: ui-monospace, "SF Mono", "Menlo", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 14px;
}
h1 {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 18px;
  text-wrap: balance;
}
.lede {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 540px;
  margin: 0 0 30px;
}
.hero-art img { border-radius: 28px; box-shadow: 0 30px 80px -30px rgba(0,0,0,0.5); }

.trust-row {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 34px;
  color: var(--text-muted);
  font-size: 13.5px;
}
.trust-row span { display: flex; align-items: center; gap: 7px; }
.trust-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); flex-shrink: 0; }

/* ---------- Section shell ---------- */
section { padding: 64px 0; }
.section-head { max-width: 640px; margin: 0 0 40px; }
.section-head h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 10px; text-wrap: balance; }
.section-head p { color: var(--text-muted); font-size: 16px; margin: 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Tool grid ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.tool-badge {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: ui-monospace, "SF Mono", monospace;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 14px;
  color: #fff;
}
.tool-card h3 { font-size: 16px; margin: 0 0 6px; font-weight: 700; }
.tool-card p { font-size: 13.5px; color: var(--text-muted); margin: 0; line-height: 1.55; }
.tool-card .soon {
  display: inline-block;
  margin-top: 10px;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent);
  padding: 3px 8px;
  border-radius: 999px;
}

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 760px;
}
@media (max-width: 640px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
}
.price-card.pro { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface)); }
.price-card h3 { margin: 0 0 4px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-family: ui-monospace, "SF Mono", monospace; }
.price-card .amount { font-size: 34px; font-weight: 800; margin: 6px 0 18px; }
.price-card .amount small { font-size: 15px; color: var(--text-muted); font-weight: 600; }
.price-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.price-card li { display: flex; gap: 9px; font-size: 14px; align-items: flex-start; }
.price-card li::before { content: "✓"; color: var(--success); font-weight: 800; flex-shrink: 0; }

/* ---------- Cards / grids generic ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--text-muted); margin: 12px 0 0; font-size: 14.5px; line-height: 1.65; max-width: 68ch; }
.faq-cat {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 40px 0 4px;
}
.faq-cat:first-child { margin-top: 0; }

/* ---------- Legal / long-form document pages ---------- */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 100px;
}
.doc .updated {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.doc h1 { font-size: 34px; margin: 0 0 6px; }
.doc .intro { color: var(--text-muted); font-size: 15.5px; margin: 18px 0 40px; }
.doc h2 { font-size: 20px; margin: 40px 0 12px; letter-spacing: -0.005em; }
.doc h2:first-of-type { margin-top: 0; }
.doc p, .doc li { font-size: 15px; color: var(--text); }
.doc p { margin: 0 0 14px; max-width: 68ch; }
.doc ul, .doc ol { max-width: 68ch; padding-left: 22px; margin: 0 0 14px; }
.doc li { margin-bottom: 7px; }
.doc a { text-decoration underline; }
.doc-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 40px;
}
.doc-toc div { font-family: ui-monospace, "SF Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.doc-toc ol { margin: 0; padding-left: 18px; columns: 2; font-size: 13.5px; }
@media (max-width: 560px) { .doc-toc ol { columns: 1; } }
.doc-toc a { color: var(--text); text-decoration: none; }
.doc-toc a:hover { color: var(--primary); }

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--border);
  padding: 48px 0 36px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 10px; }
.footer-brand img { width: 28px; height: 28px; border-radius: 8px; }
.footer-col h4 {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 0 12px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: var(--text-muted); text-decoration: none; font-size: 14px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  border-top: 1px solid var(--border); padding-top: 24px;
  color: var(--text-muted); font-size: 13px;
}

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
