/* ============================================================
   useaito.win — Zen Precision Minimal
   Design tokens from DESIGN.md (Stitch export)
   ============================================================ */

:root {
  /* Surfaces */
  --void: #05070B;
  --base: #0A0D14;
  --card: #0F1420;
  --overlay: #161E2E;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: #1E293B;

  /* Accents */
  --primary: #38BDF8;
  --secondary: #3B82F6;
  --tertiary: #60A5FA;
  --glow: rgba(56, 189, 248, 0.15);

  /* Text */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  /* Type */
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Rhythm */
  --gutter: 2rem;
  --section-pad: 7rem;
  --max-width: 1280px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: inline-block; vertical-align: middle; }
h1, h2, h3, h4, p, ul, ol, dl, blockquote, address { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--max-width); margin-inline: auto; padding-inline: 2rem; }
.container.narrow { max-width: 880px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; }
h1 { font-size: clamp(38px, 5vw, 56px); line-height: 1.15; letter-spacing: -0.03em; }
h1 em { font-style: normal; color: var(--primary); }
h2 { font-size: clamp(30px, 3.5vw, 40px); line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: 22px; line-height: 30px; letter-spacing: -0.01em; font-weight: 500; }
h4 { font-size: 15px; line-height: 24px; font-weight: 500; }
.lede, .body-lg { font-size: 18px; line-height: 28px; color: var(--text-secondary); }
.section-head { max-width: 720px; margin-bottom: 3.5rem; display: grid; gap: 1rem; }

.label-caps {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; color: var(--text-muted); text-transform: uppercase;
}
.label-sm { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); letter-spacing: 0.04em; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 100;
  background: transparent; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  box-shadow: 0 0 12px var(--glow);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  display: flex; align-items: center; gap: 1.75rem;
  padding: 0.9rem 2rem;
  background: rgba(5, 7, 11, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}
.brand { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand-dot { color: var(--primary); }
.brand-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em;
  color: var(--primary); border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 9999px; padding: 2px 8px;
}
.site-nav { margin-left: auto; display: flex; gap: 1.4rem; }
.site-nav a {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary);
  padding: 4px 0; border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.site-nav a:hover { color: var(--text-primary); }
.site-nav a.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.btn-header { flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.04em;
  border-radius: 0.25rem; padding: 0.7rem 1.2rem; cursor: pointer;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.btn-primary { background: var(--primary); color: var(--void); }
.btn-primary:hover { box-shadow: 0 0 20px rgba(56, 189, 248, 0.3); }
.btn-secondary { background: var(--base); border: 1px solid var(--border-strong); color: var(--text-primary); }
.btn-secondary:hover { border-color: rgba(255, 255, 255, 0.25); }
.btn-lg { font-size: 13px; padding: 0.95rem 1.6rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.btn-row-center { justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: grid; place-items: center; text-align: center;
  padding: 8rem 2rem 5rem; overflow: hidden;
}
.hero-glow {
  position: absolute; inset: -20% -10% auto; height: 70%;
  background:
    radial-gradient(42% 55% at 30% 40%, rgba(56, 189, 248, 0.10), transparent 70%),
    radial-gradient(38% 50% at 70% 35%, rgba(59, 130, 246, 0.08), transparent 70%);
  filter: blur(2px); will-change: transform;
}
.hero .label-caps { margin-bottom: 1.75rem; }
.hero .lede { max-width: 640px; margin: 1.5rem auto 0; }
.chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  color: var(--text-secondary);
  background: var(--card); border: 1px solid var(--border-subtle);
  border-radius: 9999px; padding: 6px 14px;
}
.pip { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.pip-active { background: var(--primary); box-shadow: 0 0 8px var(--glow); }
.scroll-cue {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-top: 4.5rem; font-family: var(--font-mono); font-size: 12px;
  color: var(--text-muted); transition: color 0.25s ease;
}
.scroll-cue:hover { color: var(--primary); }
.scroll-cue svg { animation: cue-bob 2.4s ease-in-out infinite; }
@keyframes cue-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-pad); border-top: 1px solid var(--border-subtle); }
.section-legal { padding-block: 4rem; }
.grid-2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 4rem; align-items: center; }

/* Inherent advantage anchor card */
.anchor-card {
  background: var(--base); border: 1px solid var(--border-subtle);
  border-radius: 0.5rem; padding: 2rem;
}
.anchor-card .label-caps { display: flex; align-items: center; gap: 0.5rem; color: var(--text-secondary); }
.anchor-card-text { font-size: 18px; line-height: 28px; margin: 1.25rem 0 1.75rem; }
.anchor-meta { display: grid; gap: 0; border-top: 1px solid var(--border-strong); }
.anchor-meta > div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.8rem 0; border-bottom: 1px solid var(--border-strong);
}
.anchor-meta dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--text-muted); }
.anchor-meta dd { font-family: var(--font-mono); font-size: 12px; color: var(--text-primary); }

/* ---------- Duality ---------- */
.duality { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.domain-card {
  background: var(--base); border: 1px solid var(--border-subtle);
  border-radius: 0.5rem; padding: 2rem;
  display: flex; flex-direction: column; gap: 1.25rem;
  transition: border-color 0.3s ease;
}
.domain-card:hover { border-color: var(--border-strong); }
.domain-alpha { border-top: 2px solid var(--tertiary); }
.domain-beta { border-top: 2px solid var(--primary); }
.domain-tagline { color: var(--text-secondary); }
.feature-list { display: grid; gap: 1.25rem; }
.feature-list h4 { color: var(--text-primary); }
.feature-list p { color: var(--text-secondary); font-size: 13px; margin-top: 2px; }
.feature-list li { padding-left: 1.1rem; border-left: 2px solid var(--border-strong); }
.domain-alpha .feature-list li { border-left-color: rgba(96, 165, 250, 0.4); }
.domain-beta .feature-list li { border-left-color: rgba(56, 189, 248, 0.4); }
.domain-foot {
  margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--border-strong);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.badge {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--tertiary); border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 9999px; padding: 3px 10px;
}
.badge-beta { color: var(--primary); border-color: rgba(56, 189, 248, 0.35); }

