@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Instrument+Serif:ital@0;1&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --ink: #e7efe8;
  --muted: #8e9c93;
  --faint: #52615a;
  --paper: #081014;
  --panel: #0d191d;
  --panel-2: #101f23;
  --line: rgba(178, 211, 194, 0.19);
  --acid: #cdf66d;
  --acid-dim: rgba(205, 246, 109, 0.17);
  --peach: #f4b59d;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Space Grotesk', Helvetica, sans-serif;
  --mono: 'DM Mono', 'SFMono-Regular', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  background-image: linear-gradient(rgba(165, 209, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(165, 209, 184, 0.045) 1px, transparent 1px);
  background-size: 76px 76px;
  content: '';
  inset: 0;
  opacity: 0.33;
  pointer-events: none;
  position: fixed;
  z-index: -2;
}

.grain {
  animation: grain 0.25s steps(2) infinite;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  inset: -40%;
  opacity: 0.055;
  pointer-events: none;
  position: fixed;
  z-index: 10;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(2%, -1%); }
  50% { transform: translate(-1%, 2%); }
  75% { transform: translate(1%, 1%); }
  100% { transform: translate(-2%, -1%); }
}

.page-shell { margin: 0 auto; max-width: 1440px; padding: 0 5.5vw; }

.site-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 84px;
}

.wordmark, .header-meta, .eyebrow, .scroll-cue, .card-topline, .prompt-footer,
.readout-footnote, .site-footer, .principle-number, .reply-label, .metric-label,
.restart-button, .send-button {
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wordmark { align-items: center; color: var(--ink); display: flex; font-size: 0.72rem; gap: 0.7rem; text-decoration: none; }
.wordmark-mark { display: flex; gap: 3px; height: 17px; transform: rotate(-22deg); width: 19px; }
.wordmark-mark i { background: var(--acid); display: block; height: 100%; width: 4px; }
.wordmark-mark i:nth-child(2) { height: 72%; margin-top: 28%; opacity: 0.75; }
.wordmark-mark i:nth-child(3) { height: 45%; margin-top: 55%; opacity: 0.45; }
.header-meta { align-items: center; color: var(--muted); display: flex; font-size: 0.62rem; gap: 0.75rem; }
.meta-divider { color: var(--faint); }
.pulse-dot, .live-dot { background: var(--acid); border-radius: 50%; display: inline-block; height: 6px; width: 6px; }
.pulse-dot { animation: pulse 2.2s infinite; box-shadow: 0 0 0 0 rgba(205, 246, 109, 0.5); }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(205, 246, 109, 0); } 100% { box-shadow: 0 0 0 0 rgba(205, 246, 109, 0); } }

.section-grid { display: grid; gap: clamp(3rem, 9vw, 9rem); grid-template-columns: minmax(180px, 0.67fr) minmax(0, 1.33fr); }
.hero { min-height: min(780px, calc(100vh - 84px)); padding: 13vh 0 11vh; }
.hero-copy, .section-intro { position: relative; z-index: 1; }
.eyebrow { color: var(--acid); font-size: 0.62rem; line-height: 1.4; margin: 0 0 2rem; }
.eyebrow span { color: var(--muted); display: inline-block; margin-right: 0.8rem; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-weight: 400; line-height: 0.88; margin-bottom: 2rem; }
h1 { font-size: clamp(4.6rem, 10vw, 10rem); letter-spacing: -0.075em; max-width: 800px; }
h2 { font-size: clamp(3.7rem, 7.3vw, 7.4rem); letter-spacing: -0.07em; }
h1 em, h2 em { color: var(--acid); font-family: var(--serif); font-weight: 400; letter-spacing: -0.07em; }
.hero-intro, .section-intro > p:not(.eyebrow) { color: var(--muted); font-size: 0.95rem; max-width: 350px; }
.hero-intro { margin-bottom: 3.2rem; }
.scroll-cue { align-items: center; color: var(--ink); display: inline-flex; font-size: 0.62rem; gap: 0.85rem; text-decoration: none; }
.scroll-arrow { align-items: center; border: 1px solid var(--acid); border-radius: 50%; color: var(--acid); display: inline-flex; font-size: 1rem; height: 30px; justify-content: center; transition: background 180ms, color 180ms; width: 30px; }
.scroll-cue:hover .scroll-arrow { background: var(--acid); color: var(--paper); }

