/* CurioLabs website. One stylesheet, no build step.
   Colors live in the custom properties below; change --accent to re-theme. */

:root {
  --accent: #5EEAD4;
  --accent-hover: #99F6E4;
  --amber: #F5B44A;
  --red: #F87171;

  --bg: #0A0D12;
  --bg-band: #0D1117;
  --surface: #0F141B;
  --header-bg: rgba(10, 13, 18, 0.92);
  --grid-line: rgba(148, 163, 184, 0.06);

  --line: #1C232D;          /* hairlines between bars and sections */
  --border: #222B36;        /* card borders */
  --border-strong: #2A3441; /* ghost button, inactive step, terminal dots */
  --border-lab: #3A4553;    /* dashed "in the lab" cards, hover border */

  --text: #E6EBF0;
  --soft: #CBD3DC;
  --muted: #B4BEC9;
  --dim: #8B97A3;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: Inter, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--text);
  font-family: var(--font-body);
  overflow-wrap: break-word;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

[id] { scroll-margin-top: 16px; }

.wrap {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.mono { font-family: var(--font-mono); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 16px; color: var(--bg); }

/* Color utilities */
.c-accent { color: var(--accent); }
.c-amber { color: var(--amber); }
.c-red { color: var(--red); }
.c-text { color: var(--text); }
.c-soft { color: var(--soft); }
.c-muted { color: var(--muted); }
.c-dim { color: var(--dim); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 8px;
  font-size: 16px;
}
.btn:hover { color: var(--bg); background: var(--accent-hover); }
.btn-sm { padding: 12px 18px; font-size: 15px; }
.btn-lg { padding: 16px 26px; font-size: 17px; }

.btn-ghost {
  display: inline-block;
  border: 1px solid var(--border-strong);
  color: var(--text);
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 8px;
  font-size: 16px;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-lab); }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
}

.nav {
  padding-top: 18px;
  padding-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.hex { color: var(--accent); flex-shrink: 0; }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  font-size: 15px;
}
.nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 12px 0;
}
.nav-link:hover { color: var(--text); }

/* ---------- Hero ---------- */

.hero {
  padding-top: 96px;
  padding-bottom: 72px;
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: center;
}

.hero-copy {
  flex: 1 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
}
.eyebrow-hero { letter-spacing: 0.04em; }

.h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.sweep {
  color: var(--accent);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 4px;
  padding-bottom: 2px;
}

.lede {
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 560px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
}

.status {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--dim);
}
.pulse {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Terminal cards ---------- */

.term {
  position: relative;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 13px;
}
.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.term-title { padding-left: 8px; }

.term-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
}

.term-body {
  display: flex;
  flex-direction: column;
}

.hero-term { flex: 1 1 420px; font-size: 14px; }
.hero-term .term-body { padding: 20px 20px 24px; gap: 10px; line-height: 1.5; }
.row { display: flex; gap: 12px; }
.term-summary { padding-top: 6px; }

.term-body-log { padding: 18px 20px; gap: 10px; line-height: 1.55; }
.term-body-review { padding: 20px; gap: 12px; line-height: 1.55; }

.scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 40px;
  /* rgba of --accent */
  background: linear-gradient(rgba(94, 234, 212, 0), rgba(94, 234, 212, 0.07), rgba(94, 234, 212, 0));
  pointer-events: none;
  opacity: 0;
}

.cursor {
  display: inline-block;
  width: 9px;
  height: 17px;
  background: currentColor;
  vertical-align: -3px;
  margin-left: 4px;
}

/* ---------- Proof strip and bands ---------- */

.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-band);
}

.proof {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px 48px;
  justify-content: space-between;
}
.stat {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  color: var(--accent);
}
.stat-label { color: var(--muted); font-size: 15px; }

/* ---------- Sections ---------- */

.section {
  padding-top: 96px;
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 680px;
}
.section-head-wide { max-width: 720px; }

.h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.h2-cta { font-size: clamp(32px, 4.5vw, 40px); }

.section-intro {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

/* ---------- Cards ---------- */

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.card {
  flex: 1 1 340px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card-lab { border: 1px dashed var(--border-lab); }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.ico { color: var(--accent); flex-shrink: 0; }
.ico-lab { color: var(--amber); }

.badge {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--bg);
  background: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
}
.badge-lab {
  color: var(--amber);
  background: none;
  border: 1px solid var(--amber);
  padding: 3px 10px;
}

.h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
}
.h3-lg { font-size: 26px; }

.card-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--dim);
}
.meta.c-amber { color: var(--amber); }

.grow { flex-grow: 1; }

.ledger {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-link {
  font-weight: 600;
  text-decoration: none;
  padding: 10px 0;
  align-self: flex-start;
}

.trusted {
  margin: 0;
  color: var(--dim);
  font-size: 15px;
}
.trusted a { color: var(--soft); }
.trusted a:hover { color: var(--text); }

.lift:hover { border-color: var(--border-lab); }

/* ---------- How we work ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.step {
  flex: 1 1 170px;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 2px solid var(--accent);
}
.step-num { font-family: var(--font-mono); font-size: 13px; color: var(--dim); }
.step-title { font-family: var(--font-display); font-size: 19px; }
.step-text { color: var(--muted); font-size: 15px; line-height: 1.5; }

/* ---------- Deploys we refused ---------- */

.refused {
  padding-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
}
.refused-copy {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.h3-xl {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.refused-text {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}
.refused-term { flex: 2 1 560px; }

/* ---------- Team ---------- */

.team {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: stretch;
}
.team-roles {
  flex: 3 1 600px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.role-lead {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: baseline;
  justify-content: space-between;
}
.role-lead.lift:hover { border-color: var(--accent); }
.role-lead-title { font-family: var(--font-display); font-size: 20px; }
.role-lead-text { color: var(--muted); font-size: 15px; }

.roles {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.role {
  flex: 1 1 250px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.role-title { font-family: var(--font-display); font-size: 17px; }
.role-text { color: var(--muted); font-size: 14px; line-height: 1.5; }

.review-term {
  flex: 2 1 380px;
  display: flex;
  flex-direction: column;
}

.commitments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--soft);
}
.commitments li { display: flex; gap: 10px; }

/* ---------- Responsible AI and lab log ---------- */

.split {
  padding-top: 96px;
  padding-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
}
.split-lab { padding-bottom: 96px; }

.split-copy {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-rules {
  flex: 1 1 560px;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ai-rule {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  gap: 16px;
}
.ai-num { font-family: var(--font-mono); color: var(--accent); }
.ai-title { font-family: var(--font-display); }

.timeline {
  flex: 1 1 520px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  font-family: var(--font-mono);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.timeline-list li { display: flex; gap: 20px; }
.tl-time { color: var(--dim); min-width: 56px; flex-shrink: 0; }
.tl-done, .tl-done .tl-time { color: var(--accent); }
.tl-note { margin: 0; color: var(--dim); font-size: 13px; }

/* ---------- Contact and footer ---------- */

.band-cta { border-bottom: 0; }

.cta {
  padding-top: 80px;
  padding-bottom: 80px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
}
.cta-copy {
  flex: 1 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer { border-top: 1px solid var(--line); }
.footer {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: var(--dim);
  font-size: 14px;
}

/* ---------- 404 page ---------- */

.notfound {
  min-height: 70vh;
  padding-top: 96px;
  padding-bottom: 96px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: center;
}
.notfound .term { max-width: 640px; font-size: 14px; }
.notfound .term-body { padding: 20px; gap: 10px; line-height: 1.55; }

/* ---------- Animations (only when the visitor allows motion) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .lift { transition: transform .25s ease, border-color .25s ease; }
  .lift:hover { transform: translateY(-4px); }
  .grid-bg { animation: drift 40s linear infinite; }
  @keyframes drift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 48px 48px, 48px 48px; }
  }

  .hex { animation: spin 14s linear infinite; transform-origin: 50% 50%; }
  @keyframes spin { to { transform: rotate(360deg); } }

  .tline { opacity: 0; animation: typein .35s ease-out forwards; }
  @keyframes typein {
    from { opacity: 0; transform: translateX(-6px); }
    to { opacity: 1; transform: none; }
  }

  /* Typing delays. Kept after .tline so the shorthand above doesn't reset them. */
  .d02 { animation-delay: .2s; }
  .d03 { animation-delay: .3s; }
  .d06 { animation-delay: .6s; }
  .d07 { animation-delay: .7s; }
  .d08 { animation-delay: .8s; }
  .d09 { animation-delay: .9s; }
  .d10 { animation-delay: 1s; }
  .d12 { animation-delay: 1.2s; }
  .d13 { animation-delay: 1.3s; }
  .d15 { animation-delay: 1.5s; }
  .d16 { animation-delay: 1.6s; }
  .d18 { animation-delay: 1.8s; }
  .d19 { animation-delay: 1.9s; }
  .d23 { animation-delay: 2.3s; }
  .d26 { animation-delay: 2.6s; }

  .cursor { animation: blink 1s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }

  .pulse { animation: pulse 2s ease-in-out infinite; }
  @keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, .6); }
    50% { box-shadow: 0 0 0 6px rgba(94, 234, 212, 0); }
  }

  .sweep { background-size: 0 4px; animation: sweep .9s .6s cubic-bezier(.2, .7, .2, 1) forwards; }
  @keyframes sweep { to { background-size: 100% 4px; } }

  .scan { animation: scan 5s 2.6s ease-in-out infinite; }
  @keyframes scan {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
  }

  .egg-out { opacity: 0; animation: typein .3s 1.2s ease-out forwards; }

  .step { border-top-color: var(--border-strong); animation: light 6s ease-in-out infinite; }
  .step:nth-child(2) { animation-delay: .5s; }
  .step:nth-child(3) { animation-delay: 1s; }
  .step:nth-child(4) { animation-delay: 1.5s; }
  .step:nth-child(5) { animation-delay: 2s; }
  .step:nth-child(6) { animation-delay: 2.5s; }
  @keyframes light {
    0%, 100% { border-top-color: var(--border-strong); }
    8%, 45% { border-top-color: var(--accent); }
    60% { border-top-color: var(--border-strong); }
  }
}
