/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- Tokens (ported from src/app/globals.css) ---------- */
:root {
  --background: #ffffff;
  --foreground: #0a0a0a;
  --sidebar: rgba(255, 255, 255, 0.76);
  --card: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --muted: #6e6e73;
  --accent-mono: #0a0a0a;
  --accent-mono-foreground: #ffffff;
  --input: #f5f5f5;
  --accent: #2a78d6;
  --accent-foreground: #ffffff;
}

.dark {
  --background: #000000;
  --foreground: #ffffff;
  --sidebar: rgba(0, 0, 0, 0.76);
  --card: #0d0d0d;
  --border: rgba(255, 255, 255, 0.1);
  --muted: #98989d;
  --accent-mono: #ffffff;
  --accent-mono-foreground: #000000;
  --input: #111111;
  --accent: #3987e5;
  --accent-foreground: #ffffff;
}

html, body { max-width: 100%; overflow-x: hidden; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

* { scrollbar-width: thin; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Layout helpers ---------- */
.section-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

section > .section-inner {
  padding-top: clamp(56px, 9vw, 120px);
  padding-bottom: clamp(56px, 9vw, 120px);
}

section h2 {
  font-size: clamp(28px, 4vw, 40px);
  max-width: 720px;
  margin-bottom: 20px;
}

.glass {
  background: var(--sidebar);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
}
.btn .icon { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent-mono);
  color: var(--accent-mono-foreground);
}
.btn-primary:hover { opacity: 0.85; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--input); }

.icon { width: 20px; height: 20px; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  position: relative;
}
.icon-btn:hover { background: var(--input); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--sidebar);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 15px;
}
.brand .icon { width: 26px; height: 26px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14.5px;
  font-weight: 500;
}
.nav-links a { opacity: 0.82; transition: opacity 0.15s ease; }
.nav-links a:hover { opacity: 1; }
.nav-cta {
  opacity: 1 !important;
  background: var(--accent-mono);
  color: var(--accent-mono-foreground);
  padding: 8px 18px;
  border-radius: 980px;
  font-weight: 600;
}
.nav-cta:hover { opacity: 0.85 !important; }

.nav-actions { display: flex; align-items: center; gap: 4px; }
.nav-toggle { display: none; }

/* theme + menu icon swap: default shows sun + menu, .dark / .open flip the rest */
.icon-moon-show { display: none; }
.dark .icon-sun-show { display: none; }
.dark .icon-moon-show { display: block; }

.icon-close-show { display: none; }
.nav-toggle.open .icon-menu-show { display: none; }
.nav-toggle.open .icon-close-show { display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(600px circle at 80% 0%, rgba(42, 120, 214, 0.14), transparent 60%),
    radial-gradient(500px circle at 10% 30%, rgba(42, 120, 214, 0.08), transparent 55%),
    repeating-linear-gradient(0deg, var(--border) 0, var(--border) 1px, transparent 1px, transparent 64px),
    repeating-linear-gradient(90deg, var(--border) 0, var(--border) 1px, transparent 1px, transparent 64px);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 92%);
  mask-image: linear-gradient(to bottom, black, transparent 92%);
  opacity: 0.6;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: clamp(88px, 14vw, 160px) !important;
  padding-bottom: clamp(72px, 11vw, 130px) !important;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero h1 {
  font-size: clamp(38px, 6.4vw, 72px);
  max-width: 820px;
}
.hero-sub {
  margin-top: 20px;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--muted);
  max-width: 620px;
}
.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Why ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 8px;
}
.why-text {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.75;
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 12px;
}
.step {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.step-num {
  display: block;
  font-family: "SF Mono", Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { font-size: 14.5px; color: var(--muted); line-height: 1.6; }

/* ---------- Features grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 12px;
}
.card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  margin-bottom: 16px;
}
.card h3 { font-size: 16px; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ---------- Domains / models chips ---------- */
.chip-list, .wordmark-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 500;
  background: var(--card);
}
.chip-num {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 12px;
  color: var(--accent);
}
.wordmark {
  padding: 14px 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 650;
  background: var(--card);
}
.models-note {
  margin-top: 22px;
  font-size: 14px;
  color: var(--muted);
  max-width: 720px;
  line-height: 1.7;
}

/* ---------- Sample output preview ---------- */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
  margin-top: 12px;
  align-items: start;
}
.preview-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
}
.preview-label {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.preview-input {
  font-size: 15.5px;
  line-height: 1.6;
}
.preview-sections dt {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin-top: 14px;
}
.preview-sections dt:first-child { margin-top: 0; }
.preview-sections dd {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 4px;
}

/* ---------- Final CTA ---------- */
.cta-final { border-top: 1px solid var(--border); text-align: center; }
.cta-final .section-inner { display: flex; flex-direction: column; align-items: center; }
.cta-final h2 { max-width: none; }
.cta-final p { color: var(--muted); font-size: 16px; margin-top: 4px; }
.cta-final .hero-actions { margin-top: 28px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); }
.footer-inner {
  padding-top: 32px !important;
  padding-bottom: 32px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}
.footer-inner a:hover { color: var(--foreground); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover, .btn:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--background);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }
  .nav-links a { width: 100%; padding: 10px 0; }
  .nav-links.open {
    max-height: 320px;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-cta { margin-top: 6px; text-align: center; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .chip, .wordmark { font-size: 14px; padding: 11px 16px; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}
