/* Lyrian Labs — brand tokens from brand sheet v1.1 */
:root {
  --ink: #111111;
  --ink-2: #171717;
  --ink-3: #1f1f1f;
  --paper: #F4F4F1;
  --paper-2: #E8E8E3;
  --signal: #0F9D6E;
  --mint: #34D399;
  --line: rgba(244, 244, 241, 0.12);
  --line-ink: rgba(17, 17, 17, 0.14);
  --muted: rgba(244, 244, 241, 0.56);

  --sans: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--mint); color: var(--ink); }
a { color: inherit; }
img, svg { display: block; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.03em; }
p { margin: 0; }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.muted { color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { color: var(--mint); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }

/* ---------- top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px var(--gutter);
  background: linear-gradient(var(--ink) 30%, transparent);
}
.bar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; letter-spacing: -0.02em; }
.bar__brand img { border-radius: 7px; }
.bar__dot { color: var(--mint); }
.bar__status { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(17,17,17,.6); backdrop-filter: blur(8px); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); }
  70% { box-shadow: 0 0 0 9px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: grid; place-items: center;
  padding: 120px var(--gutter) 96px;
  isolation: isolate;
}
.field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after { /* vignette */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 45%, var(--ink) 100%);
}
.hero__inner { width: 100%; max-width: 980px; padding-right: 8px; display: grid; gap: clamp(22px, 3.4vw, 36px); }

.wordmark { width: 100%; color: var(--paper); line-height: 0; }
.wordmark svg { width: 100%; height: auto; overflow: visible; }
.wordmark__dot { fill: var(--mint); transform-box: fill-box; transform-origin: center; animation: beat 3.2s var(--ease) infinite; }
@keyframes beat {
  0%, 62%, 100% { transform: scale(1); }
  70% { transform: scale(1.35); }
  78% { transform: scale(.92); }
  86% { transform: scale(1.12); }
}

.lede { max-width: 34ch; font-size: clamp(19px, 2.2vw, 26px); line-height: 1.35; letter-spacing: -0.015em; color: rgba(244,244,241,.82); }
.lede em { font-style: normal; color: var(--paper); background: linear-gradient(transparent 62%, rgba(15,157,110,.55) 62%); }

.hero__meta {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 28px;
  display: flex; justify-content: space-between; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 14px;
}

/* ---------- forms ---------- */
.signup { position: relative; display: flex; flex-wrap: wrap; gap: 8px; max-width: 520px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: rgba(23,23,23,.75); backdrop-filter: blur(10px); transition: border-color .2s; }
.signup:focus-within { border-color: rgba(52,211,153,.6); }
.signup input { flex: 1 1 200px; min-width: 0; }

input, textarea {
  font: inherit; color: var(--paper); background: transparent;
  border: 0; outline: none; padding: 12px 14px; border-radius: 10px;
}
input::placeholder, textarea::placeholder { color: rgba(244,244,241,.35); }

button {
  font: 500 15px/1 var(--sans); letter-spacing: -0.01em;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--mint); color: var(--ink);
  transition: transform .2s var(--ease), background .2s;
}
button:hover { background: #4ee0aa; }
button:active { transform: scale(.97); }
button span { transition: transform .2s var(--ease); }
button:hover span { transform: translateX(3px); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
button[disabled] { opacity: .6; cursor: progress; }

.signup__msg { flex-basis: 100%; min-height: 0; padding: 0 10px; color: var(--mint); }
.signup__msg:empty { display: none; }
.signup__msg.is-error { color: #ff8a7a; }
.signup__msg:not(:empty) { padding: 6px 10px 4px; }

/* ---------- ticker ---------- */
.ticker { overflow: hidden; border-block: 1px solid var(--line); background: var(--signal); color: var(--paper); }
.ticker__track { display: flex; align-items: center; gap: 28px; width: max-content; padding: 14px 0; animation: tick 38s linear infinite; }
.ticker__track i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section:not(.hero) { padding: clamp(80px, 12vw, 160px) 0; }
.section-head { display: grid; gap: 18px; align-content: start; }
.section-head h2 { font-size: clamp(40px, 6.4vw, 84px); line-height: .98; }
.section-head p.muted { max-width: 44ch; font-size: 18px; }

/* paper section */
.paper { background: var(--paper); color: var(--ink); }
.paper .eyebrow { color: var(--signal); }
.paper .section-head { margin-bottom: clamp(48px, 7vw, 88px); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-ink); }
.card { position: relative; padding: 28px 28px 8px 0; display: grid; gap: 14px; align-content: start; }
.card + .card { padding-left: 28px; border-left: 1px solid var(--line-ink); }
.card__n { color: var(--signal); font-size: 13px; }
.card h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.12; }
.card p { color: rgba(17,17,17,.68); max-width: 32ch; }

/* lab log */
.log__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 6vw, 96px); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; text-transform: none; font-size: 14px; letter-spacing: 0; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 18px 0 18px 32px; border-bottom: 1px dashed var(--line); color: var(--muted); }
.timeline li::before { content: ""; position: absolute; left: 0; top: 23px; width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--muted); background: var(--ink); }
.timeline time { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; padding-top: 2px; }
.timeline .is-done { color: var(--paper); }
.timeline .is-done::before { background: var(--paper); border-color: var(--paper); }
.timeline .is-active { color: var(--paper); }
.timeline .is-active time { color: var(--mint); }
.timeline .is-active::before { background: var(--mint); border-color: var(--mint); animation: pulse 2.4s infinite; }
.timeline b { color: var(--mint); font-weight: 700; }

