:root {
  color-scheme: dark;
  --bg: #080b11;
  --surface: #0e131c;
  --surface-2: #141b26;
  --line: #273142;
  --line-soft: rgba(120, 145, 177, 0.18);
  --text: #f4f7fb;
  --muted: #98a7bb;
  --blue: #4e8cff;
  --cyan: #67d4e8;
  --red: #f34b59;
  --yellow: #f3b63f;
  --max: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.021) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.021) 1px, transparent 1px),
    var(--bg);
  background-size: 56px 56px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 0.85rem;
  transform: translateY(-160%);
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-weight: 800;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: 1rem 0;
  background: rgba(8, 11, 17, 0.82);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: border-color 180ms ease;
}

.site-header.scrolled { border-color: var(--line-soft); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow: 6px 6px 0 rgba(243, 75, 89, 0.16);
}

.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 0.9rem; letter-spacing: 0.01em; }
.brand-copy span { margin-top: 0.2rem; color: var(--muted); font-size: 0.75rem; }

.site-nav { display: flex; align-items: center; gap: 1.7rem; }
.site-nav a {
  color: #c8d2df;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease;
}
.site-nav a:hover, .site-nav a:focus-visible { color: #fff; }
.site-nav .nav-cta { padding: 0.6rem 0.85rem; border: 1px solid var(--line); color: #fff; }

.nav-toggle { display: none; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
  width: min(calc(100% - 2rem), var(--max));
  min-height: calc(100vh - 78px);
  margin: 0 auto;
  padding: clamp(4rem, 11vh, 8.5rem) 0 5.5rem;
}

.hero::before {
  content: "";
  position: absolute;
  top: 9%;
  right: 14%;
  width: 22rem;
  height: 22rem;
  background: radial-gradient(circle, rgba(78, 140, 255, 0.16), transparent 68%);
  pointer-events: none;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.35rem;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow span { width: 1.4rem; height: 2px; background: currentColor; }

.hero h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3.2rem, 7.4vw, 7.2rem);
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.hero h1 em { color: var(--red); font-style: normal; }

.hero-summary {
  max-width: 690px;
  margin: 2rem 0 0;
  color: #b5c1d0;
  font-size: clamp(1.05rem, 1.55vw, 1.32rem);
  line-height: 1.65;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.1rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3.1rem;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--blue); color: #07101e; }
.button-primary:hover { background: #75a7ff; }
.button-secondary { border-color: var(--line); background: rgba(14, 19, 28, 0.78); }
.button-secondary:hover { border-color: #53637a; }

.signal-panel {
  position: relative;
  z-index: 1;
  padding: 1.2rem;
  background: linear-gradient(145deg, rgba(20, 27, 38, 0.96), rgba(11, 15, 23, 0.96));
  border: 1px solid var(--line);
  box-shadow: 18px 18px 0 rgba(78, 140, 255, 0.06);
}

.panel-topline, .panel-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.panel-topline { padding-bottom: 1rem; border-bottom: 1px solid var(--line-soft); }
.panel-state { color: #bfe8d3; }
.panel-state i {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.35rem;
  background: #5dd49c;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(93, 212, 156, 0.09);
}

.metric-main { display: flex; align-items: flex-end; gap: 1rem; padding: 1.7rem 0; }
.metric-main strong { color: #fff; font-size: clamp(3.6rem, 7vw, 5.3rem); line-height: 0.78; letter-spacing: -0.08em; }
.metric-main span { color: var(--muted); font-size: 0.82rem; line-height: 1.45; }

.signal-list { margin: 0; border-top: 1px solid var(--line-soft); }
.signal-list div {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.signal-list dt { color: var(--muted); font-size: 0.78rem; }
.signal-list dd { margin: 0; color: #dbe3ee; font-size: 0.82rem; font-weight: 700; text-align: right; }
.panel-foot { padding-top: 1rem; }

.hero-index {
  position: absolute;
  bottom: 1.3rem;
  right: 0;
  color: #536077;
  font: 700 0.68rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.18em;
}

.section {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: clamp(5.5rem, 10vw, 9rem) 0;
  border-top: 1px solid var(--line-soft);
}

.section-heading { display: grid; grid-template-columns: 0.65fr 1.35fr; gap: 2rem; align-items: start; margin-bottom: 3rem; }
.section-heading h2, .delivery h2, .foundation h2 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.expertise-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.expertise-card { min-height: 25rem; padding: 1.6rem; background: rgba(14, 19, 28, 0.82); }
.expertise-card + .expertise-card { border-left: 1px solid var(--line); }
.card-number { color: var(--red); font: 800 0.74rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.expertise-card h3 { margin: 4.5rem 0 1rem; font-size: 1.45rem; letter-spacing: -0.025em; }
.expertise-card p { margin: 0; color: var(--muted); }
.expertise-card ul { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.expertise-card li { padding: 0.36rem 0.55rem; border: 1px solid var(--line); color: #c8d2df; font: 700 0.7rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.delivery { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(3rem, 8vw, 7rem); align-items: center; }
.delivery-copy > p:last-child { max-width: 590px; margin: 1.5rem 0 0; color: var(--muted); font-size: 1.05rem; }
.pipeline { position: relative; margin: 0; padding: 0; list-style: none; }
.pipeline::before { content: ""; position: absolute; top: 1rem; bottom: 1rem; left: 1.25rem; width: 1px; background: linear-gradient(var(--blue), var(--red)); }
.pipeline li { position: relative; display: grid; grid-template-columns: 2.5rem 1fr; gap: 0 1.1rem; padding: 0.8rem 0 0.8rem 4rem; }
.pipeline li::before { content: ""; position: absolute; top: 1.55rem; left: 1rem; width: 0.55rem; height: 0.55rem; background: var(--surface); border: 2px solid var(--blue); transform: rotate(45deg); }
.pipeline li:nth-child(4)::before, .pipeline li:nth-child(5)::before { border-color: var(--red); }
.pipeline li > span { color: #526179; font: 700 0.7rem/2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pipeline strong { font-size: 1.02rem; }
.pipeline small { grid-column: 2; color: var(--muted); font-size: 0.82rem; }

.outcome-list { border-top: 1px solid var(--line); }
.outcome {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: clamp(2rem, 6vw, 6rem);
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}
.outcome-label { display: flex; flex-direction: column; gap: 0.35rem; }
.outcome-label span { color: var(--cyan); font: 800 0.75rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.08em; text-transform: uppercase; }
.outcome-label small { color: #596a82; font-size: 0.76rem; }
.outcome h3 { margin: 0 0 0.75rem; font-size: clamp(1.35rem, 2.5vw, 2rem); letter-spacing: -0.035em; }
.outcome p { max-width: 760px; margin: 0; color: var(--muted); }

.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.project-card { position: relative; overflow: hidden; min-height: 36rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color 180ms ease, transform 180ms ease; }
.project-card:hover { transform: translateY(-4px); border-color: #526279; }
.project-meta { display: flex; justify-content: space-between; color: var(--muted); font: 700 0.72rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: 0.08em; }
.project-meta span:last-child { color: #fff; font-size: 1rem; }
.project-visual { position: relative; height: 15rem; margin: 2rem -1.5rem 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: #111722; }
.project-visual svg { position: absolute; left: 0; bottom: 0; width: 100%; overflow: visible; }
.project-visual path { fill: none; stroke: var(--yellow); stroke-width: 3; vector-effect: non-scaling-stroke; }
.project-visual path.area { fill: rgba(243, 182, 63, 0.09); stroke: none; }
.sun-disc { position: absolute; top: 2.7rem; right: 4.5rem; width: 3.8rem; height: 3.8rem; background: var(--yellow); border-radius: 50%; box-shadow: 0 0 0 1.2rem rgba(243, 182, 63, 0.06), 0 0 4rem rgba(243, 182, 63, 0.22); }
.project-copy { padding-top: 2rem; }
.project-copy p { margin: 0 0 0.5rem; color: var(--cyan); font: 700 0.72rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: 0.1em; }
.project-copy h3 { margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -0.05em; }
.project-copy > span { display: block; max-width: 520px; margin-top: 1rem; color: var(--muted); }

.bitcoin-visual { display: grid; place-content: center; background: #0c1119; }
.bitcoin-visual strong { position: relative; z-index: 2; color: #fff; font: 800 clamp(2.8rem, 6vw, 5rem)/0.9 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: -0.08em; }
.bitcoin-visual small { position: relative; z-index: 2; margin-top: 0.8rem; color: var(--muted); font: 700 0.72rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.12em; text-align: right; text-transform: uppercase; }
.block { position: absolute; width: 5.4rem; height: 5.4rem; border: 1px solid rgba(78, 140, 255, 0.35); transform: rotate(30deg) skew(-8deg); }
.block-a { top: 1.8rem; left: 3.2rem; }
.block-b { right: 3rem; bottom: 2rem; border-color: rgba(243, 75, 89, 0.45); }
.block-c { top: 2.5rem; right: 7.5rem; width: 2.4rem; height: 2.4rem; border-color: rgba(103, 212, 232, 0.35); }

.foundation { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 8vw, 8rem); }
.foundation-list { border-top: 1px solid var(--line); }
.foundation-list p { margin: 0; padding: 1rem 0; border-bottom: 1px solid var(--line); color: #c8d2df; }

.site-footer { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; padding: 2rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; }
.site-footer > div { display: flex; align-items: center; gap: 0.9rem; }
.site-footer p { margin: 0; }
.site-footer strong { color: #fff; }
.site-footer a { color: #dce5f1; font-weight: 800; text-decoration: none; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 620ms ease, transform 620ms ease; }
.reveal.visible { opacity: 1; transform: none; }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 5.5rem; }
  .hero h1 { max-width: 10ch; }
  .signal-panel { max-width: 620px; }
  .section-heading, .delivery, .foundation, .outcome { grid-template-columns: 1fr; }
  .expertise-grid { grid-template-columns: 1fr; }
  .expertise-card { min-height: 0; }
  .expertise-card + .expertise-card { border-left: 0; border-top: 1px solid var(--line); }
  .expertise-card h3 { margin-top: 2.4rem; }
}

@media (max-width: 700px) {
  .site-header { width: min(calc(100% - 1.5rem), var(--max)); }
  .nav-toggle { display: grid; width: 2.7rem; height: 2.7rem; place-content: center; gap: 0.35rem; border: 1px solid var(--line); background: var(--surface); color: #fff; }
  .nav-toggle > span:not(.sr-only) { width: 1.1rem; height: 2px; background: currentColor; }
  .site-nav { position: absolute; top: calc(100% + 1px); left: 0; right: 0; display: none; align-items: stretch; padding: 1rem; background: #0b1018; border: 1px solid var(--line); box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.35); }
  .site-nav.open { display: grid; }
  .site-nav a { padding: 0.6rem; }
  .hero, .section, .site-footer { width: min(calc(100% - 1.5rem), var(--max)); }
  .hero { padding-bottom: 4.5rem; }
  .hero h1 { font-size: clamp(3rem, 15vw, 5rem); }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .panel-foot { flex-direction: column; }
  .work-grid { grid-template-columns: 1fr; }
  .outcome { gap: 1.25rem; }
  .project-card { min-height: 32rem; }
  .project-visual { height: 12rem; }
  .site-footer { grid-template-columns: 1fr; }
}

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