/* aletheia.ai marketing site — single page. Plain CSS, no framework. */
:root {
  --bg: #0B0F1A;
  --white: #FFFFFF;
  --teal: #00E6C7;
  --purple: #7B2DFF;
  --pink: #FF4DDB;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ---------- Animated text — GPU compositing + crisp font rendering ----------
   Each element below is animated by the intro choreography (scale/dock transforms,
   opacity fades, or JS class toggles). Promoting them to their own GPU layer and
   pinning antialiasing stops glyphs from pixel-jittering mid-animation. Scoped to
   the choreographed text only — intentionally NOT applied globally. */
#hero-word,
#hero-tag,
#ai-cross,
.ln,
#hero-cta {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity;
}
body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Header (fixed, transparent) ---------- */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: transparent;
  z-index: 50;
  pointer-events: none; /* re-enabled on interactive children */
}
.brand { display: flex; align-items: center; }
#mark {
  width: 40px; height: 40px;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 800ms ease-in-out;
}
.lockup { display: flex; flex-direction: column; justify-content: center; margin-left: 4px; }
#hero-word {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 20px; /* final docked size */
  line-height: 1.1;
  color: var(--white);
  white-space: nowrap;
  opacity: 0;
  transform-origin: top left;
  /* Step 1 — fade in over 800ms while centered & scaled. */
  transition: opacity 800ms ease-in-out;
}
#hero-tag {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--teal);
  white-space: nowrap;
  opacity: 0;
  transform-origin: top left;
  /* Step 3 — fade in over 800ms while centered & scaled. */
  transition: opacity 800ms ease-in-out;
}
/* Steps 2 & 4 — dock into the header over 1000ms (class added by JS). */
#hero-word.animate, #hero-tag.animate { transition: transform 1000ms ease-in-out, opacity 1000ms ease-in-out; }
.login {
  pointer-events: auto;
  color: var(--white);
  opacity: 0.7;
  text-decoration: none;
  font-weight: 400;
  font-size: 14px;
  transition: opacity 200ms ease;
}
.login:hover { opacity: 1; }

/* ---------- Sections ---------- */
section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  position: relative;
}
#hero { overflow: hidden; }
.stage {
  position: relative;
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Step 6 — AI x AI */
#ai-cross {
  position: absolute;
  font-size: 9vw;
  font-weight: 600;
  color: var(--white);
  opacity: 0;
  transition: opacity 600ms ease-in-out;
}
#ai-cross.fade-out { transition: opacity 400ms ease-in-out; }

/* Step 8 — three lines */
#three-lines { display: flex; flex-direction: column; align-items: center; gap: 0.4em; }
.ln { opacity: 0; transition: opacity 400ms ease-in-out; line-height: 1.15; }
.ln1 { font-size: 5vw; font-weight: 300; color: var(--white); }
.ln2 { font-size: 3vw; font-weight: 300; color: var(--white); opacity: 0; }
.ln2.show { opacity: 0.6; }
.ln3 { font-size: 5vw; font-weight: 300; color: var(--teal); }
.ln.show { opacity: 1; }

/* Step 9 — CTAs */
#hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  opacity: 0;
  transition: opacity 600ms ease-in-out;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 32px;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 150ms ease, background 200ms ease, opacity 200ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-fill { background: var(--purple); color: var(--white); }
.btn-fill:hover { background: #9a5cff; }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-ghost:hover { border-color: var(--white); }
.btn-block { width: 100%; }

/* ---------- Section 2 — statement ---------- */
.statement-wrap { text-align: center; max-width: 800px; }
.statement-lead { font-weight: 300; color: var(--white); font-size: 4vw; line-height: 1.3; }
.statement-sub {
  font-weight: 300;
  color: var(--teal);
  font-size: 1.4vw;
  letter-spacing: 0.2em;
  margin-top: 32px;
  text-transform: uppercase;
}

/* ---------- Section 3 — form ---------- */
.form-card {
  width: 100%;
  max-width: 480px;
  border: 1px solid rgba(123,45,255,0.3);
  border-radius: 12px;
  padding: 48px;
  background: rgba(255,255,255,0.01);
}
.form-title { font-weight: 300; font-size: 28px; color: var(--white); }
.form-sub { font-weight: 300; font-size: 14px; color: var(--white); opacity: 0.6; margin-top: 6px; }
#access-form { margin-top: 28px; display: flex; flex-direction: column; }
#access-form label { font-size: 13px; font-weight: 300; opacity: 0.8; margin: 14px 0 6px; }
#access-form input, #access-form select {
  height: 44px;
  padding: 0 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
}
#access-form input:focus, #access-form select:focus { outline: none; border-color: var(--purple); }
#access-form select { appearance: none; cursor: pointer; }
#access-form option { background: var(--bg); color: var(--white); }
.form-error { color: var(--pink); font-size: 14px; min-height: 18px; margin: 12px 0 0; }
#submit-btn { margin-top: 20px; }
.form-success { text-align: center; font-weight: 300; font-size: 20px; color: var(--white); padding: 12px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  #site-header { padding: 0 16px; height: 56px; }
  .statement-lead { font-size: 7vw; }
  .statement-sub { font-size: 3vw; }
  #ai-cross { font-size: 14vw; }
  .ln1, .ln3 { font-size: 8vw; }
  .ln2 { font-size: 5vw; }
  .form-card { padding: 32px 24px; }
  #hero-cta { width: 100%; }
  .btn { flex: 1 1 auto; }
}

/* ---------- Reduced motion — skip the choreography ---------- */
@media (prefers-reduced-motion: reduce) {
  #mark, #hero-word, #hero-tag, .ln, #hero-cta { opacity: 1 !important; transition: none !important; }
  #hero-word, #hero-tag { transform: none !important; }
  #ai-cross, #three-lines { position: static; }
  .ln2 { opacity: 0.6 !important; }
}