/* discovery */
.discover { border-top: 1px solid var(--line); background: radial-gradient(ellipse 60% 50% at 85% 60%, rgba(15,157,110,.16), transparent 70%); }
.discover__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.discover h2 { font-size: clamp(36px, 5vw, 64px); }
.panel { display: grid; gap: 10px; padding: 0 22px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--ink-2); box-shadow: 0 30px 80px -30px rgba(0,0,0,.7); }
.panel__bar { display: flex; align-items: center; gap: 7px; margin: 0 -22px 10px; padding: 14px 22px; border-bottom: 1px solid var(--line); color: var(--muted); }
.panel__bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); border: 1px solid var(--line); }
.panel__bar em { font-style: normal; margin-left: auto; text-transform: none; }
.panel label { color: var(--muted); margin-top: 8px; }
.panel input, .panel textarea { width: 100%; background: var(--ink); border: 1px solid var(--line); transition: border-color .2s; }
.panel input:focus, .panel textarea:focus { border-color: rgba(52,211,153,.6); }
.panel textarea { resize: vertical; min-height: 130px; font-family: var(--mono); font-size: 14px; line-height: 1.6; }
.panel__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel__row > div { display: grid; gap: 10px; }
.panel button { margin-top: 14px; justify-self: start; }
.panel .signup__msg { padding-left: 0; }

/* footer */
.foot { border-top: 1px solid var(--line); padding-top: clamp(64px, 10vw, 128px); overflow: hidden; }
.foot__line { font-size: clamp(44px, 8vw, 112px); line-height: .95; font-weight: 500; letter-spacing: -0.04em; margin-bottom: clamp(48px, 7vw, 88px); }
.foot__line span { color: var(--mint); }
.foot__row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); }
.foot__row a { text-decoration: none; color: var(--paper); border-bottom: 1px solid var(--mint); }
.foot__mark { color: var(--ink-3); margin: clamp(28px, 5vw, 56px) auto 0; padding: 0 var(--gutter) clamp(24px, 4vw, 48px); max-width: var(--max); }
.foot__mark svg { width: 100%; height: auto; }
.foot__mark .wordmark__dot { animation: none; fill: var(--signal); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.hero .reveal:nth-child(2) { transition-delay: .08s; }
.hero .reveal:nth-child(3) { transition-delay: .2s; }
.hero .reveal:nth-child(4) { transition-delay: .32s; }
.cards .reveal:nth-child(2), .timeline .reveal:nth-child(2) { transition-delay: .08s; }
.cards .reveal:nth-child(3), .timeline .reveal:nth-child(3) { transition-delay: .16s; }
.timeline .reveal:nth-child(4) { transition-delay: .24s; }
.timeline .reveal:nth-child(5) { transition-delay: .32s; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .card, .card + .card { padding: 28px 0; border-left: 0; }
  .card + .card { border-top: 1px solid var(--line-ink); }
  .log__grid, .discover__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hide-sm { display: none; }
  .signup button { flex: 1 1 100%; }
  .panel__row { grid-template-columns: 1fr; }
  .panel button { justify-self: stretch; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
