:root {
  --paper: #f5f3ec;
  --paper-2: #ece8dc;
  --panel: #fdfcf9;
  --ink: #292923;
  --ink-2: #706e64;
  --line: #ddd9cc;
  --accent: #b46d4d;
  --card: #fdfcf9;
  --map-dot: #c9c3b2;
  --ok: #2f9e5b;
  --header-h: 76px;
  --gutter: clamp(24px, 5vw, 84px);
  --ease: cubic-bezier(.22, .68, 0, 1);
  --serif: "Noto Serif SC", "Songti SC", serif;
  --sans: "Manrope", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17160f; --paper-2: #201e17; --panel: #1d1c15; --ink: #efebdf; --ink-2: #a8a290; --line: #35322a;
    --accent: #d8916f; --card: #1d1c15; --map-dot: #4a463b; --ok: #4cd07d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #17160f; --paper-2: #201e17; --panel: #1d1c15; --ink: #efebdf; --ink-2: #a8a290; --line: #35322a;
  --accent: #d8916f; --card: #1d1c15; --map-dot: #4a463b; --ok: #4cd07d;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
dl, dd { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 5px; }
.skip-link:focus { left: 16px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 52px; padding: 14px 25px; border: 1px solid var(--ink); border-radius: 5px; background: var(--ink); color: var(--paper); text-decoration: none; font-size: 14px; font-weight: 500; line-height: 1.4; white-space: nowrap; transition: background .18s, border-color .18s, transform .18s; }
.button:hover { background: color-mix(in srgb, var(--ink) 82%, var(--paper)); }
.button:active { transform: translateY(1px); }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.button-small { min-height: 42px; font-size: 12px; padding: 10px 17px; gap: 10px; }
.button-outline, .button-ghost { background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 30%, var(--paper)); }
.button-outline:hover, .button-ghost:hover { background: var(--paper-2); }
.button[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.button-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; height: var(--header-h); display: flex; align-items: center; gap: 28px; padding-inline: var(--gutter); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; color: var(--ink); }
.brand-mark { color: var(--ink); --logo-ink: var(--paper); flex: none; }
.wordmark { font: 750 21px/1 var(--sans); letter-spacing: -.04em; }
.wordmark i { font-style: normal; font-weight: 500; color: var(--accent); letter-spacing: -.02em; }
.site-header { transition: box-shadow .25s, background .25s; }
.site-header.is-scrolled { box-shadow: 0 10px 30px -24px rgba(41, 41, 35, .45); }
.main-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; margin-right: 22px; font-size: 13px; }
.main-nav a { display: flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink-2); transition: color .18s; }
.main-nav a { position: relative; }
.main-nav a:hover, .main-nav a.is-active { color: var(--ink); }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1.5px; border-radius: 1px; background: var(--accent); transform: scaleX(0); transition: transform .25s var(--ease); }
.main-nav a.is-active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.login-link { text-decoration: none; }

