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

:root {
  --bg:           #0a090f;
  --surface:      #0f0e16;
  --surface-2:    #15131e;
  --border:       rgba(255, 255, 255, 0.055);
  --border-hover: rgba(255, 255, 255, 0.10);
  --text:         #d8d3e3;
  --text-dim:     #847e94;
  --accent:       #c4a24e;
  --accent-dim:   #96793a;
  --accent-subtle:rgba(196, 162, 78, 0.06);
  --accent-glow:  rgba(196, 162, 78, 0.12);
  --radius:       14px;
  --radius-sm:    8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Film grain */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Accessibility ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Typography ── */
h1, h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  color: #ede9f4;
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 9, 15, 0.8);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto;
  padding: 18px 32px;
  display: flex; justify-content: space-between; align-items: center;
}
.wordmark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px; font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.5px;
}
.nav-cta {
  font-size: 13px; font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  padding: 8px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.25s;
}
.nav-cta:hover {
  color: var(--text);
  border-color: var(--accent-dim);
  box-shadow: 0 0 20px rgba(196, 162, 78, 0.06);
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 220px 32px 100px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(196, 162, 78, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-kicker {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px;
  font-style: italic;
  color: var(--accent-dim);
  margin-bottom: 28px;
  letter-spacing: 0.4px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}
.hero-sub {
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto 48px;
}

/* ── Button ── */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 40px var(--accent-glow); }
  50% { box-shadow: 0 0 60px rgba(196, 162, 78, 0.2); }
}
.btn {
  display: inline-block;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 14px 34px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.btn-primary {
  color: #0a090f;
  background: var(--accent);
  border: 1px solid var(--accent);
  animation: glow-pulse 4s ease-in-out infinite;
}
.btn-primary:hover {
  background: #ceac58;
  box-shadow: 0 0 80px rgba(196, 162, 78, 0.22);
  transform: translateY(-2px) scale(1.02);
}

/* ── Divider ── */
.divider {
  max-width: 1080px;
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
}

/* ── Section ── */
.section {
  padding: 112px 32px;
}
.section-inner {
  max-width: 920px;
  margin: 0 auto;
}
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--accent-dim);
}
.section h2 {
  font-size: clamp(30px, 4.5vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.section-sub {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.75;
  max-width: none;
  margin-bottom: 56px;
}
.section-sub.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ── Prose (problem section) ── */
.prose {
  max-width: none;
}
.prose p {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 20px;
}
.prose p:last-child { margin-bottom: 0; }
.prose em {
  font-style: italic;
  color: var(--text);
}

/* ── Horizontal Context Cascade ── */
.cascade-h {
  display: flex;
  align-items: flex-end;
  gap: 0;
  padding: 32px 0 0;
  justify-content: center;
}
.cascade-h-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 140px;
}
.cascade-h-bar-wrap {
  width: 36px;
  height: 120px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px 6px 0 0;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.cascade-h-bar {
  width: 100%;
  min-height: 3px;
  background: linear-gradient(0deg, var(--accent-dim), var(--accent));
  border-radius: 0 0 0 0;
  transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.cascade-h-label {
  text-align: center;
  padding-top: 12px;
}
.cascade-h-role {
  display: block;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.cascade-h-detail {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.6;
}
.cascade-h-arrow {
  width: 24px;
  height: 1px;
  background: var(--border);
  align-self: center;
  margin-bottom: 52px;
  flex-shrink: 0;
}
.cascade-caption {
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.5;
  text-align: center;
  margin-top: 20px;
  font-style: italic;
}

/* ── Product Preview (Chat) ── */
.preview {
  margin-bottom: 40px;
}
.preview-window {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.preview-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}
.preview-dots {
  display: flex; gap: 6px;
}
.preview-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.preview-title {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}
.preview-body {
  display: flex;
  min-height: 280px;
}
.preview-sidebar {
  width: 220px;
  flex-shrink: 0;
  padding: 20px 16px;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
}
.preview-sidebar-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.preview-card-ref {
  font-size: 12px;
  color: var(--text-dim);
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  line-height: 1.5;
  transition: border-color 0.2s;
}
.preview-card-ref:hover {
  border-color: var(--accent-dim);
}
.preview-card-type {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin-bottom: 2px;
}
.preview-hit-rate {
  font-size: 11px;
  color: var(--accent-dim);
  margin-top: 16px;
  font-style: italic;
}
.preview-chat {
  flex: 1;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.preview-msg {
  font-size: 13px;
  line-height: 1.7;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  max-width: 90%;
}
.preview-msg-user {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  align-self: flex-end;
  border: 1px solid var(--border);
}
.preview-msg-ai {
  background: var(--accent-subtle);
  color: var(--text-dim);
  align-self: flex-start;
  border: 1px solid rgba(196, 162, 78, 0.08);
}
.preview-inscribe {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-size: 12px;
  color: var(--accent-dim);
  padding: 6px 12px;
  border: 1px dashed rgba(196, 162, 78, 0.2);
  border-radius: 6px;
  margin-top: auto;
  transition: all 0.2s;
}
.preview-inscribe:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}
.preview-inscribe-icon {
  font-size: 14px;
  font-weight: 300;
}

/* Chat details row */
.chat-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.chat-detail h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.chat-detail p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ── Grimoire Split ── */
.split {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: start;
}
.split-text p {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 20px;
}
.split-text p:last-child { margin-bottom: 0; }

.grimoire-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  padding: 20px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.2);
}
.gp-entry {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gp-entry:hover {
  border-color: rgba(196, 162, 78, 0.15);
  box-shadow: 0 0 20px rgba(196, 162, 78, 0.04);
}
.gp-type {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin-bottom: 4px;
}
.gp-title {
  display: block;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.gp-meta {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.6;
  margin-top: 4px;
}
.gp-link {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  opacity: 0.4;
  text-align: center;
  padding: 8px 0;
  font-family: 'Inter', system-ui, sans-serif;
}

/* ── Scribe Grid ── */
.scribe-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.scribe-item {
  padding: 36px 32px;
  background: var(--surface);
  transition: background 0.3s, box-shadow 0.3s;
}
.scribe-item:hover {
  background: var(--surface-2);
  box-shadow: inset 0 0 40px rgba(196, 162, 78, 0.02);
}
.scribe-item h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px; font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.scribe-item p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ── Steps ── */
.steps {
  display: flex;
  flex-direction: column;
  gap: 44px;
  max-width: 560px;
  margin-top: 56px;
}
.step {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.step-num {
  flex-shrink: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  color: var(--accent-dim);
  opacity: 0.4;
  width: 36px;
  text-align: center;
  padding-top: 0;
}
.step h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px; font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.step p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ── Persona Grid ── */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 56px;
}
.persona {
  padding: 36px 30px;
  background: var(--surface);
  transition: background 0.3s, box-shadow 0.3s;
}
.persona:hover {
  background: var(--surface-2);
  box-shadow: inset 0 0 48px rgba(196, 162, 78, 0.03);
}
.persona h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 21px; font-weight: 500;
  color: #ede9f4;
  margin-bottom: 18px;
}
.persona ul {
  list-style: none;
  padding: 0;
}
.persona li {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  padding: 6px 0;
  padding-left: 16px;
  position: relative;
}
.persona li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-dim);
  opacity: 0.5;
}

/* ── Persona Grid (secondary tier) ── */
.persona-grid-secondary {
  margin-top: -1px;
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  background: var(--border);
}
.persona-grid-secondary .persona {
  background: var(--bg);
}
.persona-grid-secondary .persona:hover {
  background: var(--surface);
}
.persona-grid-secondary .persona h3 {
  font-size: 19px;
  color: var(--text-dim);
}

/* ── Security Grid ── */
.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 40px;
}
.security-item {
  padding-left: 16px;
  border-left: 1px solid var(--border);
  transition: border-color 0.3s;
}
.security-item:hover {
  border-left-color: var(--accent-dim);
}
.security-item h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.security-item p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ── Waitlist Form ── */
.section-cta {
  text-align: center;
}
.section-cta h2 {
  text-align: center;
}
.waitlist-form {
  max-width: 540px;
  margin: 0 auto;
}
.form-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.form-row {
  display: flex;
  gap: 8px;
}
.form-row input,
.form-row select {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  flex: 1;
}
.form-row input::placeholder {
  color: var(--text-dim);
  opacity: 0.5;
}
.form-row select {
  cursor: pointer;
  -webkit-appearance: none;
}
.form-row select option { background: var(--surface); }
.form-row input:focus,
.form-row select:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px rgba(196, 162, 78, 0.08);
}
.form-row button {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px; font-weight: 600;
  color: #0a090f;
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.form-row button:hover {
  background: #ceac58;
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(196, 162, 78, 0.2);
}
.form-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.form-message {
  margin-top: 14px;
  font-size: 14px;
  min-height: 20px;
}
.form-message.success { color: #6ee7b7; }
.form-message.error { color: #ef6b6b; }
.waitlist-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-dim);
  opacity: 0.6;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 32px;
}
.footer-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.footer-links a {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-copy {
  font-size: 13px;
  color: var(--text-dim);
  opacity: 0.4;
}

/* ── Cost Callout ── */
.cost-callout {
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.75;
  margin-top: 40px;
  padding: 20px 0 20px 24px;
  border-left: 2px solid var(--accent-dim);
}
.cost-callout strong {
  color: var(--text);
}

/* ── Why Now Signal ── */
.section-signal {
  padding: 64px 32px;
}
.signal-text {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-dim);
  font-style: italic;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}
.signal-text strong {
  color: var(--accent);
  font-style: normal;
}

/* ── Three-Layer Flow ── */
.layer-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 56px;
}
.layer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  min-width: 160px;
  transition: border-color 0.2s;
}
.layer-item:hover {
  border-color: rgba(196, 162, 78, 0.15);
}
.layer-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.layer-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 6px;
}
.layer-desc {
  font-size: 12px;
  color: var(--text-dim);
  opacity: 0.7;
}
.layer-arrow {
  font-size: 20px;
  color: var(--text-dim);
  opacity: 0.3;
  padding: 0 16px;
  flex-shrink: 0;
}
.layer-caption {
  font-size: 12px;
  color: var(--text-dim);
  opacity: 0.5;
  text-align: center;
  margin-top: 20px;
  font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { padding: 170px 24px 70px; }
  .hero::before { width: 300px; height: 200px; }
  .section { padding: 80px 24px; }
  .cascade-h { flex-wrap: wrap; gap: 8px; }
  .cascade-h-arrow { display: none; }
  .cascade-h-step { max-width: none; flex: 0 0 calc(33.33% - 8px); }
  .cascade-h-bar-wrap { height: 80px; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .scribe-grid { grid-template-columns: 1fr; }
  .persona-grid { grid-template-columns: 1fr; }
  .persona-grid-secondary { grid-template-columns: 1fr; }
  .security-grid { grid-template-columns: 1fr; gap: 24px; }
  .chat-details { grid-template-columns: 1fr; gap: 24px; }
  .form-row { flex-direction: column; }
  .form-row button { width: 100%; }
  .nav-cta { display: none; }
  .preview-sidebar { display: none; }
  .preview-body { min-height: 220px; }
  .section-label::before { display: none; }
  .section-signal { padding: 48px 24px; }
  .signal-text { font-size: 16px; }
  .layer-flow { flex-direction: column; gap: 0; }
  .layer-arrow { transform: rotate(90deg); padding: 8px 0; }
  .layer-item { min-width: 0; width: 100%; max-width: 280px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 32px; }
  .footer-inner { flex-direction: column; gap: 8px; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn-primary { animation: none; }
  html { scroll-behavior: auto; }
}
