/* ─────────────────────────────────────────────────────────────
   macOS Widgets Stats from Website — site styles
   Aesthetic: refined macOS dark, technical typography,
   widget-tile primitives composed throughout.
   ───────────────────────────────────────────────────────────── */

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

:root {
  /* ── Surfaces ── */
  --bg-0: #07090c;
  --bg-1: #0a0d10;
  --bg-2: #0e1318;
  --bg-3: #131922;
  --bg-glass: rgba(14, 19, 24, 0.62);
  --tile-bg: #11161e;
  --tile-bg-2: #0e131b;
  --hairline: rgba(255, 255, 255, 0.06);
  --hairline-strong: rgba(255, 255, 255, 0.12);

  /* ── Type ── */
  --ink: #eef2f6;
  --ink-soft: #c7cfd9;
  --muted: #98a4b3;
  --muted-2: #8593a3;
  --muted-3: #4f5b6b;

  /* ── Accents ── */
  --accent: #7eecaf;       /* mint — primary positive */
  --accent-soft: rgba(126, 236, 175, 0.16);
  --accent-2: #ffe27a;     /* amber — secondary */
  --accent-2-soft: rgba(255, 226, 122, 0.16);
  --accent-3: #9ec6ff;     /* periwinkle — info */
  --accent-4: #ff9eb5;     /* pink — distinct */
  --accent-5: #c4a8ff;     /* lavender */
  --good: #5fd28f;
  --bad:  #f7768e;

  /* ── Geometry ── */
  --radius-tile: 14px;
  --radius-tile-sm: 10px;
  --radius-card: 18px;
  --radius-pill: 999px;

  --pad-section: clamp(72px, 10vw, 128px);
  --pad-rail: clamp(20px, 5vw, 56px);

  /* ── Type stack ── */
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --font-rounded: -apple-system-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

@media (prefers-color-scheme: light) {
  /* The site is dark by default — light scheme stays dark for visual coherence. */
}

html { background: var(--bg-0); scroll-behavior: smooth; }
body {
  font-family: var(--font-text);
  color: var(--ink);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11", "tnum";
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; transition: color 0.15s ease, opacity 0.15s ease; }
a:hover { color: #aef3ca; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }
code, pre { font-family: var(--font-mono); }

/* ── Atmosphere: grain + ambient gradients ── */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.025;
  mix-blend-mode: overlay;
}
.ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 18% 8%, rgba(126,236,175,0.10) 0%, transparent 60%),
    radial-gradient(50% 45% at 86% 18%, rgba(255,226,122,0.08) 0%, transparent 65%),
    radial-gradient(80% 60% at 50% 105%, rgba(158,198,255,0.06) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-0) 0%, #050709 100%);
}

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad-rail);
  background: linear-gradient(180deg, rgba(7,9,12,0.92), rgba(7,9,12,0.6));
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--hairline);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand-words { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 1px;
}
.topnav {
  display: flex; align-items: center; gap: 26px;
  font-size: 13.5px;
}
.topnav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
  font-weight: 500;
}
.topnav a:hover { color: var(--ink); }
.topnav-github {
  color: var(--ink) !important;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-weight: 500;
}
.topnav-github:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
}
@media (max-width: 720px) {
  .topnav a:not(.topnav-github) { display: none; }
}

