:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #16171a;
  --muted: #6b6f76;
  --line: #e7e6e3;
  --accent: #2f6bff;
  --accent-soft: rgba(47, 107, 255, 0.10);
  --shadow: 0 1px 2px rgba(16, 18, 24, 0.04), 0 8px 24px rgba(16, 18, 24, 0.06);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1012;
    --surface: #17181b;
    --text: #ececee;
    --muted: #9a9ca3;
    --line: #26282c;
    --accent: #6b95ff;
    --accent-soft: rgba(107, 149, 255, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
a { color: inherit; }

/* ── Loader ─────────────────────────────────────────── */
.loader {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-content: center; justify-items: center; gap: 28px;
  background: var(--bg);
  transition: opacity .6s ease, visibility .6s ease;
}
body.is-ready .loader { opacity: 0; visibility: hidden; }

.orbit {
  position: relative; width: 120px; height: 120px;
  perspective: 600px; transform-style: preserve-3d;
}
.ring {
  position: absolute; inset: 0;
  border: 1.5px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  transform-style: preserve-3d;
}
.ring i {
  position: absolute; top: -4px; left: 50%;
  width: 7px; height: 7px; margin-left: -3.5px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.ring-1 { animation: spin1 2.4s linear infinite; }
.ring-2 { inset: 14px; animation: spin2 2s linear infinite; opacity: .85; }
.ring-3 { inset: 28px; animation: spin3 1.6s linear infinite; opacity: .7; }
.core {
  position: absolute; top: 50%; left: 50%;
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes spin1 { from { transform: rotateX(65deg) rotateZ(0); } to { transform: rotateX(65deg) rotateZ(360deg); } }
@keyframes spin2 { from { transform: rotateY(65deg) rotateZ(0); } to { transform: rotateY(65deg) rotateZ(-360deg); } }
@keyframes spin3 { from { transform: rotateX(-40deg) rotateY(40deg) rotateZ(0); } to { transform: rotateX(-40deg) rotateY(40deg) rotateZ(360deg); } }
@keyframes pulse {
  0%, 100% { transform: scale(.8); box-shadow: 0 0 0 0 var(--accent-soft); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 14px transparent; }
}
.loader-label {
  margin: 0; font-size: 13px; font-weight: 500;
  letter-spacing: .28em; text-transform: uppercase; color: var(--muted);
  animation: fade 1.6s ease-in-out infinite;
}
@keyframes fade { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

/* ── Layout ─────────────────────────────────────────── */
.site-header, main, .site-footer {
  width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px;
}
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: -.01em; text-decoration: none;
}
.brand-mark {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--accent); position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent);
}
nav a {
  color: var(--muted); text-decoration: none; font-size: 15px;
  transition: color .2s;
}
nav a:hover { color: var(--text); }

.hero {
  padding: 96px 0 72px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 48px;
}
.hero-text { max-width: 640px; }

/* Where the loading rings settle after the intro */
.hero-orbit {
  --s: 2.2;                       /* size of the docked rings (1 = 120px) */
  width: calc(120px * var(--s)); height: calc(120px * var(--s));
  margin-right: 24px;
}
.hero-orbit .orbit { transform: scale(var(--s)); transform-origin: 0 0; }
.orbit-flying {
  position: fixed; z-index: 60; margin: 0;
  transform-origin: 0 0;
  transition: transform 1.1s cubic-bezier(.65, 0, .25, 1);
}
.eyebrow {
  margin: 0 0 16px; font-size: 13px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
h1 {
  margin: 0 0 20px; font-size: clamp(36px, 6vw, 60px);
  line-height: 1.05; letter-spacing: -.035em; font-weight: 700;
}
.lede { margin: 0; font-size: 18px; color: var(--muted); max-width: 560px; }

.tools { padding-bottom: 96px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-top: 1px solid var(--line); padding-top: 24px; margin-bottom: 24px;
}
h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.count { font-size: 14px; color: var(--muted); }

.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px; min-height: 170px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
a.card:hover .go { background: var(--accent); color: #fff; }
.card-soon { border-style: dashed; background: transparent; }
.card-soon h3 { color: var(--muted); }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.tag {
  font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.soon { font-size: 12px; color: var(--muted); }
.go {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--muted);
  transition: background .2s, color .2s;
}
.card h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.card p { margin: 0; font-size: 14px; color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 24px; padding-bottom: 40px;
  font-size: 14px; color: var(--muted);
}

/* Entrance animation once the loader is gone */
.hero-text, .card {
  opacity: 0; transform: translateY(12px);
}
body.is-ready .hero-text, body.is-ready .card {
  opacity: 1; transform: none;
  transition: opacity .7s ease, transform .7s ease;
}
body.is-ready .card { transition-delay: calc(.25s + var(--i) * .08s); }
body.is-ready a.card:hover { transform: translateY(-3px); transition-delay: 0s; }

@media (max-width: 600px) {
  .site-header, main, .site-footer { padding: 0 16px; }
  .site-footer { padding-bottom: 32px; }
  .hero { padding: 56px 0 48px; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
  .hero-orbit { --s: 0.8; order: -1; justify-self: end; margin-right: 8px; }
}

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