/* /beam: Nhako Beam's own look, from design/tokens/tokens.json in its repo.
   Flat like the app: no gradients, no blur (build.py enforces both here). */
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  color-scheme: light dark;
  --canvas: #F4F5F7; --surface: #FFFFFF; --fill: #ECEEF2; --separator: #1214181A;
  --text: #121418; --text-2: #545B69;
  --accent: #1A6FE0; --accent-pressed: #1559B8; --accent-subtle: #E6F1FF; --accent-text: #1560C8; --on-accent: #FFFFFF;
  --focus: #1A6FE0; --yellow: #FFD23F;
  --night: #111C52; --night-text: #F1F2F4; --night-text-2: #C9D2EE; /* the room's wall, sampled from its art */
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0D0E11; --surface: #16181C; --fill: #262A31; --separator: #FFFFFF14;
    --text: #F1F2F4; --text-2: #A6ACB8;
    --accent-subtle: #12263F; --accent-text: #7DB8FF;
    --focus: #7DB8FF;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; background: var(--canvas); color: var(--text); font: 400 17px/1.55 "Inter", system-ui, sans-serif; overflow-wrap: anywhere; }
h1, h2 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 12px; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
p { margin: 0 0 12px; }
a { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.85em; }

.skip { position: absolute; left: 16px; top: -64px; z-index: 10; padding: 12px 16px; background: var(--accent); color: var(--on-accent); border-radius: 8px; }
.skip:focus { top: 12px; }

/* The nav sits on the room's wall in both themes, because the room is always night. */
.nav { position: absolute; inset: 0 0 auto; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--night); }
.nav-back { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 12px 0 10px; color: var(--night-text); background: #FFFFFF14; border-radius: 12px; font-size: 0.875rem; font-weight: 500; text-decoration: none; }
.nav-back:hover { color: var(--yellow); }
.nav-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-right: auto; margin-left: 8px; color: var(--night-text); font-weight: 650; text-decoration: none; }
.nav-brand img { border-radius: 8px; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--night-text); text-decoration: none; font-weight: 500; }
.nav-link:hover { color: var(--yellow); }