.hero-orbit { align-self: center; height: min(52vw, 640px); justify-self: center; max-height: 640px; max-width: 640px; min-height: 340px; min-width: 340px; position: relative; width: min(52vw, 640px); }
.orbit-halo { border-radius: 50%; inset: 8%; position: absolute; }
.halo-one { background: radial-gradient(circle, rgba(205, 246, 109, 0.12), rgba(205, 246, 109, 0) 63%); filter: blur(8px); }
.halo-two { background: radial-gradient(circle, rgba(244, 181, 157, 0.08), rgba(244, 181, 157, 0) 66%); transform: scale(1.42); }
.orbit-ring { border: 1px solid rgba(178, 211, 194, 0.21); border-radius: 50%; inset: 9%; position: absolute; }
.ring-one { animation: spin 36s linear infinite; border-color: rgba(205, 246, 109, 0.42); border-left-color: transparent; border-right-color: transparent; }
.ring-two { animation: spin-reverse 48s linear infinite; inset: 20%; border-style: dashed; }
.ring-three { animation: spin 60s linear infinite; inset: -2%; border-color: rgba(178, 211, 194, 0.1); border-bottom-color: var(--peach); }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes spin-reverse { from { transform: rotate(360deg); } to { transform: rotate(0); } }
.orbit-core { align-items: center; background: rgba(8, 16, 20, 0.88); border: 1px solid var(--acid); border-radius: 50%; display: flex; flex-direction: column; height: 38%; justify-content: center; left: 31%; position: absolute; text-align: center; top: 31%; width: 38%; }
.orbit-core::after { border: 1px solid var(--acid-dim); border-radius: 50%; content: ''; inset: -11px; position: absolute; }
.core-kicker, .core-caption, .orbit-label { color: var(--muted); font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.12em; text-transform: uppercase; }
.orbit-core strong { color: var(--acid); font-family: var(--serif); font-size: clamp(3rem, 7vw, 6rem); font-weight: 400; letter-spacing: -0.08em; line-height: 0.9; }
.core-caption { color: var(--ink); margin-top: 0.4rem; }
.orbit-label { position: absolute; }
.label-north { left: 48%; top: 2%; }
.label-east { right: 1%; top: 48%; }
.label-south { bottom: 1%; left: 44%; }
.label-west { left: 2%; top: 48%; }

