/* Legroom website. Light is the default; the top bar's button switches to dark. No external fonts or scripts. */
:root, [data-theme="light"] {
  --bg: #f3f8f5; --bg2: #ffffff; --ink: #0d1f15; --mute: #48604f; --accent: #127a42; --on-accent: #fff;
  --card: rgba(255, 255, 255, .8); --line: rgba(13, 31, 21, .1); --track: rgba(13, 31, 21, .09); --veil: 243, 248, 245;
  --shadow: rgba(13, 60, 35, .26); --glow: rgba(53, 201, 122, .2); color-scheme: light;
}
[data-theme="dark"] {
  --bg: #070d0b; --bg2: #0c1512; --ink: #eaf3ee; --mute: #a9bdb2; --accent: #35c97a; --on-accent: #04140b;
  --card: rgba(255, 255, 255, .05); --line: rgba(255, 255, 255, .1); --track: rgba(255, 255, 255, .1); --veil: 7, 13, 11;
  --shadow: rgba(0, 0, 0, .65); --glow: rgba(53, 201, 122, .18); color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Hiragino Sans", "PingFang SC", "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased; background: var(--bg); color: var(--ink); overflow-x: hidden; transition: background .35s, color .35s; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
[data-theme="light"] .only-dark, [data-theme="dark"] .only-light { display: none; }
h1, h2, h3 { letter-spacing: -.025em; line-height: 1.1; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: rgba(var(--veil), .72); backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px); border-bottom: 1px solid var(--line); }
.top nav { display: flex; align-items: center; gap: 14px; max-width: 1200px; margin: 0 auto; padding: 12px 32px; font-size: 14.5px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 18px; text-decoration: none; margin-right: auto; }
.links { display: flex; gap: 24px; margin-right: 10px; }
.links a { text-decoration: none; color: var(--mute); }
.links a:hover { color: var(--ink); }
.lang { position: relative; }
.lang summary { list-style: none; display: flex; align-items: center; gap: 7px; cursor: pointer; border: 1px solid var(--line); border-radius: 99px; padding: 6px 13px; color: var(--mute); background: var(--card); }
.lang summary::-webkit-details-marker { display: none; }
.lang svg, .theme svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lang ul { position: absolute; right: 0; top: calc(100% + 8px); list-style: none; padding: 6px; min-width: 190px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 44px var(--shadow); }
.lang li a { display: block; padding: 8px 12px; border-radius: 9px; text-decoration: none; }
.lang li a:hover { background: var(--track); }
.lang li a[aria-current] { color: var(--accent); font-weight: 600; }
.theme { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--mute); cursor: pointer; }
.theme:hover { color: var(--ink); }
[data-theme="light"] .theme .sun, [data-theme="dark"] .theme .moon { display: none; }

