:root {
  color-scheme: dark;
  --bg: #0c0d10;
  --surface: #14161b;
  --line: #262931;
  --line-soft: #1c1f25;
  --text: #eceef2;
  --dim: #a3a9b5;
  --faint: #7d8492;
  --accent: #8eb5ff;
  --accent-strong: #a9c7ff;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { overflow-x: hidden; }
body { margin: 0; overflow-x: hidden; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 4px; border-radius: 4px; }

.top, main, footer { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

/* --- header ---------------------------------------------------------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.top nav { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.top nav a { padding: 7px 11px; border-radius: 6px; color: var(--dim); text-decoration: none; }
.top nav a:hover { color: var(--text); background: var(--line-soft); }
.top nav .nav-download { color: var(--text); border: 1px solid var(--line); margin-left: 6px; }

/* --- hero ------------------------------------------------------------------ */

.hero { position: relative; isolation: isolate; text-align: center; padding: 96px 0 56px; }
.hero::before {
  content: "";
  position: absolute;
  inset: -40px -30% 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 60% at 50% 20%, #2b5bb033, transparent 70%),
    repeating-radial-gradient(ellipse at 50% -10%, transparent 0 46px, #8eb5ff14 47px, transparent 48px 92px);
  mask-image: linear-gradient(#000 40%, transparent);
}
.eyebrow { margin: 0 0 22px; text-transform: uppercase; font-size: 12px; letter-spacing: .18em; color: #aab5c8; font-weight: 600; }
h1 { font-size: clamp(44px, 6.4vw, 80px); line-height: 1.02; letter-spacing: -.05em; font-weight: 600; margin: 0; }
h1 span { background: linear-gradient(90deg, #8eb5ff, #c6d9ff 60%, #8eb5ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro { font-size: 18px; color: var(--dim); line-height: 1.65; max-width: 620px; margin: 26px auto 32px; text-wrap: pretty; }
.actions { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; }
.download {
  display: inline-flex; align-items: center; gap: 11px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid #b4cdff; border-radius: 8px;
  color: #0f1a30; background: var(--accent);
  font-weight: 600; text-decoration: none;
  box-shadow: 0 8px 30px #6f9cf533;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.download:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 12px 36px #6f9cf544; }
.download svg { width: 18px; height: 18px; }
.secondary { min-height: 48px; display: inline-flex; align-items: center; padding: 0 18px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); text-decoration: none; }
.secondary:hover { background: var(--line-soft); }
.platform { margin: 16px 0 0; color: var(--faint); font-size: 13px; }

/* --- pictures of the window -------------------------------------------------
   Every picture is the same captured window (mockup.html), scaled and cropped
   by the script at the end of index.html. */

.shot, .panel-shot {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101012;
  box-shadow: 0 30px 80px #00000070, 0 0 0 1px #ffffff08 inset;
}
.panel-shot { margin: 0; width: 100%; max-width: 760px; justify-self: center; }
.panel-shot a { display: block; cursor: zoom-in; }
.panel-shot a:focus-visible { outline-offset: -3px; }
.panel-shot img { display: block; width: 100%; height: auto; }
.shot iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1600px;
  height: 900px;
  border: 0;
  transform-origin: 0 0;
  pointer-events: none;
}
.window { margin: 8px 0 24px; }

/* Hero carousel: the current scene in front, its neighbours tilted and dimmed
   to either side. Positions come from data-pos, set by the script. */
.carousel { position: relative; }
.carousel-track { position: relative; width: 78%; margin: 0 auto; aspect-ratio: 1600 / 900; perspective: 1800px; }
/* Each scene is a whole app document: keep it on its own layer, rastered
   once, so scrolling the page moves pixels instead of repainting it. */
.carousel-track .shot { position: absolute; inset: 0; will-change: transform; contain: strict; transition: transform .7s cubic-bezier(.2,.7,.2,1), opacity .7s; }
.carousel-track .shot[data-pos="0"] { z-index: 3; }
.carousel-track .shot[data-pos="-1"],
.carousel-track .shot[data-pos="1"] { z-index: 2; opacity: .45; cursor: pointer; box-shadow: none; }
.carousel-track .shot[data-pos="-1"] { transform: translateX(-46%) scale(.78) rotateY(28deg); }
.carousel-track .shot[data-pos="1"] { transform: translateX(46%) scale(.78) rotateY(-28deg); }
.carousel-arrow {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 5;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: #14161bee; color: var(--text);
  font: inherit; font-size: 18px; cursor: pointer;
}
.carousel-arrow:hover { border-color: var(--accent); }
.carousel-arrow:focus-visible, .carousel-dots button:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.carousel-arrow.prev { left: -8px; }
.carousel-arrow.next { right: -8px; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.carousel-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: var(--line); cursor: pointer; transition: width .3s, background .3s; }
.carousel-dots button[aria-current="true"] { width: 28px; background: var(--accent); }
.window .shot { border-radius: 12px; box-shadow: 0 40px 120px #000000a0, 0 0 0 1px #ffffff0a inset, 0 0 120px #2b5bb022; }
.window figcaption { text-align: center; padding: 14px 0 0; min-height: 1.4em; transition: opacity .3s; color: var(--faint); font-size: 13px; }

/* --- features -------------------------------------------------------------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: center;
  padding: 96px 0 24px;
}
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip .feature-text { order: 2; }
.kicker { font-family: "Cascadia Mono", Consolas, monospace; font-size: 12.5px; color: var(--accent); letter-spacing: .04em; }
.feature h2 { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.12; letter-spacing: -.035em; font-weight: 600; margin: 14px 0 16px; }
.feature p { font-size: 16px; line-height: 1.7; color: var(--dim); margin: 0 0 20px; text-wrap: pretty; }
.feature ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.feature li { position: relative; padding-left: 22px; font-size: 14.5px; color: #c3c8d2; line-height: 1.5; }
.feature li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); opacity: .8; }
.feature code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; color: var(--text); background: var(--surface); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line-soft); }

/* --- the debugger: wider, with the paused line's amber ------------------------ */

.debug {
  --amber: #e3b341;
  position: relative;
  isolation: isolate;
  margin: 120px 0 0;
  padding: 72px 0 8px;
}
.debug::before {
  content: "";
  position: absolute;
  inset: 0 -40vw;
  z-index: -1;
  pointer-events: none;
  border-block: 1px solid var(--line-soft);
  background:
    radial-gradient(ellipse 40% 50% at 50% 30%, #e3b34114, transparent 70%),
    linear-gradient(180deg, #ffffff03, transparent 60%);
}
.debug .kicker { color: var(--amber); }
.debug-intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px 64px; align-items: end; margin-bottom: 40px; }
.debug-intro .kicker { grid-column: 1 / -1; }
.debug h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.04em; font-weight: 600; margin: 0; }
.debug h2 span { color: var(--amber); }
.debug-intro p { font-size: 16px; line-height: 1.7; color: var(--dim); margin: 0; text-wrap: pretty; }
.debug-shot { border-color: #3a3220; box-shadow: 0 40px 120px #000000a0, 0 0 0 1px #ffffff0a inset, 0 0 100px #e3b34114; }
.debug-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 40px; }
.debug-points h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.debug-points p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--dim); text-wrap: pretty; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #d16969; }
.dot.hollow { background: none; border: 2px solid #d16969; }
.dot.arrow { width: 0; height: 0; border-radius: 0; background: none; border-block: 5px solid transparent; border-left: 8px solid var(--amber); }

/* "New in" chip above the hero's headline. */
.news {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 22px; padding: 5px 12px 5px 5px;
  border: 1px solid var(--line); border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--dim); font-size: 13px; text-decoration: none;
  transition: border-color .15s, color .15s;
}
.news > span:first-child { padding: 3px 9px; border-radius: 999px; background: #e3b3411f; color: #e3b341; font-weight: 600; font-size: 12px; }
.news svg { width: 14px; height: 14px; }
.news:hover { border-color: #e3b34166; color: var(--text); }

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 120px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--line);
}
.grid div { background: var(--surface); padding: 26px 24px 28px; }
.grid h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.grid p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--dim); }
.grid code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; color: var(--text); }

.closing { text-align: center; padding: 120px 0 110px; }
.closing h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -.04em; font-weight: 600; margin: 0 auto 30px; max-width: 700px; line-height: 1.15; }

footer { border-top: 1px solid var(--line-soft); padding: 24px 0 32px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--faint); }
footer a { text-underline-offset: 4px; text-decoration-color: #4a5160; }

/* --- legal ----------------------------------------------------------------- */

.legal { max-width: 780px; margin: 0 auto; padding: 64px 0 96px; }
.legal h1 { font-size: clamp(34px, 4.5vw, 52px); margin: 0 0 18px; }
.legal-lead { font-size: 17px; color: var(--dim); line-height: 1.65; margin: 0 0 48px; }
.legal section { border-top: 1px solid var(--line-soft); padding-top: 36px; margin-top: 40px; }
.legal h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 12px; }
.legal h3 { font-size: 15px; font-weight: 600; color: var(--text); margin: 28px 0 10px; }
.legal p, .legal li { font-size: 14.5px; line-height: 1.7; color: var(--dim); }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 8px; }
.legal code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; color: var(--text); background: var(--surface); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line-soft); }
.legal-meta { color: var(--faint); font-size: 13.5px; }
.legal-caps { font-size: 12.5px; line-height: 1.65; color: var(--faint); background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px; padding: 14px 16px; }

