/* Fledge landing page. One bold element (the black hole); everything else stays quiet and typographic. */

@font-face {
  font-family: 'Unbounded';
  src: url('fonts/unbounded-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('fonts/hanken-grotesk-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('fonts/hanken-grotesk-latin-wght-italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --horizon: #000000;   /* the event horizon is literally black */
  --starlight: #ece8f6;
  --dust: #9690a8;
  --accretion: #a78bfa;
  --doppler: #8fd8ff;
  --plasma: #ffcfae;
  --line: rgba(236, 232, 246, 0.14);
  --line-strong: rgba(236, 232, 246, 0.28);
  --panel: rgba(16, 12, 28, 0.62);

  --display: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
  --body: 'Hanken Grotesk', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;

  /* Type scale, ratio 4:3 from a 17px body. */
  --t-0: 0.8125rem;
  --t-1: 1.0625rem;
  --t-2: 1.375rem;
  --t-3: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem);
  --t-4: clamp(2.6rem, 1.2rem + 5.6vw, 6.5rem);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--horizon);
  color: var(--starlight);
  font: 400 var(--t-1) / 1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; }
h2 {
  font: 500 var(--t-3) / 1.15 var(--display);
  letter-spacing: -0.02em;
  max-width: 22ch;
  text-wrap: balance;
}
h3 { font: 600 var(--t-1) / 1.35 var(--body); letter-spacing: 0; }
p { margin: 0; }
em { font-style: italic; }
b { font-weight: 650; }
:focus-visible { outline: 2px solid var(--doppler); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--plasma); color: #000; padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }

/* The black hole. */
#bh {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  display: block;
  transition: opacity 0.6s linear;
}
/* Shown when WebGL2 is missing: a still approximation in CSS. */
.no-webgl #bh { display: none; }
.no-webgl .veil {
  background:
    radial-gradient(circle at 72% 46%, #000 0 10vmin, transparent 10.4vmin),
    radial-gradient(ellipse 34vmin 4vmin at 72% 46%, rgba(255, 207, 174, 0.85), rgba(167, 139, 250, 0.35) 60%, transparent 72%),
    radial-gradient(circle at 72% 46%, transparent 10.6vmin, rgba(255, 207, 174, 0.7) 11vmin, rgba(167, 139, 250, 0.25) 13vmin, transparent 20vmin),
    #000;
}
.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.55) 34%, rgba(0, 0, 0, 0.15) 56%, transparent 66%);
}
@media (max-width: 860px) {
  .veil { background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.25) 35%, rgba(0, 0, 0, 0.82) 62%); }
}

/* Navigation. */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 18px var(--gutter);
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.05rem/1 var(--display); letter-spacing: -0.01em; }
.links { display: flex; gap: 24px; margin-left: 12px; }
.links a { text-decoration: none; color: var(--dust); font-size: 0.95rem; transition: color 0.2s; }
.links a:hover { color: var(--starlight); }
.nav .btn { margin-left: auto; }
@media (max-width: 760px) {
  .links { display: none; }
}

