:root {
  --space: #040922;
  --indigo: #0c1846;
  --nebula: #5b7cff;
  --nebula-soft: rgba(91, 124, 255, 0.35);
  --moonlight: #dfe6ff;
  --mist: #a9b5e0;
  --ember: #ffb46a;
  --line: rgba(160, 182, 255, 0.28);
  --line-strong: rgba(170, 192, 255, 0.55);

  --display: "Michroma", "Eurostile", "Arial Black", sans-serif;
  --body: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 64px);
  --max: 1440px;
}

*, *::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: var(--space);
  color: var(--moonlight);
  font: 300 1rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
strong { font-weight: 600; color: #fff; }

.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;
}

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

/* ---------- Sky ---------- */

.starfield {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: -2;
}

.nebula {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 22% 30%, rgba(60, 98, 255, 0.28), transparent 70%),
    radial-gradient(40% 30% at 88% 14%, rgba(150, 110, 255, 0.22), transparent 70%),
    radial-gradient(70% 40% at 100% 60%, rgba(44, 70, 190, 0.30), transparent 70%),
    radial-gradient(70% 45% at 0% 85%, rgba(44, 70, 190, 0.30), transparent 70%),
    linear-gradient(180deg, #030716 0%, var(--space) 30%, var(--indigo) 100%);
}

body::after {
  /* the horizon from the artwork, anchored to the bottom of the page */
  content: "";
  display: block;
  height: clamp(70px, 9vw, 150px);
  background: url(/assets/horizon.jpg) center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 60%);
          mask-image: linear-gradient(to bottom, transparent, #000 60%);
}

/* ---------- Type ---------- */

.wordmark {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  line-height: 1;
  white-space: nowrap;
}

.section-title {
  margin: 0 0 0.9rem;
  font: 400 clamp(0.9rem, 1.1vw, 1.05rem)/1.3 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: #fff;
}

.wave { overflow: visible; }

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

.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: clamp(16px, 3vw, 48px);
  padding: 12px max(var(--gutter), (100% - var(--max)) / 2 + var(--gutter));
  background: linear-gradient(180deg, rgba(3, 7, 22, 0.92), rgba(3, 7, 22, 0.6));
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}

.site-header::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.brand {
  display: flex; align-items: center; gap: 16px;
  text-decoration: none;
  margin-right: auto;
}

.brand-mark {
  width: 64px; height: 64px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-strong), 0 0 24px var(--nebula-soft);
}

.brand-text { display: grid; gap: 6px; }
.brand-text .wordmark { font-size: 1rem; }
.wave-small { width: 100%; height: 12px; }

.site-nav { display: flex; gap: clamp(20px, 3.4vw, 56px); }

.site-nav a {
  position: relative;
  padding: 8px 0;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mist);
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: #fff; }

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute; left: -6px; right: -6px; bottom: -2px; height: 2px;
  border-radius: 2px;
  background: radial-gradient(closest-side, #9fb5ff, transparent);
  box-shadow: 0 0 12px var(--nebula);
}