/* ── Layout ── */
.section {
  padding: var(--pad-section) var(--pad-rail);
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
}
.section-head { margin-bottom: 56px; max-width: 820px; }
.kicker {
  display: inline-flex;
  align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(126,236,175,0.22);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.section-sub {
  margin-top: 16px;
  font-size: 16px;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.6;
}

/* ───────────────────── HERO ───────────────────── */
.hero {
  padding: clamp(80px, 14vw, 160px) var(--pad-rail) clamp(60px, 10vw, 120px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.hero-inner { position: relative; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
  padding: 7px 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.02);
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 0.04em;
}
.hero-line {
  display: block;
  opacity: 0;
  transform: translateY(12px);
  animation: heroIn 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero-line:nth-child(1) { animation-delay: 0.1s; }
.hero-line:nth-child(2) { animation-delay: 0.2s; }
.hero-line:nth-child(3) { animation-delay: 0.3s; }
@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}
.hero-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-tag {
  font-size: clamp(15px, 1.3vw, 17px);
  color: var(--ink-soft);
  max-width: 560px;
  margin-bottom: 36px;
  line-height: 1.6;
  opacity: 0;
  animation: heroIn 0.8s cubic-bezier(0.2,0.7,0.2,1) 0.45s forwards;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  opacity: 0;
  animation: heroIn 0.8s cubic-bezier(0.2,0.7,0.2,1) 0.55s forwards;
}
.hero-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
  opacity: 0;
  animation: heroIn 0.8s cubic-bezier(0.2,0.7,0.2,1) 0.65s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #04140a;
  box-shadow: 0 8px 24px -8px rgba(126,236,175,0.5);
}
.btn-primary:hover { background: #92f3bd; color: #04140a; }
.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  border-color: var(--hairline-strong);
}
.btn-ghost:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.18); color: var(--ink); }

/* ── Hero stage: floating widget tiles ── */
.hero-stage {
  position: relative;
  height: clamp(440px, 56vw, 580px);
}
.hero-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 155px 155px;
  grid-template-rows: 155px auto auto;
  gap: 18px;
  justify-content: end;
  align-content: center;
}
@media (min-width: 980px) {
  .hero-grid { gap: 22px; }
}

/* ── Tile primitive (used in hero + galleries) ── */
.tile {
  background: linear-gradient(180deg, var(--tile-bg) 0%, var(--tile-bg-2) 100%);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-tile);
  padding: 14px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 24px 60px -28px rgba(0,0,0,0.65);
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,0.045) 0%, transparent 60%);
  pointer-events: none;
}
.tile-flat { box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 12px 32px -22px rgba(0,0,0,0.7); }

.tile-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.tile-title-pad { margin-bottom: 10px; }
.tile-hero {
  font-family: var(--font-rounded);
  font-weight: 600;
  font-size: 38px;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  margin: 8px 0 6px;
  font-variant-numeric: tabular-nums;
}
.tile-hero-cents { font-size: 0.6em; color: var(--muted); }
.tile-hero-sm { font-size: 30px; }
.tile-hero-md { font-size: 26px; }
.tile-hero-lg { font-size: 44px; margin-top: 6px; }
.tile-hero-xl { font-size: 56px; }

.tile-foot {
  display: flex; align-items: center; gap: 6px;
  margin-top: auto;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.tile-foot-tight { margin-top: 4px; font-size: 10px; justify-content: center; }

.tile-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-3); }
.tile-dot-good { background: var(--good); box-shadow: 0 0 8px rgba(95,210,143,0.5); }

/* ── Hero tile placement ── */
.tile-small { width: 155px; height: 155px; display: flex; flex-direction: column; }
.tile-medium { width: 329px; height: 155px; display: flex; flex-direction: column; }
.tile-large  { width: 329px; height: 345px; display: flex; flex-direction: column; }
.tile-xl     { width: 690px; height: 318px; display: flex; flex-direction: column; }

.hero-grid .tile-small.tile-1 { grid-column: 1; grid-row: 1; transform: translate(-12px, -32px) rotate(-3.4deg); animation: floatA 9s ease-in-out infinite; }
.hero-grid .tile-small.tile-2 { grid-column: 2; grid-row: 1; transform: translate(8px, -8px) rotate(2.6deg); animation: floatB 10s ease-in-out infinite; }
.hero-grid .tile-medium.tile-3 { grid-column: 1 / span 2; grid-row: 2; transform: translate(-30px, 0) rotate(-1.4deg); margin-top: 14px; animation: floatC 11s ease-in-out infinite; }
.hero-grid .tile-large.tile-4 { grid-column: 1 / span 2; grid-row: 3; display: none; }

