/*
 * The launch page, on top of site.css (tokens, type, buttons, the app window). Dark only.
 * Uplink's own look next to Lantern's: bigger, tighter type, and light that rises in columns.
 */

/* ── nav: a meter that fills as you read ── */
.nav-meter { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 3px; margin: 0; color: var(--ink); opacity: 0.9; pointer-events: none; }
.nav-end .btn { min-width: 128px; }

/* ── hero ── */
.hero-x { padding-top: calc(var(--nav-h) + clamp(48px, 9vh, 104px)); }
.hero-x .hero-field, .hero-x .hero-veil { height: min(1300px, 150vh); }
.hero-veil-x {
  background:
    linear-gradient(to bottom, rgb(var(--bg-rgb) / 0.75), transparent 160px),
    radial-gradient(56% 42% at 50% 24%, rgb(var(--bg-rgb) / 0.94) 0%, rgb(var(--bg-rgb) / 0.7) 50%, transparent 82%),
    linear-gradient(to bottom, transparent 62%, var(--bg));
}
.hero-copy-x { align-items: center; text-align: center; gap: 26px; }
.display-x { font-size: clamp(60px, 10.4vw, 156px); line-height: 0.88; letter-spacing: -0.048em; max-width: none; text-wrap: balance; }
.hero-copy-x .display-x { max-width: none; }
.hero-copy-x .lead { max-width: 34em; text-wrap: pretty; }
.hero-copy-x .cta-row { justify-content: center; margin-top: 6px; }
.hero-copy-x .meta { justify-content: center; flex-wrap: wrap; }

.badge {
  display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px 0 5px; border-radius: 999px;
  font-size: 14.5px; font-weight: 500; color: var(--text-2); background: rgb(var(--sheet-rgb) / 0.7); box-shadow: inset 0 0 0 1px var(--line-2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: color var(--d-2), box-shadow var(--d-2), transform var(--d-1) var(--ease-out);
}
.badge:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-3); }
.badge:active { transform: scale(0.97); }
.badge .ic { width: 13px; height: 13px; transition: translate var(--d-3) var(--ease-out); }
.badge:hover .ic { translate: 2px 0; }
.badge-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--text); color: var(--text-inverse); font-size: 12.5px; font-weight: 600; }

.hero-x .hero-app { margin-top: clamp(56px, 9vh, 96px); padding-bottom: 96px; }
.hero-x .app { box-shadow: var(--shadow-app), 0 -40px 140px -50px rgb(138 132 255 / 0.4); }

/* The tray's live check, after the upload */
.tray-live { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; max-height: 0; overflow: hidden; transition: max-height 360ms var(--ease-out), margin 360ms var(--ease-out); }
.tray.checking .tray-live { max-height: 70px; margin-top: 12px; }
.tray-live li { display: flex; align-items: center; gap: 8px; height: 24px; font-size: 12.5px; color: var(--text-4); white-space: nowrap; transition: color 200ms; }
.tray-live li::before { content: ''; width: 6px; height: 6px; flex: none; background: var(--line-3); transition: background-color 200ms, box-shadow 200ms; }
.tray-live li.ok { color: var(--text-2); }
.tray-live li.ok::before { background: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }

/* Chapters and pause, under the window */
.chapters { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 22px; }
.ch-list { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgb(var(--sheet-rgb) / 0.8); box-shadow: inset 0 0 0 1px var(--line-2); }
.ch { position: relative; height: 36px; padding: 0 16px; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--text-3); overflow: hidden; transition: color var(--d-2), background-color var(--d-3), transform var(--d-1) var(--ease-out); }
.ch:hover { color: var(--text); background: var(--fill-2); }
.ch:active { transform: scale(0.96); }
.ch[aria-checked='true'] { color: var(--text-inverse); background: var(--text); }
/* how far the playing chapter has got */
.ch i { position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; background: currentColor; opacity: 0.28; transform-origin: 0 50%; transform: scaleX(0); }
.ch[aria-checked='true'] i { transform: scaleX(var(--p, 0)); }
.ch-pause { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; color: var(--text-2); background: rgb(var(--sheet-rgb) / 0.8); box-shadow: inset 0 0 0 1px var(--line-2); transition: color var(--d-2), box-shadow var(--d-2), transform var(--d-1) var(--ease-out); }
.ch-pause:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-3); }
.ch-pause:active { transform: scale(0.94); }
.ch-pause .i-play, .ch-pause[aria-pressed='true'] .i-pause { display: none; }
.ch-pause[aria-pressed='true'] .i-play { display: block; }