.nav-toggle { display: none; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  font: 600 0.95rem/1 var(--body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: box-shadow 0.25s, background-color 0.25s, transform 0.25s;
}

.btn .i { width: 18px; height: 18px; flex: none; }

.btn-solid {
  color: #0a1338;
  background: linear-gradient(180deg, #f2f5ff 0%, #b9c7ff 55%, #8ea4ff 100%);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(200, 214, 255, 0.7), 0 8px 30px rgba(91, 124, 255, 0.45);
}

.btn-solid:hover { box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #fff, 0 10px 40px rgba(120, 150, 255, 0.7); }

.btn-ghost {
  color: #fff;
  background: rgba(10, 20, 60, 0.35);
  box-shadow: inset 0 0 0 1.5px var(--line-strong), 0 0 18px rgba(91, 124, 255, 0.18);
}

.btn-ghost:hover { background: rgba(40, 60, 150, 0.4); box-shadow: inset 0 0 0 1.5px #c9d5ff, 0 0 26px rgba(91, 124, 255, 0.4); }

.btn-small { min-height: 40px; padding: 0 22px; font-size: 0.8rem; }
.btn-small .i { width: 14px; height: 14px; }

.brand-icon {
  display: inline-block;
  width: 22px; height: 22px; flex: none;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
}

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

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(8px, 2vw, 24px) var(--gutter) clamp(24px, 3vw, 40px);
}

.hero-art { position: relative; }

.hero-art img {
  width: 100%;
  height: auto;
  -webkit-mask-image: radial-gradient(62% 62% at 50% 54%, #000 62%, transparent 100%);
          mask-image: radial-gradient(62% 62% at 50% 54%, #000 62%, transparent 100%);
}

.hero-art::after {
  /* ember glow where the orbits cross */
  content: "";
  position: absolute; left: 30%; right: 30%; bottom: 14%; height: 14%;
  background: radial-gradient(closest-side, rgba(255, 180, 106, 0.35), transparent);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: breathe 6s ease-in-out infinite;
}

.hero-copy { text-align: center; container-type: inline-size; }

.hero-title { margin: 0; display: grid; justify-items: center; gap: clamp(10px, 1.4vw, 18px); font-weight: 400; }

.wordmark-xl {
  font-size: min(5.2cqi, 3rem); /* sized to the column so it never overflows */
  letter-spacing: 0.3em;
  margin-right: -0.3em; /* recentre: tracking adds trailing space */
  color: #f4f6ff;
  text-shadow: 0 0 24px rgba(160, 185, 255, 0.45);
  background: linear-gradient(180deg, #ffffff 30%, #9fb0e8 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wave-large { width: min(78%, 420px); height: 24px; }

.tagline {
  font-family: var(--display);
  font-size: min(6.6cqi, 3.3rem);
  line-height: 1.22;
  display: inline-block;
  transform: skewX(-12deg); /* Michroma has no italic; slant it like the mockup */
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 0 2px #fff, 0 0 26px rgba(130, 160, 255, 0.75);
}

.lede {
  max-width: 34em;
  margin: clamp(16px, 2vw, 28px) auto 0;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  color: #e3e9ff;
}

.hero-actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 28px;
  margin-top: clamp(24px, 3vw, 40px);
}

.hero-actions .btn { min-width: 236px; min-height: 52px; }

/* one orchestrated entrance */
@media (prefers-reduced-motion: no-preference) {
  .hero-art img { animation: rise 1.6s cubic-bezier(.2,.7,.2,1) both; }
  .hero-copy > * { animation: fade 1.2s ease-out both; }
  .hero-title { animation-delay: 0.35s !important; }
  .lede { animation-delay: 0.6s !important; }
  .hero-actions { animation-delay: 0.8s !important; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art::after { animation: none; }
}

@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.98); filter: blur(6px); } }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }
@keyframes breathe { 50% { opacity: 0.55; } }

/* ---------- Tiles ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 26px);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  scroll-margin-top: 110px;
}

.tile {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: 14px;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(14, 26, 78, 0.65), rgba(6, 12, 40, 0.85));
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 18px 40px rgba(0, 0, 0, 0.35);
  scroll-margin-top: 110px;
  transition: box-shadow 0.3s;
}

.tile img {
  width: 100%;
  height: auto;
  aspect-ratio: 3.6 / 1;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
          mask-image: linear-gradient(to bottom, #000 55%, transparent);
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}

.tile-body {
  display: grid; align-content: start; gap: 4px;
  padding: 2px 54px 20px 20px;
  margin-top: -14px;
  position: relative;
}

.tile-title {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600;
  font-size: clamp(0.86rem, 1.05vw, 1.05rem);
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-transform: uppercase;
  color: #fff;
}

.tile-title .i { width: 26px; height: 26px; flex: none; color: #dfe6ff; }

.tile-text { font-size: 0.85rem; color: var(--mist); padding-left: 38px; }

.tile-go {
  position: absolute; right: 18px; bottom: 22px;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: background-color 0.3s, box-shadow 0.3s;
}

.tile-go svg { width: 16px; height: 16px; }

.tile:hover { box-shadow: inset 0 0 0 1px #c9d5ff, 0 0 0 1px rgba(91, 124, 255, 0.4), 0 20px 50px rgba(40, 70, 200, 0.35); }
.tile:hover img { transform: scale(1.04); }
.tile:hover .tile-go { background: var(--moonlight); color: var(--space); box-shadow: 0 0 18px var(--nebula); }

/* ---------- About + orbit ---------- */

.lower {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  max-width: var(--max);
  margin: clamp(40px, 5vw, 64px) auto 0;
  padding: clamp(28px, 3.5vw, 44px) var(--gutter) 0;
  position: relative;
}

.lower::before {
  content: "";
  position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.about {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
  padding-right: clamp(24px, 4vw, 64px);
  scroll-margin-top: 110px;
}

.about-mark {
  width: clamp(96px, 10vw, 146px); height: auto;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-strong), 0 0 40px var(--nebula-soft);
}

.about > div { padding-left: clamp(20px, 3vw, 40px); border-left: 1px solid var(--line); }
.about p { margin: 0; max-width: 36em; color: #e3e9ff; }

.orbit {
  padding-left: clamp(24px, 4vw, 64px);
  border-left: 1px solid var(--line);
  scroll-margin-top: 110px;
}

.orbit > p { margin: 0 0 22px; max-width: 30em; color: #e3e9ff; }

.btn-wide { width: 100%; max-width: 520px; }
.btn-wide .brand-icon { width: 24px; height: 24px; color: #d6203a; }

.follow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px;
  margin-top: 28px;
}

.follow-label {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e3e9ff;
}

.socials { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }

.socials a {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: #f2f5ff;
  transition: color 0.2s, background-color 0.2s;
}

.socials a:hover { background: rgba(91, 124, 255, 0.2); color: #fff; }
.socials .brand-icon { width: 24px; height: 24px; }

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 64px) var(--gutter) 0;
  font-size: 0.8rem;
  color: var(--mist);
  text-align: center;
}

.site-footer p { margin: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-cta { display: none; }
}

@media (max-width: 960px) {
  .brand-mark { width: 52px; height: 52px; }
  .brand-text .wordmark { font-size: 0.85rem; }

  .nav-toggle {
    display: grid; align-content: center; gap: 6px;
    width: 44px; height: 44px; padding: 0 10px;
    background: none; border: 0; border-radius: 50%; cursor: pointer;
    box-shadow: inset 0 0 0 1px var(--line-strong);
  }
  .nav-toggle span:not(.sr-only) { display: block; height: 1.5px; background: var(--moonlight); transition: transform 0.25s; }
  .nav-toggle[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(3.75px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-of-type(3) { transform: translateY(-3.75px) rotate(-45deg); }

  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    padding: 8px var(--gutter) 20px;
    background: rgba(3, 7, 22, 0.96);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 0; font-size: 0.95rem; border-bottom: 1px solid rgba(160, 182, 255, 0.12); }
  .site-nav a[aria-current="page"]::after { display: none; }

  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-art { max-width: 620px; margin: 0 auto; width: 100%; }
  .hero-copy { margin-top: -6%; }

  .lower { grid-template-columns: 1fr; row-gap: 44px; }
  .about { padding-right: 0; }
  .orbit { padding-left: 0; border-left: 0; padding-top: 44px; border-top: 1px solid var(--line); }
}

@media (max-width: 600px) {
  .brand-text .wordmark { font-size: 0.72rem; letter-spacing: 0.24em; }
  .wordmark-xl { letter-spacing: 0.22em; margin-right: -0.22em; }
  .tiles { grid-template-columns: 1fr; }
  .hero-actions .btn { min-width: 0; width: 100%; }
  .about { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .about > div { padding-left: 0; border-left: 0; }
  .about p { margin-inline: auto; }
  .orbit { text-align: center; }
  .orbit > p { margin-inline: auto; }
  .follow { justify-content: center; flex-direction: column; }
}
