:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255, 255, 255, 0.52);
  --faint: rgba(255, 255, 255, 0.28);
  --line: rgba(255, 255, 255, 0.14);
  --pad: clamp(20px, 4vw, 56px);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
::selection { background: #fff; color: #000; }

#galaxy {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
  transition: opacity .4s linear;
}

/* Keeps text readable over the galaxy */
.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 0% 100%, rgba(0,0,0,.78) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,0) 70%),
    linear-gradient(to bottom, rgba(0,0,0,.55) 0, rgba(0,0,0,0) 120px);
}

.nav, main, .footer { position: relative; z-index: 2; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--pad);
  font-size: 13px;
  letter-spacing: .02em;
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease, padding .3s ease;
}
/* Once the page scrolls, the bar gets a solid backdrop so content passing under it never mixes with the logo */
.nav.is-scrolled {
  padding-top: 16px;
  padding-bottom: 16px;
  background-color: rgba(0, 0, 0, .82);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav.is-scrolled { background-color: rgba(0, 0, 0, .96); }
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .14em; }
.nav-links { display: flex; gap: clamp(18px, 3vw, 36px); color: var(--muted); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--fg); }
.arrow { display: inline-block; margin-left: 4px; transition: transform .25s ease; }
a:hover .arrow { transform: translate(2px, -2px); }

