/* ==========================================================================
   isonode.org — marketing page (dark theme)
   Token-driven: every value resolves to a design-system-v2 token. The dark
   treatment maps the page onto the DS's slate-900/950 chrome surfaces with
   light text — the same dark chrome the DS uses for terminals, stats, footer.
   ========================================================================== */

/* ---- Dark theme: re-point semantic surface/text aliases to the dark ramp -- */
.t-dark {
  --surface-page:   var(--slate-950);
  --surface-card:   var(--slate-900);
  --surface-sunken: #0b0e12;            /* one notch below slate-950 */
  --surface-raised: var(--slate-800);

  --text-strong: var(--slate-0);
  --text-body:   var(--slate-300);
  --text-muted:  var(--slate-400);
  --text-faint:  var(--slate-500);
  --text-link:   var(--blue-300);

  --border-subtle:  var(--slate-800);
  --border-default: var(--slate-700);
  --border-strong:  var(--slate-600);

  background: var(--surface-page);
  color: var(--text-body);
}

::selection { background: var(--blue-500); color: var(--slate-0); }
html { overflow-x: hidden; }
img, svg { max-width: 100%; }
/* grid/flex children must be allowed to shrink below content size */
.hero__grid > *, .how > *, .model > *, .section__split > *, .cards-3 > *, .ticker { min-width: 0; }

.wrap { max-width: var(--container-wide); margin: 0 auto; padding-inline: var(--gutter-desktop); }

.eyebrow {
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide); color: var(--brand-accent);
  margin: 0 0 var(--space-4);
}

.muted { color: var(--text-muted); }

/* ===================== Buttons (DS control language) ===================== */
.btn {
  --btn-h: var(--size-control-md);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: var(--btn-h); padding-inline: var(--space-5);
  font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-medium);
  border-radius: var(--radius-md); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: var(--transition-control);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(0.5px); }
.btn--sm { --btn-h: var(--size-control-sm); padding-inline: var(--space-4); font-size: var(--text-xs); }
.btn--lg { --btn-h: var(--size-control-lg); padding-inline: var(--space-6); font-size: var(--text-md); }
.btn--block { display: flex; width: 100%; margin-top: var(--space-5); }

.btn--primary { background: var(--brand-primary); color: var(--slate-0); border-color: var(--brand-primary); }
.btn--primary:hover { background: var(--brand-primary-hover); border-color: var(--brand-primary-hover); }

.btn--ghost { background: transparent; color: var(--text-strong); border-color: var(--border-default); }
.btn--ghost:hover { border-color: var(--border-strong); background: color-mix(in srgb, var(--slate-0) 5%, transparent); }

.btn__arrow { font-size: 1.05em; }

/* ============================== Nav ============================== */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--slate-950) 72%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav__inner {
  max-width: var(--container-wide); margin: 0 auto; height: 68px;
  padding-inline: var(--gutter-desktop);
  display: flex; align-items: center; gap: var(--space-8);
}
.nav__brand { display: inline-flex; align-items: center; }
.nav__brand img { display: block; }
.nav__links { display: flex; gap: var(--space-6); flex: 1; }
.nav__links a {
  font-size: var(--text-sm); font-weight: var(--weight-medium);
  color: var(--text-muted); text-decoration: none; transition: color var(--dur-fast) var(--ease-out);
}
.nav__links a:hover { color: var(--text-strong); }
.nav__actions { display: flex; align-items: center; gap: var(--space-3); }
.nav__burger { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: var(--space-2); }
.nav__burger span { width: 20px; height: 1.5px; background: var(--text-strong); display: block; }
.nav__mobile { display: none; flex-direction: column; gap: var(--space-4); padding: var(--space-5) var(--gutter-desktop);
  border-bottom: 1px solid var(--border-subtle); background: var(--surface-page); }
.nav__mobile a { color: var(--text-body); text-decoration: none; font-weight: var(--weight-medium); font-size: var(--text-sm); }
.nav__mobile[hidden] { display: none; }