/* Buttons. Primary takes the colour of the hot inner disk. */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  font: 600 0.98rem/1 var(--body);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.25s;
  white-space: nowrap;
}
.btn-sm { padding: 9px 15px; font-size: 0.88rem; }
.btn-primary { background: var(--plasma); color: #160a02; }
.btn-primary:hover { background: #ffe1cb; box-shadow: 0 0 0 6px rgba(255, 207, 174, 0.14), 0 0 40px rgba(255, 207, 174, 0.35); }
.btn-line { border-color: var(--line-strong); color: var(--starlight); background: rgba(0, 0, 0, 0.25); }
.btn-line:hover { border-color: var(--starlight); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

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

/* Hero. */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 120px var(--gutter) clamp(48px, 9vh, 104px);
}
.hero-inner { width: 100%; max-width: var(--max); margin: 0 auto; }
.news {
  display: inline-block;
  color: var(--dust); text-decoration: none; font-size: 0.92rem;
  padding: 6px 14px 6px 12px; margin-bottom: 28px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(0, 0, 0, 0.35);
  transition: color 0.2s, border-color 0.2s;
}
.news::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--plasma); margin-right: 10px; vertical-align: 1px; box-shadow: 0 0 10px var(--plasma); }
.news:hover { color: var(--starlight); border-color: var(--line-strong); }
h1 {
  font: 500 var(--t-4) / 0.98 var(--display);
  letter-spacing: -0.035em;
  margin-bottom: 30px;
}
h1 span { display: block; }
/* The second line sits further out, as if the text were swinging round the hole. */
h1 .l2 { padding-left: 1.15em; }
.lede { max-width: 56ch; color: #cfc9de; font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.2rem); margin-bottom: 34px; }

.install { max-width: 680px; margin-bottom: 28px; }
.install-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.install-tabs button, .tour-tabs button {
  font: 500 0.88rem/1 var(--body);
  color: var(--dust); background: none; border: 1px solid transparent;
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.install-tabs button:hover, .tour-tabs button:hover { color: var(--starlight); }
.install-tabs button[aria-selected='true'], .tour-tabs button[aria-selected='true'] { color: var(--starlight); border-color: var(--line-strong); background: rgba(0, 0, 0, 0.4); }
.install-cmd {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 18px;
  border: 1px solid var(--line-strong); border-radius: 14px;
  background: rgba(6, 4, 14, 0.78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.install-cmd code {
  flex: 1; min-width: 0;
  font: 0.86rem/1.5 var(--mono); color: var(--starlight);
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.install-cmd code::-webkit-scrollbar { display: none; }
.copy {
  flex: none;
  font: 600 0.85rem/1 var(--body);
  padding: 10px 14px; border-radius: 9px; cursor: pointer;
  color: var(--starlight); background: rgba(236, 232, 246, 0.08); border: 1px solid var(--line);
  transition: background 0.2s;
  min-width: 72px;
}
.copy:hover { background: rgba(236, 232, 246, 0.16); }
.copy.done { color: #160a02; background: var(--plasma); border-color: var(--plasma); }
.install-note { margin-top: 10px; color: var(--dust); font-size: var(--t-0); }

/* The one orchestrated moment: the hero settles while the camera falls toward the hole. */
.intro { opacity: 0; transform: translateY(14px); animation: settle 1.1s cubic-bezier(0.2, 0.7, 0.1, 1) forwards; }
.i1 { animation-delay: 0.5s; } .i2 { animation-delay: 0.65s; } .i3 { animation-delay: 0.9s; } .i4 { animation-delay: 1.05s; } .i5 { animation-delay: 1.15s; }
@keyframes settle { to { opacity: 1; transform: none; } }

/* Sections. */
.block {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 160px) var(--gutter) 0;
}

/* How it works. */
.how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.how-copy h2 { margin-bottom: 24px; }
.how-copy > p { color: #cfc9de; max-width: 52ch; margin-bottom: 36px; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li {
  counter-increment: s;
  display: grid; grid-template-columns: 44px 1fr; align-items: baseline;
  padding: 16px 0; border-top: 1px solid var(--line); color: var(--dust);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s); font: 500 0.95rem/1 var(--display); color: var(--accretion); }
.steps b { color: var(--starlight); }
.orbit { margin: 0; }
.orbit svg { width: 100%; height: auto; overflow: visible; }
.rings circle { fill: none; stroke: var(--line); stroke-width: 1; }
.hub-label { fill: var(--plasma); font: 500 15px var(--display); text-anchor: middle; letter-spacing: 0.02em; }
.node-dot { fill: #0b0816; stroke: var(--line-strong); stroke-width: 1.2; }
.node-name { fill: var(--starlight); font: 500 13px var(--body); }
.node-meta { fill: var(--dust); font: 400 11.5px var(--body); }
.link-line { stroke: rgba(143, 216, 255, 0.22); stroke-width: 1.2; }
.pulse { fill: var(--doppler); filter: drop-shadow(0 0 4px var(--doppler)); }
.orbit figcaption { color: var(--dust); font-size: var(--t-0); max-width: 52ch; margin: 12px auto 0; text-align: center; }

/* Product tour. */
.tour-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.tour-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.frame-wrap { perspective: 1800px; }
.frame {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #07050e;
  box-shadow: 0 40px 120px -30px rgba(124, 58, 237, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.6);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.1, 1);
  transform-style: preserve-3d;
}
.frame-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: #0c0915; }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(236, 232, 246, 0.16); }
.frame-bar span { margin-left: 14px; color: var(--dust); font-size: 0.78rem; padding: 3px 12px; border-radius: 6px; background: rgba(236, 232, 246, 0.05); }
.frame img { width: 100%; aspect-ratio: 1360 / 860; object-fit: cover; object-position: top left; transition: opacity 0.25s; }
.frame img.swap { opacity: 0; }
.tour-caption { margin-top: 18px; color: #cfc9de; min-height: 1.6em; }
.tour-foot { margin-top: 6px; color: var(--dust); font-size: var(--t-0); }

/* Spec grid: plain text columns, one live element. */
.spec h2 { margin-bottom: 48px; }
.spec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); row-gap: 52px; }
.spec-item { border-top: 1px solid var(--line-strong); padding-top: 20px; }
.spec-item h3 { margin-bottom: 10px; }
.spec-item p { color: var(--dust); font-size: 0.98rem; margin-bottom: 14px; }
.spec-item a, .status a, .linkish {
  color: var(--accretion); text-decoration: underline; text-decoration-color: rgba(167, 139, 250, 0.4); text-underline-offset: 3px;
  font-size: 0.95rem;
}
.spec-item a:hover, .status a:hover, .linkish:hover { text-decoration-color: var(--accretion); }
.spec-disk { grid-column: span 3; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); column-gap: clamp(24px, 4vw, 56px); align-items: start; grid-template-rows: auto auto 1fr; }
.spec-disk h3, .spec-disk > p, .spec-disk > a { grid-column: 1; }
.disks { grid-column: 2; grid-row: 1 / span 3; display: grid; gap: 14px; }
.disk { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; font-size: 0.92rem; }
.disk::before {
  content: ''; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--f));
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.10), rgba(167, 139, 250, 0.32));
}
.disk.full::before { background: linear-gradient(90deg, rgba(255, 207, 174, 0.12), rgba(255, 207, 174, 0.45)); }
.disk span, .disk em { position: relative; }
.disk em { font-style: normal; color: var(--dust); font-variant-numeric: tabular-nums; }
.disk.full em { color: var(--plasma); }