.eyebrow { display: flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: .06em; color: #807360; line-height: 1.7; margin: 0 0 14px; }
.accent-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.lede { color: var(--ink-2); font-size: clamp(15px, 1.4vw, 17px); margin: 16px 0 0; }

/* Story — sizes come from app.js measureStory(); fallbacks keep it sane without JS */
.punct { display: inline-block; width: .55em; text-align: left; white-space: nowrap; font-weight: 400; }
.punct.end { width: 0; overflow: visible; }
.phrase { display: inline-block; white-space: nowrap; }
.phrase + .phrase { margin-left: .28em; }
.story { position: relative; height: calc(var(--story-stage-height, 750px) * 3.8); }
.story-stage { position: sticky; top: var(--story-sticky-top, var(--header-h)); height: var(--story-stage-height, calc(100svh - var(--header-h))); padding-block: var(--story-pad, 26px); display: grid; grid-template-rows: var(--story-copy-height, 232px) minmax(0, 1fr) var(--story-bottom-height, 85px); row-gap: var(--story-gap, 14px); isolation: isolate; overflow: hidden; background: var(--paper); }
.story-heading-slot { position: relative; min-width: 0; width: 100%; z-index: 4; }
.story-copy { position: absolute; top: 0; left: 0; width: 100%; padding-inline: var(--gutter); text-align: center; opacity: 0; pointer-events: none; will-change: opacity, transform; }
.story-copy.is-current { pointer-events: auto; }
.story-copy[data-copy="intro"] { opacity: 1; }
.story-copy .eyebrow { justify-content: center; margin: 0; }
.optical-heading { font-size: clamp(48px, 6.2vw, 94px); line-height: 1.22; letter-spacing: -.03em; margin-top: 17px; font-weight: 500; }
.story-description { font-size: 15px; color: var(--ink-2); line-height: 1.85; margin: 22px auto 0; max-width: 54em; }
.story-description > span { display: block; }

.story-art { position: relative; width: 100%; min-height: 0; z-index: 1; overflow: visible; }

/* World map: dot texture is a CSS mask so it follows the theme */
.map { position: absolute; left: 50%; top: 50%; width: var(--map-width, 900px); aspect-ratio: 1000 / 350; transform: translate(-50%, -50%); transform-origin: var(--map-origin, 50% 50%); will-change: transform, opacity; }
.map-dots { position: absolute; inset: 0; background: var(--map-dot); -webkit-mask: url(assets/world-dots.svg) center / 100% 100% no-repeat; mask: url(assets/world-dots.svg) center / 100% 100% no-repeat; }
.map-overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map-nodes circle { fill: var(--ink-2); opacity: .55; }
.map-nodes circle.is-selected { opacity: 0; }
.link { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.link-glow { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; opacity: .14; filter: blur(3px); vector-effect: non-scaling-stroke; }
.packet { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.node .core { fill: var(--ink); stroke: var(--paper); stroke-width: 2; vector-effect: non-scaling-stroke; }
.node.dest .core { fill: var(--accent); }
.node .pulse { fill: none; stroke: var(--accent); stroke-width: 1.2; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: pulse 2.4s var(--ease) infinite; }
.node.origin .pulse { stroke: var(--ink-2); animation-delay: 1.2s; }
@keyframes pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(5); opacity: 0; } }
.map-label { position: absolute; display: grid; gap: 1px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(6px); font-size: 12px; line-height: 1.35; white-space: nowrap; transform: translate(-50%, calc(-100% - 14px)); opacity: var(--label-opacity, 1); box-shadow: 0 6px 18px -12px rgba(41, 41, 35, .35); }
.map-label b { font-weight: 600; }
.map-label span { color: var(--ink-2); font-size: 11px; }
.dest-label [data-link-state].is-live { color: var(--ok); }
.dest-label [data-link-state].is-live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: 5px; vertical-align: 1px; }