/* ---------- Shared ---------- */
.label {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero .label { text-transform: none; font-family: var(--sans); font-size: 15px; letter-spacing: .02em; }

.section, .statement, .hero, .footer { padding-left: var(--pad); padding-right: var(--pad); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 120px;
  padding-bottom: clamp(28px, 5vh, 56px);
}
.hero h1 {
  margin: 10px 0 clamp(24px, 4vh, 44px) -0.06em;
  font-size: clamp(68px, 17vw, 260px);
  font-weight: 600;
  line-height: .86;
  letter-spacing: -0.045em;
}
.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.tagline {
  margin: 0;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll { display: inline-flex; gap: 8px; color: var(--fg); }
.scroll span { animation: drift 2.4s ease-in-out infinite; }
@keyframes drift { 50% { transform: translateY(4px); } }

/* ---------- Products ---------- */
.section { padding-top: clamp(96px, 16vh, 180px); padding-bottom: clamp(48px, 8vh, 96px); }
.section-head { display: flex; justify-content: space-between; margin-bottom: 20px; }

.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.product {
  position: relative;
  min-height: clamp(280px, 42vh, 420px);
  padding: clamp(20px, 2.4vw, 32px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(0, 0, 0, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background .35s ease;
}
a.product:hover { background: rgba(14, 14, 14, .78); }
.idx { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: .08em; }
.product h2 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}
.product-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}
.product .link { color: var(--fg); }

/* ---------- Vision ---------- */
.vision-statement {
  margin: clamp(24px, 6vh, 64px) 0 clamp(56px, 10vh, 112px);
  max-width: 17em;
  font-size: clamp(34px, 5.4vw, 88px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
}
.js .vision-statement .w { opacity: .16; transition: opacity .35s ease; }
.js .vision-statement .w.on { opacity: 1; }

.vm {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 4vw, 64px);
}
.vm-item { border-top: 1px solid var(--line); padding-top: 18px; }
.vm-item p {
  margin: 14px 0 0;
  max-width: 26em;
  font-size: clamp(19px, 1.9vw, 26px);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* ---------- Principles ---------- */
.principles, .roadmap { list-style: none; margin: 0; padding: 0; }
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
}
.principles li { border-top: 1px solid var(--line); padding-top: 18px; }
.principles h3 {
  margin: clamp(40px, 8vh, 88px) 0 14px;
  font-size: clamp(30px, 3.4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}
.principles p, .roadmap p {
  margin: 0;
  max-width: 22em;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Direction ---------- */
.roadmap {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
  padding-top: 8px;
}
.roadmap::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 13px;
  height: 1px;
  background: linear-gradient(to right, #fff 0%, rgba(255,255,255,.3) 33%, rgba(255,255,255,.08) 100%);
}
.step { position: relative; }
.dot {
  display: block;
  width: 11px; height: 11px;
  margin-bottom: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.5);
  background: #000;
  position: relative;
}
.is-now .dot { background: #fff; border-color: #fff; box-shadow: 0 0 14px rgba(255,255,255,.8); }
.is-now .dot::after {
  content: "";
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.6);
  animation: ping 2.4s cubic-bezier(.2,.6,.3,1) infinite;
}
@keyframes ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.step h3 {
  margin: 12px 0 10px;
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.step:not(.is-now) h3 { color: rgba(255,255,255,.72); }

/* ---------- Statement ---------- */
.statement {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding-top: clamp(64px, 10vh, 120px);
  padding-bottom: clamp(64px, 10vh, 120px);
}
.statement p {
  margin: 0;
  font-size: clamp(40px, 7.4vw, 120px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -0.045em;
}
.statement span { color: rgba(255, 255, 255, .4); }

/* ---------- Contact ---------- */
.contact { padding-bottom: clamp(72px, 12vh, 140px); }
.contact-mail {
  display: inline-block;
  margin: clamp(24px, 6vh, 64px) 0 clamp(56px, 10vh, 112px);
  font-size: clamp(30px, 6.2vw, 104px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}
.contact-mail .arrow { margin-left: .12em; font-weight: 300; color: var(--muted); transition: transform .25s ease, color .25s ease; }
.contact-mail:hover .arrow { color: var(--fg); }
.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: clamp(24px, 4vw, 64px);
}
.contact-item { border-top: 1px solid var(--line); padding-top: 18px; }
.contact-item address, .contact-item p {
  margin: 14px 0 0;
  font-style: normal;
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.contact-item a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s ease; }
.contact-item a:hover { background-size: 100% 1px; }

/* ---------- Footer ---------- */
.footer {
  display: grid;
  grid-template-columns: 1.6fr 1fr auto;
  gap: 16px 32px;
  padding-top: 24px;
  padding-bottom: 28px;
  border-top: 1px solid var(--line);
  margin: 0 var(--pad);
  padding-left: 0;
  padding-right: 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .04em;
  color: var(--muted);
}
.footer-col { display: flex; flex-direction: column; gap: 4px; }
.footer-end { align-items: flex-end; }
.footer-brand { color: var(--fg); letter-spacing: .08em; }
.footer address { font-style: normal; }
.footer a { transition: color .2s; }
.footer a:hover { color: var(--fg); }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s ease, transform 1s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .scroll span, .is-now .dot::after { animation: none; }
  .js .vision-statement .w { opacity: 1; }
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .nav-links a:first-child { display: none; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .hero-meta { flex-direction: row; justify-content: space-between; width: 100%; }
  .products, .vm, .principles { grid-template-columns: 1fr; }
  .principles h3 { margin-top: 28px; }
  .statement br { display: none; }
  .statement p { text-wrap: balance; }
  .roadmap { grid-template-columns: 1fr; gap: 40px; padding-left: 28px; padding-top: 0; }
  .roadmap::before {
    left: 5px; right: auto; top: 6px; bottom: 0;
    width: 1px; height: auto;
    background: linear-gradient(to bottom, #fff 0%, rgba(255,255,255,.3) 33%, rgba(255,255,255,.08) 100%);
  }
  .dot { position: absolute; left: -28px; top: 1px; margin: 0; }
  .step h3 { margin-top: 8px; }
  .product { min-height: 240px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-item address br, .footer address br { display: none; }
  .footer { grid-template-columns: 1fr; gap: 14px; }
  .footer-end { align-items: flex-start; flex-direction: row; justify-content: space-between; }
  .veil {
    background:
      linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.4) 45%, rgba(0,0,0,0) 70%),
      linear-gradient(to bottom, rgba(0,0,0,.55) 0, rgba(0,0,0,0) 100px);
  }
}
