/* Wisp landing page. Tokens follow the app's macOS 26 (Tahoe) look. */
:root {
  --bg: #F5F5F7;
  --card: #FFFFFF;
  --ink: #1D1D1F;
  --ink-2: #6E6E73;
  --hair: rgba(0, 0, 0, .08);
  --hair-strong: rgba(0, 0, 0, .12);
  --fill: rgba(120, 120, 128, .12);

  /* Apple system colours: bright for marks, darker cut for text on white */
  --blue: #0088FF;   --blue-text: #0071E3;  --button: #0071E3;  --button-hover: #0077ED;
  --cyan: #00C0E8;   --cyan-text: #007A99;
  --green: #34C759;  --green-text: #1E7F38;
  --orange: #FF8D28; --orange-text: #B35200;
  --red: #FF383C;    --red-text: #D70015;
  --indigo: #6155F5; --indigo-text: #5046E5;
  --purple: #CB30E0; --purple-text: #9B1FB5;
  --teal: #00C3D0;   --teal-text: #00788A;

  --radius-card: 18px;
  --radius-inner: 12px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .03);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --page: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { margin: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--button); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--card); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-card); }
.skip:focus { top: 16px; }

.wrap { width: min(var(--page), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- Type ---------- */
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.05; letter-spacing: -.015em; font-weight: 700; }
h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.1; letter-spacing: -.01em; font-weight: 700; }
h3 { font-size: 21px; line-height: 1.24; }
.lede { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.42; color: var(--ink-2); text-wrap: pretty; }
.fine { font-size: 14px; line-height: 1.43; color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 999px;
  font: 600 17px/1 var(--font); white-space: nowrap;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--button); color: #fff; box-shadow: 0 1px 2px rgba(0, 60, 140, .2), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn-primary:hover { background: var(--button-hover); }
.btn-plain { color: var(--blue-text); padding: 0 12px; }
.btn-plain:hover { background: rgba(0, 113, 227, .08); }
.btn svg { flex: none; }
.btn-sm { height: 32px; padding: 0 14px; font-size: 14px; }

/* ---------- Nav: floating glass capsule ---------- */
.nav {
  position: fixed; z-index: 40; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  width: min(var(--page), 100% - 24px);
  display: flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 10px 0 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 0 0 .5px var(--hair-strong), 0 8px 24px rgba(0, 0, 0, .06), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 600; font-size: 17px; margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { color: var(--ink); font-size: 14px; padding: 7px 12px; border-radius: 999px; }
.nav-links a:hover { background: var(--fill); text-decoration: none; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(128px, 15vh, 168px); text-align: center; position: relative; }
.hero-icon { width: 112px; height: 112px; margin: 0 auto 28px; }
.hero h1 { max-width: 13ch; margin-inline: auto; }
@media (min-width: 1100px) { .hero h1 { max-width: none; } }
.hero .lede { max-width: 36em; margin: 22px auto 0; }
.cta { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.req { margin-top: 16px; }

/* ---------- Tour (window stage) ---------- */
.tour { position: relative; padding-top: clamp(48px, 7vh, 72px); overflow-x: clip; }
.backdrop { display: none; }
.tour-pin { position: relative; }
.stage { position: relative; width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; perspective: 1600px; }
.win { width: 100%; aspect-ratio: 2400 / 1505; }
.win img { width: 100%; height: 100%; }
.win-over { position: absolute; inset: 0; }
.menubar-layer { display: none; }

.captions { width: min(720px, 100% - 2 * var(--gutter)); margin: 40px auto 0; }
.cap { text-align: center; }
.cap + .cap { margin-top: 88px; }
.cap h3 { font-size: clamp(24px, 2.4vw, 30px); }
.cap p { margin-top: 10px; color: var(--ink-2); font-size: 18px; line-height: 1.5; text-wrap: pretty; }
.cap-media { margin: 28px auto 0; }
.cap-media.pop { width: min(380px, 100%); filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .12)); }
.cap-label { display: none; }

