*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Design tokens — dark (default) ─────────────────── */
:root {
  --orange:        #D94F00;
  --orange-dark:   #8C2800;
  --orange-bright: #FF6B2B;
  --orange-warm:   #FF8C52;
  --ink:           #0D0D0D;

  /* Semantic tokens — dark baseline */
  --bg:                  #111111;
  --bg-alt:              #0c0c0c;
  --text:                #FFFFFF;
  --text-muted:          rgba(255,255,255,0.5);
  --text-dim:            rgba(255,255,255,0.28);
  --card-bg:             #181818;
  --card-border:         rgba(255,255,255,0.07);
  --surface:             #1e1e1e;
  --feat-hover:          #1d1d1d;
  --nav-bg:              rgba(17,17,17,0.85);
  --nav-bg-scrolled:     rgba(17,17,17,0.97);
  --nav-border:          rgba(255,255,255,0.06);
  --nav-border-scrolled: rgba(255,255,255,0.10);
  --cta-border:          rgba(217,79,0,0.10);
}

/* ─── Light mode — system preference ─────────────────── */
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) {
    --bg:                  #F7F6F3;
    --bg-alt:              #EEECEA;
    --text:                #0D0D0D;
    --text-muted:          rgba(13,13,13,0.55);
    --text-dim:            rgba(13,13,13,0.38);
    --card-bg:             #E9E7E3;
    --card-border:         rgba(0,0,0,0.08);
    --surface:             #E2DFD9;
    --feat-hover:          #E4E1DC;
    --nav-bg:              rgba(247,246,243,0.85);
    --nav-bg-scrolled:     rgba(247,246,243,0.97);
    --nav-border:          rgba(0,0,0,0.07);
    --nav-border-scrolled: rgba(0,0,0,0.12);
    --cta-border:          rgba(217,79,0,0.12);
  }
}

/* ─── Explicit theme overrides ────────────────────────── */
html[data-theme="light"] {
  --bg:                  #F7F6F3;
  --bg-alt:              #EEECEA;
  --text:                #0D0D0D;
  --text-muted:          rgba(13,13,13,0.55);
  --text-dim:            rgba(13,13,13,0.38);
  --card-bg:             #E9E7E3;
  --card-border:         rgba(0,0,0,0.08);
  --surface:             #E2DFD9;
  --feat-hover:          #E4E1DC;
  --nav-bg:              rgba(247,246,243,0.85);
  --nav-bg-scrolled:     rgba(247,246,243,0.97);
  --nav-border:          rgba(0,0,0,0.07);
  --nav-border-scrolled: rgba(0,0,0,0.12);
  --cta-border:          rgba(217,79,0,0.12);
}

html[data-theme="dark"] {
  --bg:                  #111111;
  --bg-alt:              #0c0c0c;
  --text:                #FFFFFF;
  --text-muted:          rgba(255,255,255,0.5);
  --text-dim:            rgba(255,255,255,0.28);
  --card-bg:             #181818;
  --card-border:         rgba(255,255,255,0.07);
  --surface:             #1e1e1e;
  --feat-hover:          #1d1d1d;
  --nav-bg:              rgba(17,17,17,0.85);
  --nav-bg-scrolled:     rgba(17,17,17,0.97);
  --nav-border:          rgba(255,255,255,0.06);
  --nav-border-scrolled: rgba(255,255,255,0.10);
  --cta-border:          rgba(217,79,0,0.10);
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
}

/* ─── Nav ─────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 40px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--nav-border);
  transition: background 0.2s, border-color 0.2s;
}
nav.scrolled {
  background: var(--nav-bg-scrolled);
  border-bottom-color: var(--nav-border-scrolled);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-wordmark {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -1px;
  color: var(--text);
}
.nav-wordmark .tld {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 14px;
  font-weight: 400;
  color: var(--orange-bright);
  letter-spacing: 0.04em;
}
.nav-spacer { flex: 1; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

/* ─── Theme toggle ────────────────────────────────────── */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: rgba(128,128,128,0.12);
  color: var(--text);
}

/* Show sun in dark mode (click = go light); moon in light mode (click = go dark) */
.theme-toggle .icon-sun  { display: block; }
.theme-toggle .icon-moon { display: none;  }

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .theme-toggle .icon-sun  { display: none;  }
  html:not([data-theme="dark"]) .theme-toggle .icon-moon { display: block; }
}
html[data-theme="light"] .theme-toggle .icon-sun  { display: none;  }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }
html[data-theme="dark"]  .theme-toggle .icon-sun  { display: block; }
html[data-theme="dark"]  .theme-toggle .icon-moon { display: none;  }