/* Plugins. */
.plugins { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.plugins-copy h2 { margin-bottom: 24px; }
.plugins-copy p { color: #cfc9de; max-width: 54ch; margin-bottom: 18px; }
.plugins-copy .cta { margin-top: 30px; }
.code { border: 1px solid var(--line-strong); border-radius: 14px; background: rgba(8, 6, 16, 0.85); overflow: hidden; }
.code-name { padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--dust); font-size: 0.8rem; }
.code pre { margin: 0; padding: 18px 18px 20px; overflow-x: auto; font: 0.84rem/1.65 var(--mono); color: #cfc9de; }
.code .k { color: var(--doppler); }
.code .s { color: var(--plasma); }
.limits { margin: 24px 0 0; display: grid; }
.limits div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.limits dt { color: var(--dust); }
.limits dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* Example themes. */
.brandsec-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.brandsec-copy > p { color: #cfc9de; max-width: 52ch; margin-bottom: 26px; }
.points { list-style: none; margin: 0 0 30px; padding: 0; display: grid; }
.points li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--dust); font-size: 0.98rem; }
.points li:last-child { border-bottom: 1px solid var(--line); }
.points b { color: var(--starlight); }
.points code { font: 0.86em var(--mono); color: var(--starlight); }
.brandsec .tour-foot, .hostsec .tour-foot { margin-top: 18px; }
@media (max-width: 960px) { .brandsec-grid { grid-template-columns: 1fr; } }

/* Templates. */
.templates h2 { margin-bottom: 32px; }
.tpl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tpl-list li { padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0, 0, 0, 0.4); }
.tpl-list small { color: var(--dust); font-size: 0.85rem; margin-left: 6px; }

/* Final. */
.final { padding-bottom: clamp(80px, 10vw, 140px); }
.final h2 { font-size: var(--t-4); max-width: 14ch; letter-spacing: -0.035em; line-height: 1; margin-bottom: 28px; }
.final > p:not(.status) { color: #cfc9de; max-width: 52ch; margin-bottom: 32px; font-size: 1.15rem; }
.status { margin-top: 48px; max-width: 70ch; color: var(--dust); font-size: 0.92rem; padding-left: 16px; border-left: 2px solid var(--plasma); }

.footer {
  border-top: 1px solid var(--line);
  padding: 40px max(var(--gutter), calc((100% - var(--max)) / 2)) 48px;
  display: grid; gap: 22px;
  background: #000;
}
.foot-brand { display: flex; align-items: center; gap: 10px; font: 600 1rem var(--display); }
.footer nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer nav a { color: var(--dust); text-decoration: none; font-size: 0.92rem; }
.footer nav a:hover { color: var(--starlight); }
.foot-note { color: var(--dust); font-size: var(--t-0); max-width: 70ch; }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: inherit; }

/* Narrow screens. */
@media (max-width: 960px) {
  .how, .plugins { grid-template-columns: minmax(0, 1fr); }
  .orbit { max-width: 520px; margin: 0 auto; width: 100%; }
  .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-disk { grid-column: span 2; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero { padding-top: 96px; }
  h1 .l2 { padding-left: 0.6em; }
  .spec-grid { grid-template-columns: 1fr; }
  .spec-disk { grid-column: auto; display: block; }
  .disks { margin: 6px 0 16px; }
  .tour-head { align-items: start; }
  .cta .btn { flex: 1 1 auto; justify-content: center; }
  .install-cmd { padding-left: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro { animation: none; opacity: 1; transform: none; }
  .frame { transition: none; }
  #bh { transition: none; }
}

.mews-section .tour-head { flex-wrap:wrap; }
.mews-hold { display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:clamp(24px,5vw,72px);align-items:center;margin-top:64px; }
.mews-hold img { width:100%;height:auto;border:1px solid var(--line);border-radius:12px; }
.mews-hold h3 { font-size:clamp(24px,3vw,40px);line-height:1.15;margin:0 0 20px; }
.mews-hold p { color:var(--muted);line-height:1.7; }
@media(max-width:760px) { .mews-hold {grid-template-columns:1fr;margin-top:36px;} .mews-section .tour-head .btn {margin-top:16px;} }