@media (min-width: 1100px) {
  .hero-grid {
    grid-template-columns: 155px 329px;
    grid-template-rows: 155px 155px 345px;
  }
  .hero-grid .tile-small.tile-1 { grid-column: 1; grid-row: 1; transform: translate(-30px, -10px) rotate(-3deg); }
  .hero-grid .tile-small.tile-2 { grid-column: 2; grid-row: 1; transform: translate(-100px, 30px) rotate(3deg); }
  .hero-grid .tile-medium.tile-3 { grid-column: 1 / span 2; grid-row: 2; transform: translate(-20px, 8px) rotate(-1deg); margin-top: 0; }
  .hero-grid .tile-large.tile-4 { display: flex; grid-column: 1 / span 2; grid-row: 3; transform: translate(40px, 16px) rotate(2.2deg); }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-stage { height: clamp(400px, 90vw, 560px); margin-top: 12px; }
  .hero-grid { justify-content: center; }
}
@keyframes floatA { 0%,100% { transform: translate(-30px,-10px) rotate(-3deg); } 50% { transform: translate(-30px,-22px) rotate(-3.4deg); } }
@keyframes floatB { 0%,100% { transform: translate(-100px,30px) rotate(3deg); } 50% { transform: translate(-100px,16px) rotate(2.4deg); } }
@keyframes floatC { 0%,100% { transform: translate(-20px,8px) rotate(-1deg); } 50% { transform: translate(-20px,-2px) rotate(-0.6deg); } }
@media (max-width: 1099px) {
  @keyframes floatA { 0%,100% { transform: translate(-12px,-32px) rotate(-3.4deg); } 50% { transform: translate(-12px,-40px) rotate(-3.8deg); } }
  @keyframes floatB { 0%,100% { transform: translate(8px,-8px) rotate(2.6deg); } 50% { transform: translate(8px,-16px) rotate(2deg); } }
  @keyframes floatC { 0%,100% { transform: translate(-30px,0) rotate(-1.4deg); } 50% { transform: translate(-30px,-8px) rotate(-1deg); } }
}
@media (prefers-reduced-motion: reduce) {
  .hero-grid > * { animation: none !important; }
  .hero-line, .hero-tag, .hero-cta, .hero-note { animation: none !important; opacity: 1 !important; transform: none !important; }
}

.tile-ring { width: 90px; height: 90px; align-self: center; margin-top: 4px; }
.tile-center { align-items: center; }