/* hero */
.hero-wrap { position: relative; overflow: hidden; margin-top: -62px; padding: 62px 0 90px; }
.hero-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.veil { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(1100px 760px at 20% 38%, rgba(var(--veil), .95), rgba(var(--veil), .62) 58%, rgba(var(--veil), .14)), linear-gradient(180deg, transparent 78%, var(--bg)); }
.hero { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; padding: 64px 32px 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 44px; align-items: center; }
h1 { font-size: clamp(38px, 5vw, 66px); line-height: 1.04; letter-spacing: -.035em; font-weight: 700; }
h1 em { font-style: normal; color: var(--accent); }
.sub { font-size: 19px; color: var(--mute); margin: 20px 0 26px; max-width: 30em; }
.cta { display: inline-flex; align-items: center; gap: 10px; border-radius: 12px; padding: 13px 22px; font-weight: 600; font-size: 16.5px; background: var(--accent); color: var(--on-accent); text-decoration: none; transition: transform .2s, box-shadow .2s; }
a.cta:hover { transform: translateY(-2px); box-shadow: 0 10px 26px var(--glow); }
.cta svg { width: 19px; height: 19px; fill: currentColor; margin-top: -3px; }
.cta.soon { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.facts { font-size: 13.5px; color: var(--mute); margin-top: 12px; }

.meter { margin-top: 30px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); max-width: 520px; }
.mhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; color: var(--mute); }
.mhead small { border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; margin-left: 8px; font-size: 11px; white-space: nowrap; }
.mhead .free { font-size: 15px; color: var(--ink); white-space: nowrap; }
.mhead .free b { font-size: 30px; letter-spacing: -.03em; color: var(--accent); font-variant-numeric: tabular-nums; }
.track { display: flex; gap: 2px; height: 16px; margin: 10px 0 12px; border-radius: 8px; overflow: hidden; }
.track i { display: block; height: 100%; flex: 0 0 0; transition: flex-basis 1s cubic-bezier(.3, .7, .2, 1); }
.track .rec { background: repeating-linear-gradient(135deg, #127a42 0 4px, #35c97a 4px 8px); }
.track .fr { background: var(--track); flex: 1 1 0; }
.tick { font-size: 13.5px; height: 21px; overflow: hidden; color: var(--mute); white-space: nowrap; text-overflow: ellipsis; }
.tick span { display: block; animation: up .5s ease; overflow: hidden; text-overflow: ellipsis; }
.tick b { color: var(--accent); font-weight: 600; }
@keyframes up { from { transform: translateY(18px); opacity: 0; } }

.stage { perspective: 1600px; }
.demo { position: relative; aspect-ratio: 1600 / 1313; transform: rotateY(calc(-12deg + var(--rx, 0deg))) rotateX(calc(4deg + var(--ry, 0deg))); transition: transform .25s ease-out; filter: drop-shadow(0 50px 70px var(--shadow)) drop-shadow(0 0 60px var(--glow)); }
.frame { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.frame.on { opacity: 1; }
.frame img { width: 100%; height: 100%; }
.steps { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 30px; }
.steps button { font: inherit; font-size: 13.5px; border-radius: 99px; padding: 7px 14px; cursor: pointer; background: var(--card); color: var(--mute); border: 1px solid var(--line); transition: background .3s, color .3s; }
.steps button.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.tiles { position: relative; z-index: 2; max-width: 1200px; margin: 76px auto 0; padding: 0 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile, .card, .step { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.tile h3 { font-size: 18px; margin-bottom: 8px; }
.tile p { color: var(--mute); font-size: 15.5px; }

/* sections */
.section { max-width: 1200px; margin: 0 auto; padding: 90px 32px 0; }
.section.narrow { max-width: 820px; }
h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; }
.lead { color: var(--mute); font-size: 19px; margin-top: 12px; max-width: 34em; }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; margin-top: 96px; }
.feature:nth-of-type(even) .feature-text { order: 2; }
.feature h3 { font-size: clamp(26px, 2.8vw, 34px); margin: 14px 0 12px; }
.feature p { color: var(--mute); }
.feature ul { margin: 16px 0 0; padding: 0; list-style: none; }
.feature li { position: relative; padding-left: 22px; margin-top: 8px; font-size: 15.5px; color: var(--mute); }
.feature li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 3px; background: var(--k, var(--accent)); }
.feature-shot { filter: drop-shadow(0 30px 50px var(--shadow)); transition: transform .5s ease; }
.feature:hover .feature-shot { transform: translateY(-6px); }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; padding: 5px 12px 5px 8px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.kicker::before { content: ""; width: 12px; height: 12px; border-radius: 4px; background: var(--k, var(--accent)); }
#story, #sweep { --k: #1f9d58; } #receipts { --k: #7d8696; } #developer { --k: #8257e6; } #files { --k: #ea8a2f; } #apps, #timeline { --k: #4a6cf0; } #photos { --k: #e0b02a; }
.steps-list { list-style: none; padding: 0; margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step .num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px; margin-bottom: 16px; }
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--mute); font-size: 15.5px; }
.demo-video video { width: 100%; height: auto; margin-top: 36px; border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 30px 60px var(--shadow); background: #000; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card { padding: 34px; }
.card h2 { font-size: 28px; margin-bottom: 18px; }
.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 30px; margin-top: 12px; color: var(--mute); }
.checks li::before { content: ""; position: absolute; left: 0; top: .28em; width: 18px; height: 18px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.300l2.700 2.700L13 6.500' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/cover; }
.more { display: inline-block; margin-top: 22px; color: var(--accent); font-weight: 600; text-decoration: none; }
.plans dt { font-weight: 700; margin-top: 14px; }
.plans dd { color: var(--mute); }
.small { font-size: 14px; color: var(--mute); margin-top: 18px; }
#faq details, .article details { border-bottom: 1px solid var(--line); padding: 4px 0; }
#faq h2 { margin-bottom: 22px; }
summary { cursor: pointer; }
#faq summary, .article summary { list-style: none; position: relative; padding: 16px 36px 16px 0; font-weight: 600; font-size: 18px; }
#faq summary::-webkit-details-marker, .article summary::-webkit-details-marker { display: none; }
#faq summary::after, .article summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 24px; font-weight: 400; color: var(--accent); transition: transform .25s; }
details[open] > summary::after { transform: rotate(45deg); }
#faq details p, .article details p { color: var(--mute); padding: 0 0 18px; max-width: 44em; }
.closing { text-align: center; padding-bottom: 110px; }
.closing h2 { margin-bottom: 28px; }

/* privacy and support pages */
.article { max-width: 760px; margin: 0 auto; padding: 70px 32px 110px; }
.article h1 { font-size: clamp(34px, 4.4vw, 52px); margin-bottom: 18px; }
.article h2 { font-size: 24px; margin: 40px 0 12px; }
.article p, .article li { color: var(--mute); margin-top: 12px; }
.article ul { padding-left: 22px; }
.article b { color: var(--ink); }
.article a { color: var(--accent); }
.note { border-left: 3px solid var(--accent); padding-left: 14px; }

.foot { border-top: 1px solid var(--line); background: var(--bg2); }
.foot-in { max-width: 1200px; margin: 0 auto; padding: 40px 32px 48px; font-size: 14.5px; color: var(--mute); }
.foot .brand { color: var(--ink); margin-bottom: 6px; }
.foot-links { margin-top: 20px; display: flex; gap: 22px; }
.foot-langs { margin-top: 12px; line-height: 2; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

/* reveal on scroll; without scripting everything is simply visible */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 980px) { .links { display: none; } }
@media (max-width: 860px) {
  body { font-size: 16px; }
  .top nav { padding: 10px 16px; gap: 10px; }
  .hero, .feature, .two, .tiles, .steps-list { grid-template-columns: 1fr; }
  .hero { padding: 40px 16px 0; gap: 36px; }
  .tiles, .section, .article, .foot-in { padding-left: 16px; padding-right: 16px; }
  .section { padding-top: 64px; }
  .demo { transform: none; }
  .feature { gap: 26px; margin-top: 64px; }
  .feature:nth-of-type(even) .feature-text { order: 0; }
  .lang summary { padding: 6px 10px; }
  .card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, .js .reveal { animation: none !important; transition: none !important; opacity: 1; transform: none; }
  .frame { opacity: 0; } .frame.on { opacity: 1; }
}

/* Japanese and Chinese: no negative tracking, break at phrases, a slightly smaller headline */
:lang(ja) h1, :lang(zh-Hans) h1 { font-size: clamp(32px, 4vw, 52px); line-height: 1.2; }
:lang(ja) :is(h1, h2, h3, .sub, .lead), :lang(zh-Hans) :is(h1, h2, h3, .sub, .lead) { letter-spacing: 0; word-break: auto-phrase; line-break: strict; }
/* dark windows on a dark page need an edge */
[data-theme="dark"] .demo { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .55)) drop-shadow(0 50px 70px var(--shadow)) drop-shadow(0 0 70px var(--glow)); }
[data-theme="dark"] .feature-shot { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .5)) drop-shadow(0 30px 50px var(--shadow)); }
/* on a phone the map sits behind all the text, so it is faded further */
@media (max-width: 860px) { .veil { background: linear-gradient(180deg, rgba(var(--veil), .84) 70%, var(--bg)); } }
video::cue { font: 600 1em -apple-system, "Helvetica Neue", sans-serif; background: rgba(7, 13, 11, .78); color: #fff; }
