/* Folio — PDF to TI-Nspire CX II */
:root {
  --bg: #000;
  --ink: #f5f5f4;
  --muted: #8c8c91;
  --faint: #4a4a4f;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --panel: #0b0b0c;
  --panel-2: #141416;
  --blue: #1e6ef3;
  --blue-hi: #4c8dff;
  --blue-deep: #0f4fc4;
  --sans: "Host Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --gutter: clamp(16px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: var(--blue); color: #fff; }
a { color: inherit; }
img { max-width: 100%; display: block; }
code { font: 0.86em/1 var(--mono); letter-spacing: -0.02em; }
kbd {
  font: 500 0.72em/1 var(--mono);
  display: inline-block;
  padding: 0.45em 0.55em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  vertical-align: 0.1em;
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 3px; }

h1, h2, h3 { font-weight: 500; letter-spacing: -0.035em; margin: 0; }
h1 { font-size: clamp(44px, 7.2vw, 104px); line-height: 0.95; }
h2 { font-size: clamp(32px, 4.4vw, 60px); line-height: 1.02; }
h3 { font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; }

.eyebrow {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dot { width: 6px; height: 6px; background: var(--blue); border-radius: 1px; display: inline-block; }

/* ---------- buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 20px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hi); }
.btn-primary:disabled { background: var(--faint); cursor: default; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.4); }
.btn-light { background: #fff; color: #000; }
.btn-light:hover { background: #dfe8ff; }
.btn-wide { width: 100%; }
.btn .ext { font: 500 11px/1 var(--mono); opacity: 0.7; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(620px, calc(100% - 24px));
  height: 52px;
  padding: 0 6px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 18, 20, 0.72);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; letter-spacing: -0.03em; text-decoration: none; }
.brand svg { width: 20px; height: 20px; fill: var(--blue); }
.brand svg path { stroke: #fff; stroke-width: 1.8; stroke-linecap: round; fill: none; }
.nav nav { display: flex; align-items: center; gap: 2px; }
.nav nav a { font-size: 14px; text-decoration: none; padding: 9px 12px; border-radius: 6px; color: #d6d6d8; transition: color 0.2s; }
.nav nav a:hover { color: #fff; }
.nav .nav-cta { background: var(--blue); color: #fff; margin-left: 6px; padding: 9px 16px; }
.nav .nav-cta:hover { background: var(--blue-hi); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 110px var(--gutter) 60px;
  overflow: hidden;
  isolation: isolate;
}
.field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after { /* fade the field into the next section */
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 160px;
  background: linear-gradient(transparent, var(--bg));
  z-index: -1;
  pointer-events: none;
}
.hero-grid {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 40px;
}
.hero-copy, .workspace { grid-column: 1; grid-row: 1; }
.stage { grid-column: 2; grid-row: 1; }

.hero-copy h1 { margin-bottom: 28px; }
.lede { font-size: clamp(17px, 1.5vw, 20px); color: #b9b9be; max-width: 30em; margin: 0 0 36px; letter-spacing: -0.01em; }
.lede code { color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.fine { margin: 22px 0 0; font: 400 11px/1.4 var(--mono); color: var(--muted); letter-spacing: 0.02em; }

/* page-load choreography */
.hero-copy > * { animation: rise 1s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.hero-copy > :nth-child(5) { animation-delay: 0.32s; }
.stage { animation: rise 1.3s 0.2s var(--ease) both; }
.hero { overflow: clip; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* idle <-> ready states */
.workspace { opacity: 0; visibility: hidden; transform: translateY(20px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0.6s; }
.hero-copy { transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), visibility 0.5s; }
.hero[data-state="ready"] .hero-copy { opacity: 0; visibility: hidden; transform: translateY(-20px); }
.hero[data-state="ready"] .workspace { opacity: 1; visibility: visible; transform: none; }

.drop-veil {
  position: absolute; inset: 12px;
  border: 1.5px dashed var(--blue-hi);
  border-radius: 16px;
  background: rgba(30, 110, 243, 0.08);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  z-index: 5;
}
.drop-veil p { font-size: 28px; letter-spacing: -0.03em; margin: 0; }
.hero.dragging .drop-veil { opacity: 1; }

/* ---------- workspace ---------- */
.workspace { max-width: 520px; }
.ws-back {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 24px;
}
.ws-back:hover { color: var(--ink); }
.ws-file { font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -0.035em; line-height: 1.1; margin: 0 0 6px; word-break: break-word; }
.ws-meta { margin: 0 0 26px; font: 400 12px/1.4 var(--mono); color: var(--muted); }

.settings { border-top: 1px solid var(--line); margin-bottom: 24px; }
.setting {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
}
.label { font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.settings input[type="number"], .name-input input {
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  font: 400 14px/1 var(--sans);
  height: 34px;
  padding: 0 10px;
  width: 64px;
  text-align: center;
  -moz-appearance: textfield;
}
.settings input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
.settings input:focus { outline: none; border-color: var(--blue-hi); }
.range-inputs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.name-input { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.name-input input { width: 180px; text-align: left; }

.seg { display: flex; background: var(--panel-2); border-radius: 7px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; cursor: pointer;
  font-size: 13px; padding: 7px 11px; border-radius: 5px; color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { background: #2a2a2e; color: #fff; }

.switch { position: relative; width: 42px; height: 24px; display: inline-block; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; background: #2a2a2e; border-radius: 99px; transition: background 0.25s; }
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; transition: transform 0.25s var(--ease);
}
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--blue-hi); outline-offset: 3px; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 180px; height: 24px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--line-strong); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--line-strong); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; margin-top: -7px; border: 0; }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; }

.progress { height: 2px; background: var(--line); margin-top: 18px; overflow: hidden; border-radius: 2px; }
.progress span { display: block; height: 100%; width: 0; background: var(--blue-hi); transition: width 0.3s var(--ease); }
.status { min-height: 1.4em; margin: 14px 0 0; font: 400 12px/1.5 var(--mono); color: var(--muted); white-space: pre-line; }
.downloads { display: grid; gap: 8px; margin-top: 10px; }
.downloads a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 8px;
  text-decoration: none; font-weight: 500; letter-spacing: -0.01em;
  transition: border-color 0.2s, background 0.2s;
  animation: rise 0.6s var(--ease) both;
}
.downloads a:hover { border-color: var(--blue-hi); background: rgba(30, 110, 243, 0.08); }
.downloads a small { font: 400 11px/1 var(--mono); color: var(--muted); }
.send-help { margin-top: 10px; animation: rise 0.6s 0.1s var(--ease) both; }
.send-help[hidden] { display: none; }

/* info tooltips on setting labels */
.setting .label { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.info {
  width: 17px; height: 17px; padding: 0; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: transparent; color: var(--muted);
  font: 500 10px/1 var(--mono); cursor: help;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.info:hover, .info:focus-visible, .label.open .info { color: #fff; border-color: var(--blue-hi); background: rgba(30, 110, 243, 0.2); }
.tip {
  position: absolute; left: -2px; top: calc(100% + 12px); z-index: 20;
  width: 270px; padding: 12px 14px;
  background: #18181b; border: 1px solid var(--line-strong); border-radius: 8px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.8);
  font: 400 13px/1.5 var(--sans); letter-spacing: -0.005em; text-transform: none; color: #d8d8dd;
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity 0.2s, transform 0.25s var(--ease);
}
.tip::before { content: ""; position: absolute; top: -5px; left: calc(var(--arrow, 100px)); width: 8px; height: 8px; background: #18181b; border-left: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong); transform: rotate(45deg); }
.info:hover + .tip, .info:focus-visible + .tip, .label.open .tip { opacity: 1; transform: none; }

/* ---------- 3D calculator (TI-Nspire CX II) ---------- */
.stage { display: flex; flex-direction: column; align-items: center; }
.calc-zoom {
  perspective: 1600px;
  transition: transform 1s var(--ease); /* no will-change: it would keep the layer at 1x and blur the zoomed screen */
}
.calc {
  --rx: 0deg; --ry: 0deg; --gx: 30%; --gy: 20%;
  --shell: #10151c;
  font-size: clamp(11px, 1.1vw, 15.5px);
  position: relative;
  width: 20em;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  outline: none;
  cursor: grab;
  touch-action: pan-y;
}
.calc:active { cursor: grabbing; }
.calc-body { position: relative; transform-style: preserve-3d; }
.calc-layer {
  position: absolute; inset: 0;
  border-radius: 1.7em 1.7em 2.6em 2.6em;
  background: linear-gradient(90deg, #06080b, #131a24 20%, #0f2a4d 50%, #131a24 80%, #06080b);
  transform: translateZ(calc(var(--z) * 1px));
}
/* dark shell with the blue side rails */
.calc-shell {
  position: relative;
  border-radius: 1.7em 1.7em 2.6em 2.6em;
  padding: 0.3em 8.2% 1.1em;
  background:
    radial-gradient(90% 55% at var(--gx) var(--gy), rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(90deg,
      #07090c 0, #232b37 2%, #155aa6 3%, #3c9df2 5.3%, #1c6ec6 7.4%, var(--shell) 8.2%,
      var(--shell) 91.8%, #1c6ec6 92.6%, #3c9df2 94.7%, #155aa6 97%, #232b37 98%, #07090c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -0.3em 0.4em rgba(0, 0, 0, 0.5);
}
.calc-shell::after { /* blue wrapping round the bottom corners */
  content: ""; position: absolute; left: 3%; right: 3%; bottom: 0.25em; height: 1.1em;
  border-radius: 0 0 2.4em 2.4em;
  border-bottom: 0.32em solid #2f8ee8;
  pointer-events: none;
}
.calc-face {
  position: relative;
  border-radius: 0.5em 0.5em 1.5em 1.5em;
  padding: 0.55em 0.7em 1.05em;
  background:
    radial-gradient(120% 60% at var(--gx) var(--gy), rgba(255, 255, 255, 0.9), transparent 55%),
    linear-gradient(180deg, #fdfdfe 0%, #f1f3f6 45%, #e6e9ee 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.35);
  color: #1b1d21;
}
.logo { text-align: center; color: #1f6fc9; font: 500 0.98em/1 var(--sans); letter-spacing: -0.02em; }
.logo-n { font-style: italic; font-weight: 600; letter-spacing: -0.04em; }
.logo-cx { margin-left: 0.35em; font-weight: 400; }
.maker { display: flex; align-items: center; justify-content: center; gap: 0.3em; margin: 0.25em 0 0.45em; font: 600 0.46em/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: #3a3d43; }
.maker svg { width: 1.3em; height: 1.3em; fill: #3a3d43; }

.bezel {
  position: relative;
  background: #0d0e10;
  border-radius: 0.28em;
  padding: 0.3em;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.bezel canvas { display: block; width: 100%; aspect-ratio: 4 / 3; background: #fff; }
.glare {
  position: absolute; inset: 0.3em;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.03) 36%, transparent 40%);
  pointer-events: none; mix-blend-mode: screen;
}
.calc:focus-visible .bezel { box-shadow: 0 0 0 2px var(--blue-hi); }

/* keys */
.k {
  position: relative;
  font: 500 0.52em/1 var(--sans);
  font-style: normal;
  height: 2.95em;
  display: grid; place-items: center;
  border-radius: 0.5em;
  user-select: none;
  transition: transform 0.08s, filter 0.08s;
}
.k svg { width: 1.6em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.3; }
.k[data-sub]::before {
  content: attr(data-sub);
  position: absolute; left: -0.5em; right: -0.5em; bottom: 100%;
  margin-bottom: 0.28em;
  text-align: center; white-space: nowrap;
  font-size: 0.78em; font-weight: 500; color: #2a7bd0;
}
.k-w {
  background: linear-gradient(#ffffff, #eceef2);
  box-shadow: 0 0 0 1px #b5bcc6, 0 0.16em 0 #a2aab5, 0 0.3em 0.45em rgba(0, 0, 0, 0.16);
}
.k-b {
  font-size: 0.76em; height: 2.02em; border-radius: 0.34em;
  background: linear-gradient(#3a3d44, #1c1e22);
  color: #fff;
  box-shadow: 0 0 0 1px #0b0c0e, 0 0.1em 0 #000, 0 0.22em 0.35em rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.k-b[data-sub]::before { font-size: 0.54em; }
.k-blue {
  background: linear-gradient(#3f93ec, #1a68c1);
  color: #fff;
  box-shadow: 0 0 0 1px #11509a, 0 0.16em 0 #0d3f7c, 0 0.3em 0.45em rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
[data-key] { cursor: pointer; }
.k.pressed, [data-key].pressed { transform: translateY(0.12em); filter: brightness(0.93); }
.k-blue.pressed { filter: brightness(1.2); }

.cluster { display: grid; grid-template-columns: 1fr 2.05fr 1fr; gap: 0.6em; align-items: center; margin: 1.05em 0.1em 0; }
.cluster .col { display: grid; gap: 0.95em; padding-top: 0.5em; }
.pad {
  position: relative; aspect-ratio: 1.12;
  border-radius: 1em;
  background: linear-gradient(#f3f5f8, #dde1e7);
  box-shadow: 0 0 0 0.16em #8e98a5, 0 0 0 0.26em #e9ecf0, 0 0 0 0.3em #b3bbc6, 0 0.3em 0.6em rgba(0, 0, 0, 0.2), inset 0 1px 0 #fff;
}
.pad-center {
  position: absolute; left: 50%; top: 50%; width: 1.9em; height: 1.9em; transform: translate(-50%, -50%);
  border-radius: 0.5em;
  background: linear-gradient(#fdfdfe, #e6e9ee);
  box-shadow: 0 0 0 1px #aab2bd, 0 0.1em 0.2em rgba(0, 0, 0, 0.15);
  display: grid; place-items: center;
}
.pad-center svg { width: 0.95em; fill: #3a3d43; }
.pad-arrow { position: absolute; width: 1.6em; height: 1.6em; display: grid; place-items: center; }
.pad-arrow::before { content: ""; border: 0.2em solid transparent; }
.pad-arrow.up { top: 0.15em; left: calc(50% - 0.8em); } .pad-arrow.up::before { border-bottom-color: #3a3d43; margin-top: -0.2em; }
.pad-arrow.down { bottom: 0.15em; left: calc(50% - 0.8em); } .pad-arrow.down::before { border-top-color: #3a3d43; margin-bottom: -0.2em; }
.pad-arrow.left { left: 0.15em; top: calc(50% - 0.8em); } .pad-arrow.left::before { border-right-color: #3a3d43; margin-left: -0.2em; }
.pad-arrow.right { right: 0.15em; top: calc(50% - 0.8em); } .pad-arrow.right::before { border-left-color: #3a3d43; margin-right: -0.2em; }
.pad-arrow:hover::before { filter: brightness(2); }

.mods { display: grid; grid-template-columns: 1fr 1fr 0.55fr 1fr 1fr; gap: 0.45em; margin: 1.3em 0.1em 0; }
.keys {
  display: grid;
  grid-template-columns: 1fr 1fr 1.18fr 1.18fr 1.18fr 0.6fr 0.6fr;
  gap: 1.05em 0.38em;
  margin: 1.75em 0.1em 0;
  align-items: end;
}
.keys .k-s { font-size: 0.6em; height: 2.55em; }
.keys .k-s:nth-child(7n+6) { border-radius: 0.45em 0.12em 0.12em 0.45em; }
.keys .k-s:nth-child(7n) { border-radius: 0.12em 0.45em 0.45em 0.12em; }
.keys .k-enter { grid-column: span 2; }

.alpha { display: grid; grid-template-columns: repeat(9, 1fr); gap: 0.4em 0.3em; margin: 1.05em 0.05em 0; }
.alpha i {
  font: 500 0.4em/1 var(--sans); font-style: normal;
  height: 2.75em; display: grid; place-items: center;
  border-radius: 0.9em;
  background: linear-gradient(#ffffff, #eceef2); color: #1b1d21;
  box-shadow: 0 0 0 1px #b5bcc6, 0 0.14em 0 #a2aab5;
}
.alpha i.dark { background: linear-gradient(#3a3d44, #1c1e22); color: #fff; box-shadow: 0 0 0 1px #0b0c0e, 0 0.14em 0 #000; }
.alpha i.gap { visibility: hidden; }
.alpha i.space { grid-column: span 3; }

.calc-shadow {
  position: absolute; left: 12%; right: 12%; bottom: -7%; height: 10%;
  background: radial-gradient(closest-side, rgba(30, 110, 243, 0.4), transparent);
  filter: blur(18px);
  transform: translateZ(-60px) translateX(calc(var(--ry) * -1.2));
  pointer-events: none;
}
.stage-hint { transition: opacity 0.5s var(--ease); }
.hero.screen-focus .stage-hint { opacity: 0; }
.stage-hint { margin: 42px 0 0; font: 400 11px/1.6 var(--mono); color: var(--muted); text-align: center; letter-spacing: 0.02em; }
.stage-hint kbd { font-size: 10px; }

/* ---------- sections ---------- */
section { position: relative; }
.section-head { max-width: 1280px; margin: 0 auto 64px; padding: 0 var(--gutter); }
.section-head h2 { max-width: 14em; }
.sub { color: #a7a7ad; font-size: 18px; max-width: 34em; margin: 24px 0 0; letter-spacing: -0.01em; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* how it works */
.how { padding: 140px 0 120px; }
.offers {
  list-style: none; margin: 0 auto; padding: 0 var(--gutter);
  max-width: 1280px;
  display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 16px;
  counter-reset: none;
}
.offer {
  position: relative;
  display: flex; flex-direction: column;
  padding: 32px 30px 30px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 60%);
  transition: border-color 0.3s, background 0.3s;
}
.offer:hover { border-color: var(--line-strong); }
.offer:nth-child(2) { transition-delay: 0.08s; }
.offer:nth-child(3) { transition-delay: 0.16s; }
.offer .num { font: 500 11px/1 var(--mono); color: var(--blue-hi); letter-spacing: 0.06em; text-transform: uppercase; }
.offer svg { width: 44px; height: 44px; margin: 36px 0 26px; fill: none; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.offer h3 { margin-bottom: 12px; }
.offer p { color: #a0a0a6; margin: 0 0 28px; max-width: 26em; }
.offer-link {
  margin-top: auto; align-self: flex-start;
  font-size: 15px; font-weight: 500; text-decoration: none; letter-spacing: -0.01em;
  padding-bottom: 3px; border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s;
}
.offer-link:hover { border-color: currentColor; }
.offer-featured { background: var(--blue); border-color: var(--blue); color: #fff; }
.offer-featured:hover { border-color: var(--blue-hi); }
.offer-featured .corner { color: rgba(255, 255, 255, 0.7); }
.offer-featured .num { color: #fff; opacity: 0.85; }
.offer-featured p { color: rgba(255, 255, 255, 0.88); }
.offer-featured .offer-link { margin-top: 0; border-color: rgba(255, 255, 255, 0.5); }
.offer-actions { margin-top: auto; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

/* hero: what's included */
.includes { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.includes li { font-size: 14px; color: #c9c9ce; display: flex; align-items: center; gap: 8px; letter-spacing: -0.005em; }
.includes span { font: 500 10px/1 var(--mono); color: var(--blue-hi); }
.hero-copy > :nth-child(6) { animation-delay: 0.4s; }

/* install tour */
.install { padding: 100px 0 40px; }
.tour { position: relative; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.tour-sticky {
  position: relative;
  height: clamp(560px, calc(100vh - 160px), 680px);
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
}
.corner { position: absolute; width: 11px; height: 11px; z-index: 2; pointer-events: none; }
.corner::before, .corner::after { content: ""; position: absolute; background: currentColor; }
.corner::before { left: 5px; top: 0; width: 1px; height: 11px; }
.corner::after { top: 5px; left: 0; height: 1px; width: 11px; }
.corner.tl { top: 14px; left: 14px; } .corner.tr { top: 14px; right: 14px; }
.corner.bl { bottom: 14px; left: 14px; } .corner.br { bottom: 14px; right: 14px; }

.tour-panel {
  position: relative; background: var(--blue); color: #fff;
  padding: clamp(28px, 4vw, 56px);
  display: flex; flex-direction: column; justify-content: center;
}
.tour-kicker { position: absolute; top: 34px; left: 0; right: 0; text-align: center; margin: 0; font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.tour-texts { position: relative; min-height: 300px; }
.tour-text {
  position: absolute; inset: 0; margin: auto 0; height: fit-content;
  opacity: 0; transform: translateY(18px); pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.tour-text.is-active { opacity: 1; transform: none; pointer-events: auto; }
.tour-text h3 { font-size: clamp(30px, 3.2vw, 46px); letter-spacing: -0.035em; line-height: 1.02; margin-bottom: 22px; }
.tour-text p, .tour-text li { font-size: 17px; line-height: 1.5; color: rgba(255, 255, 255, 0.88); }
.tour-text p { margin: 0 0 14px; max-width: 28em; }
.tour-text ul { margin: 0 0 16px; padding: 0; list-style: none; }
.tour-text li { padding: 7px 0 7px 22px; position: relative; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.tour-text li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 6px; height: 6px; background: #fff; }
.tour-text a { color: #fff; text-underline-offset: 3px; }
.tour-text b { font-weight: 600; color: #fff; }
.tour-text code { color: #fff; }
.tour-text .note { font-size: 14px; color: rgba(255, 255, 255, 0.72); border-left: 2px solid rgba(255, 255, 255, 0.5); padding-left: 12px; }
.tour-text kbd { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.12); color: #fff; }
.keymap { margin: 0; display: grid; max-width: 30em; }
.keymap div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.keymap dt { font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.keymap dd { margin: 0; font-size: 15px; color: rgba(255, 255, 255, 0.85); text-align: right; white-space: nowrap; }
.tour-nav {
  position: absolute; left: clamp(28px, 4vw, 56px); right: clamp(28px, 4vw, 56px); bottom: 30px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.tour-btn {
  height: 42px; padding: 0 18px; border: 0; border-radius: 6px; cursor: pointer;
  background: #fff; color: #0a1f44; font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s var(--ease), opacity 0.2s, background 0.2s;
}
.tour-btn:hover:not(:disabled) { background: #e8f0ff; }
.tour-btn:active:not(:disabled) { transform: scale(0.97); }
.tour-btn:disabled { opacity: 0.35; cursor: default; box-shadow: none; }
.tour-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.tour-dots { display: flex; gap: 2px; }
.tour-dots button { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.tour-dots button::before { content: ""; width: 6px; height: 3px; background: rgba(255, 255, 255, 0.45); transition: width 0.4s var(--ease), background 0.4s; }
.tour-dots button.on::before { width: 20px; background: #fff; }
.tour-dots button:hover::before { background: #fff; }

.tour-stage {
  position: relative; color: var(--faint);
  background-color: #050505;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.2px);
  background-size: 28px 28px;
  display: grid; place-items: center;
  padding: clamp(24px, 4vw, 56px);
  overflow: hidden;
}
.tour-shots { position: relative; width: 100%; aspect-ratio: 16 / 11; }
.shot {
  position: absolute; inset: 0; margin: 0;
  display: grid; place-items: center;
  opacity: 0; transform: scale(0.96) translateY(10px);
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease);
}
.shot.is-active { opacity: 1; transform: none; }
.shot img {
  max-height: 100%; width: auto; object-fit: contain;
  border-radius: 8px; background: #fff;
  box-shadow: 0 30px 80px -20px rgba(30, 110, 243, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.shot-calc img {
  width: 82%; height: auto; image-rendering: auto;
  border-radius: 4px;
  border: 10px solid #0e0e10;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 30px 80px -20px rgba(30, 110, 243, 0.45);
}
.kit { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; width: min(100%, 440px); }
.kit-item {
  aspect-ratio: 1.3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: #fff; color: #111; border-radius: 6px;
  font: 500 11px/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase;
}
.kit-item svg { height: 54px; width: 54px; fill: none; stroke: var(--blue); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }

/* ai */
.ai { padding: 160px var(--gutter) 120px; }
.ai-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.ai-copy h2 { max-width: 11em; }
.tips { list-style: none; padding: 0; margin: 36px 0 36px; border-top: 1px solid var(--line); }
.tips li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); color: #b3b3b9; }
.tips span { font: 500 12px/1.7 var(--mono); color: var(--ink); }
.doc-card {
  border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden;
  background: var(--panel);
  box-shadow: 0 40px 120px -40px rgba(30, 110, 243, 0.35);
  transition-delay: 0.12s;
}
.doc-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: #111113; }
.doc-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2c2c30; }
.doc-bar span { margin-left: 10px; font: 400 11px/1 var(--mono); color: var(--muted); }
.doc-body {
  height: 460px; overflow: auto; padding: 28px 32px 40px;
  font-size: 14px; color: #b9b9bf;
  mask-image: linear-gradient(#000 85%, transparent);
  -webkit-mask-image: linear-gradient(#000 85%, transparent);
  scrollbar-width: thin; scrollbar-color: #333 transparent;
}
.doc-body h1 { font-size: 22px; letter-spacing: -0.03em; line-height: 1.2; color: var(--ink); margin: 0 0 14px; }
.doc-body h2 { font-size: 16px; letter-spacing: -0.02em; color: var(--ink); margin: 26px 0 8px; }
.doc-body p { margin: 0 0 10px; }
.doc-body ul, .doc-body ol { margin: 0 0 10px; padding-left: 20px; }
.doc-body li { margin: 4px 0; }
.doc-body strong { color: var(--ink); font-weight: 500; }
.doc-body pre { font: 400 11.5px/1.6 var(--mono); background: #070708; border: 1px solid var(--line); border-radius: 8px; padding: 14px; overflow: auto; color: #9fb8ff; }
.doc-body code { color: #cfd9ff; }
.doc-loading { color: var(--muted); font: 400 12px/1 var(--mono); }

/* faq */
.faq { padding: 80px 0 120px; }
.faq-list { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); border-top: 0; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 0; font-size: clamp(18px, 1.6vw, 22px); letter-spacing: -0.02em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background: linear-gradient(#fff, #fff) center / 14px 1.5px no-repeat, linear-gradient(#fff, #fff) center / 1.5px 14px no-repeat;
  transition: transform 0.35s var(--ease);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover { color: #fff; }
.faq-list details p { margin: -6px 0 28px; max-width: 40em; color: #a7a7ad; font-size: 16px; }

/* closer */
.closer { padding: 60px var(--gutter) 160px; }
.closer-inner {
  max-width: 1280px; margin: 0 auto; text-align: center;
  padding: clamp(70px, 10vw, 140px) 24px;
  border: 1px solid var(--line);
  background: radial-gradient(60% 90% at 50% 120%, rgba(30, 110, 243, 0.45), transparent 70%);
}
.closer h2 { font-size: clamp(40px, 6vw, 88px); margin-bottom: 36px; }

/* footer */
.footer { background: var(--blue); color: #fff; padding: 72px var(--gutter) 28px; }
.footer-top { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; flex-wrap: wrap; }
.footer-mark { font-size: clamp(90px, 16vw, 230px); font-weight: 600; letter-spacing: -0.07em; line-height: 0.8; margin: 0; }
.footer-cols { display: flex; gap: 64px; }
.footer-cols h4 { font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 18px; opacity: 0.75; }
.footer-cols a { display: block; text-decoration: none; margin-bottom: 10px; font-size: 15px; }
.footer-cols a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  max-width: 1280px; margin: 64px auto 0; padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font: 400 11px/1.6 var(--mono); opacity: 0.85;
}
.footer-bottom p { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { padding-top: 96px; align-items: flex-start; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .stage { grid-column: 1; grid-row: 2; }
  .calc { font-size: clamp(11px, 3.4vw, 15px); }
  .offers { grid-template-columns: 1fr; }
  .offer svg { margin: 24px 0 18px; }
  .tour-sticky { grid-template-columns: 1fr; grid-template-rows: auto 300px; height: auto; }
  .tour-panel { padding: 60px 22px 96px; }
  .tour-nav { left: 22px; right: 22px; bottom: 24px; }
  .tour-kicker { top: 22px; }
  .tour-text h3 { margin-bottom: 14px; }
  .tour-text p, .tour-text li { font-size: 15px; }
  .tour-texts { min-height: 330px; }
  .tour-stage { padding: 20px; }
  .ai-grid { grid-template-columns: 1fr; }
  .doc-body { height: 380px; padding: 22px; }
  .footer-cols { gap: 40px; }
}
@media (max-width: 600px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .setting { flex-wrap: wrap; padding: 10px 0; }
  .seg button { padding: 7px 8px; font-size: 12px; }
  .tips li { grid-template-columns: 1fr; gap: 4px; }
  .stage-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
.nowrap { white-space: nowrap; }