/* Tile internals — 3up dashboard */
.tile-3up {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  flex: 1;
  align-items: center;
}
.tile-3up-pad { padding: 6px 0; }
.tile-3up-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px;
  border-right: 1px solid var(--hairline);
  min-width: 0;
}
.tile-3up-col:last-child { border-right: none; }
.tile-chip {
  width: 14px; height: 4px; border-radius: 2px;
  background: var(--chip, var(--accent));
  margin-bottom: 6px;
}
.tile-3up-title {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.tile-3up-val {
  font-family: var(--font-rounded);
  font-size: 22px;
  font-weight: 600;
  margin-top: 2px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.tile-3up-delta {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.delta-up { color: var(--good); }
.delta-down { color: var(--bad); }

/* Tile internals — list */
.tile-list { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tile-list li {
  display: grid;
  grid-template-columns: 14px 1fr 60px auto;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--hairline);
  min-height: 28px;
}
.tile-list li:last-child { border-bottom: none; }
.tile-list-tall li { padding: 9px 4px; min-height: 36px; }
.tile-list .tile-chip {
  width: 10px; height: 10px; border-radius: 3px; margin: 0;
}
.tile-list-name {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-list-val {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.tile-spark { width: 60px; height: 16px; }

/* Tile — split row (number + sparkline) */
.tile-row-split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  margin-top: 6px;
}
.tile-spark-lg { width: 60px; height: 30px; }

/* Tile — medium hero+sparkline */
.tile-medium-row {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 14px;
  flex: 1;
  align-items: stretch;
}
.tile-medium-left { display: flex; flex-direction: column; justify-content: center; }
.tile-medium-right { display: flex; align-items: stretch; }
.tile-spark-xl { width: 100%; height: 100%; min-height: 80px; }

/* Tile — compare */
.tile-compare {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 12px;
  flex: 1;
  align-items: center;
}
.tile-compare-side {
  display: flex; flex-direction: column; gap: 2px;
  padding: 0 10px;
}
.tile-compare-divider {
  width: 1px; height: 70%;
  background: var(--hairline);
  align-self: center;
}

/* Tile — mixed snapshot+stat */
.tile-mixed {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0;
  flex: 1;
  margin: -14px;
  border-radius: var(--radius-tile);
  overflow: hidden;
}
.tile-mixed-snap {
  position: relative;
  border-right: 1px solid var(--hairline);
}
.tile-mixed-snap svg { width: 100%; height: 100%; }
.tile-mixed-text {
  display: flex; flex-direction: column;
  padding: 14px;
  gap: 4px;
  justify-content: center;
}

/* Tile — snapshot */
.tile-snapshot { padding: 0; }
.tile-snapshot .snap-image { width: 100%; height: 100%; position: absolute; inset: 0; }
.tile-snapshot .snap-image svg { width: 100%; height: 100%; }
.tile-snapshot::before { content: none; }
.snap-overlay {
  position: absolute;
  bottom: 8px; left: 8px; right: 8px;
  background: rgba(8, 12, 18, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
}
.tile-snapshot-large { padding: 0; position: relative; }
.snap-large { width: 100%; height: 100%; position: absolute; inset: 0; border-radius: var(--radius-tile); }
.snap-overlay-large {
  bottom: 14px; left: 14px; right: auto;
  display: inline-block;
  width: auto;
}

/* Tile — large hero+detail */
.tile-large-hero {
  padding: 6px 4px 0;
}
.tile-large-mid {
  flex: 1;
  margin: 14px 0;
  min-height: 80px;
}
.tile-large-mid svg { width: 100%; height: 100%; }
.tile-large-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}
.tile-large-grid > div { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }

/* Tile — XL grid */
.tile-xl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 14px;
  flex: 1;
}
.xl-cell {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-tile-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.xl-cell .tile-spark { margin-top: auto; width: 100%; }
.xl-cell-snap { padding: 0; overflow: hidden; position: relative; }
.xl-cell-snap svg { width: 100%; height: 100%; }
.xl-snap-label {
  position: absolute;
  bottom: 8px; left: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(8,12,18,0.7);
  padding: 3px 6px;
  border-radius: 4px;
}

/* ───────────────────── WHY ───────────────────── */
.section-why .prose {
  display: grid;
  gap: 22px;
  max-width: 700px;
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.prose-callout {
  margin-top: 16px;
  padding: 22px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 80%);
  border: 1px solid rgba(126,236,175,0.18);
  border-radius: var(--radius-card);
  font-size: 16px;
  color: var(--ink);
}
.prose-callout strong { color: var(--accent); font-weight: 600; }
.prose-callout em { color: var(--ink); font-style: italic; }

/* ───────────────────── HOW ───────────────────── */
.steps {
  display: grid;
  gap: clamp(48px, 8vw, 96px);
}
.step {
  display: grid;
  grid-template-columns: 80px minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.step-flip {
  grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.1fr);
}
.step-flip .step-illustration { order: 2; }
.step-flip .step-copy { order: 1; }
.step-num {
  align-self: start;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #4dc88d);
  color: #04140a;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -0.02em;
  box-shadow: 0 8px 24px -10px rgba(126,236,175,0.55);
  flex-shrink: 0;
}
.step:nth-child(2) .step-num { background: linear-gradient(135deg, var(--accent-2), #d4a234); }
.step:nth-child(3) .step-num { background: linear-gradient(135deg, var(--accent-3), #5e7fb7); color: #0a1530; }
.step-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.step-copy p { color: var(--ink-soft); font-size: 16px; line-height: 1.65; max-width: 460px; }
.step-copy strong { color: var(--ink); font-weight: 600; }

.step-illustration {
  background: var(--bg-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.step-illustration::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 60% at 30% 0%, rgba(255,255,255,0.025), transparent);
  pointer-events: none;
}

@media (max-width: 760px) {
  .step, .step-flip { grid-template-columns: 1fr; gap: 20px; }
  .step-flip .step-illustration, .step-flip .step-copy { order: initial; }
  .step-num { margin-bottom: 4px; }
  .step-copy p { max-width: 100%; }
}

/* Step illustrations — windows */
.window {
  background: linear-gradient(180deg, #0d1218, #0a0e13);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.85);
}
.window-bar {
  padding: 9px 12px;
  background: linear-gradient(180deg, #1a212b, #141a23);
  border-bottom: 1px solid var(--hairline);
  display: flex; gap: 6px;
}
.window-bar span {
  width: 11px; height: 11px; border-radius: 50%;
  background: rgba(255,255,255,0.10);
}
.window-bar span:nth-child(1) { background: #ff5f57; }
.window-bar span:nth-child(2) { background: #ffbd2e; }
.window-bar span:nth-child(3) { background: #28c940; }
.window-body { padding: 20px; }
.form-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: center;
}
.form-row:last-of-type { border-bottom: none; }
.form-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-input {
  font-size: 13.5px;
  color: var(--ink);
}
.form-mono { font-family: var(--font-mono); font-size: 12px; color: var(--accent-3); }
.form-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 16px;
  background: var(--accent);
  color: #04140a;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  letter-spacing: -0.005em;
  align-self: flex-start;
}

/* Step 2 — browser pane */
.window-body-browser {
  padding: 0;
  position: relative;
  height: 220px;
  background: linear-gradient(180deg, #f5f6f8 0%, #e8eaee 100%);
  color: #0a0e14;
  overflow: hidden;
}
.browser-page { padding: 24px; display: flex; flex-direction: column; gap: 12px; height: 100%; justify-content: center; }
.browser-text-row { width: 75%; height: 8px; background: rgba(10,14,20,0.18); border-radius: 4px; }
.browser-text-row.short { width: 50%; }
.browser-card {
  background: white;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 6px 16px -8px rgba(0,0,0,0.16);
  display: flex; flex-direction: column; gap: 4px;
  margin: 4px 0;
  width: 60%;
}
.browser-card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(10,14,20,0.5);
}
.browser-card-value {
  font-family: var(--font-rounded);
  font-size: 24px;
  font-weight: 600;
  color: #0a0e14;
  position: relative;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
}
.pulse-target {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
  animation: pulseTarget 2s ease-in-out infinite;
  background: var(--accent-soft);
}
@keyframes pulseTarget {
  0%, 100% { outline-color: var(--accent); outline-offset: 4px; }
  50% { outline-color: rgba(126,236,175,0.4); outline-offset: 8px; }
}
.browser-cursor {
  position: absolute;
  width: 18px; height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 2l7 18 2.5-7.5L20 10z' fill='black' stroke='white' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  bottom: 60px; left: 50%;
  animation: cursorMove 4s ease-in-out infinite;
}
@keyframes cursorMove {
  0%, 100% { transform: translate(-50%, 0); }
  40% { transform: translate(-30%, -20px); }
  60% { transform: translate(-30%, -20px); }
}

/* Step 3 — desktop */
.desktop {
  background:
    radial-gradient(70% 60% at 30% 30%, rgba(126,236,175,0.10), transparent),
    radial-gradient(60% 60% at 80% 80%, rgba(255,226,122,0.07), transparent),
    linear-gradient(135deg, #1c2435 0%, #0c1320 100%);
  border-radius: 8px;
  height: 220px;
  position: relative;
  overflow: hidden;
}
.desktop-tile {
  position: absolute;
  top: 24px; right: 24px;
  width: 155px; height: 155px;
  background: linear-gradient(180deg, var(--tile-bg) 0%, var(--tile-bg-2) 100%);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-tile);
  padding: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.7);
  animation: tileAppear 4s ease-in-out infinite;
}
@keyframes tileAppear {
  0%, 30% { opacity: 0; transform: scale(0.92) translateY(8px); }
  40%, 100% { opacity: 1; transform: scale(1) translateY(0); }
}
.desktop-spark {
  position: absolute;
  bottom: 20px; left: 20px;
  width: 64px; height: 64px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='4' y='4' width='56' height='56' rx='12' fill='%23ffffff' fill-opacity='0.06' stroke='%23ffffff' stroke-opacity='0.12'/%3E%3Ccircle cx='32' cy='32' r='8' fill='%23ffffff' fill-opacity='0.15'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ───────────────────── FEATURES ───────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.feat {
  background: var(--bg-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}
.feat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 50% at 0% 0%, rgba(126,236,175,0.06), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.feat:hover {
  border-color: rgba(126,236,175,0.2);
  transform: translateY(-2px);
  background: var(--bg-3);
}
.feat:hover::before { opacity: 1; }
.feat-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.feat-icon svg { width: 22px; height: 22px; }
.feat h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.feat p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
}
.feat p a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(126,236,175,0.4);
  text-underline-offset: 3px;
  font-weight: 500;
}
.feat p a:hover {
  text-decoration-color: var(--accent);
}
.feat code {
  background: rgba(255,255,255,0.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--accent-3);
}

/* ───────────────────── TEMPLATES GALLERY ───────────────────── */
.size-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.size-label {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 32px 0 4px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.size-label:first-of-type { margin-top: 0; }
.size-dim {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 400;
}
.gallery {
  display: grid;
  gap: 22px;
}
.gallery-small { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery-medium { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.gallery-large { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.gallery-xl { grid-template-columns: 1fr; }

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card-frame {
  background: var(--bg-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}
.card-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}
.card-large .card-frame { min-height: 380px; }
.card-xl .card-frame { min-height: 360px; padding: 32px; }
.card-medium .card-frame { min-height: 200px; }

.card figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px;
}
.card figcaption strong {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.card figcaption span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2);
  letter-spacing: 0.04em;
}

/* Make XL tile responsive */
.card-xl .tile-xl {
  width: 100%;
  max-width: 690px;
  height: auto;
  aspect-ratio: 690 / 318;
}
@media (max-width: 760px) {
  .card-xl .tile-xl-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, 1fr); }
  .card-xl .card-frame { padding: 16px; }
}
@media (max-width: 540px) {
  .tile-medium {
    width: 100%;
    max-width: 329px;
  }
  .tile-large {
    width: 100%;
    max-width: 329px;
  }
}

/* ───────────────────── INSTALL ───────────────────── */
.install-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.install-card {
  background: var(--bg-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.install-card-locked {
  background: linear-gradient(180deg, rgba(126,236,175,0.06), var(--bg-2));
  border-color: rgba(126,236,175,0.15);
}
.install-tag {
  display: inline-flex;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--hairline);
  padding: 4px 9px;
  border-radius: var(--radius-pill);
}
.install-card-locked .install-tag {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(126,236,175,0.22);
}
.install-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--hairline);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink);
}
.install-card-locked .install-icon {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(126,236,175,0.18);
}
.install-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.install-card p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
}
.install-cmd {
  display: block;
  background: var(--bg-0);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  line-height: 1.55;
  word-break: break-all;
  white-space: pre-line;
}
.install-soon {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  margin-top: auto;
  padding-top: 4px;
}
.install-card code {
  font-size: 12.5px;
  color: var(--accent-3);
  background: rgba(158,198,255,0.08);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ───────────────────── MCP ───────────────────── */
.mcp-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) { .mcp-row { grid-template-columns: 1fr; } }

.mcp-codeblock {
  background: var(--bg-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.6);
}
.mcp-codebar {
  padding: 11px 14px;
  background: linear-gradient(180deg, #1a212b, #141a23);
  border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center; gap: 8px;
}
.mcp-codebar span:nth-child(1) { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.mcp-codebar span:nth-child(2) { width: 11px; height: 11px; border-radius: 50%; background: #ffbd2e; }
.mcp-codebar span:nth-child(3) { width: 11px; height: 11px; border-radius: 50%; background: #28c940; }
.mcp-codetitle {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  margin-left: 10px;
  letter-spacing: 0.04em;
}
.mcp-pre {
  padding: 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--ink-soft);
}
.tk-com { color: var(--muted-2); font-style: italic; }
.tk-key { color: var(--accent-2); font-weight: 600; }
.tk-prop { color: var(--accent-3); }
.tk-str { color: var(--accent); }
.tk-num { color: #ff9eb5; }

.mcp-tools {
  background: var(--bg-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 28px;
}
.mcp-tools h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}
.mcp-tools ul { display: flex; flex-direction: column; gap: 10px; }
.mcp-tools li {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}
.mcp-tools li:last-of-type { border-bottom: none; }
.mcp-tools code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.mcp-tools li span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.mcp-tools li em { font-style: italic; color: var(--ink-soft); }
.mcp-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-size: 12.5px;
  color: var(--muted-2);
  font-style: italic;
  line-height: 1.55;
}

/* ───────────────────── PRINCIPLES ───────────────────── */
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.principle {
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: rgba(255,255,255,0.015);
  position: relative;
}
.principle::before {
  content: "×";
  position: absolute;
  top: 18px; right: 22px;
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--bad);
  opacity: 0.4;
}
.principle h3 {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
  padding-right: 28px;
}
.principle p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.principle p em { font-style: italic; color: var(--ink-soft); }

/* ───────────────────── FOOTER ───────────────────── */
.footer {
  margin-top: clamp(80px, 12vw, 160px);
  background: linear-gradient(180deg, transparent 0%, var(--bg-1) 30%);
  border-top: 1px solid var(--hairline);
  padding: 64px var(--pad-rail) 32px;
  position: relative;
  z-index: 2;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
  gap: 60px;
}
@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
}
.footer-left { display: flex; flex-direction: column; gap: 14px; }
.brand-footer { align-items: center; }
.footer-by { font-size: 13px; color: var(--muted); }
.footer-by a { color: var(--ink-soft); border-bottom: 1px solid var(--hairline); }
.footer-by a:hover { color: var(--accent); border-color: var(--accent); }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
@media (max-width: 580px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
.footer-cols h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 14px;
  font-weight: 500;
}
.footer-cols ul { display: flex; flex-direction: column; gap: 8px; }
.footer-cols a {
  color: var(--ink-soft);
  font-size: 13.5px;
  transition: color 0.15s ease;
}
.footer-cols a:hover { color: var(--accent); }
.footer-lineage a { color: var(--muted); }
.footer-lineage a:hover { color: var(--ink); }

.footer-bottom {
  max-width: 1240px;
  margin: 56px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.04em;
}
.footer-disclaimer {
  max-width: 540px;
  text-align: right;
  line-height: 1.55;
}
@media (max-width: 720px) {
  .footer-bottom { flex-direction: column; }
  .footer-disclaimer { text-align: left; }
}

/* ── Selection ── */
::selection { background: var(--accent); color: #04140a; }

/* ── Scrollbar refinement (webkit only) ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 5px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }
