/* === RESET & ROOT === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #08080a;
  --bg-card: #111115;
  --bg-card-hover: #18181f;
  --fg: #e8e4dc;
  --fg-muted: #7a7670;
  --fg-dim: #3a3830;
  --accent: #f5a623;
  --accent-dim: rgba(245, 166, 35, 0.12);
  --accent-glow: rgba(245, 166, 35, 0.25);
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --border: rgba(232, 228, 220, 0.08);
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-sans: 'DM Sans', system-ui, sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

/* === GRID OVERLAY === */
.hero-grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(232, 228, 220, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 228, 220, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 30%, transparent 80%);
}

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 6rem 4rem 4rem;
}

.hero-signal {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 50vw;
  height: 50vw;
  max-width: 640px;
  max-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
}

.signal-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(245, 166, 35, 0.15);
}
.signal-ring-1 { width: 100%; height: 100%; }
.signal-ring-2 { width: 70%; height: 70%; border-color: rgba(245, 166, 35, 0.25); }
.signal-ring-3 { width: 40%; height: 40%; border-color: rgba(245, 166, 35, 0.4); }

.signal-center {
  position: relative;
  width: 16px;
  height: 16px;
  z-index: 1;
}

.signal-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(2.5); opacity: 0.15; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-headline {
  font-family: var(--font-mono);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 1.5rem;
}

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

.hero-sub {
  font-size: 1.1rem;
  color: var(--fg-muted);
  max-width: 480px;
  margin-bottom: 3rem;
  font-weight: 300;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* === SECTION TAG === */
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(245, 166, 35, 0.25);
  border-radius: 2px;
}

/* === LOOP SECTION === */
.loop-section {
  padding: 7rem 4rem;
  border-top: 1px solid var(--border);
  position: relative;
}

.loop-header {
  margin-bottom: 4rem;
}

.loop-title {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.loop-timeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
}

.loop-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2rem;
  position: relative;
  transition: border-color 0.3s;
}

.loop-step:hover {
  border-color: rgba(245, 166, 35, 0.3);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.step-body h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.step-label {
  font-size: 0.72rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.step-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.step-list li {
  font-size: 0.82rem;
  color: var(--fg-muted);
  padding-left: 0.75rem;
  position: relative;
}

.step-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}

.engine-step {
  border-color: rgba(245, 166, 35, 0.25);
  background: rgba(245, 166, 35, 0.03);
}

.engine-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.25rem;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 2px;
  color: var(--accent);
}

.step-note {
  font-size: 0.72rem;
  color: var(--fg-muted);
  margin-top: 1rem;
  font-style: italic;
}

.loop-connector {
  display: flex;
  align-items: center;
  padding-top: 4.5rem;
}

/* === SIX MODULES === */
.six-modules {
  padding: 7rem 4rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.six-modules-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.six-title {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.module-card {
  background: var(--bg);
  padding: 2rem;
  transition: background 0.2s;
  cursor: default;
}

.module-card:hover {
  background: var(--bg-card);
}

.module-icon {
  margin-bottom: 1rem;
}

.module-card h3 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

.module-card p {
  font-size: 0.8rem;
  color: var(--fg-muted);
  line-height: 1.5;
}

/* === DEMO SECTION === */
.demo-section {
  padding: 5rem 4rem;
  border-top: 1px solid var(--border);
}

.demo-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
}

.demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  max-width: 900px;
}

.demo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
}

.demo-store-name {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
}

.demo-tags {
  display: flex;
  gap: 0.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--fg-muted);
  text-transform: uppercase;
}

.tag-live {
  border-color: rgba(52, 211, 153, 0.3);
  color: var(--green);
}

.demo-signal {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
}

.signal-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.signal-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.signal-dot.green { background: var(--green); }
.signal-dot.amber { background: var(--amber); }
.signal-dot.red { background: var(--red); }

.signal-label {
  font-size: 0.75rem;
  color: var(--fg-muted);
}

.signal-val {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fg);
}

.signal-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 2px;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.demo-change {
  padding: 1.75rem;
}