/* ── Free with Lantern ── */
.band { position: relative; overflow: hidden; border-block: 1px solid var(--line); background: var(--sheet); padding: clamp(56px, 7vw, 84px) 0; scroll-margin-top: var(--nav-h); }
.band-row { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.band-fx { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
.band-h { flex: none; font-size: clamp(26px, 2.6vw, 34px); font-weight: 500; letter-spacing: -0.025em; white-space: nowrap; }
.band-mark { display: inline-block; width: 0.715em; height: 0.715em; margin: 0 0.16em 0 0.04em; vertical-align: baseline; }
.band-p { font-size: 17px; color: var(--text-3); max-width: 38em; text-wrap: balance; }
.band .btn { margin-top: 14px; }
.band .btn .ic { width: 14px; height: 14px; }

/* ── sections ── */
.sec-x { min-height: 0; padding: clamp(96px, 13vh, 150px) 0; }
.sec-short { padding-bottom: clamp(110px, 15vh, 170px); }
.h2-x { font-size: clamp(42px, 5.8vw, 84px); line-height: 0.94; letter-spacing: -0.042em; max-width: none !important; }
.h2-dim { color: var(--text-4); }
.speed-intro { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.lan, .check, .race, .decoder, .s3, .steps3, .mac-x { font-family: var(--ui); }

/* ── agents: a Lantern conversation ── */
.lan { position: relative; display: flex; flex-direction: column; min-height: 470px; border-radius: 20px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 90px -50px rgb(0 0 0 / 0.8); overflow: hidden; }
.lan-head { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.lan-head b { font-weight: 600; }
.lan-dots { display: flex; gap: 6px; margin-right: 6px; }
.lan-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--fill-4); }
.lan-log { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 20px 18px; font-size: 14px; line-height: 1.45; }
.lan-log > * { animation: rise 420ms var(--ease-out) both; }
.msg-me { align-self: flex-end; max-width: 78%; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: var(--panel-3); color: var(--text); }
.msg-ag { color: var(--text-2); max-width: 92%; }
.msg-ag .live-dot { display: inline-block; margin-right: 8px; vertical-align: 1px; }
.dep { padding: 14px; border-radius: 12px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.dep-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dep-top b { font-weight: 600; font-size: 14px; }
.dep-top .dim { color: var(--text-3); font-size: 12.5px; }
.dep-files { margin-top: 10px; display: grid; gap: 3px; font: 12.5px/1.5 var(--mono); color: var(--text-3); }
.dep-files li { display: flex; gap: 12px; }
.dep-files .add { color: var(--green); } .dep-files .del { color: var(--red); } .dep-files .new { color: var(--text-2); }
.dep .a-btn { height: 32px; padding: 0 14px; cursor: var(--cursor-hand); }
.dep .a-btn:hover { transform: translateY(-1px); }
.dep .a-btn:active { transform: scale(0.97); }
.dep .a-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.dep .a-btn.pressed { box-shadow: 0 0 0 3px rgb(var(--text-rgb) / 0.18); }
.dep .a-btn[disabled] { opacity: 0.5; pointer-events: none; }
.dep .pixel-meter { margin-top: 12px; }
.lan-foot { padding: 14px 16px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.lan-try { font-size: 12.5px; color: var(--text-4); }
.lan-prompts { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: color var(--d-2), background-color var(--d-2), box-shadow var(--d-2), transform var(--d-1) var(--ease-out); }
.chip-btn:hover { color: var(--text); background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--line-3); }
.chip-btn:active { transform: scale(0.96); }
.chip-btn[aria-pressed='true'] { color: var(--text-inverse); background: var(--text); box-shadow: none; }

/* ── live check ── */
.check { border-radius: 20px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 90px -50px rgb(0 0 0 / 0.8); padding: 22px; }
.ck-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.ck-head b { display: block; font-size: 16px; font-weight: 620; letter-spacing: -0.01em; }
.ck-head .dim { font-size: 13px; color: var(--text-3); }
.switch-row { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-3); cursor: var(--cursor-hand); }
.switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--fill-3); box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color var(--d-2), box-shadow var(--d-2); }
.switch i { position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform var(--d-3) var(--ease-out), background-color var(--d-2); }
.switch:hover { box-shadow: inset 0 0 0 1px var(--line-3); }
.switch:active i { width: 19px; }
.switch[aria-checked='true'] { background: var(--amber); }
.switch[aria-checked='true'] i { transform: translateX(16px); background: var(--bg); }
.switch[aria-checked='true']:active i { transform: translateX(13px); }
.ck-list { display: grid; gap: 2px; }
.ck-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border-radius: 10px; font-size: 14px; color: var(--text-4); transition: color 220ms, background-color 220ms; }
.ck-list li .ic { width: 16px; height: 16px; opacity: 0; transition: opacity 200ms; }
.ck-list li .ms { font-size: 12.5px; color: var(--text-4); font-variant-numeric: tabular-nums; }
.ck-list li.ok { color: var(--text); }
.ck-list li.ok .ic { opacity: 1; color: var(--green); }
.ck-list li.bad { color: var(--text); background: var(--amber-dim); }
.ck-list li.bad .ic { opacity: 1; color: var(--amber); }
.ck-note { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--panel-2); font-size: 13.5px; line-height: 1.5; color: var(--text-2); animation: rise 360ms var(--ease-out) both; }
.ck-note code { font: 12.5px var(--mono); color: var(--text); }