/* Segmented control, styled like the app's Live / Hour / Day picker */
.seg {
  display: none; width: max-content; margin: 0 auto; padding: 3px; border-radius: 999px;
  background: rgba(255, 255, 255, .7); box-shadow: 0 0 0 .5px var(--hair-strong), 0 2px 8px rgba(0, 0, 0, .04);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.seg button {
  font: 500 14px/1 var(--font); color: var(--ink); background: none; border: 0; cursor: pointer;
  height: 32px; padding: 0 16px; border-radius: 999px; transition: background-color .2s ease, box-shadow .2s ease;
}
.seg button[aria-current="true"] { background: #fff; font-weight: 600; box-shadow: 0 0 0 .5px var(--hair), 0 2px 6px rgba(0, 0, 0, .08); }

/* Hidden until GSAP brings them in (only when motion is allowed and GSAP loaded) */
.anim .hero > *, .anim .perf-card, .anim .feat, .anim .download > * { opacity: 0; }
html.motion { scroll-behavior: auto; }

/* Motion mode: pinned stage, layered windows, captions stacked in place */
html.motion .hero { padding-top: clamp(104px, 13vh, 132px); }
html.motion .hero-icon { width: 96px; height: 96px; margin-bottom: 24px; }
html.motion .tour { padding-top: 0; }
html.motion .tour-pin { height: 100vh; height: 100dvh; display: flex; flex-direction: column; justify-content: flex-start; padding-top: 88px; }
html.motion .stage { width: min(1180px, 100% - 2 * var(--gutter), (100vh - 270px) * 1.595); }
html.motion .win-over, html.motion .menubar-layer { display: block; }
html.motion .seg { display: flex; margin-top: 22px; }
html.motion .captions { position: relative; height: 96px; margin-top: 18px; }
html.motion .cap { position: absolute; inset: 0; }
html.motion .cap + .cap { margin-top: 0; }
html.motion .cap-media { display: none; }
html.motion .cap p { font-size: 17px; margin-top: 6px; }
html.motion .cap h3 { font-size: 24px; }
html:not(.motion) .win-over { display: none; }

.menubar-layer { position: absolute; inset: 0; pointer-events: none; }
.menubar {
  position: absolute; left: 1.2%; right: 1.2%; top: 1.6%; height: 4.2%; min-height: 26px; border-radius: 10px;
  display: flex; align-items: center; justify-content: flex-end; gap: 18px; padding: 0 12px;
  font: 500 13px/1 var(--font); color: var(--ink);
  background: rgba(255, 255, 255, .78); box-shadow: 0 0 0 .5px var(--hair), 0 4px 16px rgba(0, 0, 0, .06);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
}
.menubar .mb-menus { display: flex; gap: 18px; margin-right: auto; }
.menubar .mb-menus b { font-weight: 700; }
.menubar .mb-wisp { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; background: rgba(0, 0, 0, .08); }
.menubar .mb-wisp img { width: 16px; height: 16px; }
.popover { position: absolute; top: 7.4%; right: 4.2%; width: 26%; filter: drop-shadow(0 24px 48px rgba(0, 0, 0, .18)); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(96px, 14vw, 168px) 0; }
.section-head { max-width: 760px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .lede { margin-top: 16px; }

/* ---------- Performance ---------- */
.perf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
.card { background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.perf-card { padding: 32px 32px 30px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; }
.card-title svg { width: 20px; height: 20px; flex: none; }
.big { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; font-size: clamp(56px, 6vw, 80px); font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.big .unit { font-size: .42em; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }
.big-sub { margin-top: 10px; color: var(--ink-2); font-size: 15px; }
.bars { list-style: none; padding: 0; margin-top: 30px; display: grid; gap: 16px; }
.bar-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 104px; align-items: center; gap: 14px; font-size: 15px; }
.bar-row .name { font-weight: 600; }
.bar-row .val { text-align: right; font-weight: 600; }
.track { position: relative; height: 10px; border-radius: 99px; background: rgba(120, 120, 128, .12); overflow: hidden; }
.fill { position: absolute; inset: 0 auto 0 0; border-radius: 99px; transform-origin: left center; }
.fill.lo { background: #AEAEB2; }
.fill.hi { background: #D1D1D6; }
.bar-row.us .fill.lo { background: var(--blue); }
.bar-row.us .fill.hi { background: #8CC8FF; }
.bar-row.us .name, .bar-row.us .val { color: var(--blue-text); }
.perf-note { margin-top: 24px; text-align: center; }

/* ---------- Features (app-style cards) ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
.feat { padding: 26px 26px 28px; display: flex; flex-direction: column; }
.feat p { margin-top: 10px; color: var(--ink-2); font-size: 15px; line-height: 1.47; text-wrap: pretty; }
.feat.wide { grid-column: span 2; padding-bottom: 0; overflow: hidden; }
.feat.wide .shot { margin: 22px -26px 0 0; border-top-left-radius: var(--radius-inner); box-shadow: -1px -1px 0 var(--hair); overflow: hidden; }
.feat.wide .shot img { width: 100%; }
.feat.wide .shot { -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.meters { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 2px; }
.meters li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 8px; font-size: 14px; }
.meters li:first-child { background: var(--fill); }
.feat .more { margin-top: auto; padding-top: 14px; font-size: 14px; color: var(--ink-2); }
.meters .v { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.meters .v.warn { color: var(--orange-text); }
.t-blue { color: var(--blue-text); } .t-orange { color: var(--orange-text); } .t-cyan { color: var(--cyan-text); }
.t-purple { color: var(--purple-text); } .t-red { color: var(--red-text); } .t-indigo { color: var(--indigo-text); }
.t-green { color: var(--green-text); } .t-teal { color: var(--teal-text); }

/* Hover cards: one tinted plate slides between cards (main.js); the hovered card lights up */
.feat-grid { position: relative; isolation: isolate; }
.feat > * { position: relative; z-index: 2; }
.plate { position: absolute; top: 0; left: 0; z-index: 1; border-radius: var(--radius-card); pointer-events: none; opacity: 0; visibility: hidden; }
@media (hover: hover) {
  .feat .card-title { transition: color .2s ease; }
  .feat .card-title svg { transition: color .2s ease, transform .2s ease; }
  html.anim .feat .card-title { color: var(--ink); }
  html.anim .feat .card-title svg { color: var(--ink-2); }
  html.anim .feat.is-active .card-title, html.anim .feat.is-active .card-title svg { color: var(--c); }
  html.anim .feat.is-active .card-title svg { transform: scale(1.08); }
  html:not(.anim) .feat:hover { background-image: linear-gradient(var(--tint), var(--tint)); }
}

/* ---------- Download ---------- */
.download { text-align: center; padding-bottom: clamp(96px, 12vw, 144px); }
.download-icon { width: 128px; height: 128px; margin: 0 auto 28px; }
.download .lede { margin: 16px auto 0; max-width: 30em; }

/* ---------- Footer ---------- */
.footer { padding-block: 28px 40px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--ink-2); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat.wide { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .perf-grid { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 50px minmax(0, 1fr) auto; gap: 12px; }
  .bar-row .val { white-space: nowrap; }
  /* Shots bleed off one edge at a readable scale instead of shrinking to fit */
  .win-base { width: 175%; }
  .cap-media:not(.pop) { width: 175%; max-width: none; margin-inline-start: -75%; }
  .feat.wide .shot img { width: 175%; max-width: none; }
  .perf-card { padding: 26px 22px; }
  .hero-icon { width: 88px; height: 88px; margin-bottom: 22px; }
  .cap + .cap { margin-top: 72px; }
  .menubar { display: none; }
}
@media (max-width: 420px) {
  .cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .seg button { transition: none; }
}

/* ---------- Privacy and Terms ---------- */
.doc { width: min(680px, 100% - 2 * var(--gutter)); margin: 128px auto 72px; }
.doc h1 { font-size: 34px; line-height: 1.15; margin: 0 0 6px; }
.doc h2 { font-size: 20px; line-height: 1.3; margin: 36px 0 8px; }
.doc p, .doc li { font-size: 17px; line-height: 1.55; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc code { font: 15px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--fill); padding: 1px 5px; border-radius: 5px; }
.install { display: inline-block; margin: 18px 0 4px; font: 15px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--card); border: 1px solid var(--hair-strong); padding: 10px 14px; border-radius: 10px; user-select: all; }
