/* Mabute – mabute.com
   Tokens follow the Mabute design system: one family (Hanken Grotesk),
   six type steps, one radius, ice blue only as a signal. */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #05070b;
  --surface: #0d1117;
  --surface-raised: #151b24;
  --ink: #f1f1ee;
  --muted: #a9b0c4;
  --subtle: #7e869c;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.35);
  --accent: #8ed8ff;
  --on-accent: #05070b;
  --nebula-indigo: 58, 52, 168;
  --nebula-violet: 168, 84, 210;
  --nebula-ice: 142, 216, 255;
  --nebula-lime: 198, 227, 61;

  --radius: 16px;
  --wrap: 1320px;
  --pad: clamp(20px, 4vw, 56px);
  --section: clamp(80px, 11vw, 160px);

  --font: "Hanken Grotesk", Arial, sans-serif;
  --fs-display: clamp(44px, 6vw, 88px);
  --fs-headline: clamp(36px, 4.8vw, 68px);
  --fs-title: 32px;
  --fs-label: 22px;
  --fs-body: 17px;
  --fs-small: 14px;

  color-scheme: dark;
}

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

html {
  background: var(--ground);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, dl, dd, ol { margin: 0; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

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

/* ---------- Type scale ---------- */
.t-display  { font-size: var(--fs-display);  line-height: 1.0;  font-weight: 400; letter-spacing: -0.045em; }
.t-headline { font-size: var(--fs-headline); line-height: 1.06; font-weight: 400; letter-spacing: -0.04em; }
.t-title    { font-size: var(--fs-title);    line-height: 1.1;  font-weight: 500; letter-spacing: -0.03em; }
.t-label    { font-size: var(--fs-label);    line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; }
.t-small    { font-size: var(--fs-small);    line-height: 1.4; }
.muted  { color: var(--muted); }
.subtle { color: var(--subtle); }
.accent { color: var(--accent); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding-bottom: var(--section); }
.section > .wrap, .section.wrap { display: flex; flex-direction: column; gap: 40px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 26px; border: 0; border-radius: var(--radius);
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: #b8e8ff; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn--small { min-height: 48px; padding: 0 22px; }

/* ---------- Space backdrop ---------- */
.stars {
  position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 64%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 41% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 78%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 73% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 86% 48%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 82%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 88%, rgba(255,255,255,.5) 50%, transparent 51%);
  background-size: 240px 240px;
}

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 5; }
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 32px;
  padding-top: max(32px, env(safe-area-inset-top)); padding-bottom: 32px;
}
.logo { display: inline-flex; align-items: center; color: var(--ink); }
.logo svg { width: 118px; height: auto; }
.nav { display: flex; align-items: center; gap: 8px 32px; }
.nav a:not(.btn) { text-decoration: none; }
.nav a:not(.btn):hover { color: var(--accent); }
.nav__lang { color: var(--muted); }
.menu-btn {
  display: none; align-items: center; justify-content: center; width: 48px; height: 48px;
  padding: 0; border: 0; border-radius: var(--radius); cursor: pointer;
  background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); color: var(--ink);
}
.mobile-menu {
  display: flex; flex-direction: column; gap: 4px; padding: 8px; margin-bottom: 16px;
  border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--fs-label); font-weight: 500;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a { display: flex; align-items: center; min-height: 52px; padding: 0 16px; text-decoration: none; }
.mobile-menu .btn { margin-top: 4px; }