/* ── speed ── */
.stats-x { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 56px; border-radius: 18px; overflow: hidden; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.stats-x li { background: var(--bg); padding: 28px 24px 26px; display: flex; flex-direction: column; gap: 12px; }
.stats-x b { font-size: clamp(44px, 4.6vw, 64px); font-weight: 500; line-height: 1; letter-spacing: -0.04em; }
.stats-x span { font-size: 15px; line-height: 1.4; color: var(--text-3); max-width: 17em; }
.race { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; padding: 22px 24px; border-radius: 18px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); }
.race-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; color: var(--text-3); }
.race-top b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.race .pixel-meter { margin-top: 12px; color: var(--text-4); }
.race-up .pixel-meter { color: var(--ink); }
.race-top em { font-style: normal; color: var(--text-4); }
.race-ctl { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; }
.race-ctl label { font-size: 14px; color: var(--text-3); white-space: nowrap; }
.race-ctl label b { display: inline-block; min-width: 2.2em; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
input[type='range'] { flex: 1; -webkit-appearance: none; appearance: none; height: 32px; background: none; cursor: var(--cursor-hand); }
input[type='range']::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(var(--text), var(--text)) 0 0 / var(--fill, 2%) 100% no-repeat, var(--fill-4); }
input[type='range']::-moz-range-track { height: 4px; border-radius: 4px; background: var(--fill-4); }
input[type='range']::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--text); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: var(--text); box-shadow: 0 2px 8px rgb(0 0 0 / 0.5); transition: transform var(--d-1) var(--ease-out); }
input[type='range']::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--text); }
input[type='range']:hover::-webkit-slider-thumb { transform: scale(1.1); }
input[type='range']:active::-webkit-slider-thumb { transform: scale(0.92); }
input[type='range']:focus-visible { outline: none; }
input[type='range']:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--focus); }
input[type='range']:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--focus); }