/* ============================== Hero ============================== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(50% 60% at 88% -5%, color-mix(in srgb, var(--blue-500) 30%, transparent), transparent 60%),
    radial-gradient(40% 50% at 8% 0%, color-mix(in srgb, var(--blue-900) 40%, transparent), transparent 70%),
    var(--surface-page);
}
.hero::before {
  content: ''; position: absolute; inset: 0; opacity: 0.5; pointer-events: none;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(75% 60% at 30% 0%, #000, transparent 80%);
  mask-image: radial-gradient(75% 60% at 30% 0%, #000, transparent 80%);
}
.hero__grid {
  position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-16); align-items: center;
  padding-block: var(--space-24) var(--space-16);
}
.hero__title {
  font-family: var(--font-display); font-weight: var(--weight-semibold);
  font-size: clamp(2.75rem, 5.5vw, var(--text-6xl)); line-height: 1.0;
  letter-spacing: var(--tracking-tighter); color: var(--text-strong);
  margin: 0 0 var(--space-6); text-wrap: balance; max-width: 13ch;
}
.hero__sub {
  font-size: var(--text-lg); line-height: var(--leading-relaxed);
  color: var(--text-muted); max-width: 34em; margin: 0 0 var(--space-8);
}
.hero__cta { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.hero__trust { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-8); }
.stars { color: var(--clay-400); letter-spacing: 2px; font-size: var(--text-sm); }
.hero__trustmeta { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); letter-spacing: var(--tracking-wide); }

/* Brand-motif node card (replaces stock 3D render — DS isometric mark) */
.hero__visual { display: flex; justify-content: center; }
.node-card {
  position: relative; width: 100%; max-width: 460px; aspect-ratio: 4 / 3;
  border-radius: var(--radius-2xl); border: 1px solid var(--border-subtle);
  background:
    radial-gradient(120% 100% at 50% 0%, var(--slate-800), var(--slate-900) 55%, var(--slate-950));
  box-shadow: var(--shadow-xl);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.node-card--lg { max-width: 100%; aspect-ratio: 16 / 11; }
.node-card__grid {
  position: absolute; inset: 0; opacity: 0.4;
  background-image:
    linear-gradient(var(--slate-800) 1px, transparent 1px),
    linear-gradient(90deg, var(--slate-800) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(60% 60% at 50% 45%, #000, transparent 80%);
  mask-image: radial-gradient(60% 60% at 50% 45%, #000, transparent 80%);
}
.node-card__mark { position: relative; z-index: 2; filter: drop-shadow(0 8px 30px color-mix(in srgb, var(--blue-500) 45%, transparent)); }
.node-card__pulse {
  position: absolute; z-index: 1; width: 46%; aspect-ratio: 1; border-radius: var(--radius-full);
  background: radial-gradient(circle, color-mix(in srgb, var(--blue-500) 30%, transparent), transparent 70%);
  animation: node-pulse 3.2s var(--ease-inout) infinite;
}
@keyframes node-pulse { 0%,100% { transform: scale(0.9); opacity: 0.7; } 50% { transform: scale(1.15); opacity: 1; } }
.node-card__tag {
  position: absolute; z-index: 3; font-family: var(--font-mono); font-size: var(--text-2xs);
  color: var(--slate-300); background: color-mix(in srgb, var(--slate-950) 70%, transparent);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-full);
  padding: 4px 10px; display: inline-flex; align-items: center; gap: 6px; backdrop-filter: blur(4px);
}
.node-card__tag--a { top: var(--space-5); left: var(--space-5); }
.node-card__tag--b { bottom: var(--space-5); right: var(--space-5); color: var(--clay-300); }

/* mono ticker */
.ticker {
  position: relative; display: flex; flex-wrap: wrap; gap: var(--space-6);
  padding-block: var(--space-6); border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint);
  letter-spacing: var(--tracking-wide);
}

/* status dot */
.dot { width: 7px; height: 7px; border-radius: var(--radius-full); display: inline-block; flex-shrink: 0; }
.dot--online { background: var(--status-online); box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-online) 60%, transparent); animation: dot-ping 2.4s var(--ease-out) infinite; }
@keyframes dot-ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-online) 55%, transparent); } 70%,100% { box-shadow: 0 0 0 6px transparent; } }

/* ========================= Manifesto band ========================= */
.band { border-block: 1px solid var(--border-subtle); background: var(--surface-sunken); overflow: hidden; }
.band__inner { padding-block: var(--space-24); }
.band__text {
  font-family: var(--font-display); font-weight: var(--weight-medium);
  font-size: clamp(1.75rem, 3.6vw, var(--text-4xl)); line-height: 1.22;
  letter-spacing: var(--tracking-tight); color: var(--text-muted);
  text-align: center; max-width: 20ch; margin: 0 auto; text-wrap: balance;
}
.band__text strong { color: var(--text-strong); font-weight: var(--weight-semibold); }

/* ============================ Sections ============================ */
.section { padding-block: var(--space-24); }
.section--alt { background: var(--surface-sunken); border-block: 1px solid var(--border-subtle); }
.section__split {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-12);
  align-items: end; margin-bottom: var(--space-12);
}
.section__title {
  font-family: var(--font-display); font-weight: var(--weight-semibold);
  font-size: clamp(2rem, 4vw, var(--text-4xl)); line-height: 1.05;
  letter-spacing: var(--tracking-tight); color: var(--text-strong);
  margin: 0; text-wrap: balance;
}
.section__lead { font-size: var(--text-lg); line-height: var(--leading-relaxed); color: var(--text-muted); margin: 0; max-width: 32em; }

