/* Copyright (c) 2026 Joseph Dattilo <https://github.com/jdattilo>
   SPDX-License-Identifier: Apache-2.0 */

/* Landing layer ONLY. All design tokens (palette, fonts, radii) come from
   daddy-design-system.css, linked before this file in index.html and copied
   from vendor/daddy-design-system at image build (see the landing
   Dockerfile). Do not redefine DDS tokens here — the mirrored copy this
   replaced drifted once and broke the dark theme. */

:root {
  --max-width: 72rem;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Header ────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: 56px;
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-icon { width: 1.8rem; height: 1.8rem; flex-shrink: 0; }

nav { display: flex; gap: 0.25rem; }

.nav-link {
  padding: 0.3rem 0.65rem;
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: background 0.12s, color 0.12s;
}

.nav-link:hover {
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

/* ── Buttons ───────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: background 0.12s, border-color 0.12s, transform 0.1s;
}

.btn:hover { background: var(--surface-hover); border-color: var(--border-hover); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0f0f0f;
}

.btn.primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); }

.btn.lg { padding: 0.6rem 1.4rem; font-size: 0.9375rem; }

/* ── Hero ──────────────────────────────────── */

.hero {
  padding: 6rem 0 5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--r-pill);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: rgba(78, 205, 196, 0.1);
  border: 1px solid rgba(78, 205, 196, 0.3);
  color: var(--accent);
  margin-bottom: 1.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.25rem;
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.075rem;
  color: var(--text-dim);
  max-width: 38rem;
  margin: 0 auto 2.75rem;
  line-height: 1.75;
}

.cta-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Works With ────────────────────────────── */

.works-with {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface-sunken);
  text-align: center;
}

.works-with .eyebrow { margin-bottom: 1rem; }

.agent-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.agent-pill {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ── Story ─────────────────────────────────── */

.story {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface-sunken);
}

.story-inner {
  max-width: 52rem;
  margin: 0 auto;
}

.eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.story h2 {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 2rem;
}

.story h2 code {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--accent);
  background: rgba(78, 205, 196, 0.08);
  border: 1px solid rgba(78, 205, 196, 0.2);
  padding: 0.05em 0.35em;
  border-radius: var(--r-sm);
}

.story-body {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.story-body p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-dim);
}

.story-body p strong {
  color: var(--text);
  font-weight: 600;
}

.story-body p em {
  font-style: italic;
  color: var(--text);
}

.story-break {
  width: 3rem;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border: none;
  margin: 0.5rem 0;
  border-radius: 999px;
}

.story-sig {
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-dimmer);
}

.story-sig a { color: var(--text-dim); }
.story-sig a:hover { color: var(--accent); text-decoration: none; }

/* ── Features ──────────────────────────────── */

.features {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}

.section-heading {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  margin-bottom: 2.5rem;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.feature-card {
  background: var(--surface);
  padding: 1.75rem;
  transition: background 0.12s;
}

.feature-card:hover { background: var(--surface-hover); }

.feature-icon {
  font-size: 1.4rem;
  margin-bottom: 0.875rem;
  display: block;
  line-height: 1;
}

.feature-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ── Not For ───────────────────────────────── */

.not-for {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface-sunken);
}

.not-for-inner {
  max-width: 52rem;
  margin: 0 auto;
}

.not-for h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1rem;
}

.not-for p {
  font-size: 0.9375rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 0.875rem;
}

.not-for p strong { color: var(--text); }

/* ── Audience ──────────────────────────────── */

.audience {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}

.audience-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.audience-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 1rem;
}

.audience-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  border-top: 2px solid var(--accent);
}

.audience-card h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.audience-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.65;
}

.audience-card p em { font-style: italic; color: var(--text); }

/* ── Open Source ───────────────────────────── */

.open-source {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface-sunken);
}

.open-source-inner {
  max-width: 52rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: start;
}

.os-text h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1rem;
  margin-top: 0.75rem;
}

.os-text p {
  font-size: 0.9375rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 1rem;
  max-width: 36rem;
}

.os-text .btn { margin-top: 0.5rem; }

.os-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 13rem;
}

.os-stat-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  margin-bottom: 0.2rem;
}

.os-stat-value {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

/* ── FAQ ───────────────────────────────────── */

.faq {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}

.faq-inner {
  max-width: 52rem;
  margin: 0 auto;
}

.faq-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.faq-item {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child { border-bottom: none; }

.faq-item summary {
  padding: 1.1rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.12s;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.15s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary:hover { background: var(--surface-hover); }

.faq-item[open] summary {
  background: var(--surface-hover);
  border-bottom: 1px solid var(--border);
}

.faq-item p {
  padding: 1rem 1.4rem 1.2rem;
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ── CTA section ───────────────────────────── */

.cta-section {
  padding: 6rem 0;
  text-align: center;
}

.cta-section h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.cta-section p {
  color: var(--text-dim);
  max-width: 30rem;
  margin: 0 auto 2rem;
  line-height: 1.7;
  font-size: 0.9375rem;
}

/* ── Footer ────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  background: var(--surface-sunken);
}

.site-footer p {
  font-size: 0.775rem;
  color: var(--text-dimmer);
  text-align: center;
  line-height: 1.75;
}

.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--accent); text-decoration: none; }

/* ── Responsive ────────────────────────────── */

@media (max-width: 768px) {
  .open-source-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .os-stats {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    min-width: unset;
  }
}

@media (max-width: 640px) {
  .hero { padding: 4rem 0 3rem; }
  .story, .features, .audience, .open-source, .cta-section { padding: 3rem 0; }
  .feature-grid, .audience-grid { grid-template-columns: 1fr; }
  .feature-grid { border: none; gap: 0.75rem; }
  .feature-card { border: 1px solid var(--border); border-radius: var(--r-lg); }
}