/* ---------- Sections below the room ---------- */
main > section:not(.hero, .how) { max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
main > section:not(.hero) { padding-block: clamp(44px, 5.5vw, 72px); }
h3 { margin: 0 0 8px; font-size: 1.125rem; line-height: 1.3; font-weight: 650; }
.head { max-width: 40em; margin-bottom: 24px; }
.head p:last-child { margin-bottom: 0; }
.head p { color: var(--text-2); font-size: 1.0625rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fine { color: var(--text-2); font-size: 0.9375rem; }

/* Floating shapes: behind the text, across the whole width, drifting with the scroll. */
main > section:not(.hero) { position: relative; isolation: isolate; }
.float { position: absolute; inset: 0 auto 0 calc(50% - 50vw); width: 100vw; z-index: -1; pointer-events: none; }
.pair-art .float { inset: 0; width: 100%; }
.f { position: absolute; display: block; }
.f > span { display: block; animation: drift var(--d, 7s) ease-in-out infinite alternate; }
.f svg { display: block; width: 100%; height: auto; }
@keyframes drift { from { transform: translateY(-8px) rotate(var(--r, 0deg)); } to { transform: translateY(10px) rotate(calc(var(--r, 0deg) + 8deg)); } }
h2 em { font-style: normal; color: var(--accent-text); }
.how h2 em, .closer h2 em { color: var(--yellow); }

.i { width: 1.1em; height: 1.1em; flex: 0 0 auto; }
.dot { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px; color: #121418; font-size: 1.2rem; }
.dot.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 1rem; }
.c-y { background: #FFD23F; } .c-b { background: #7DB8FF; } .c-p { background: #FF8FA3; } .c-m { background: #7FD8B0; } .c-l { background: #B7A6FF; }

.promise-lead { max-width: 15em; margin-bottom: 28px; font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
.promise-lead em { display: block; font-style: normal; color: var(--accent-text); }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.tiles strong { display: block; margin: 16px 4px 2px; font-size: 1.375rem; letter-spacing: -0.01em; }
.tiles li > span { display: block; margin: 0 4px; color: var(--text-2); }
.art { position: relative; height: 190px; overflow: hidden; background: var(--night); border-radius: 20px; }
.art .route-art { position: absolute; inset: auto 12px 18px; margin: 0; }
.art .route-art img { flex-basis: 84px; width: 84px; }
.art .route-art img:last-child { flex-basis: 108px; width: 108px; }
.art-cloud-mark { position: absolute; top: 18px; left: 50%; width: 92px; margin-left: -46px; animation: drift 5s ease-in-out infinite alternate; }
.art-cloud-mark svg, .art-inf svg, .art-card svg { display: block; width: 100%; height: auto; }
.art-inf { position: absolute; top: 22px; left: 50%; width: 120px; margin-left: -60px; animation: drift 6s ease-in-out infinite alternate; }
.belt { position: absolute; left: 0; right: 0; bottom: 26px; height: 44px; overflow: hidden; }
.belt > div { display: flex; width: max-content; animation: belt 14s linear infinite; }
.belt b { flex: 0 0 auto; height: 44px; margin-right: 10px; border: 2.5px solid #0B1030; border-radius: 8px; }
@keyframes belt { to { transform: translateX(-50%); } }
.art-card { position: absolute; left: 50%; top: 34px; width: 150px; margin-left: -96px; transform: rotate(-5deg); }
.art-bolt { position: absolute; right: 12%; bottom: 8px; width: 104px; height: auto; animation: trophy 3.2s ease-in-out infinite; }

.previews { padding-top: 0 !important; }
.shots { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; scrollbar-width: thin; }
.shots figure { flex: 0 0 min(86vw, 880px); margin: 0; scroll-snap-align: start; }
.shots img { display: block; width: 100%; height: auto; background: var(--night); border-radius: 16px; border: 1px solid var(--separator); }
.shots figcaption { margin-top: 12px; color: var(--text-2); font-size: 0.9375rem; }

/* The diagrams use the room's own devices, so this band stays night in both themes. */
.how { background: var(--night); color: var(--night-text); }
.how-inner { max-width: 1120px; margin: 0 auto; padding-inline: 16px; }
.how .head p, .route p { color: var(--night-text-2); }
.routes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 16px; }
.route p { margin: 0; }
.how-more { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 12px; color: var(--yellow); font-weight: 600; }
.route { padding: 20px; background: #10132A; border-radius: 20px; }
.route-art { display: flex; align-items: center; margin-bottom: 16px; }
.route-art img { flex: 0 1 92px; min-width: 0; width: 92px; height: auto; }
.route-art img:last-child { flex-basis: 116px; width: 116px; }
.route-line { position: relative; flex: 1; height: 2px; min-width: 40px; background: #3A4676; container-type: inline-size; }
.dashed .route-line { background: none; border-top: 2px dashed #3A4676; }
.route-line i { position: absolute; left: 0; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); animation: travel 2.4s linear infinite; }
.dashed .route-line i { top: -5px; }
.route-line i:nth-child(2) { animation-delay: -0.8s; }
.route-line i:nth-child(3) { animation-delay: -1.6s; }
@keyframes travel { from { transform: translateX(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } to { transform: translateX(100cqw); opacity: 0; } }
.relay { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; background: #10132A; color: var(--night-text); box-shadow: inset 0 0 0 1px #6E7BA3; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.pair-text .fine { margin: 0; }
.howto ol { margin: 0 0 16px; padding-left: 1.3em; display: grid; gap: 10px; }
.steps { list-style: none; margin: 20px 0 16px; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; align-items: center; gap: 14px; }
/* The trophy from the room, breathing as the app's idle mascot does. */
.pair-art { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px; padding: 28px 20px; background: var(--night); border-radius: 24px; }
.pair-art img { flex: 0 0 auto; width: 112px; height: auto; animation: trophy 3.2s ease-in-out infinite; }
@keyframes trophy { 50% { transform: translateY(-5px); } }
.words { display: grid; grid-template-columns: repeat(2, max-content); gap: 10px; margin: 0; overflow-wrap: normal; }
.words span { padding: 12px 16px; white-space: nowrap; text-align: center; color: #121418; background: #F2F5FF; border-radius: 14px; font: 400 clamp(1rem, 2vw, 1.375rem) "JetBrains Mono", ui-monospace, monospace; }

.sees-grid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.sees-grid li { flex: 1 1 190px; padding: 18px; background: var(--surface); border: 1px solid var(--separator); border-radius: 18px; }
.sees-grid h3 { margin: 12px 0 8px; }
.sees-grid p { margin: 0; color: var(--text-2); font-size: 0.9375rem; line-height: 1.45; }
.sees-grid .sees { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 3px 10px; background: var(--fill); color: var(--text); border-radius: 999px; font-size: 0.8125rem; font-weight: 600; }
.private .head a { display: inline-flex; align-items: center; min-height: 44px; }

.feature-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 16px; margin-top: 20px; }
.panel { padding: 20px; background: var(--surface); border: 1px solid var(--separator); border-radius: 20px; }
.panel h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.panel li { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 0.9375rem; line-height: 1.35; }

.howto { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; align-items: start; }
.howto details { border-bottom: 1px solid var(--separator); }
.howto summary span { display: inline-flex; align-items: center; gap: 10px; }
.howto summary, .faq summary { display: flex; align-items: center; min-height: 52px; padding-block: 8px; font-weight: 650; cursor: pointer; }
.howto details[open] { padding-bottom: 8px; }
.howto-send { padding: 24px; background: var(--surface); border: 1px solid var(--separator); border-radius: var(--radius); }
.cmd { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; padding: 6px 6px 6px 12px; background: var(--fill); border-radius: 10px; }
.cmd code { flex: 1; min-width: 0; font-size: 0.8125rem; }
.cmd pre { flex: 1; min-width: 0; margin: 0; padding-block: 10px; overflow-x: auto; white-space: pre; overflow-wrap: normal; line-height: 1.55; scrollbar-width: thin; }
.cmd pre code { display: block; }
.copy { flex: 0 0 auto; min-width: 64px; min-height: 44px; background: var(--surface); color: var(--text); border: 1px solid var(--separator); border-radius: 8px; font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; }

.dl { scroll-margin-top: 0; }
.dl-list { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }

.faq { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: start; }
.faq-side { position: sticky; top: 24px; }
.faq-side img { width: 104px; height: auto; margin-bottom: 12px; animation: trophy 3.2s ease-in-out infinite; }
.faq details { border-bottom: 1px solid var(--separator); }
.howto summary, .faq summary, .dl-more summary { justify-content: space-between; gap: 16px; list-style: none; }
.howto summary::-webkit-details-marker, .faq summary::-webkit-details-marker, .dl-more summary::-webkit-details-marker { display: none; }
.howto summary::after, .faq summary::after, .dl-more summary::after { content: "+"; flex: 0 0 auto; color: var(--accent-text); font-size: 1.5rem; font-weight: 400; line-height: 1; transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1); }
details[open] > summary::after { transform: rotate(45deg); }
.faq p { color: var(--text-2); max-width: 44em; padding-bottom: 8px; }

.legal { max-width: 720px; margin: 0 auto; padding: 96px 16px 64px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal h2 { margin-top: 36px; font-size: 1.375rem; }
.legal ul { padding-left: 1.2em; display: grid; gap: 10px; }
.legal a { display: inline-flex; align-items: center; min-height: 44px; }
.legal p a, .legal li a { display: inline; }
.dl-meta, .dl-else { color: var(--text-2); }
.dl-else { padding: 12px 16px; background: var(--accent-subtle); border-radius: 12px; color: var(--text); }
.dl-list { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 12px; }
.dl-row { position: relative; padding: 16px; background: var(--surface); border: 1px solid var(--separator); border-radius: var(--radius); }
.dl-row.is-you { border: 2px solid var(--accent); }
.dl-btn { display: block; min-height: 44px; padding: 10px 14px; background: var(--fill); color: var(--text); border-radius: 12px; text-decoration: none; transition: background-color 150ms ease-out; }
.dl-btn:hover { background: var(--accent-subtle); }
.is-you .dl-btn { background: var(--accent); color: var(--on-accent); }
.is-you .dl-btn:hover { background: var(--accent-pressed); }
.dl-os { float: left; width: 26px; height: 26px; margin: 4px 12px 16px 0; }
.dl-label { display: block; font-weight: 650; }
.dl-file { display: block; font-size: 0.875rem; }
.dl-you { display: inline-block; margin-top: 10px; padding: 2px 10px; background: var(--yellow); color: #121418; border-radius: 999px; font-size: 0.8125rem; font-weight: 650; }
.dl-you[hidden] { display: none; }
.dl-note { display: block; margin-top: 10px; color: var(--text-2); font-size: 0.9375rem; }
code.dl-note { font-size: 0.8125rem; }
.dl-more { margin: 12px 0; max-width: 560px; border-bottom: 1px solid var(--separator); }
.dl-more summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; }
.dl-sums { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 0.875rem; }
.dl-sums span { display: block; color: var(--text-2); }
.dl-sums code { display: block; font-size: 0.75rem; }
.dl-all { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.dl-all a { display: inline-flex; align-items: center; min-height: 44px; }

main > section.cta { width: calc(100% - 32px); display: grid; grid-template-columns: 1fr auto; column-gap: 24px; align-items: center; max-width: 1088px; margin: 0 auto 64px; padding: 24px 28px !important; background: var(--surface); border: 1px solid var(--separator); border-radius: var(--radius); }
.cta h2 { font-size: 1.375rem; margin: 0 0 2px; grid-column: 1; letter-spacing: -0.01em; }
.cta p { color: var(--text-2); margin: 0; grid-column: 1; }
.cta-btn { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; background: var(--accent); color: var(--on-accent); border-radius: 12px; font-weight: 650; text-decoration: none; }
.cta-btn:hover { background: var(--accent-pressed); }

.closer { padding: 72px 16px 0 !important; max-width: none !important; background: var(--night); color: var(--night-text); text-align: center; overflow: clip; }
.closer-text { position: relative; padding-bottom: 32px; }
.closer h2 { font-size: clamp(2.25rem, 6vw, 4rem); }
.closer img { width: 104px; height: auto; animation: trophy 3.2s ease-in-out infinite; }
.closer p { margin: 14px 0 0; color: var(--night-text-2); font-size: 0.9375rem; }
.closer .hero-btn { gap: 10px; }
.sky { display: block; width: calc(100% + 32px); height: clamp(90px, 15vw, 170px); margin: 0 -16px; }
.win { animation: lit 19s steps(1) infinite; }

/* The footer carries on from the night at the end of the page, in both themes. */
.foot { background: #0B1030; color: var(--night-text-2); font-size: 0.9375rem; }
.foot a { color: var(--night-text-2); }
.foot a:hover { color: var(--yellow); }
.foot :focus-visible { outline-color: var(--yellow); }
.foot-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; max-width: 1120px; margin: 0 auto; padding: 48px 16px 28px; }
.foot-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 12px; padding: 0 14px 0 10px; background: var(--night); color: var(--night-text) !important; border-radius: 12px; font-weight: 600; text-decoration: none; }
.foot-name { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; color: var(--night-text); font-size: 1.125rem; font-weight: 650; }
.foot-name img { border-radius: 10px; }
.foot-brand p:not(.foot-name) { margin: 0 0 6px; max-width: 26em; }
.foot h2 { margin: 0 0 6px; color: var(--night-text); font-size: 0.875rem; letter-spacing: 0; font-weight: 650; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; text-decoration: none; }
.foot li a:hover { text-decoration: underline; }
.foot-bottom { max-width: 1120px; margin: 0 auto; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid #FFFFFF1F; font-size: 0.8125rem; }
.foot-bottom p { margin: 0 0 8px; }
.foot-bottom strong { color: var(--night-text); }
.foot-bottom p:last-child { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 0; }
.foot-bottom p:last-child a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-bottom p:nth-child(2) a { display: inline-block; min-width: 44px; padding: 14px 10px; margin: -14px -8px; text-align: center; }

/* ---------- Your own server ---------- */
.sh-diagram { display: flex; align-items: center; gap: 4px; padding: clamp(16px, 3vw, 28px); background: var(--night); color: var(--night-text); border-radius: 24px; }
.sh-diagram > img { flex: 0 1 110px; min-width: 0; width: 110px; height: auto; }
.sh-diagram > img:last-child { flex-basis: 140px; width: 140px; }
.sh-diagram .route-line { min-width: 16px; }
.sh-server { flex: 0 0 auto; display: grid; justify-items: center; gap: 8px; padding: 14px clamp(10px, 2vw, 22px); background: #10132A; box-shadow: inset 0 0 0 1px #6E7BA3; border-radius: 16px; }
.sh-rack { display: grid; gap: 4px; width: 64px; }
.sh-rack i { display: block; height: 16px; background: #26305C; border-radius: 4px; position: relative; }
.sh-rack i::before, .sh-rack i::after { content: ""; position: absolute; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: #7FD8B0; animation: twinkle 3s steps(1) infinite; }
.sh-rack i::before { left: 7px; } .sh-rack i::after { left: 18px; background: var(--yellow); animation-delay: -1.2s; }
.sh-server b { font-size: 0.9375rem; white-space: nowrap; }
.sh-svc { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; color: var(--night-text-2); font-size: 0.75rem; }
.sh-svc code { color: var(--yellow); }
.sh-facts { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.sh-facts li { display: flex; align-items: center; gap: 12px; }
.sh-facts span:last-child { color: var(--text-2); font-size: 0.875rem; line-height: 1.35; }
.sh-facts b { display: block; color: var(--text); font-size: 1rem; }
.sh-steps { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
.sh-steps > li:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
.sh-steps > li { position: relative; padding: 20px; background: var(--surface); border: 1px solid var(--separator); border-radius: 20px; }
.sh-steps h3 { margin: 12px 0 4px; }
.sh-steps > li > p { margin: 0 0 4px; color: var(--text-2); font-size: 0.9375rem; }
.sh-steps .cmd { background: var(--fill); }
.num { display: grid; place-items: center; width: 34px; height: 34px; background: var(--yellow); color: #121418; border-radius: 10px; font-weight: 700; }
.sh-form { margin-top: 10px; padding: 12px; background: var(--fill); border-radius: 12px; font-size: 0.8125rem; }
.sh-form p { margin: 0 0 8px; }
.sh-form small { display: block; color: var(--text-2); font-size: 0.75rem; }
.sh-form p > span { display: block; padding: 6px 10px; background: var(--surface); border-radius: 8px; overflow-wrap: anywhere; }
.sh-tabs { display: flex; padding: 3px; background: var(--surface); border-radius: 10px; font-weight: 600; text-align: center; }
.sh-form .sh-tabs span { flex: 1; padding: 5px; background: none; }
.sh-form .sh-tabs .on { background: var(--accent); color: var(--on-accent); border-radius: 8px; }
.sh-save { margin: 0 !important; padding: 7px; background: var(--accent); color: var(--on-accent); border-radius: 8px; text-align: center; font-weight: 650; }
.sh-more { max-width: 880px; margin-top: 16px; }
.sh-more details { border-bottom: 1px solid var(--separator); }
.sh-more details > :not(summary) { max-width: 44em; }
.sh-more details p { color: var(--text-2); }
.sh-more summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; font-weight: 650; cursor: pointer; list-style: none; }
.sh-more summary::-webkit-details-marker { display: none; }
.sh-more summary::after { content: "+"; color: var(--accent-text); font-size: 1.5rem; font-weight: 400; line-height: 1; transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1); }
.sh-table { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; color: var(--text-2); }
.sh-table b { display: block; color: var(--text); }
.sh-source { margin: 8px 0 0; }
.sh-source a { display: inline-flex; align-items: center; min-height: 44px; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .shots figure, .route { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    .words span { animation: settle linear both; animation-timeline: view(); animation-range: entry calc(20% + var(--i) * 12%) entry calc(50% + var(--i) * 12%); }
  }
}
@keyframes rise { from { transform: translateY(28px); } }
@keyframes settle { from { transform: translateY(14px) scale(0.94); } }

/* ---------- Hero: the app's real room, layer by layer ---------- */
.hero { background: var(--night); color: var(--night-text); }
/* The room's flat ceiling slides under the text, so nothing in the room gets cropped. */
.hero-text { position: relative; z-index: 1; padding: 72px 16px 20px; text-align: center; }
.hero h1 { font-size: clamp(2.25rem, 4.6vw, 4.25rem); max-width: 15em; margin: 0 auto 12px; }
.hero-name { display: block; margin-bottom: 10px; color: var(--yellow); font-size: clamp(1rem, 1.6vw, 1.25rem); font-weight: 650; letter-spacing: 0; }
.hero-lede { max-width: 42em; margin: 0 auto 20px; color: var(--night-text-2); font-size: clamp(1.0625rem, 1.6vw, 1.3125rem); }
.hero-acts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 20px; }
.hero-btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; background: var(--yellow); color: #121418; border-radius: 14px; font-weight: 700; text-decoration: none; transition: transform 120ms ease-out, background-color 150ms ease; }
.hero-btn:active { transform: scale(0.97); }
.hero-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--night-text); }
.hero-meta { margin: 6px 0 0; color: var(--night-text-2); font-size: 0.875rem; }
.hero-meta a { display: inline-flex; align-items: center; min-height: 44px; color: var(--night-text); }
.hero :focus-visible, .nav :focus-visible { outline-color: var(--yellow); }
@media (hover: hover) and (pointer: fine) {
  .hero-btn:hover { background: #FFDD6B; }
  .hero-link:hover { color: var(--yellow); }
}

/* Every layer is placed in the app's room units, so the two crops share one set of numbers. */
.scene { --vx: 0; --vy: 0; --vw: 1600; --vh: 780; margin-top: calc(-70 / 1600 * 100vw); position: relative; container-type: inline-size; overflow: hidden; aspect-ratio: 1600 / 780; background: var(--night); user-select: none; -webkit-user-select: none; }
.scene * { --u: calc(100cqw / var(--vw)); }
.stage { position: absolute; inset: 0; }
.l, .p, .dev { position: absolute; left: calc((var(--x) - var(--vx)) / var(--vw) * 100%); top: calc((var(--y) - var(--vy)) / var(--vh) * 100%); }
.l, .dev { width: calc(var(--w) / var(--vw) * 100%); height: calc(var(--h) / var(--vh) * 100%); }
.l { display: block; max-width: none; pointer-events: none; -webkit-user-drag: none; }
.room-art { --x: 0; --y: 0; --w: 1600; --h: 900; }
.breath, .nod { position: absolute; inset: 0; pointer-events: none; transition: transform 750ms cubic-bezier(0.3, 0.9, 0.3, 1.1); }
.breath { animation: breath 4.2s ease-in-out infinite; }
.nod { animation: nod 4.2s ease-in-out infinite; }
.awake .breath { animation: none; transform: translateY(calc(-10 * var(--u))); }
.awake .nod { animation: none; transform: translateY(calc(-36 * var(--u))); }
@keyframes breath { 50% { transform: translateY(calc(-2 * var(--u))); } }
@keyframes nod { 50% { transform: translateY(calc(-5 * var(--u))); } }
.bolt { opacity: 0; transition: opacity 320ms ease; }
.awake .bolt { opacity: 1; }

.p { pointer-events: none; }
.star { width: calc(2.4 * var(--u)); height: calc(2.4 * var(--u)); background: #FFF6D8; opacity: 0.2; animation: twinkle 5.5s steps(1) infinite; }
.lit { width: calc(5 * var(--u)); height: calc(6.5 * var(--u)); background: #FFD27A; opacity: 0; animation: lit 19s steps(1) infinite; }
@keyframes twinkle { 0% { opacity: 0.25; } 30% { opacity: 1; } 55% { opacity: 0.55; } 80% { opacity: 0.15; } }
@keyframes lit { 0% { opacity: 0; } 25% { opacity: 1; } 70% { opacity: 0; } }
.mote { width: calc(2.5 * var(--u)); height: calc(2.5 * var(--u)); border-radius: 50%; background: #FFE9AD; opacity: 0; animation: dust var(--d, 8s) ease-in-out infinite; }
@keyframes dust { 25% { opacity: 0.8; } 50% { transform: translate(calc(8 * var(--u)), calc(-14 * var(--u))); opacity: 0.35; } 75% { opacity: 0.7; } 100% { transform: translate(calc(-4 * var(--u)), calc(-26 * var(--u))); opacity: 0; } }
.steam { width: calc(3 * var(--u)); height: calc(16 * var(--u)); border-radius: 999px; background: #DBE7FF; opacity: 0; animation: steam 3.6s ease-out infinite; }
@keyframes steam { 30% { opacity: 0.45; } 100% { transform: translateY(calc(-30 * var(--u))) scaleX(1.6); opacity: 0; } }
.zee { color: #DBE7FF; font: 700 calc(22 * var(--u)) / 1 "Inter", sans-serif; opacity: 0; animation: zee 4s ease-out infinite; }
.zee::before { content: "z"; }
.awake .zee { display: none; }
@keyframes zee { 30% { opacity: 1; } 100% { transform: translate(calc(30 * var(--u)), calc(-56 * var(--u))) scale(1.15); opacity: 0; } }
.paused * { animation-play-state: paused !important; }

.thread { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; visibility: hidden; }
.thread.on { visibility: visible; }
.thread path { fill: none; stroke: #FFF1A8; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 3 15; animation: thread 0.7s linear infinite; }
.thread .glow { stroke: var(--yellow); stroke-width: 8; opacity: 0.3; }
@keyframes thread { to { stroke-dashoffset: -18; } }

.dev { padding: 0; background: none; border: 0; border-radius: 12px; cursor: pointer; min-width: 44px; min-height: 44px; -webkit-tap-highlight-color: transparent; }
.dev.near { outline: 3px solid var(--yellow); outline-offset: 2px; }
.dev-art { transition: transform 320ms cubic-bezier(0.23, 1, 0.32, 1); transform-origin: 50% 80%; }
.tag { translate: -50% 0; }
.tag span { display: block; padding: 3px 10px; background: #10132A; color: #F2F5FF; box-shadow: inset 0 0 0 1px #6E7BA3; border-radius: 999px; font-size: 0.75rem; line-height: 1.35; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.spark { position: absolute; width: 14px; height: 14px; background: var(--yellow); clip-path: polygon(55% 0, 15% 55%, 45% 55%, 35% 100%, 85% 40%, 55% 40%); pointer-events: none; }

.token { translate: -50% -50%; z-index: 2; display: inline-flex; white-space: nowrap; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; background: #F2F5FF; color: #121418; border: 0; border-radius: 12px; font: 600 0.875rem/1 "Inter", sans-serif; cursor: grab; pointer-events: auto; touch-action: none; }
.token.held { cursor: grabbing; }
.demo-note { margin: 0; padding: 12px 16px; background: #10132A; color: var(--night-text-2); font-size: 0.9375rem; text-align: center; }

@media (max-width: 900px) {
  .pair, .howto, .faq { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .sh-steps { grid-template-columns: minmax(0, 1fr); }
  .sh-steps { gap: 12px; }
  .sh-steps > li:nth-child(3) { grid-column: auto; grid-row: auto; }
  .faq-side { position: static; }
  .foot-top { grid-template-columns: repeat(2, 1fr); }
  .foot-brand { grid-column: 1 / -1; }
  main > section.cta { grid-template-columns: 1fr; row-gap: 12px; }
  .cta-btn { grid-column: 1; grid-row: auto; justify-self: start; }
  .f-wide { display: none; }
  .nav-extra { display: none; }
}
@media (max-width: 760px) {
  .scene { --vx: 490; --vy: 60; --vw: 620; --vh: 690; margin-top: 0; aspect-ratio: 620 / 690; }
  .room-art { --x: 490; --y: -200; --w: 620; --h: 1700; }
  .d-desktop { display: none; }
  .hero-text { padding-top: 72px; padding-bottom: 12px; }
  .hero-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .nav-back span { display: none; }
  .nav-back { padding: 0; }
  .sh-diagram > img { flex-basis: 56px; width: 56px; }
  .sh-diagram > img:last-child { flex-basis: 70px; width: 70px; }
  .sh-rack { width: 48px; }
  .sh-svc { display: grid; }
}
/* Very wide screens: the room keeps a sensible size instead of filling the height. */
@media (min-width: 1921px) {
  .scene { max-width: 1920px; margin-inline: auto; margin-top: -84px; }
}
/* A folded phone's cover screen or a phone on its side has little height to spare. */
@media (max-height: 480px) {
  .hero-text { padding-top: 64px; }
  .hero h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .steam, .zee, .thread { display: none; }
  .route-line i:not(:first-child) { display: none; }
  .route-line i { left: 50%; }
  .mote { opacity: 0.6; }
  .star { opacity: 0.8; }
}

/* the film, and the phone screens */
.film figure { margin: 0; max-width: 960px; }
.film video { display: block; width: 100%; height: auto; background: var(--night); border-radius: 16px; border: 1px solid var(--separator); }
.head-phones { margin-top: 48px; }
.head-phones h3 { margin: 0 0 8px; font-size: clamp(1.25rem, 3vw, 1.625rem); letter-spacing: -0.015em; }
.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; max-width: 960px; }
.phones figure { margin: 0; }
.phones img { display: block; width: 100%; height: auto; background: #000; border-radius: 22px; border: 1px solid var(--separator); }
.phones figcaption { margin-top: 12px; color: var(--text-2); font-size: 0.9375rem; }
@media (max-width: 680px) {
  .phones { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 0 16px 12px; scroll-padding-inline: 16px; }
  .phones figure { flex: 0 0 min(72vw, 300px); scroll-snap-align: start; }
}