/* The real machine rises out of the destination node */
.mac-card { position: absolute; left: 50%; top: 50%; width: var(--mac-width, 640px); margin: 0; opacity: 0; transform: translate(-50%, -50%) scale(.1); transform-origin: center; will-change: transform, opacity, left, top; }
.mac-overline { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 21px; letter-spacing: -.8px; line-height: 1.35; margin-bottom: 18px; opacity: 0; }
.mac-overline b { font-size: 12px; letter-spacing: -.3px; font-weight: 600; padding: 2px 6px; border: 1px solid #aaa395; border-radius: 4px; }
.mac-overline em { font-style: normal; font-size: 12px; letter-spacing: 0; color: var(--ink-2); padding-left: 10px; border-left: 1px solid var(--line); }
.mac-photo { border-radius: 22px; overflow: hidden; aspect-ratio: 1600 / 1067; background: #d9c6a5; box-shadow: 0 40px 80px -42px rgba(54, 40, 18, .55), 0 0 0 1px rgba(41, 41, 35, .06); }
.mac-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Remote desktop window opens in front of the machine. Everything inside scales with the window (cqw). */
.remote { position: absolute; left: 50%; top: 50%; width: var(--remote-width, 760px); aspect-ratio: 16 / 10.4; container-type: inline-size; border-radius: 12px; overflow: hidden; background: #1c1c1e; box-shadow: 0 50px 100px -40px rgba(20, 16, 8, .6), 0 0 0 1px rgba(0, 0, 0, .25); opacity: 0; transform: translate(-50%, -50%) translateY(40px) scale(.96); will-change: transform, opacity; display: flex; flex-direction: column; font-family: -apple-system, "SF Pro Text", "PingFang SC", var(--sans); }
.remote-bar { height: 3.6cqw; min-height: 20px; flex: none; display: flex; align-items: center; gap: .8cqw; padding: 0 1.4cqw; background: linear-gradient(#3a3a3c, #2c2c2e); color: #c7c7cc; font-size: max(9px, 1.3cqw); }
.remote-bar i, .win-bar i { width: 1.25cqw; height: 1.25cqw; min-width: 7px; min-height: 7px; border-radius: 50%; background: #ff5f57; flex: none; }
.remote-bar i:nth-child(2), .win-bar i:nth-child(2) { background: #febc2e; }
.remote-bar i:nth-child(3), .win-bar i:nth-child(3) { background: #28c840; }
.remote-bar span { margin-left: 1cqw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-bar b { color: #f2f2f7; font-weight: 600; }
.remote-bar code { font: 1.15cqw "JetBrains Mono", ui-monospace, monospace; color: #8e8e93; }
.remote-bar em { margin-left: auto; font-style: normal; color: #30d158; white-space: nowrap; }

.remote-screen { position: relative; flex: 1; overflow: hidden; font-size: 1.25cqw; color: #1d1d1f;
  background:
    radial-gradient(60% 70% at 85% 110%, rgba(255, 196, 120, .55), transparent 70%),
    radial-gradient(70% 90% at 0% 0%, #7fb4ff 0%, transparent 60%),
    linear-gradient(160deg, #4f7fd9 0%, #6b5bd1 38%, #b0589c 68%, #f08a5d 100%); }
.mac-menubar { position: relative; z-index: 5; height: 2.9cqw; display: flex; align-items: center; gap: 1.6cqw; padding: 0 1.4cqw; background: rgba(246, 246, 248, .55); backdrop-filter: blur(16px) saturate(1.6); font-size: 1.22cqw; }
.mac-menubar b { font-weight: 700; }
.mac-menubar .spacer { flex: 1; }
.mb-ico { width: 1.45cqw; height: 1.45cqw; color: #1d1d1f; }

.desk-icons { position: absolute; right: 1.6cqw; top: 12.5cqw; display: grid; gap: 1.6cqw; justify-items: center; z-index: 1; }
.desk-icons figure { margin: 0; display: grid; justify-items: center; gap: .4cqw; width: 8.5cqw; }
.desk-icons figcaption { font-size: 1.05cqw; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); white-space: nowrap; }
.ico-drive { width: 4.6cqw; height: 3.4cqw; border-radius: .7cqw; background: linear-gradient(#f4f4f6, #c8c8cc); box-shadow: inset 0 -.5cqw 0 #a7a7ad, 0 .4cqw .8cqw rgba(0, 0, 0, .25); }
.ico-folder { width: 4.8cqw; height: 3.8cqw; border-radius: .5cqw; background: linear-gradient(#8ccfff, #3f9cf0); position: relative; box-shadow: 0 .4cqw .8cqw rgba(0, 0, 0, .25); }
.ico-folder::before { content: ""; position: absolute; left: 0; top: -.55cqw; width: 45%; height: 1cqw; border-radius: .4cqw .4cqw 0 0; background: #5fb3f7; }
.ico-doc { width: 3.6cqw; height: 4.6cqw; border-radius: .35cqw; background: linear-gradient(135deg, #fff 80%, #ddd 80%); box-shadow: 0 .4cqw .8cqw rgba(0, 0, 0, .25); position: relative; }
.ico-doc::after { content: "PDF"; position: absolute; left: 50%; bottom: .7cqw; transform: translateX(-50%); padding: .1cqw .5cqw; border-radius: .3cqw; background: #e5483b; color: #fff; font: 700 .85cqw/1.3 var(--sans); }

.win { position: absolute; border-radius: 1cqw; overflow: hidden; box-shadow: 0 2.4cqw 5cqw -1.6cqw rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .18); }
.win-bar { height: 2.9cqw; display: flex; align-items: center; gap: .7cqw; padding: 0 1.1cqw; font-size: 1.1cqw; }

.ide { left: 2.2cqw; top: 4.4cqw; width: 58cqw; height: 37cqw; background: #1f1f24; z-index: 2; }
.ide .win-bar { background: #2b2b31; color: #b8b8c0; }
.ide .run { margin-left: 1.4cqw; width: 2cqw; height: 2cqw; display: grid; place-items: center; color: #d0d0d8; }
.ide .run svg { width: 1.3cqw; height: 1.3cqw; }
.ide .scheme { padding: .3cqw .9cqw; border-radius: .5cqw; background: rgba(255, 255, 255, .07); color: #e4e4ea; }
.ide .status { margin-left: auto; padding: .3cqw 1cqw; border-radius: .5cqw; background: rgba(255, 255, 255, .06); color: #b8b8c0; }
.ide .status::before { content: ""; display: inline-block; width: .8cqw; height: .8cqw; border-radius: 50%; background: #30d158; margin-right: .6cqw; vertical-align: .05cqw; }
.ide-body { display: grid; grid-template-columns: 15cqw 1fr; height: calc(100% - 2.9cqw); }
.tree { margin: 0; padding: 1cqw .8cqw; list-style: none; background: #26262c; color: #c9c9d1; font-size: 1.1cqw; line-height: 2.1; border-right: 1px solid rgba(255, 255, 255, .06); }
.tree li { padding-left: 1.4cqw; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: .4cqw; }
.tree li::before { content: ""; position: absolute; left: 0; top: 50%; width: .9cqw; height: .9cqw; transform: translateY(-50%); border-radius: .2cqw; background: #5aa9ff; }
.tree li.open::before { background: #7f8ea3; }
.tree li.d1 { padding-left: 3cqw; } .tree li.d1::before { left: 1.6cqw; }
.tree li.sw::before { background: #f0743e; } .tree li.as::before { background: #45b5e8; } .tree li.pl::before { background: #a1a1aa; } .tree li.pk::before { background: #b18cff; }
.tree li.sel { background: rgba(10, 132, 255, .35); color: #fff; }
.code { margin: 0; padding: 1.2cqw 1.4cqw; color: #e6e6ea; font: 1.18cqw/1.75 "JetBrains Mono", ui-monospace, monospace; white-space: pre; overflow: hidden; }
.code .ln { display: inline-block; width: 2.4cqw; margin-right: 1.2cqw; text-align: right; color: #5c5c66; }
.code .k { color: #fc5fa3; font-weight: 600; } .code .t { color: #5dd8ff; } .code .a { color: #fd8f3f; } .code .s { color: #fc6a5d; } .code .f { color: #67b7a4; }

.sim { position: absolute; left: 61.5cqw; top: 10.5cqw; z-index: 2; }
.sim-phone { position: relative; width: 17cqw; aspect-ratio: 9 / 19.2; border-radius: 3cqw; padding: .7cqw; background: #111; box-shadow: 0 2.4cqw 5cqw -1.6cqw rgba(0, 0, 0, .55), inset 0 0 0 .25cqw #3a3a3c; }
.sim-island { position: absolute; left: 50%; top: 1.3cqw; width: 5cqw; height: 1.4cqw; border-radius: 1cqw; background: #000; transform: translateX(-50%); z-index: 1; }
.sim-app { height: 100%; border-radius: 2.4cqw; background: #f2f2f7; padding: 3.4cqw 1.4cqw 1cqw; overflow: hidden; }
.sim-time { position: absolute; top: 1.3cqw; left: 2.6cqw; margin: 0; font-size: 1cqw; font-weight: 600; }
.sim-app h4 { margin: 0 0 1cqw; font: 700 2.2cqw/1.1 -apple-system, var(--sans); }
.sim-app ul { margin: 0; padding: 0; list-style: none; border-radius: 1.2cqw; background: #fff; }
.sim-app li { display: grid; grid-template-columns: auto 1fr; column-gap: .9cqw; align-items: center; padding: .85cqw 1cqw; border-bottom: 1px solid #e5e5ea; font-size: 1.05cqw; }
.sim-app li:last-child { border-bottom: 0; }
.sim-app li i { grid-row: span 2; width: 1cqw; height: 1cqw; border-radius: 50%; background: #30d158; }
.sim-app li i.run { background: #ff9f0a; } .sim-app li i.err { background: #ff453a; }
.sim-app li span { color: #8e8e93; font-size: .9cqw; }

.term { left: 24cqw; top: 31cqw; width: 50cqw; background: rgba(24, 24, 27, .94); backdrop-filter: blur(10px); z-index: 3; }
.term .win-bar { background: #2c2c30; color: #9a9aa2; justify-content: flex-start; }
.term .win-bar .title { margin: 0 auto; padding-right: 4cqw; }
.term pre { margin: 0; padding: 1.1cqw 1.4cqw 1.3cqw; font: 1.12cqw/1.7 "JetBrains Mono", ui-monospace, monospace; color: #e5e5ea; white-space: pre; overflow: hidden; }
.term .p { color: #64d2ff; } .term .g { color: #bf5af2; } .term .ok { color: #30d158; } .term .dim { color: #8e8e93; }
.term .caret { display: inline-block; width: .65em; height: 1.1em; vertical-align: -.2em; background: #e5e5ea; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.toast { position: absolute; right: 1.4cqw; top: 3.6cqw; z-index: 6; width: 27cqw; display: grid; grid-template-columns: auto 1fr auto; gap: 1cqw; align-items: center; padding: 1cqw 1.2cqw; border-radius: 1.6cqw; background: rgba(246, 246, 248, .78); backdrop-filter: blur(18px) saturate(1.6); box-shadow: 0 1.2cqw 3cqw -1cqw rgba(0, 0, 0, .35); font-size: 1.1cqw; }
.toast div { display: grid; line-height: 1.35; }
.toast b { font-weight: 600; } .toast span { color: #3c3c43; } .toast time { align-self: start; color: #6e6e73; font-size: .95cqw; }

.dock { position: absolute; bottom: 1cqw; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; align-items: flex-end; gap: .7cqw; padding: .7cqw .8cqw; border-radius: 2cqw; background: rgba(255, 255, 255, .28); backdrop-filter: blur(18px) saturate(1.6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.dock .sep { align-self: stretch; width: 1px; margin: .3cqw .2cqw; background: rgba(0, 0, 0, .18); }
.ico-tile { position: relative; width: 4.3cqw; height: 4.3cqw; border-radius: 1cqw; display: grid; place-items: center; color: #fff; box-shadow: 0 .3cqw .7cqw rgba(0, 0, 0, .22), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.ico-tile svg { width: 58%; height: 58%; }
.ico-tile.on::after { content: ""; position: absolute; bottom: -.65cqw; left: 50%; width: .45cqw; height: .45cqw; border-radius: 50%; background: rgba(0, 0, 0, .55); transform: translateX(-50%); }
.toast .ico-tile { width: 3.6cqw; height: 3.6cqw; }
.t-finder { background: linear-gradient(160deg, #6fc3ff, #1f7ae0); }
.t-browser { background: linear-gradient(160deg, #ffffff, #dfe7f2); color: #1a73e8; }
.t-mail { background: linear-gradient(160deg, #6ac0ff, #1670f0); }
.t-cal { background: #fff; color: #1d1d1f; grid-template-rows: auto auto; align-content: center; gap: 0; line-height: 1; }
.t-cal b { font: 600 1.9cqw/1 -apple-system, var(--sans); } .t-cal small { font-size: .8cqw; color: #ff3b30; order: -1; font-weight: 600; }
.t-notes { background: linear-gradient(#ffd75e 0 26%, #fffdf4 26%); color: #c9b98a; }
.t-photos { background: #fff; }
.t-music { background: linear-gradient(160deg, #ff6a88, #fc3158); }
.t-ide, .ico-hammer { background: linear-gradient(160deg, #3fa4ff, #1d5fe0); }
.t-sim { background: linear-gradient(160deg, #4a4a52, #1c1c20); }
.t-term { background: linear-gradient(160deg, #3a3a3f, #0d0d0f); color: #e5e5ea; }
.t-settings { background: linear-gradient(160deg, #a8a8b0, #6e6e78); }
.t-trash { background: linear-gradient(160deg, rgba(255, 255, 255, .7), rgba(220, 220, 228, .5)); color: #6e6e78; }

.story-bottom-slot { position: relative; min-width: 0; z-index: 4; }
.story-detail { position: absolute; top: 0; left: 50%; transform: translateX(-50%); opacity: 0; pointer-events: none; width: 100%; padding-inline: var(--gutter); }
.story-detail[data-copy="intro"] { opacity: 1; }
.story-detail.is-current { pointer-events: auto; }
.intro-action { text-align: center; }
.intro-action p { margin: 14px 0 0; font-size: 12px; color: var(--ink-2); }
.intro-action strong { color: var(--ink); font-weight: 600; }
.story-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; max-width: 1000px; }
.story-facts > div { border-top: 1px solid var(--line); text-align: center; padding-top: 13px; }
.story-facts dt { font-size: 14px; font-weight: 600; line-height: 1.5; }
.story-facts dd { font-size: 11px; color: var(--ink-2); line-height: 1.65; margin-top: 7px; }

/* Sections */
.section { padding: clamp(72px, 10vw, 128px) clamp(16px, 5vw, 64px); max-width: 1200px; margin: 0 auto; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section h2 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.2; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

.cycle-switch { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); margin-bottom: 28px; }
.cycle-switch button { appearance: none; border: 0; background: none; color: var(--ink-2); font: 600 14px var(--sans); padding: 8px 18px; border-radius: 999px; cursor: pointer; }
.cycle-switch button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.cycle-switch small { font-weight: 500; opacity: .8; margin-left: 4px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; align-items: stretch; }
.plan { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px 26px 26px; display: flex; flex-direction: column; gap: 14px; transition: transform .25s var(--ease), box-shadow .25s; }
.plan:hover { transform: translateY(-3px); box-shadow: 0 24px 48px -36px rgba(41, 41, 35, .45); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan h3 { font-size: 21px; }
.plan .badge { font: 600 11px/1 var(--sans); letter-spacing: .04em; padding: 6px 9px; border-radius: 99px; background: var(--accent); color: #fff; }
.plan .fit { margin: -6px 0 0; color: var(--ink-2); font-size: 13px; }
.plan .price { font-family: var(--serif); font-size: 42px; line-height: 1; margin-top: 4px; letter-spacing: -.01em; }
.plan .price small { font: 500 14px var(--sans); color: var(--ink-2); margin-left: 4px; }
.plan .meta { font-size: 13px; color: var(--ink-2); min-height: 1.6em; }
.plan .meta s { opacity: .7; }
.specs { list-style: none; margin: 2px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 9px; font-size: 14px; color: var(--ink-2); }
.specs li { display: flex; align-items: center; gap: 9px; }
.specs li::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='m4 7.2 2 2 4-4.4' fill='none' stroke='%23b46d4d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.specs b { color: var(--ink); font-weight: 600; }
.plan .button { margin-top: auto; justify-content: center; }
.plan.featured { border-color: var(--ink); box-shadow: 0 24px 50px -34px rgba(41, 41, 35, .5); }
.fine { font-size: 13px; color: var(--ink-2); margin-top: 22px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; position: relative; }
.steps li { position: relative; padding: 24px 22px 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 44px; right: -19px; width: 20px; height: 1.5px; background: var(--line); }
.step-ico { display: block; width: 40px; height: 40px; padding: 9px; border-radius: 12px; color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, transparent); margin-bottom: 18px; }
.steps span { font: 600 12px var(--sans); letter-spacing: .08em; color: var(--ink-2); }
.steps h3 { font-size: 20px; margin: 4px 0 8px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 14px; }
.process-cta { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }

.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.faq .section-head { position: sticky; top: calc(var(--header-h) + 32px); margin: 0; }
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary:hover { color: var(--accent); }
.faq summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--serif); font-size: 22px; line-height: 1; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); margin: 12px 0 0; max-width: 760px; }

.site-footer { border-top: 1px solid var(--line); padding: 56px clamp(16px, 5vw, 64px) 32px; max-width: 1328px; margin: 0 auto; font-size: 13px; color: var(--ink-2); }
.footer-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.footer-brand p { margin: 14px 0 0; max-width: 34em; line-height: 1.8; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-cols h4 { margin: 0 0 12px; font: 600 12px var(--sans); letter-spacing: .08em; color: var(--ink); }
.footer-cols a { display: block; padding: 5px 0; text-decoration: none; color: var(--ink-2); transition: color .18s; }
.footer-cols a:hover { color: var(--ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 22px; font-size: 12px; }
.footer-bottom p { margin: 0; }

/* Overview strip */
.facts { border-block: 1px solid var(--line); background: var(--panel); }
.facts-grid { max-width: 1200px; margin: 0 auto; padding: 34px clamp(16px, 5vw, 64px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.facts-grid div { padding-left: 18px; border-left: 1px solid var(--line); }
.facts-grid div:first-child { border-left: 0; padding-left: 0; }
.facts-grid dt { font: 500 26px/1.2 var(--serif); color: var(--ink); }
.facts-grid dd { margin-top: 6px; font-size: 13px; color: var(--ink-2); }

/* Closing call to action */
.cta-band { padding: 0 clamp(16px, 5vw, 64px); }
.cta-inner { max-width: 1200px; margin: 0 auto; padding: clamp(48px, 7vw, 88px) clamp(24px, 6vw, 80px); border-radius: 28px; text-align: center; color: #f5f3ec;
  background: radial-gradient(80% 120% at 85% 0%, rgba(180, 109, 77, .55), transparent 60%), radial-gradient(70% 100% at 0% 100%, rgba(84, 108, 186, .35), transparent 60%), #23221d; }
.cta-inner h2 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.2; }
.cta-inner p { margin: 16px auto 28px; max-width: 36em; color: rgba(245, 243, 236, .72); }
.button-light { background: #f5f3ec; color: #23221d; border-color: #f5f3ec; }
.button-light:hover { background: #fff; }
.button-outline-light { background: transparent; color: #f5f3ec; border-color: rgba(245, 243, 236, .35); }
.button-outline-light:hover { background: rgba(245, 243, 236, .08); }
.faq + .cta-band, main + .cta-band { margin-bottom: clamp(56px, 8vw, 96px); }

@media (max-width: 1100px) {
  :root { --gutter: 36px; --header-h: 70px; }
  .main-nav { gap: 21px; margin-right: 0; font-size: 12px; }
  .optical-heading { font-size: clamp(45px, 6.3vw, 69px); }
  .story-description { font-size: 14px; }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .header-actions { margin-left: auto; }
  .story-copy { padding-inline: 28px; }
  .optical-heading { font-size: 60px; }
  .optical-heading > .phrase { display: block; }
  .optical-heading > .phrase + .phrase { margin: 0; }
  .story-description { margin-top: 18px; }
  .story-facts { gap: 18px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; --header-h: 64px; }
  .brand { font-size: 20px; gap: 9px; }
  .site-header { gap: 15px; }
  .button-small { min-height: 38px; padding: 9px 13px; font-size: 11px; }
  .header-actions .login-link { display: none; }
  .story-copy { padding-inline: 20px; }
  .eyebrow { font-size: 10px; gap: 10px; }
  .optical-heading { font-size: clamp(42px, 11.8vw, 62px); margin-top: 18px; line-height: 1.3; letter-spacing: -.04em; }
  .story-description { font-size: 12px; line-height: 1.9; margin-top: 20px; max-width: 29em; }
  .story-description > span + span { margin-top: 4px; }
  .mac-overline { font-size: 18px; margin-bottom: 18px; }
  .mac-overline b { font-size: 10px; }
  .story-facts { gap: 13px; }
  .story-facts > div { padding-top: 12px; }
  .story-facts dt { font-size: 11px; }
  .story-facts dd { font-size: 9px; line-height: 1.6; margin-top: 6px; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-height: 800px) and (min-width: 901px) {
  :root { --header-h: 68px; }
  .optical-heading { font-size: clamp(44px, 5.7vw, 72px); margin-top: 13px; }
  .story-description { font-size: 13px; margin-top: 15px; line-height: 1.8; }
  .mac-overline { font-size: 19px; margin-bottom: 17px; }
}
@media (max-height: 600px) and (min-width: 601px) {
  :root { --header-h: 54px; }
  .optical-heading { font-size: 32px !important; margin-top: 9px; }
  .optical-heading > .phrase { display: inline-block; }
  .story-description { font-size: 11px; line-height: 1.6; margin-top: 12px; }
}
/* Reduced motion: unstick the story and lay the scenes out as a plain column */
@media (prefers-reduced-motion: reduce) {
  .story { height: auto !important; padding-bottom: 50px; }
  .story-stage { position: relative !important; top: auto !important; height: auto !important; display: flex; flex-direction: column; overflow: hidden; padding-top: 35px; }
  .story-heading-slot, .story-art, .story-bottom-slot { display: contents; }
  .story-copy { position: relative; opacity: 1 !important; transform: none !important; pointer-events: auto; order: 1; }
  .story-copy[data-copy="device"] { order: 3; margin-top: 45px; }
  .story-copy[data-copy="native"] { order: 5; margin-top: 38px; margin-bottom: 30px; }
  .map { position: relative; left: auto; top: auto; width: min(92vw, 1000px); margin: 28px auto 0; transform: none !important; opacity: 1 !important; order: 2; }
  .mac-card { position: relative; left: auto !important; top: auto !important; width: min(82vw, 720px); margin: 38px auto 0; opacity: 1 !important; transform: none !important; order: 4; }
  .remote { display: none; }
  .mac-overline { opacity: 1 !important; }
  .story-detail { position: relative; left: auto; transform: none; order: 6; }
  .story-detail:not([data-copy="intro"]) { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Region picker */
.region-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px; align-items: start; }
.region-groups { display: grid; gap: 26px; }
.region-group h3 { font: 600 12px var(--sans); letter-spacing: .08em; color: var(--ink-2); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.region-group h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.region-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.region-option { appearance: none; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: 500 15px var(--sans); text-align: left; cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.region-option:hover { border-color: color-mix(in srgb, var(--ink) 35%, var(--line)); }
.region-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.region-option small { margin-left: auto; font: 500 11px "JetBrains Mono", ui-monospace, monospace; color: var(--ink-2); letter-spacing: .04em; }
.region-option .tick { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; transition: border-color .18s, background .18s; }
.region-option[aria-checked="true"] { border-color: var(--ink); background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.region-option[aria-checked="true"] .tick { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--card); }
.region-summary { position: sticky; top: calc(var(--header-h) + 24px); padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.map-static { position: relative; left: auto; top: auto; width: 100%; transform: none; }
.map-static .map-dots { background: color-mix(in srgb, var(--map-dot) 70%, var(--ink-2)); }
.map-static .link { stroke-dasharray: 4 5; }
.region-current { margin: 18px 0 0; font-size: 15px; display: flex; align-items: baseline; gap: 10px; }
.region-current strong { font: 500 26px/1.2 var(--serif); }
.region-current span { font-size: 12px; color: var(--ink-2); padding: 2px 8px; border: 1px solid var(--line); border-radius: 99px; }
.plan .region-tag { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.plan .region-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.lede b, .story-description b { color: var(--ink); font-weight: 600; }

@media (max-width: 900px) {
  .faq { grid-template-columns: 1fr; gap: 8px; }
  .faq .section-head { position: relative; top: auto; }
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
  .facts-grid div:nth-child(3) { border-left: 0; padding-left: 0; }
  .footer-top { grid-template-columns: 1fr; }
  .steps li:not(:last-child)::after { display: none; }
  .region-layout { grid-template-columns: 1fr; }
  .region-summary { position: relative; top: auto; order: -1; }
}
@media (max-width: 600px) {
  .wordmark { font-size: 19px; }
  .facts-grid dt { font-size: 21px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-inner { border-radius: 20px; }
  .region-list { grid-template-columns: 1fr 1fr; gap: 8px; }
  .region-option { padding: 11px 12px; font-size: 14px; gap: 9px; }
  .region-summary { padding: 14px; border-radius: 16px; }
  .map-label { font-size: 11px; padding: 4px 8px; }
  .remote-bar code { display: none; }
  .mac-photo { border-radius: 14px; }
}