/* ── simple ── */
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; }
.s3 { display: flex; flex-direction: column; border-radius: 18px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); overflow: hidden; padding-bottom: 22px; }
.s3-vis { height: 150px; display: grid; place-items: center; border-bottom: 1px solid var(--line); background: var(--sheet); padding: 0 20px; font-size: 13px; }
.s3-n { margin: 18px 22px 2px; font: 500 13px var(--mono); color: var(--text-4); }
.s3 h3 { margin: 0 22px; font: 500 24px/1.15 var(--font); letter-spacing: -0.02em; }
.s3 p { margin: 6px 22px 0; font-size: 14.5px; line-height: 1.45; color: var(--text-3); }
.mini-fav { display: grid; grid-template-columns: 22px auto; column-gap: 12px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.mini-fav .heart { grid-row: span 2; }
.mini-fav b { font-weight: 600; font-size: 14px; }
.mini-fav .dim { color: var(--text-3); font-size: 12.5px; }
.mini-link { display: flex; align-items: center; gap: 9px; color: var(--text-2); white-space: nowrap; }
.mini-link .ic { color: var(--text-3); }
.mini-up { width: min(220px, 100%); display: flex; flex-direction: column; align-items: center; }
.mini-up .pixel-meter { margin-top: 16px; }
.decoder { margin-top: 18px; display: grid; grid-template-columns: 1fr 1.3fr auto; align-items: center; gap: 28px; padding: 22px 24px; border-radius: 18px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); }
.dc-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dc-cap { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-4); }
.dc-cap .mark { width: 13px; height: 13px; }
.dc-raw { font: 14px/1.4 var(--mono); color: var(--text-3); overflow-wrap: anywhere; }
.dc-title { font-size: 16px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.dc-desc { font-size: 14px; line-height: 1.45; color: var(--text-3); }
.dc-desc.in { animation: rise 360ms var(--ease-out) both; }
.dc-nav { display: flex; align-items: center; gap: 6px; }
.dc-count { min-width: 3.6em; text-align: center; font-size: 13px; color: var(--text-4); font-variant-numeric: tabular-nums; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: color var(--d-2), background-color var(--d-2), transform var(--d-1) var(--ease-out); }
.icon-btn:hover { color: var(--text); background: var(--fill-2); }
.icon-btn:active { transform: scale(0.94); }

/* ── mac ── */
.mac-x { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 56px; }
.mac-x li { display: flex; flex-direction: column; gap: 6px; padding-top: 20px; border-top: 1px solid var(--line-2); }
.mac-x .ic { width: 22px; height: 22px; color: var(--text-2); margin-bottom: 10px; }
.mac-x b { font: 500 20px/1.2 var(--font); letter-spacing: -0.015em; }
.mac-x span { font-size: 15px; line-height: 1.45; color: var(--text-3); }

/* ── close ── */
.close-x .close-inner { gap: 28px; }
.close-x .cta-row { justify-content: center; }
.close-x .cta-row .btn { height: 60px; padding: 0 26px; }
.close-x .lead { max-width: 30em; }

/* ── Free with Lantern: paper, to set it apart ── */
.band { background: #eeebe5; color: #1c1b19; border-color: transparent; }
.band-p { color: #55524c; }
.band .btn-ghost { background: #1c1b19; color: #f2f1ee; box-shadow: none; }
.band .btn-ghost:hover { background: #000; }
.band .btn-ghost:focus-visible, .band a:focus-visible { outline-color: #1c1b19; }

/* ── compare (as on Lantern's site) ── */
.vs-head { margin-bottom: 44px; }
.vs-scroll { overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.vs-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: var(--r-lg); }
.vs-table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; font: 15.5px/1.4 var(--ui); }
.vs-table th, .vs-table td { padding: 17px 20px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line-2); }
.vs-table thead th { padding-top: 22px; font: 500 16px var(--font); color: var(--text-2); }
.vs-table tbody th { width: 30%; font-weight: 400; color: var(--text); }
.vs-table tbody td { color: var(--text-3); }
.vs-table tbody tr:last-child > * { border-bottom: 0; }
.vs-table .vs-us { background: var(--panel); color: var(--text); box-shadow: inset 1px 0 0 var(--line-2), inset -1px 0 0 var(--line-2); }
.vs-table thead .vs-us { border-radius: 16px 16px 0 0; box-shadow: inset 1px 0 0 var(--line-2), inset -1px 0 0 var(--line-2), inset 0 1px 0 var(--line-2); font-weight: 600; color: var(--text); }
.vs-table tbody tr:last-child .vs-us { border-radius: 0 0 16px 16px; box-shadow: inset 1px 0 0 var(--line-2), inset -1px 0 0 var(--line-2), inset 0 -1px 0 var(--line-2); }
.vs-table thead .vs-us .mark { width: 16px; height: 16px; vertical-align: -2px; margin-right: 8px; }
.vs-yes { width: 18px; height: 18px; color: var(--text); }
.vs-table td:not(.vs-us) .vs-yes { color: var(--text-3); }
.vs-no { color: var(--text-4); }
.vs-note { margin-top: 18px; font: 13.5px var(--ui); color: var(--text-4); }
.sec-short + .vs { padding-top: 0; }

/* ── responsive ── */
@media (max-width: 1100px) {
  .speed-intro { grid-template-columns: 1fr; align-items: start; gap: 20px; }
  .stats-x { grid-template-columns: repeat(2, 1fr); }
  .mac-x { grid-template-columns: repeat(2, 1fr); }
  .decoder { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 900px) {
  .steps3 { grid-template-columns: 1fr; }
  .race { grid-template-columns: 1fr; }
  .race-ctl { flex-direction: column; align-items: stretch; gap: 6px; }
}
@media (max-width: 640px) {
  .display-x { font-size: clamp(54px, 15vw, 80px); }
  .h2-x { font-size: clamp(38px, 11vw, 54px); }
  .sec-x { min-height: 0; padding: calc(var(--nav-h) + 40px) 0 72px; }
  .nav-end .btn { display: inline-flex; min-width: 0; height: 36px; padding: 0 14px; }
  .chapters { gap: 6px; }
  .ch { padding: 0 11px; font-size: 13.5px; }
  .ch-pause { width: 44px; height: 44px; flex: none; }
  .stats-x li { padding: 20px 18px; }
  .lan { min-height: 440px; }
  .ck-head { flex-direction: column; }
  .mac-x { grid-template-columns: 1fr; gap: 20px; }
  .tray-live { grid-template-columns: 1fr; }
  .tray.checking .tray-live { max-height: 110px; }
}