.exchange, .readout, .principles, .closing { border-top: 1px solid var(--line); padding: 12rem 0; }
.section-intro h2 { max-width: 500px; }
.conversation-card { background: var(--panel); border: 1px solid var(--line); box-shadow: 18px 18px 0 rgba(205, 246, 109, 0.055); min-height: 590px; }
.card-topline { align-items: center; border-bottom: 1px solid var(--line); color: var(--muted); display: flex; font-size: 0.59rem; justify-content: space-between; padding: 1.1rem 1.25rem; }
.card-topline .live-dot { margin-right: 0.45rem; vertical-align: 1px; }
.conversation-stage { align-items: center; display: flex; height: 380px; justify-content: center; overflow: hidden; position: relative; }
.conversation-stage::before { background: linear-gradient(90deg, transparent 49.9%, rgba(178, 211, 194, 0.1) 50%, transparent 50.1%), linear-gradient(0deg, transparent 49.9%, rgba(178, 211, 194, 0.1) 50%, transparent 50.1%); background-size: 100% 100%, 100% 100%; border: 1px solid rgba(178, 211, 194, 0.1); border-radius: 50%; content: ''; height: 260px; position: absolute; width: 260px; }
.stage-signal { border: 1px solid rgba(205, 246, 109, 0.25); border-radius: 50%; height: 70%; position: absolute; width: 50%; }
.signal-a { animation: breathe-a 5s ease-in-out infinite; transform: rotate(35deg); }
.signal-b { animation: breathe-b 5s 1.6s ease-in-out infinite; transform: rotate(-35deg); }
.signal-c { animation: breathe-c 5s 3.2s ease-in-out infinite; border-color: rgba(244, 181, 157, 0.21); transform: rotate(90deg) scale(0.76); }
@keyframes breathe-a { 0%, 100% { opacity: 0.2; transform: rotate(35deg) scale(0.9); } 50% { opacity: 0.8; transform: rotate(35deg) scale(1.08); } }
@keyframes breathe-b { 0%, 100% { opacity: 0.2; transform: rotate(-35deg) scale(0.9); } 50% { opacity: 0.8; transform: rotate(-35deg) scale(1.08); } }
@keyframes breathe-c { 0%, 100% { opacity: 0.2; transform: rotate(90deg) scale(0.68); } 50% { opacity: 0.8; transform: rotate(90deg) scale(0.84); } }
.listening-state { align-items: center; display: flex; flex-direction: column; gap: 1rem; position: relative; z-index: 2; }
.listening-state p { color: var(--muted); font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; margin: 0; text-transform: uppercase; }
.listening-orb { align-items: center; background: var(--acid); border-radius: 50%; box-shadow: 0 0 45px rgba(205, 246, 109, 0.35); display: flex; height: 64px; justify-content: center; width: 64px; }
.listening-orb span { border: 1px solid var(--paper); border-radius: 50%; height: 27px; position: relative; width: 27px; }
.listening-orb span::before, .listening-orb span::after { background: var(--paper); content: ''; height: 1px; left: 5px; position: absolute; top: 12px; transform: rotate(45deg); width: 15px; }
.listening-orb span::after { transform: rotate(-45deg); }
.token-cloud { inset: 0; opacity: 0; pointer-events: none; position: absolute; transition: opacity 500ms; }
.token-cloud.active { opacity: 1; }
.token { animation: token-in 750ms cubic-bezier(0.22, 0.61, 0.36, 1) both; color: var(--ink); font-family: var(--mono); font-size: clamp(0.56rem, 1vw, 0.72rem); letter-spacing: 0.08em; max-width: 145px; overflow: hidden; position: absolute; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.token:nth-child(odd) { color: var(--acid); }
.token:nth-child(3n) { color: var(--peach); }
.token.token-past { animation-name: token-past-in; color: var(--faint); font-size: 0.58rem; }
@keyframes token-in { from { opacity: 0; transform: translate(-50%, -50%) scale(0.35); } to { opacity: 0.92; transform: translate(-50%, -50%) scale(1); } }
@keyframes token-past-in { from { opacity: 0; transform: translate(-50%, -50%) scale(0.35); } to { opacity: 0.34; transform: translate(-50%, -50%) scale(1); } }
.reply-state { background: rgba(8, 16, 20, 0.72); border: 1px solid var(--acid); max-width: 420px; opacity: 0; padding: 1.4rem 1.5rem 1.3rem; position: relative; transform: translateY(10px); transition: opacity 600ms 300ms, transform 600ms 300ms; z-index: 3; }
.reply-state.active { opacity: 1; transform: translateY(0); }
.reply-label { color: var(--acid); display: block; font-size: 0.57rem; margin-bottom: 0.75rem; }
.reply-state p { color: var(--ink); font-family: var(--serif); font-size: clamp(1.3rem, 2.1vw, 1.7rem); line-height: 1.08; margin: 0; }
.prompt-form { border-top: 1px solid var(--line); padding: 1.1rem 1.25rem 1.15rem; }
textarea { background: transparent; border: 0; color: var(--ink); display: block; font: 400 1.05rem/1.4 var(--sans); outline: 0; padding: 0; resize: none; width: 100%; }
textarea::placeholder { color: var(--faint); }
.prompt-footer { align-items: center; color: var(--faint); display: flex; font-size: 0.57rem; gap: 0.7rem; justify-content: space-between; margin-top: 1.1rem; }
.local-note { color: var(--faint); letter-spacing: 0.06em; }
.send-button, .restart-button { align-items: center; background: var(--acid); border: 1px solid var(--acid); color: var(--paper); cursor: pointer; display: inline-flex; font-size: 0.6rem; gap: 1rem; justify-content: space-between; padding: 0.8rem 0.9rem; transition: background 180ms, color 180ms, transform 180ms; }
.send-button:hover, .restart-button:hover { background: transparent; color: var(--acid); transform: translateY(-2px); }
.send-button:disabled { background: var(--faint); border-color: var(--faint); color: var(--paper); cursor: not-allowed; opacity: 0.75; transform: none; }
.button-arrow { font-size: 1.1rem; line-height: 0.6; }

.readout-panel { align-self: center; border-top: 1px solid var(--line); }
.metric-row { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 1.2rem; grid-template-columns: 220px 1fr 45px; min-height: 82px; }
.metric-label { align-items: center; display: flex; font-size: 0.6rem; gap: 0.8rem; }
.metric-label span { color: var(--faint); }
.metric-label b { color: var(--muted); font-weight: 400; }
.meter { background: rgba(178, 211, 194, 0.1); height: 4px; overflow: hidden; }
.meter i { background: var(--acid); display: block; height: 100%; transform: scaleX(0); transform-origin: left; transition: transform 1000ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.metric-row output { color: var(--acid); font-family: var(--mono); font-size: 0.68rem; text-align: right; }
.readout-footnote { align-items: center; color: var(--faint); display: flex; font-size: 0.57rem; justify-content: space-between; padding-top: 1.1rem; }
.throughline { color: var(--muted); margin-left: auto; }
.tiny-cross { color: var(--peach); font-size: 1.3rem; }

.principle-list { border-top: 1px solid var(--line); }
.principle { border-bottom: 1px solid var(--line); display: grid; gap: 1.6rem; grid-template-columns: 40px 1fr; padding: 1.7rem 0 1.9rem; }
.principle-number { color: var(--acid); font-size: 0.6rem; padding-top: 0.2rem; }
.principle h3 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 400; letter-spacing: -0.04em; margin-bottom: 0.5rem; }
.principle p { color: var(--muted); font-size: 0.9rem; margin-bottom: 0; max-width: 520px; }

.closing { align-items: center; min-height: 620px; padding-bottom: 10rem; padding-top: 10rem; }
.closing-mark { align-items: center; display: flex; height: 260px; justify-content: center; position: relative; }
.closing-mark::before { border: 1px solid var(--line); border-radius: 50%; content: ''; height: 230px; position: absolute; transform: rotate(25deg); width: 150px; }
.closing-mark::after { border: 1px solid rgba(205, 246, 109, 0.45); border-radius: 50%; content: ''; height: 180px; position: absolute; transform: rotate(-25deg); width: 230px; }
.closing-mark span { background: var(--acid); border-radius: 50%; height: 11px; position: absolute; width: 11px; }
.closing-mark span:nth-child(1) { transform: translate(-90px, -14px); }
.closing-mark span:nth-child(2) { background: var(--peach); transform: translate(72px, -55px); }
.closing-mark span:nth-child(3) { transform: translate(14px, 94px); }
.closing-mark span:nth-child(4) { background: var(--ink); transform: translate(-49px, 38px); }
.closing-mark span:nth-child(5) { transform: translate(94px, 49px); }
.closing-copy h2 { font-size: clamp(3.4rem, 6.5vw, 6.5rem); }
.closing-copy > p:not(.eyebrow) { color: var(--muted); font-size: 0.95rem; max-width: 400px; }
.restart-button { background: transparent; border-color: var(--line); color: var(--ink); margin-top: 1.6rem; }
.restart-button:hover { border-color: var(--acid); }
.restart-button span:last-child { color: var(--acid); font-size: 1.1rem; }

.site-footer { align-items: center; border-top: 1px solid var(--line); color: var(--faint); display: flex; font-size: 0.56rem; gap: 1rem; justify-content: space-between; min-height: 90px; }
.footer-line { background: var(--line); flex: 1; height: 1px; max-width: 230px; }
.footer-year { color: var(--muted); }
.sr-only { clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

@media (max-width: 780px) {
  .page-shell { padding: 0 1.3rem; }
  .site-header { min-height: 70px; }
  .header-meta { font-size: 0.53rem; gap: 0.45rem; }
  .header-meta span:last-child { display: none; }
  .hero { min-height: auto; padding: 6rem 0 7rem; }
  .section-grid { gap: 3.5rem; grid-template-columns: 1fr; }
  .hero-orbit { height: min(85vw, 500px); margin-top: 1rem; min-height: 0; min-width: 0; width: min(85vw, 500px); }
  .exchange, .readout, .principles, .closing { padding: 7rem 0; }
  .conversation-card { min-height: auto; }
  .conversation-stage { height: 340px; }
  .metric-row { gap: 0.8rem; grid-template-columns: 1fr 1fr 38px; min-height: 100px; }
  .metric-label { font-size: 0.55rem; grid-column: 1 / -1; }
  .meter { grid-column: 1 / 3; }
  .metric-row output { grid-column: 3; grid-row: 2; }
  .readout-footnote { align-items: flex-start; flex-wrap: wrap; gap: 0.5rem; }
  .throughline { margin-left: 0; }
  .closing { min-height: auto; }
  .closing-mark { order: 2; }
  .site-footer { align-items: flex-start; flex-wrap: wrap; padding: 1.4rem 0; }
  .footer-line { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.001ms !important; }
}