/* --- narrow ---------------------------------------------------------------- */

.tutorial-steps { padding-left: 24px; display: grid; gap: 40px; }
.tutorial-steps li { padding-left: 8px; }
.tutorial-steps img { display: block; width: 100%; height: auto; border: 1px solid var(--line-soft); border-radius: 8px; margin-top: 20px; }

@media (max-width: 900px) {
  .top nav a:not(.nav-download) { display: none; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; padding-top: 72px; }
  .feature.flip .feature-text { order: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 88px; }
  .debug-intro { grid-template-columns: 1fr; align-items: start; }
  .debug-points { grid-template-columns: 1fr; gap: 22px; }
  .carousel-track { width: 100%; }
  .carousel-track .shot[data-pos="-1"], .carousel-track .shot[data-pos="1"] { opacity: 0; pointer-events: none; }
  .carousel-arrow { display: none; }
}
@media (max-width: 560px) {
  .top, main, footer { width: calc(100% - 32px); }
  .hero { padding: 64px 0 40px; }
  .intro { font-size: 16px; }
  .download, .secondary { width: 100%; justify-content: center; }
  .grid { grid-template-columns: 1fr; }
  .shot, .panel-shot, .window .shot { border-radius: 8px; }
  .closing { padding: 88px 0 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .download, .carousel-track .shot { transition: none; }
}
