/* ============================================
   Tachyon Lab — Design System
   ============================================ */

:root {
  --bg: #06070a;
  --bg-elevated: #0d1117;
  --bg-elevated-2: #12161d;
  --line: rgba(79, 216, 232, 0.14);
  --gold: #c9a961;
  --gold-bright: #e4c878;
  --cyan: #4fd8e8;
  --text: #f2f0ea;
  --text-muted: #9aa5ad;
  --text-faint: #6b747c;
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(201, 169, 97, 0.35);
  --radius: 4px;
  --max-width: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  margin: 0 0 1.1em;
  color: var(--text-muted);
  max-width: 62ch;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover { color: var(--gold-bright); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.7rem;
  color: var(--cyan);
  font-weight: 500;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--cyan);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section--tight { padding: 64px 0; }

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-head p { max-width: 56ch; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 14px 28px;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease), color 0.4s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: #101010;
}

.btn-primary:hover {
  background: var(--gold-bright);
  color: #101010;
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-bright);
  color: var(--gold-bright);
  transform: translateY(-2px);
}

.btn-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- Navbar ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 22px 0;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  padding: 14px 0;
  background: rgba(6, 7, 10, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}

.logo:hover { color: var(--text); }

.logo svg { display: block; flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  position: relative;
  padding: 4px 0;
}

.nav-links a:hover { color: var(--text); }

.nav-item { position: relative; }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 280px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: 3px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.nav-dropdown a:hover {
  background: rgba(255,255,255,0.04);
  color: var(--gold-bright);
}

.nav-cta { display: flex; align-items: center; gap: 20px; }
.nav-cta .btn { padding: 11px 22px; font-size: 0.75rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
}

.nav-toggle svg { display: block; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-cta .btn-secondary { display: none; }
}

@media (max-width: 600px) {
  .logo { font-size: 0.82rem; letter-spacing: 0.12em; gap: 8px; }
  .logo svg { width: 20px; height: 20px; }
  .nav-cta { gap: 12px; }
  .nav-cta .btn-primary { display: none; }
}

/* Mobile menu panel */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg);
  padding: 100px 28px 40px;
  display: none;
  overflow-y: auto;
}

.mobile-menu.is-open { display: block; }

.mobile-menu ul { list-style: none; margin: 0; padding: 0; }

.mobile-menu > .container > ul > li {
  border-bottom: 1px solid var(--border);
}

.mobile-menu a {
  display: block;
  padding: 18px 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
  color: var(--text);
}

.mobile-menu .mobile-sub {
  padding-left: 16px;
  border-bottom: none !important;
}

.mobile-menu .mobile-sub a {
  font-size: 1rem;
  padding: 12px 0;
  color: var(--text-muted);
  font-family: "Inter", sans-serif;
}

.mobile-menu .btn { margin-top: 30px; width: 100%; }

/* ---------- Credential bar ---------- */

.credential-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.credential-bar .container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 18px 28px;
  flex-wrap: wrap;
  text-align: center;
}

.credential-bar span {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 500;
}

.credential-bar .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-faint);
}

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  height: 400vh;
}

.hero-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("/images/hero.jpg");
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(6,7,10,0.35) 0%, rgba(6,7,10,0.85) 65%),
    linear-gradient(180deg, rgba(6,7,10,0.2) 0%, rgba(6,7,10,0.5) 70%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-content .eyebrow { margin-bottom: 22px; }

.hero-content h1 {
  max-width: 780px;
  margin-bottom: 22px;
}

.hero-content .lede {
  font-size: 1.15rem;
  max-width: 46ch;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.hero-scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero-scroll-cue .line {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--gold), transparent);
  animation: scrollcue 2s var(--ease) infinite;
}

@keyframes scrollcue {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.01% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (max-width: 768px) {
  .hero { height: auto; }
  .hero-pin { position: relative; height: 92vh; min-height: 620px; }
  .hero-bg { transform: none; }
}

/* ---------- Page intro banner (interior pages) ---------- */

.page-intro {
  position: relative;
  padding: 200px 0 90px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.page-intro-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
}

.page-intro-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,7,10,0.55) 0%, var(--bg) 100%);
}

.page-intro .container { position: relative; z-index: 2; }
.page-intro .lede { font-size: 1.1rem; max-width: 58ch; }

.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.breadcrumb a { color: var(--text-faint); }
.breadcrumb a:hover { color: var(--gold); }

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

.grid {
  display: grid;
  gap: 24px;
}

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

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), background 0.5s var(--ease);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  background: var(--bg-elevated-2);
}

.card .icon {
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  color: var(--gold);
}

.card h3 { margin-bottom: 12px; }
.card p { font-size: 0.92rem; margin-bottom: 18px; }
.card .card-link {
  margin-top: auto;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.card .card-link svg { transition: transform 0.3s var(--ease); }
.card:hover .card-link svg { transform: translateX(4px); }

.card-image {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}
.card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}

@media (max-width: 800px) {
  .steps { grid-template-columns: 1fr; }
}

.step {
  position: relative;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.step .step-num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 18px;
}

/* ---------- CTA band ---------- */

.cta-band {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  text-align: center;
  padding: 100px 0;
}

.cta-band h2 { max-width: 620px; margin: 0 auto 16px; }
.cta-band p { max-width: 520px; margin: 0 auto 32px; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Content page layout (pillars / personas / legal) ---------- */

.prose { max-width: 720px; }
.prose p { max-width: none; }
.prose ul { color: var(--text-muted); padding-left: 20px; }
.prose li { margin-bottom: 10px; }

.two-col {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
}

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}

.side-facts {
  border-top: 1px solid var(--border-bright);
  padding-top: 20px;
}

.side-facts dt {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: var(--cyan);
  margin-bottom: 6px;
}

.side-facts dd {
  margin: 0 0 26px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.deliverable-block {
  background: var(--bg-elevated);
  border-left: 2px solid var(--gold);
  padding: 26px 28px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 40px 0;
}

.deliverable-block h4 {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 10px;
}

.problem-list {
  display: grid;
  gap: 20px;
  margin: 32px 0 44px;
}

.problem-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.problem-item .num {
  font-family: "Space Grotesk", sans-serif;
  color: var(--gold);
  font-size: 1.1rem;
}

.related-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.related-links a {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.related-links a:hover {
  border-color: var(--border-bright);
  color: var(--gold-bright);
}

/* ---------- Forms ---------- */

.form-grid {
  display: grid;
  gap: 20px;
  max-width: 560px;
}

.field label {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  padding: 14px 16px;
  transition: border-color 0.3s var(--ease);
}

.field textarea { resize: vertical; min-height: 130px; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
}

.form-status {
  font-size: 0.88rem;
  margin-top: 4px;
  min-height: 1.4em;
}
.form-status[data-state="ok"] { color: var(--cyan); }
.form-status[data-state="error"] { color: #e8836f; }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 70px 0 40px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
}

@media (max-width: 800px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer-top { grid-template-columns: 1fr; }
}

.footer-col h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  margin-bottom: 18px;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--gold-bright); }

.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { font-size: 0.88rem; max-width: 32ch; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.footer-bottom a { color: var(--text-faint); }
.footer-bottom a:hover { color: var(--gold); }
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- Reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Misc ---------- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 60px 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.tag {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