/* ---- Cards (DS flat + hairline) ---- */
.card {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: var(--space-8);
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.card:hover { border-color: var(--border-default); }
.card__title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-semibold); color: var(--text-strong); margin: 0 0 var(--space-3); }
.card__body { font-size: var(--text-md); line-height: var(--leading-relaxed); color: var(--text-muted); margin: 0 0 var(--space-3); }
.card__body:last-of-type { margin-bottom: 0; }

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-6); }
.tag {
  font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--text-muted);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  padding: 4px 10px; background: var(--surface-sunken);
}

/* session model split */
.model { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: stretch; }
.model__card { display: flex; flex-direction: column; }
.model__visual { display: flex; }

/* ---- How it works ---- */
.how { display: grid; grid-template-columns: 1fr 1.05fr; gap: var(--space-16); align-items: center; }
.how__body { font-size: var(--text-lg); line-height: var(--leading-relaxed); color: var(--text-muted); margin: var(--space-6) 0 var(--space-8); max-width: 34em; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.step {
  display: flex; gap: var(--space-5); align-items: flex-start;
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: var(--space-6) var(--space-6);
}
.step__n { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--brand-accent); flex-shrink: 0; padding-top: 2px; }
.step__title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-semibold); color: var(--text-strong); margin: 0 0 4px; }
.step__body { font-size: var(--text-md); line-height: var(--leading-normal); color: var(--text-muted); margin: 0; }

/* ---- Attributes band ---- */
.attrs { background: var(--slate-900); border-block: 1px solid var(--border-subtle); }
.attrs__grid { max-width: var(--container-wide); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.attr { padding: var(--space-12) var(--gutter-desktop); text-align: center; border-right: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: var(--space-2); }
.attr:last-child { border-right: 0; }
.attr__v { font-family: var(--font-display); font-size: var(--text-4xl); font-weight: var(--weight-medium); color: var(--text-strong); letter-spacing: -0.02em; line-height: 1; }
.attr__l { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); letter-spacing: var(--tracking-wide); }

/* ---- 3-up cards ---- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.tier { display: flex; flex-direction: column; }
.tier .card__body { flex: 1; }
.tier--feature { border-color: var(--border-brand); background: linear-gradient(180deg, color-mix(in srgb, var(--blue-900) 22%, var(--surface-card)), var(--surface-card)); }

/* ============================ Footer ============================ */
.footer { background: var(--slate-950); border-top: 1px solid var(--border-subtle); }
.footer__inner { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-8); padding-block: var(--space-16) var(--space-10); flex-wrap: wrap; }
.footer__brand img { display: block; margin-bottom: var(--space-3); }
.footer__tag { font-size: var(--text-sm); color: var(--text-faint); margin: 0; }
.footer__claim { font-family: var(--font-display); font-size: var(--text-lg); color: var(--text-muted); margin: 0; max-width: 22ch; text-align: right; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; padding-block: var(--space-5); border-top: 1px solid var(--border-subtle); font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); }
.footer__status { display: inline-flex; align-items: center; gap: var(--space-2); }

/* ============================ Reveal ============================ */
/* Entrance is transform-only per DS rule — content visible even if paused. */
.reveal { transform: translateY(14px); transition: transform 600ms var(--ease-out); }
.reveal.is-in { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transform: none; transition: none; }
  .node-card__pulse, .dot--online { animation: none; }
}

/* ============================ Responsive ============================ */
@media (max-width: 900px) {
  .nav__links, .nav__actions { display: none; }
  .nav__burger { display: flex; margin-left: auto; }
  .hero__grid, .how, .model, .section__split { grid-template-columns: 1fr; gap: var(--space-10); }
  .section__split { align-items: start; }
  .cards-3 { grid-template-columns: 1fr; }
  .attrs__grid { grid-template-columns: repeat(2, 1fr); }
  .attr:nth-child(2) { border-right: 0; }
  .attr:nth-child(-n+2) { border-bottom: 1px solid var(--border-subtle); }
  .footer__inner { flex-direction: column; }
  .footer__claim { text-align: left; }
}

@media (max-width: 560px) {
  .band__text { font-size: 1.5rem; line-height: 1.28; max-width: 16ch; }
  .hero__title { font-size: clamp(2.25rem, 11vw, 2.75rem); max-width: 100%; }
  .hero__sub { font-size: var(--text-md); }
  .attrs__grid { grid-template-columns: 1fr 1fr; }
  .attr { padding: var(--space-8) var(--space-5); }
  .attr__v { font-size: var(--text-3xl); }
  .node-card { max-width: 100%; }
}