.principle { margin-top: 3.5rem; text-align: center; padding: 2.5rem 1.5rem; background: var(--card); border: 1px solid var(--border-subtle); border-radius: 0.5rem; }
.principle p { font-family: var(--font-display); font-size: 22px; line-height: 32px; letter-spacing: -0.01em; }
.principle cite { display: block; margin-top: 1.25rem; font-style: normal; }

/* ---------- Pillars ---------- */
.pillar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.pillar {
  background: var(--base); border: 1px solid var(--border-subtle);
  border-radius: 0.5rem; padding: 2rem;
  display: flex; flex-direction: column; gap: 1rem;
  transition: border-color 0.3s ease;
}
.pillar:hover { border-color: var(--border-strong); }
.pillar p { color: var(--text-secondary); }
.pillar-metrics {
  margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--border-strong);
  display: flex; gap: 1.25rem; flex-wrap: wrap;
}
.pillar-metrics span {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--primary);
}

/* ---------- Phases ---------- */
.phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: phase; }
.phase {
  background: var(--base); border: 1px solid var(--border-subtle);
  border-radius: 0.5rem; padding: 2rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.phase-head { display: flex; justify-content: space-between; gap: 1rem; }
.phase-duration { color: var(--primary); }
.phase p { color: var(--text-secondary); }
.phase-deliverable { padding-top: 1.25rem; border-top: 1px solid var(--border-strong); color: var(--text-primary); }
.phase-deliverable .label-sm { margin-right: 0.5rem; }

/* ---------- Telemetry ---------- */
#telemetry .body-lg { margin-bottom: 3rem; }
.metric-block {
  background: #070A10; border: 1px solid var(--border-subtle); border-radius: 0.5rem;
  padding: 3rem 2rem; text-align: center;
}
.metric-value {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(48px, 8vw, 84px); line-height: 1; letter-spacing: -0.03em;
  color: var(--primary); margin: 1.25rem 0 2rem;
  text-shadow: 0 0 40px var(--glow);
}
.metric-unit { font-size: 16px; letter-spacing: 0.08em; color: var(--text-secondary); margin-left: 0.75rem; }
.metric-block .pillar-metrics { justify-content: center; border-top: 0; padding-top: 0; margin-top: 1.5rem; }

/* ---------- Contact ---------- */
#contact .container { text-align: center; }
#contact .body-lg { margin: 0 auto 0.5rem; max-width: 640px; }
.cta-note { margin-top: 1.5rem; }

/* ---------- Impressum ---------- */
.section-legal h2 { font-size: 22px; margin-bottom: 1.5rem; }
.legal-block { font-style: normal; line-height: 28px; }
.legal-block .label-sm { display: block; margin-top: 0.75rem; }
.legal-court { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border-strong); }
.legal-court .label-sm { margin-right: 0.75rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-subtle); background: var(--base); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; padding-block: 4rem; }
.footer-lede { color: var(--text-secondary); max-width: 380px; margin: 1rem 0 1.25rem; }
.footer-nav { display: grid; gap: 0.6rem; justify-items: start; }
.footer-nav a { font-size: 13px; color: var(--text-secondary); transition: color 0.25s ease; }
.footer-nav a:hover { color: var(--primary); }
.footer-address { font-style: normal; color: var(--text-secondary); line-height: 22px; margin-top: 0.75rem; }
.footer-base {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-block: 1.5rem; border-top: 1px solid var(--border-subtle);
}

/* ---------- Scroll effects ---------- */
.zen-reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--rd, 0s);
}
.zen-reveal.is-revealed { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .grid-2, .duality, .pillar-grid, .phases, .footer-grid { grid-template-columns: 1fr 1fr; }
  .phases { grid-template-columns: 1fr; }
  .site-nav { display: none; }
}
@media (max-width: 767px) {
  :root { --section-pad: 4.5rem; }
  .container { padding-inline: 1.25rem; }
  .grid-2, .duality, .pillar-grid, .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .site-header { gap: 0.9rem; padding: 0.75rem 1.25rem; }
  .btn-header { display: none; }
  .domain-card, .pillar, .phase, .anchor-card { padding: 1.5rem; }
}

/* ---------- Contact modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1.25rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 7, 11, 0.7); backdrop-filter: blur(16px); }
.modal-panel {
  position: relative; width: min(560px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--overlay); border: 1px solid var(--border-subtle);
  border-radius: 0.5rem; padding: 2rem;
}
.modal-panel h3 { margin: 0.5rem 0 1.5rem; }
.form-row { display: grid; gap: 0.4rem; margin-bottom: 1.1rem; }
.form-row input, .form-row textarea {
  font-family: var(--font-body); font-size: 14px; color: var(--text-primary);
  background: var(--void); border: 1px solid var(--border-strong);
  border-radius: 0.25rem; padding: 0.65rem 0.8rem; width: 100%;
  transition: border-color 0.2s ease;
}
.form-row textarea { resize: vertical; min-height: 120px; }
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--primary); }
.char-count { text-align: right; margin-top: 0.25rem; }
.form-status { min-height: 1.2rem; font-size: 13px; margin-bottom: 0.75rem; }
.form-status.is-ok { color: var(--primary); }
.form-status.is-error { color: var(--error, #ffb4ab); }
.form-note { margin-top: 1rem; color: var(--text-muted); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .zen-reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue svg { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