/* ─── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.18s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-bright); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(217,79,0,0.35); }
.btn-secondary { background: rgba(128,128,128,0.1); color: var(--text); border: 1px solid var(--card-border); }
.btn-secondary:hover { background: rgba(128,128,128,0.18); }
.btn-lg { padding: 13px 26px; font-size: 16px; border-radius: 8px; }

/* ─── Hero ────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 130px 40px 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -160px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 700px;
  background: radial-gradient(ellipse at center, rgba(217,79,0,0.12) 0%, transparent 65%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid rgba(217,79,0,0.28);
  background: rgba(217,79,0,0.08);
  font-size: 12px;
  color: var(--orange-bright);
  letter-spacing: 0.05em;
  margin-bottom: 28px;
  animation: fadeUp 0.5s ease forwards;
}
.hero h1 {
  font-size: clamp(48px, 7.5vw, 92px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  max-width: 820px;
  animation: fadeUp 0.5s 0.1s ease both;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(130deg, var(--orange-warm) 0%, var(--orange-bright) 45%, var(--orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.65;
  animation: fadeUp 0.5s 0.2s ease both;
}
.hero-cta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 72px;
  animation: fadeUp 0.5s 0.3s ease both;
}

/* ─── App mockup ──────────────────────────────────────── */
.app-window {
  width: 100%;
  max-width: 980px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.07),
    0 40px 90px rgba(0,0,0,0.5),
    0 0 140px rgba(217,79,0,0.07);
  animation: fadeUp 0.6s 0.4s ease both;
}
/* Window chrome — always dark (it's a macOS mock) */
.window-bar {
  height: 40px;
  background: #1e1e1e;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 7px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tl { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.tl-r { background: #FF5F57; }
.tl-y { background: #FEBC2E; }
.tl-g { background: #28C840; }
.window-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.28);
  font-family: ui-monospace, monospace;
}
.window-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
/* Editor pane — always dark (code editor) */
.editor-pane {
  background: #0d0d0d;
  padding: 28px;
  font-family: ui-monospace, SFMono-Regular, 'Cascadia Code', monospace;
  font-size: 13px;
  line-height: 1.75;
  border-right: 1px solid rgba(255,255,255,0.05);
  overflow: hidden;
}
.editor-pane p { min-height: 1.75em; }
.c-h1   { color: #FF8C52; font-weight: 600; }
.c-h2   { color: #FF6B2B; font-weight: 600; }
.c-h3   { color: #e88060; font-weight: 600; }
.c-text { color: #999; }
.c-sep  { color: #3a3a3a; }
.c-col  { color: #D94F00; font-weight: bold; }
.c-note { color: #484848; font-style: italic; }
.c-code { color: #6a9955; }
.c-kw   { color: #FF8C52; }
.cursor {
  display: inline-block;
  width: 2px; height: 14px;
  background: var(--orange-bright);
  vertical-align: text-bottom;
  animation: blink 1.2s step-end infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

.preview-pane {
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 32px;
  transition: background 0.2s;
}
.slide-card {
  width: 100%;
  aspect-ratio: 16/9;
  background: white;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.slide-title {
  font-size: 22px;
  font-weight: 700;
  color: #0d0d0d;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.slide-rule {
  width: 36px; height: 3px;
  background: var(--orange);
  border-radius: 2px;
  margin-bottom: 10px;
}
.slide-body { font-size: 11px; color: #555; line-height: 1.65; }
.slide-num {
  position: absolute;
  bottom: 10px; right: 14px;
  font-size: 9px;
  color: #ccc;
  font-family: ui-monospace, monospace;
}

/* ─── Section chrome ──────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; }
section { padding: 100px 40px; }
.s-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange-bright);
  margin-bottom: 14px;
}
.s-heading {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 16px;
}
.s-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.65;
}

/* ─── Features grid ───────────────────────────────────── */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 60px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  gap: 1px;
  background: var(--card-border);
}
.feat-card {
  background: var(--card-bg);
  padding: 32px;
  transition: background 0.2s;
}
.feat-card:hover { background: var(--feat-hover); }
.feat-icon {
  width: 40px; height: 40px;
  background: rgba(217,79,0,0.1);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feat-icon svg { width: 20px; height: 20px; }
.feat-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 7px; }
.feat-card p  { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; }
.feat-card code {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--orange-warm);
}

/* ─── Syntax section ──────────────────────────────────── */
.syntax-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  transition: background 0.2s;
}
.syntax-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 48px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
}
/* Code input panel — always dark */
.syntax-code {
  background: #111;
  padding: 32px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 13px;
  line-height: 1.8;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.syntax-pane-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #444;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-family: ui-monospace, monospace;
}
.syntax-result {
  background: var(--surface);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 0.2s;
}
/* Light mode pane label in the results panel */
.syntax-result .syntax-pane-label { color: var(--text-dim); }
.mini-slide {
  flex: 1;
  background: white;
  border-radius: 5px;
  padding: 14px 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.mini-tag {
  position: absolute;
  bottom: 7px; right: 10px;
  font-size: 9px;
  color: rgba(0,0,0,0.25);
  font-family: ui-monospace, monospace;
  font-style: italic;
}

/* ─── Presenter section ───────────────────────────────── */
.present-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.checklist { list-style: none; display: flex; flex-direction: column; gap: 13px; margin-top: 24px; }
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
}
.check-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(217,79,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
/* Presenter mock — always dark (it's a UI mock) */
.presenter-mock {
  background: #0a0a0a;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.presenter-bar {
  background: #131313;
  padding: 11px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.presenter-body { padding: 24px; }

/* ─── Install section ─────────────────────────────────── */
.install-section {
  border-top: 1px solid var(--card-border);
  background: var(--bg-alt);
  transition: background 0.2s;
}
.install-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
/* Terminal — always dark */
.terminal-block {
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  overflow: hidden;
}
.terminal-bar {
  background: #181818;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 8px;
}
.terminal-bar span {
  font-size: 11px;
  color: #444;
  font-family: ui-monospace, monospace;
  margin-left: 6px;
}
.terminal-body {
  padding: 22px 24px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 13px;
  line-height: 2;
}
.terminal-body .prompt { color: #555; }
.terminal-body .cmd    { color: #aaa; }
.terminal-body .cmd-hi { color: #FF8C52; }

/* ─── CTA section ─────────────────────────────────────── */
.cta-section {
  text-align: center;
  border-top: 1px solid var(--cta-border);
  border-bottom: 1px solid var(--cta-border);
  transition: background 0.2s;
}
/* Separate gradients per theme */
html:not([data-theme="light"]) .cta-section,
html[data-theme="dark"] .cta-section {
  background: linear-gradient(180deg, #111111 0%, #1b0b03 55%, #111111 100%);
}
html[data-theme="light"] .cta-section {
  background: linear-gradient(180deg, #F7F6F3 0%, #FFF1E6 55%, #F7F6F3 100%);
}
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .cta-section {
    background: linear-gradient(180deg, #F7F6F3 0%, #FFF1E6 55%, #F7F6F3 100%);
  }
}
.cta-icon { margin-bottom: 24px; }
.cta-section h2 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 18px;
}
.cta-section > .container > p {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 36px;
}
.cta-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.other-platforms { margin-bottom: 32px; }
.other-platforms a {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}
.other-platforms a:hover { color: var(--orange-bright); }
.platform-tags { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.platform-tag  { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-dim); }

/* ─── Footer ──────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--card-border);
  padding: 44px 40px;
  transition: background 0.2s;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links { display: flex; gap: 22px; list-style: none; }
.footer-links a {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text-muted); }
.footer-copy { font-size: 13px; color: var(--text-dim); }

/* ─── Animations ──────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 820px) {
  nav { padding: 0 20px; }
  .nav-links li:not(:last-child) { display: none; }
  .hero { padding: 110px 20px 80px; }
  section { padding: 72px 20px; }
  .window-body { grid-template-columns: 1fr; }
  .preview-pane { display: none; }
  .feat-grid { grid-template-columns: 1fr; }
  .syntax-demo { grid-template-columns: 1fr; }
  .syntax-result { display: none; }
  .present-section .container { grid-template-columns: 1fr; gap: 40px; }
  .install-section .container { grid-template-columns: 1fr; gap: 40px; }
  footer { padding: 36px 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