@media (max-width: 760px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero { position: relative; }
.hero__nebula {
  position: absolute; left: -10%; right: -10%; top: -10%; height: 120%; pointer-events: none; filter: blur(18px);
  background:
    radial-gradient(ellipse 22% 18% at 64% 42%, rgba(228,246,255,.85) 0%, transparent 70%),
    radial-gradient(ellipse 34% 26% at 61% 46%, rgba(var(--nebula-ice),.5) 0%, transparent 72%),
    radial-gradient(ellipse 28% 38% at 75% 58%, rgba(var(--nebula-lime),.22) 0%, transparent 72%),
    radial-gradient(ellipse 46% 34% at 47% 62%, rgba(var(--nebula-indigo),.55) 0%, transparent 74%),
    radial-gradient(ellipse 30% 26% at 83% 26%, rgba(var(--nebula-violet),.38) 0%, transparent 72%);
}
.hero__dots {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(circle, rgba(228,246,255,.8) 0 1.2px, transparent 1.6px);
  background-size: 7px 7px;
  -webkit-mask-image: radial-gradient(ellipse 26% 24% at 64% 44%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse 26% 24% at 64% 44%, #000 0%, transparent 70%);
}
.hero__content {
  position: relative; display: flex; flex-direction: column; gap: 28px; max-width: 680px;
  padding: clamp(64px, 11vw, 180px) 0 clamp(96px, 14vw, 220px);
}
.hero__lead { max-width: 26em; color: #c9cedb; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Statement ---------- */
.statement { padding: clamp(40px, 6vw, 96px) 0 var(--section); }
.statement p { max-width: 18em; font-size: var(--fs-headline); line-height: 1.12; letter-spacing: -0.035em; }

/* ---------- Cards ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 380px; padding: 32px; border-radius: var(--radius);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
}
.card__body { display: flex; flex-direction: column; gap: 10px; }
.card__body p { color: var(--muted); }

/* ---------- Stance ---------- */
.stance {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 32px 64px; align-items: end;
  padding-top: clamp(40px, 5vw, 80px); padding-bottom: clamp(120px, 15vw, 220px); border-top: 1px solid var(--line);
}
.stance h2 { max-width: 12em; }
.stance p { max-width: 28em; color: var(--muted); }

/* ---------- Process ---------- */
.process__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.process__inner { min-width: 880px; display: flex; flex-direction: column; gap: 28px; }
.process__band { display: block; width: 100%; height: auto; }
.stages { padding: 0; list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.stage { display: flex; flex-direction: column; gap: 6px; }
.stage p { color: var(--muted); }
.stage__ventures { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.marker { display: flex; align-items: center; gap: 10px; }
.marker::before { content: ""; flex: 0 0 10px; height: 10px; border-radius: 50%; }
.marker--run::before { background: var(--accent); }
.marker--dev { color: var(--muted); }
.marker--dev::before { box-shadow: inset 0 0 0 1.5px var(--accent); }
.marker--open { color: var(--subtle); }
.marker--open::before { box-shadow: inset 0 0 0 1.5px var(--subtle); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: var(--fs-small); color: var(--muted); }
.legend .marker::before { flex-basis: 8px; height: 8px; }

/* ---------- Ventures ---------- */
.venture {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 32px 56px; align-items: center; padding: 40px 0; border-top: 1px solid var(--line);
}
.venture--flip .shot { order: 2; }
.venture__text { display: flex; flex-direction: column; gap: 24px; }
.venture__name { display: flex; flex-direction: column; gap: 6px; }
.facts { display: grid; grid-template-columns: minmax(0, 130px) minmax(0, 1fr); gap: 12px 20px; }
.facts dt { font-weight: 700; }
.facts dd { color: var(--muted); }
.venture__foot {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding-top: 20px; border-top: 1px solid var(--line);
}
.proof { display: flex; flex-direction: column; gap: 4px; }
.proof__value { font-size: var(--fs-title); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; color: var(--accent); }

.shot { display: flex; flex-direction: column; gap: 12px; }
.shot__stage {
  position: relative; perspective: 1800px;
  padding: clamp(24px, 4vw, 56px) clamp(12px, 3vw, 40px) clamp(56px, 6vw, 88px);
}
.shot__nebula { position: absolute; inset: -10% -6%; filter: blur(24px); pointer-events: none; }
.shot__nebula--tc { background: radial-gradient(ellipse 60% 55% at 70% 40%, rgba(var(--nebula-ice),.45) 0%, rgba(var(--nebula-indigo),.35) 45%, transparent 75%); }
.shot__nebula--si { background: radial-gradient(ellipse 60% 55% at 30% 45%, rgba(var(--nebula-violet),.38) 0%, rgba(var(--nebula-indigo),.35) 45%, transparent 75%); }
.shot__nebula--ou { background: radial-gradient(ellipse 60% 55% at 65% 60%, rgba(var(--nebula-lime),.22) 0%, rgba(var(--nebula-ice),.3) 35%, rgba(var(--nebula-indigo),.3) 55%, transparent 78%); }
.shot__dots {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(circle, rgba(228,246,255,.5) 0 1px, transparent 1.4px); background-size: 9px 9px;
  -webkit-mask-image: radial-gradient(ellipse 45% 40% at 50% 45%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse 45% 40% at 50% 45%, #000 0%, transparent 70%);
}
.shot__frame {
  position: relative; padding: 10px; border-radius: var(--radius);
  background: rgba(13,17,23,.85);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 40px 80px rgba(0,0,0,.55);
  transform: rotateY(-12deg) rotateX(5deg);
}
.venture--flip .shot__frame { transform: rotateY(12deg) rotateX(5deg); }
.shot__screen { position: relative; overflow: hidden; border-radius: var(--radius); }
.shot__screen img { width: 100%; border-radius: var(--radius); }
.shot__overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.shot__lupe { position: absolute; right: 0; bottom: 8px; width: min(240px, 46%); }
.venture--flip .shot__lupe { right: auto; left: 0; }
.shot__lupe svg {
  display: block; width: 100%; height: auto; overflow: visible;
  filter: drop-shadow(0 0 16px rgba(var(--nebula-ice),.3)) drop-shadow(0 24px 28px rgba(0,0,0,.5));
}
.shot figcaption { font-size: var(--fs-small); color: var(--muted); }

@media (max-width: 760px) {
  .shot__frame, .venture--flip .shot__frame { transform: rotateY(-6deg) rotateX(3deg); }
  .venture--flip .shot { order: 0; }
  .facts { grid-template-columns: 1fr; gap: 4px; }
  .facts dd { margin-bottom: 10px; }
}

.signature { padding: 48px 0 64px; border-top: 1px solid var(--line); }
.dev { display: flex; flex-direction: column; gap: 20px; padding-top: 40px; border-top: 1px solid var(--line); }
.dev__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.dev__card {
  display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: var(--radius);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
}
.dev__card p { color: var(--muted); }

/* ---------- Contact ---------- */
.contact { position: relative; overflow: hidden; }
.contact__bg { position: absolute; inset: 0; pointer-events: none; }
.contact__bg img { width: 100%; height: 100%; object-fit: cover; }
.contact__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--ground) 0%, rgba(5,7,11,.35) 22%, rgba(5,7,11,.35) 78%, var(--ground) 100%),
    linear-gradient(90deg, rgba(5,7,11,.75) 0%, rgba(5,7,11,.1) 55%);
}
.contact__inner {
  position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 40px;
  padding-top: var(--section); padding-bottom: var(--section);
}
.contact__intro { flex: 0 1 560px; display: flex; flex-direction: column; gap: 20px; }
.contact__intro p { max-width: 26em; color: #c9cedb; }
.contact__intro .themes { color: var(--ink); }

.form {
  flex: 0 1 460px; display: flex; flex-direction: column; gap: 12px;
  padding: clamp(24px, 3vw, 36px); border-radius: var(--radius);
  background: rgba(13,17,23,.82); box-shadow: inset 0 0 0 1px var(--line);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.form label { margin-top: 12px; }
.form label:first-of-type { margin-top: 0; }
.form input, .form textarea {
  width: 100%; min-height: 54px; padding: 0 18px; border: 0; border-radius: var(--radius);
  background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: inherit;
}
.form textarea { padding: 14px 18px; resize: vertical; min-height: 120px; }
.form input:hover, .form textarea:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.form input[aria-invalid="true"], .form textarea[aria-invalid="true"] { box-shadow: inset 0 0 0 1px #ff8f8f; }
.form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__note { font-size: var(--fs-small); color: var(--muted); }
.form__note a { color: var(--ink); }
.form .btn { margin-top: 8px; }
.form .btn[disabled] { opacity: .6; cursor: progress; }
.form__status { min-height: 1.4em; font-size: var(--fs-body); }
.form__status--ok { color: var(--accent); }
.form__status--error { color: #ffb4b4; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer__inner {
  display: flex; flex-direction: column; gap: 56px;
  padding-top: clamp(56px, 7vw, 96px); padding-bottom: max(48px, env(safe-area-inset-bottom));
}
.site-footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.site-footer__brand { flex: 0 1 600px; display: flex; flex-direction: column; gap: 20px; }
.site-footer__brand svg { width: 180px; height: auto; color: var(--ink); }
.site-footer__cols { display: flex; flex-wrap: wrap; gap: 40px 64px; }
.site-footer__col { display: flex; flex-direction: column; gap: 6px; }
.site-footer__col a { text-decoration: none; }
.site-footer__col a:hover { color: var(--accent); }

/* ---------- Legal pages ---------- */
.legal { padding-top: 40px; padding-bottom: var(--section); max-width: 820px; }
.legal h1 { margin-bottom: 40px; }
.legal h2 { margin: 48px 0 12px; font-size: var(--fs-label); font-weight: 700; letter-spacing: -0.02em; }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: 12px; }
.todo { color: #ffd38a; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Header sits over the hero */
.site-header { position: absolute; left: 0; right: 0; top: 0; }
.hero { position: relative; overflow: hidden; padding-top: 112px; }
.hero > .wrap { position: relative; }
.stars--page { position: absolute; top: 0; left: 0; right: 0; height: 600px; z-index: 0; }
.legal { position: relative; z-index: 1; padding-top: 160px; }
main { overflow-x: clip; }
.shot__stage { padding-left: clamp(8px, 2vw, 24px); padding-right: clamp(8px, 2vw, 24px); }
.legal .todo, .legal .todo * { color: #ffd38a; }