.change-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.change-time {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}

.change-reversal {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--green);
  letter-spacing: 0.04em;
}

.change-copy {
  font-size: 0.9rem;
  color: var(--fg);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  font-style: italic;
}

.change-metrics {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.metric { display: flex; align-items: baseline; gap: 0.5rem; }

.metric-val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
}

.metric-val.positive { color: var(--green); }

.metric-label {
  font-size: 0.7rem;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}

.confidence-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  margin-left: auto;
}

.demo-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--border);
  background: rgba(245, 166, 35, 0.03);
}

.demo-cta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}

/* === AUDIT SECTION === */
.audit-section {
  padding: 7rem 4rem;
  border-top: 1px solid var(--border);
}

.audit-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
  max-width: 1100px;
}

.audit-content {}

.audit-title {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.audit-body {
  font-size: 1rem;
  color: var(--fg-muted);
  max-width: 440px;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.audit-promise {
  padding: 1rem 1.25rem;
  border-left: 2px solid var(--accent);
}

.promise-text {
  font-size: 0.82rem;
  color: var(--fg-muted);
  font-style: italic;
  line-height: 1.6;
}

.audit-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.audit-clock {}

.clock-ring {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clock-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(245, 166, 35, 0.25);
}

.clock-ring::after {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1px solid rgba(245, 166, 35, 0.15);
}

.clock-face {
  position: relative;
  z-index: 1;
  text-align: center;
}

.clock-time {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.clock-unit {
  font-size: 0.7rem;
  color: var(--fg-muted);
  display: block;
  margin-top: 0.2rem;
  font-weight: 400;
}

/* === CLOSING === */
.closing {
  padding: 8rem 4rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.closing-inner {}

.closing-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

.closing-headline {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.closing-sub {
  font-size: 1rem;
  color: var(--fg-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.8;
}

/* === FOOTER === */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 4rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.footer-sep {
  color: var(--fg-dim);
}

.footer-tagline {
  font-size: 0.75rem;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero { padding: 5rem 2rem 4rem; }
  .loop-section { padding: 5rem 2rem; }
  .six-modules { padding: 5rem 2rem; }
  .demo-section { padding: 5rem 2rem; }
  .audit-section { padding: 5rem 2rem; }
  .closing { padding: 6rem 2rem; }
  .footer { padding: 2rem 2rem; }

  .hero-signal { display: none; }

  .loop-timeline {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .loop-connector { display: none; }

  .modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .audit-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .modules-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    flex-wrap: wrap;
    gap: 1rem;
  }
}
/* === RESEARCH MODULE (homepage) === */
.research-module {
  padding: 5rem 4rem;
  border-top: 1px solid var(--border);
}

.research-module-inner {
  max-width: 1100px;
}

.research-module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.research-module-all-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.15s;
}
.research-module-all-link:hover { color: var(--accent); }

.research-card-row {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.research-home-card {
  display: block;
  background: var(--bg-card);
  padding: 2rem;
  text-decoration: none;
  transition: background 0.2s;
}
.research-home-card:hover { background: var(--bg-card-hover); }

.rhc-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.rhc-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}

.rhc-title {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.4;
  margin-bottom: 0.6rem;
}

.rhc-excerpt {
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.rhc-cta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.research-home-aside {
  background: rgba(245, 166, 35, 0.04);
  border-left: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rha-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.rha-date {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
}

.rha-sub p {
  font-size: 0.78rem;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.rha-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: opacity 0.15s;
}
.rha-link:hover { opacity: 0.7; }

@media (max-width: 900px) {
  .research-module { padding: 5rem 2rem; }
  .research-card-row { grid-template-columns: 1fr; }
  .research-home-aside { border-left: none; border-top: 1px solid var(--border); }
}
.hero-ops-link {
  margin-bottom: 1.5rem;
}
.ops-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 0.45rem 1rem;
  border-radius: 100px;
  transition: background 0.15s, color 0.15s;
}
.ops-cta-link:hover {
  background: var(--accent);
  color: #08080a;
}
