/* Liquix website
   One scroll scene: full-screen Tahoe → the middle tile of the bento → the bento pops in.
   Sizes on the board are in "board units" (--u): the board is 1191 × 749 units. */

:root {
  --page: #ffffff;
  --board: #e8e8ed;
  --tile: #ffffff;
  --ink: #1d1d1f;
  --sub: #636366;
  --blue: #0071e3;
  --scrim: rgba(245, 245, 247, 0.35);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-edge: rgba(255, 255, 255, 0.7);
  --title-ink: rgba(0, 0, 0, 0.65);      /* see-through text, from the Proto design */
  --soft-ink: rgba(0, 0, 0, 0.65);
  --btn-bg: rgba(255, 255, 255, 0.51);
  --btn-ink: rgba(0, 0, 0, 0.55);
  --glass-sym: rgba(0, 0, 0, 0.32);
  --spring: cubic-bezier(0.22, 1.18, 0.36, 1);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  color-scheme: light;
}
[data-theme="dark"] {
  --page: #000000;
  --board: #000000;
  --tile: #1c1c1e;
  --ink: #f5f5f7;
  --sub: #98989d;
  --blue: #2997ff;
  --scrim: rgba(0, 0, 0, 0.4);
  --glass: rgba(30, 30, 32, 0.6);
  --glass-edge: rgba(255, 255, 255, 0.12);
  --title-ink: rgba(255, 255, 255, 0.83);
  --soft-ink: rgba(255, 255, 255, 0.64);
  --btn-bg: rgba(0, 0, 0, 0.42);
  --btn-ink: rgba(255, 255, 255, 0.82);
  --glass-sym: rgba(255, 255, 255, 0.81);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--board); color: var(--ink); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease);
}
button { font: inherit; color: inherit; }
a { color: inherit; }

/* Apple logo, drawn from the SF Symbol, in the text colour. */
.apple {
  display: inline-block; width: .78em; height: .92em; vertical-align: -0.06em;
  background: currentColor;
  -webkit-mask: url(assets/sym/apple.logo.png) center / contain no-repeat;
          mask: url(assets/sym/apple.logo.png) center / contain no-repeat;
}
/* An SF Symbol (exported from Proto) drawn in the text colour. */
.ms { display: inline-block; background: currentColor;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }

/* ---------- Header: icon + name on frosted glass ---------- */
.bar {
  position: fixed; inset: 14px 0 auto; z-index: 30;
  width: min(1100px, calc(100% - 28px)); margin: 0 auto; height: 52px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px 0 14px; border-radius: 26px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -.2px; }
.brand img { border-radius: 7px; }
.theme {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: transparent;
  transition: background-color .2s var(--ease);
}
.theme:hover { background: rgba(127, 127, 127, .14); }
.theme .ms { width: 20px; height: 20px; color: #000; opacity: .53; }
[data-theme="dark"] .theme .ms { color: #fff; opacity: .52; transform: scaleX(-1); }

/* ---------- The scroll scene ---------- */
.scene { position: relative; height: 560vh; }
.scene-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--board); }

.board {
  --u: 1px;                                   /* set by main.js */
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--u) * 1191); height: calc(var(--u) * 749);
  transform: translate(-50%, -46%);
}
.board-bg {
  position: absolute; inset: calc(var(--u) * -16);
  border-radius: calc(var(--u) * 40); background: var(--board);
  opacity: 0; transition: opacity .7s var(--ease);
}
[data-theme="dark"] .board-bg { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.board.in .board-bg { opacity: 1; }

.tile {
  position: absolute; overflow: hidden; border: 0; padding: 0; margin: 0; cursor: pointer;
  border-radius: calc(var(--u) * 26); background: var(--tile); color: var(--ink);
  text-align: center;
  opacity: 0; transform: translateY(calc(var(--u) * 18)) scale(.92);
  transition: opacity .55s var(--ease) calc(var(--i, 0) * 70ms),
              transform .8s var(--spring) calc(var(--i, 0) * 70ms),
              background-color .4s var(--ease);
}
.board.in .tile { opacity: 1; transform: none; }
.tile:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.tile.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile:not(.slot):hover { filter: brightness(1.03); }
.label {
  position: absolute; left: 0; right: 0; top: calc(var(--u) * 20);
  font-weight: 600; font-size: calc(var(--u) * 21); letter-spacing: -.3px; z-index: 1;
}
.label.on-light { color: #1d1d1f; }
.label.on-dark { color: #fff; }
[data-theme="dark"] .label.on-light { color: #fff; }
.caption { display: block; font-weight: 600; font-size: calc(var(--u) * 21); letter-spacing: -.3px; line-height: 1.15; }
.tile.plain { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--u) * 14); }
.tile.plain .sym { width: auto; height: calc(var(--u) * 62); }
.t-glass .ms { width: calc(var(--u) * 62); height: calc(var(--u) * 58); color: var(--glass-sym); }
.t-glass .caption { font-size: calc(var(--u) * 20); }

/* Split view: the label, then the MacBook rising from the bottom edge. */
.t-split .split-shot { position: absolute; left: 50%; top: calc(var(--u) * 62); width: 92%; height: auto; transform: translateX(-50%); filter: drop-shadow(0 6px 12px rgba(0,0,0,.16)); }

/* Positions, in board units */
.t-answers  { left: 0;   top: 0;   width: calc(var(--u) * 330); height: calc(var(--u) * 330); }
.t-clock    { left: 0;   top: calc(var(--u) * 342); width: calc(var(--u) * 330); height: calc(var(--u) * 220); }
.t-download { left: 0;   top: calc(var(--u) * 574); width: calc(var(--u) * 330); height: calc(var(--u) * 175); }
.t-glass    { left: calc(var(--u) * 342); top: 0; width: calc(var(--u) * 110); height: calc(var(--u) * 200); }
.t-split    { left: calc(var(--u) * 464); top: 0; width: calc(var(--u) * 385); height: calc(var(--u) * 200); }
.t-hero     { left: calc(var(--u) * 342); top: calc(var(--u) * 212); width: calc(var(--u) * 507); height: calc(var(--u) * 352); visibility: hidden; }
.t-love     { left: calc(var(--u) * 342); top: calc(var(--u) * 564); width: calc(var(--u) * 507); height: calc(var(--u) * 185); }
.t-private  { left: calc(var(--u) * 861); top: 0; width: calc(var(--u) * 330); height: calc(var(--u) * 305); }
.t-custom   { left: calc(var(--u) * 861); top: calc(var(--u) * 317); width: calc(var(--u) * 330); height: calc(var(--u) * 245); }
.t-sleep    { left: calc(var(--u) * 861); top: calc(var(--u) * 574); width: calc(var(--u) * 330); height: calc(var(--u) * 175); }

/* Made with love joins the hero above it: square top corners, no gap, and the hero's
   bottom fades into it (see .seam), so the two read as one liquid card. */
.t-love {
  border-top-left-radius: 0; border-top-right-radius: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--u) * 6);
  transform: translateY(calc(var(--u) * -60)) scaleY(.6); transform-origin: top;
}
.board.in .t-love { transform: none; }
.love-title { font-weight: 700; font-size: calc(var(--u) * 38); color: var(--soft-ink); }
.love-by { display: flex; align-items: center; gap: calc(var(--u) * 12); font-weight: 700; font-size: calc(var(--u) * 38); color: var(--soft-ink); }
.pfp { display: block; width: calc(var(--u) * 70); height: calc(var(--u) * 70); border-radius: 50%; overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18); transition: transform .35s var(--spring); }
.pfp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pfp:hover { transform: scale(1.08); }

/* ---------- The Tahoe window ---------- */
.window {
  position: absolute; left: 0; top: 0; width: 100vw; height: 100vh;   /* set every frame by main.js */
  overflow: hidden; z-index: 5; will-change: left, top, width, height, border-radius;
  background: transparent;
}
.window.landed { cursor: pointer; }
.tahoe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s var(--ease); }
.tahoe-dark { opacity: 0; }
[data-theme="dark"] .tahoe-dark { opacity: 1; }
.seam {   /* fades the hero into the Made with love tile below it */
  position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background: linear-gradient(to bottom, transparent, var(--tile) 96%);
  opacity: 0; transition: opacity .7s var(--ease) .25s;
}
.board.in ~ .window .seam { opacity: 0; }   /* a clean cut into Made with love, as designed */
/* The hero, laid out at the size it was designed (a 1781-wide frame) and scaled to fit. */
.window-content {
  position: absolute; left: 50%; top: 50%; width: 1400px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  transform: translate(-50%, calc(-50% + var(--dy, 0px))) scale(var(--s, 1)); transform-origin: center;
  color: var(--title-ink);
}
.app-icon { width: 350px; height: 350px; }
.line1, .line2 { margin: 0; font-size: 56px; line-height: 75px; font-weight: 700; white-space: nowrap; }   /* as in Proto: system 56, bold */
.line1 { display: flex; justify-content: center; margin-top: 4px; }
.ghost { display: inline-block; overflow: hidden; vertical-align: top;
  max-width: calc(var(--full, 1) * 560px); opacity: var(--full, 1); }
.line2-wrap { position: relative; height: 75px; width: 100%; }
.line2 { position: absolute; left: 0; right: 0; }
.line2.full { opacity: var(--full, 1); }
.line2.tile-sub { font-size: 43px; opacity: var(--tile, 0); }
/* One smooth capsule: symbol and label together, in the colours from the design. */
.cta {
  display: inline-flex; align-items: center; gap: 12px; height: 76px; margin-top: 34px;
  padding: 0 38px 0 30px; border-radius: 999px; text-decoration: none;
  background: rgba(255, 255, 255, 0.92);
  opacity: var(--full, 1); pointer-events: var(--pe, auto); transition: transform .3s var(--spring);
}
[data-theme="dark"] .cta { background: rgba(255, 254, 242, 0.87); }
.cta:hover { transform: scale(1.03); }
.cta-sym { width: 34px; height: 33px; color: rgba(0, 0, 0, 0.6); }
.cta-label { font-size: 34px; font-weight: 600; color: rgba(0, 0, 0, 0.6); letter-spacing: -.3px; }
.requires {
  position: absolute; left: 0; right: 0; bottom: calc(var(--hu, 1) * 24px); margin: 0; text-align: center;
  font-size: calc(var(--hu, 1) * 18px); color: rgba(191, 191, 191, 0.51); opacity: var(--full, 1);
}

/* ---------- Footer: the icon and name, then who made it ---------- */
.foot { display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 110px 20px 70px; background: var(--board); }
.foot-icon { width: 72px; height: 72px; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .18)); }
.foot-name { margin: 14px 0 0; font-size: 40px; font-weight: 700; color: var(--soft-ink); }
.foot-sub { margin: 4px 0 0; font-size: 19px; font-weight: 600; color: var(--soft-ink); }
.foot-people { display: flex; gap: 10px; margin-top: 26px; }
.foot-person { display: flex; align-items: center; gap: 8px; padding: 5px 16px 5px 5px; border-radius: 999px;
  text-decoration: none; font-size: 15px; font-weight: 600; color: var(--soft-ink); background: var(--tile);
  transition: transform .3s var(--spring); }
.foot-person:hover { transform: scale(1.04); }
.foot-person img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.foot-fine { margin: 28px 0 0; font-size: 12px; color: var(--sub); }

/* ---------- Expanded cards ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 40; background: var(--scrim);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  opacity: 0; transition: opacity .45s var(--ease);
}
.scrim.on { opacity: 1; }
/* The shadow sits on the outer box as a drop shadow, so it follows the inner card's
   shape while it grows and shrinks, instead of being clipped and popping in at the end. */
.card { position: fixed; z-index: 50; margin: 0; padding: 0; border: 0; max-width: none; max-height: none;
  background: transparent; color: var(--ink); overscroll-behavior: contain;
  filter: drop-shadow(0 26px 50px rgba(0, 0, 0, .22)); }
.card-inner { position: absolute; inset: 0; overflow: hidden; border-radius: 30px; background: var(--tile); }
.card-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; }
.card-media { position: relative; height: var(--media-h, 62%); overflow: hidden; }
/* The picture keeps one size and is pinned to the top, so it never re-crops or slides while
   the card grows or shrinks; the card just reveals more or less of it. */
.card-media > img, .card-media > video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.card-media.contain > img { object-fit: contain; padding: 26px; }
.card-media.plainmedia { display: grid; place-items: center; background: var(--board); }
.card-media.plainmedia > img { position: static; width: auto; height: 46%; object-fit: contain; }
.card-body { padding: 22px 30px 26px; }
.card-body h2 { margin: 0; font-size: 30px; letter-spacing: -.6px; line-height: 1.1; }
.card-body p { margin: 10px 0 0; font-size: 17px; line-height: 1.45; color: var(--sub); max-width: 62ch; }
.card-more { padding: 0 30px 30px; }
.card.about .card-media { position: absolute; left: 0; right: 0; top: 0; height: 100%; }
.card.about:not(.more) .card-more { visibility: hidden; }
.card-more h3 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.4px; }
.card-more p { margin: 0; font-size: 19px; line-height: 1.45; color: var(--sub); }

/* Round glass buttons: close, pause */
/* Round buttons: plain see-through circles with a see-through symbol, as designed in Proto. */
.glass-btn {
  position: absolute; z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--btn-ink); background: var(--btn-bg);
  transition: transform .3s var(--spring);
}
.glass-btn:hover { transform: scale(1.06); }
.glass-btn .ms { width: 18px; height: 18px; }
.close-btn { top: 16px; right: 16px; }
.pause-btn { bottom: 16px; right: 16px; }
.expand-btn {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 0; background: none; cursor: pointer; color: var(--btn-ink); font-weight: 600; font-size: 16px;
}
.expand-btn .ms { width: 20px; height: 20px; }
/* The bottom of the Tahoe video is deep blue in both themes, so Expand uses the light
   version from the design (white at 82%) there. */
.card.about .expand-btn { color: rgba(255, 255, 255, 0.82); }

/* The About card ("We took an idea…") sits on the video */
.about-head { position: absolute; left: 44px; top: 40px; right: 80px; z-index: 2; color: var(--title-ink); }
.about-head h2 { margin: 0; font-size: 56px; line-height: 1.12; font-weight: 700; }
.about-row { position: absolute; left: 40px; bottom: 78px; z-index: 2; display: flex; align-items: flex-end; gap: 34px; color: var(--title-ink); }
.about-icon { display: flex; flex-direction: column; align-items: center; }
.about-icon img { width: 160px; height: 160px; filter: drop-shadow(0 16px 30px rgba(0, 30, 90, .25)); }
.about-icon span { font-size: 56px; font-weight: 700; margin-top: -4px; }
.about-by { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; }
.about-by > span { font-size: 40px; font-weight: 700; }
.people { display: flex; gap: 22px; }
.person { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 28px; }
.person img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); transition: transform .35s var(--spring); }
.person:hover img { transform: scale(1.07); }

/* ---------- Smaller screens: no pinned scene, the bento stacks ---------- */
@media (max-width: 860px) {
  .scene { height: auto; }
  .scene-stage { position: relative; height: auto; overflow: visible; padding: 0 14px 30px; }
  .window { position: relative !important; left: auto !important; top: auto !important; width: auto !important; height: 92vh !important; margin: 0 -14px 24px; border-radius: 0 !important; }
  .window-content { --s: .62 !important; }
  .board { position: relative; left: auto; top: auto; transform: none; width: auto; height: auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; --u: .9px !important; }
  .board-bg { display: none; }
  .tile { position: relative !important; left: auto !important; top: auto !important; width: auto !important; height: 220px !important;
    opacity: 1; transform: none; border-radius: 22px !important; }
  .t-hero { display: none; }
  .t-love, .t-answers, .t-split { grid-column: span 2; }
  .t-love { border-radius: 22px !important; }
  .label, .caption { font-size: 18px; }
  .love-title { font-size: 28px; } .love-by { font-size: 24px; }
  .pfp { width: 56px; height: 56px; }
  .about-head h2 { font-size: 34px; }
  .about-icon img { width: 96px; height: 96px; } .about-icon span { font-size: 30px; }
  .person img { width: 64px; height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .tile, .board-bg, .seam, .scrim { transition-duration: .01ms !important; transition-delay: 0s !important; }
}

.t-hero { transform: none !important; }

/* ---------- Theme switch ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
html.theme-fade *, html.theme-fade *::before { transition: background-color .5s var(--ease), color .5s var(--ease), opacity .5s var(--ease) !important; }

/* ---------- Hover: slow, soft, no bounce ---------- */
:root { --hover: cubic-bezier(0.2, 0.8, 0.2, 1); }
.theme { transition: background-color .35s var(--hover), transform .45s var(--hover); }
.theme:hover { transform: scale(1.06); }
.theme:active { transform: scale(.94); transition-duration: .15s; }
.cta { transition: transform .5s var(--hover), filter .4s var(--hover); }
.cta:hover { transform: none; filter: brightness(1.03); }
.cta:active { transform: scale(.98); transition-duration: .15s; }
.glass-btn { transition: transform .45s var(--hover), background-color .35s var(--hover); }
.glass-btn:hover { transform: scale(1.06); }
.glass-btn:active { transform: scale(.94); transition-duration: .15s; }
.pfp, .person img, .foot-person { transition: transform .5s var(--hover); }
.pfp:hover, .foot-person:hover { transform: scale(1.05); }
.person:hover img { transform: scale(1.05); }
.board.in .tile:not(.slot) { transition: opacity .55s var(--ease), transform .55s var(--hover), filter .45s var(--hover), background-color .4s var(--ease); }
.board.in .tile:not(.slot):hover { transform: scale(1.012); filter: brightness(1.03); }
.board.in .tile:not(.slot):active { transform: scale(.99); transition-duration: .2s; }
.window.landed { transition: filter .45s var(--hover); }
.window.landed:hover { filter: brightness(1.03); }

/* Avatars: zoom in a touch so the picture's own light edge never shows as an outline. */
.pfp img, .person img, .foot-person img { transform: scale(1.08); }
.pfp, .person, .foot-person { overflow: hidden; }
.person { overflow: visible; }
.person img { clip-path: circle(46% at 50% 50%); transform: none; }

/* Avatars: no shadow halo, and zoomed in past the picture's own outer ring. */
.pfp, .person img, .foot-person img { box-shadow: none !important; }
.pfp img, .foot-person img { transform: scale(1.16); }
.person img { clip-path: none; transform: none; overflow: hidden; }
.person { overflow: visible; }
.person .av { display: block; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; }
.person .av img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.16); }

/* Download label: solid ink on the white capsule reads crisper than see-through grey. */
.cta-label { font-size: 33px; font-weight: 600; letter-spacing: -0.02em; color: #1d1d1f;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
.cta-sym { color: #1d1d1f; width: 32px; height: 31px; }
[data-theme="dark"] .cta-label, [data-theme="dark"] .cta-sym { color: #1d1d1f; }

/* Tile pictures, cropped exactly as in the Proto design (size and position per theme). */
.tile .bg { position: absolute; inset: 0; background-repeat: no-repeat;
  background-image: var(--img); background-size: var(--sz-l, cover); background-position: var(--pos-l, 50% 50%); }
[data-theme="dark"] .tile .bg { background-size: var(--sz-d, cover); background-position: var(--pos-d, 50% 50%); }

/* "The idea": sits on a solid panel below the video when expanded, in readable ink. */
.card.about .card-more { background: var(--tile); color: var(--ink); padding: 26px 44px 34px; z-index: 2; }
.card.about .card-more h3 { color: var(--ink); font-size: 28px; font-weight: 700; margin-bottom: 10px; }
.card.about .card-more p { color: var(--sub); font-size: 19px; line-height: 1.5; }

/* Unxnown's avatar is already cropped as designed: show it as is, on the tile colour. */
img[src$="unxnown-avatar.png"] { transform: none !important; object-fit: cover; }
.pfp, .person .av, .foot-person img { background: var(--tile); }

/* Liquid Glass tile: the real layered symbol, large, with a bold label, as on the board. */
.t-glass { gap: calc(var(--u) * 12) !important; }
.t-glass .glass-sym { width: calc(var(--u) * 78); height: auto; opacity: .32; }
[data-theme="dark"] .t-glass .glass-sym { opacity: .81; }
.t-glass .caption { font-size: calc(var(--u) * 24) !important; font-weight: 700; line-height: 1.08; letter-spacing: -.3px; }

/* ---------- Waitlist: one capsule that opens into an email field ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
form.waitlist.cta { position: relative; display: block; width: 410px; height: 76px; padding: 0; margin: 34px auto 0;
  border-radius: 999px; background: rgba(255, 255, 255, 0.92); overflow: hidden;
  transition: width .55s var(--hover), background-color .3s var(--ease), transform .5s var(--hover); }
form.waitlist.open, form.waitlist.done { width: 600px; }
.wl-open, .wl-send { border: 0; background: none; cursor: pointer; color: #1d1d1f; }
.wl-open { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px;
  transition: opacity .25s var(--ease); }
.waitlist.open .wl-open, .waitlist.done .wl-open { opacity: 0; pointer-events: none; }
.wl-field { position: absolute; left: 34px; right: 86px; top: 0; bottom: 0; display: flex; align-items: center;
  opacity: 0; transition: opacity .3s var(--ease) .15s; }
.waitlist.open .wl-field { opacity: 1; }
.wl-field input { width: 100%; border: 0; outline: none; background: none; font: inherit; font-size: 30px;
  font-weight: 500; color: #1d1d1f; letter-spacing: -.3px; }
.wl-field input::placeholder { color: rgba(0, 0, 0, .35); }
.wl-send { position: absolute; right: 10px; top: 10px; width: 56px; height: 56px; border-radius: 50%;
  background: #1d1d1f; color: #fff; display: grid; place-items: center; opacity: 0; transform: scale(.6);
  transition: opacity .3s var(--ease) .2s, transform .45s var(--hover) .2s, filter .3s var(--hover); }
.wl-send .ms { width: 24px; height: 26px; }
.waitlist.open .wl-send { opacity: 1; transform: none; }
.wl-send:hover { filter: brightness(1.25); }
.waitlist.sending .wl-send { opacity: .5; }
.wl-done { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 30px; font-weight: 600; color: #1d1d1f; letter-spacing: -.3px; opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease) .1s; }
.wl-done .ms { width: 26px; height: 24px; color: #34c759; }
.waitlist.done .wl-done { opacity: 1; }
.waitlist.done .wl-field, .waitlist.done .wl-send { opacity: 0; pointer-events: none; }
.waitlist.bad { animation: wl-shake .4s var(--ease); }
.waitlist.bad .wl-field input { color: #d70015; }
@keyframes wl-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.waitlist .cta-label { font-size: 33px; font-weight: 600; letter-spacing: -0.02em; color: #1d1d1f; }
.waitlist .cta-sym { width: 34px; height: 28px; color: #1d1d1f; }
/* Inside the download card it's a little smaller. */
.card-wl { margin-top: 20px; }
.card-wl form.waitlist.cta { transform: scale(.62); transform-origin: left center; margin: 0; }

/* Never show Safari's own play button over the Tahoe video. */
video::-webkit-media-controls, video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-play-button { display: none !important; -webkit-appearance: none; }

/* MacBook pictures in cards: whole, centred on the board colour, never cropped. */
.card-media.contain { background: var(--board); }
.card-media.contain > img { object-fit: contain !important; object-position: 50% 50% !important; padding: 28px 36px 20px; }
.tahoe-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Card pictures centre on what matters (set per card), not the top edge. */
.card-media:not(.contain):not(.plainmedia) > img { object-position: var(--focus, 50% 50%) !important; }

/* Story card: the video and everything on it is one block that keeps its size; the idea
   text sits below it and only shows once expanded, by scrolling the card. */
.card.about .card-media.about-media { position: relative !important; left: auto; right: auto; top: auto; height: 100%; }
.card.about .card-more { position: relative !important; top: auto !important; bottom: auto !important; }
.card.about:not(.more) .card-more { display: none; }
.card-inner.scrolls { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.card-inner.scrolls::-webkit-scrollbar { display: none; }
.card.about .expand-btn { bottom: 18px !important; }
 

/* Screenshot cards: the whole picture, centred and rounded, over a soft blurred copy of it. */
.card-media.shotmedia { background: var(--board); }
.card-media.shotmedia > img.shot-bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px);
  object-fit: cover; object-position: 50% 50% !important; filter: blur(34px) saturate(1.3); opacity: .75; }
.card-media.shotmedia > img.shot { position: absolute; left: 50%; top: 22px; bottom: 22px; right: auto;
  width: auto !important; height: calc(100% - 44px) !important; max-width: calc(100% - 44px);
  transform: translateX(-50%); object-fit: contain; border-radius: 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, .3); }

/* Avatars: nothing behind the cut-out, so the bite shows what's under it, not a dark patch. */
.pfp, .person .av, .foot-person img, img[src$="unxnown-avatar.png"] { background: transparent !important; }
/* A real wallpaper behind the screenshot: sharp, not blurred. */
.card-media.shotmedia > img.shot-bg.wallpaper { inset: 0; width: 100%; height: 100%; filter: none; opacity: 1; object-position: 50% 60% !important; }
/* Tahoe wallpaper behind the MacBook pictures. */
.card-media.contain > img.wall { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0 !important;
  object-fit: cover !important; object-position: 50% 40% !important; }
.card-media.contain > img:not(.wall) { z-index: 1; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }
/* Glyph cards: the moving Tahoe behind the symbol. */
.card-media.plainmedia > video.glyph-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-media.plainmedia > img { position: relative; z-index: 1; filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .35)); }
/* The Tahoe video behind every card's picture. */
.card-media > video.glyph-bg { position: absolute !important; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.card-media > img.tahoe-img { z-index: 0; }
.card-media.shotmedia > img.shot, .card-media.contain > img, .card-media.plainmedia > img { z-index: 1; }
.card-media > .pause-btn { z-index: 2; }

/* Tahoe card + Made with love grow as one, from the middle of the pair. */
.board.in .t-love:hover:not(.pair-hover) { transform: none; filter: none; }
.window.landed:hover:not(.pair-hover) { filter: none; }
.window.landed { transition: transform .55s var(--hover), filter .45s var(--hover); }
.window.landed.pair-hover { transform: translateY(-1.2%) scale(1.012); filter: brightness(1.03); }
.board.in .t-love.pair-hover { transform: translateY(calc(var(--u) * 3.2)) scale(1.012); filter: brightness(1.03); }

/* Made with love is exactly as wide as the Tahoe card above it (which overlaps its slot by
   0.75px each side), and both grow from their shared seam, so their edges always line up. */
.board .t-love { left: calc(var(--u) * 342 - 0.75px); width: calc(var(--u) * 507 + 1.5px); }
.window.landed { transform-origin: 50% 100%; transition-duration: .9s, .45s; }
.board.in .tile.t-love:not(.slot) { transform-origin: 50% 0%; transition-duration: .55s, .9s, .45s, .4s; }
.window.landed.pair-hover { transition-duration: .55s, .45s; }
.board.in .tile.t-love.pair-hover:not(.slot) { transition-duration: .55s, .55s, .45s, .4s; }
.window.landed.pair-hover, .board.in .t-love.pair-hover { transform: scale(1.012); }

/* All cards start with their media and reveal their story on expansion. */
.card:not(.about) .card-media { height: 100%; }
.card:not(.more) .card-more { display: none; }
.card:not(.about) .card-more { background: var(--tile); padding: 26px 44px 34px; }
.card-media.shotmedia > img.shot { height: calc(100% - 104px) !important; }
.card-media.contain > img:not(.wall) { padding-bottom: 80px !important; }
.card:not(.about) .expand-btn { color: rgba(255, 255, 255, .9); bottom: 18px; text-shadow: 0 1px 5px rgba(0, 0, 0, .55); }
.card .expand-btn .ms { transform: rotate(180deg); }
.card.more .expand-btn .ms { transform: none; }

/* Let the artwork make room as the story comes into view. */
@media (prefers-reduced-motion: no-preference) {
  .card-media.shotmedia > img.shot,
  .card-media.contain > img:not(.wall) { transition: transform .85s cubic-bezier(.22, 1, .36, 1); }
  .card-media.shotmedia > img.shot { transform-origin: 50% 0; }
  .card.more .card-media.shotmedia > img.shot { transform: translateX(-50%) translateY(-10px) scale(.94); }
  .card-media.contain > img:not(.wall) { transform-origin: 50% 0; }
  .card-media.contain { transition: height .72s cubic-bezier(.22, 1, .36, 1); }
}

/* Give the download symbol and its action a clear surface in either theme. */
.card-download .plainmedia::before {
  content: ""; position: absolute; left: 50%; top: 50%; height: 52%; aspect-ratio: 1;
  z-index: 1; transform: translate(-50%, -50%); border-radius: 26%; background: rgba(255, 255, 255, .86);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .15);
}
.card-download .plainmedia > img { z-index: 2; }
.card-wl form.waitlist.cta { background: #e8e8ed; }
[data-theme="dark"] .card-wl form.waitlist.cta { background: #f5f5f7; }

.card:focus { outline: none; }
.card::backdrop { background: transparent; overflow: hidden; overscroll-behavior: contain; }
.card :focus-visible { outline: 2px solid rgba(255, 255, 255, .85); outline-offset: 3px; }
.card .expand-btn { min-width: 64px; min-height: 44px; }
@media (max-width: 600px) {
  .card-body, .card:not(.about) .card-more, .card.about .card-more { padding: 24px 24px 30px; }
  .card-body h2, .card.about .card-more h3 { font-size: 24px; }
  .card-body p, .card.about .card-more p { font-size: 16px; }
  .about-head { left: 24px; right: 64px; top: 28px; }
  .about-head h2 { font-size: clamp(25px, 7vw, 34px); }
  .about-row { left: 24px; right: 24px; bottom: 90px; gap: 20px; }
  .about-icon img { width: 68px; height: 68px; }
  .about-icon span, .about-by > span { font-size: 24px; }
  .about-by { padding-bottom: 0; }
  .people { gap: 14px; }
  .person { font-size: 15px; gap: 5px; }
  .person .av { width: 56px; height: 56px; }
  .card-wl form.waitlist.cta { max-width: 150%; }
}

/* Keep the page soft behind the native dialog in WebKit. */
main { transition: filter .45s var(--ease); }
body:has(.scrim.on) main { filter: blur(16px); }

@media (max-width: 600px) {
  .scene-stage > .window { height: 92vh !important; height: 92dvh !important; }
  .window-content { width: calc(100% - 32px); transform: translate(-50%, -50%); }
  .app-icon { width: min(38vw, 160px); height: auto; }
  .line1, .line2 { font-size: clamp(23px, 6.5vw, 32px); line-height: 1.25; }
  .line2-wrap { height: 40px; }
  .window-content form.waitlist.cta { width: min(100%, 330px); height: 60px; margin-top: 24px; }
  .window-content form.waitlist.open, .window-content form.waitlist.done { width: 100%; }
  .window-content .waitlist .cta-label, .window-content .wl-done { font-size: 21px; }
  .window-content .wl-field input { font-size: 18px; }
  .window-content .wl-send { width: 44px; height: 44px; top: 8px; right: 8px; }
}

/* The stacked layout keeps the full hero instead of the desktop tile transition. */
@media (max-width: 860px) {
  .window { --full: 1 !important; --tile: 0 !important; --pe: auto !important; }
  .window .line2.tile-sub { display: none; }
  .window .line2.full, .window .ghost { opacity: 1; }
  .window .ghost { max-width: none; }
}
@media (max-width: 600px) {
  .line1 { flex-wrap: wrap; white-space: normal; }
}

/* On narrow screens the hero comes first and the cards form complete rows. */
@media (max-width: 860px) {
  .scene-stage { display: flex; flex-direction: column; }
  .scene-stage > .window { order: -1; flex: none; }
  .board { flex: none; }
  .t-split { grid-column: auto; }
  .t-sleep { grid-column: span 2; }
}

/* Smooth pair hover: the grow origins stay put (they used to jump back on hover-out),
   and both cards use the exact same timing, so they move as one. */
.window { transform-origin: 50% 100%; }
.board .t-love { transform-origin: 50% 0%; }
.window.landed,
.board.in .t-love {
  transition: transform .6s cubic-bezier(0.22, 1, 0.36, 1), filter .6s cubic-bezier(0.22, 1, 0.36, 1),
              opacity .55s var(--ease), background-color .4s var(--ease) !important;
}
.window.landed.pair-hover, .board.in .t-love.pair-hover { transform: scale(1.012); filter: brightness(1.03); }

/* Keep glyphs centered and contained in tall, narrow panels. */
.card-media.plainmedia > img {
  position: absolute; left: 50%; top: 50%; width: auto; height: auto;
  max-width: calc(100% - 64px); max-height: 46%; transform: translate(-50%, -50%);
}
.card-download .plainmedia::before { max-width: calc(100% - 48px); }

/* Phone layout */
@media (max-width: 600px) {
  .scene-stage { padding: 0 14px 24px; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .board .tile { min-width: 0; height: auto !important; aspect-ratio: .9; border-radius: 20px !important; }
  .board .t-answers { aspect-ratio: 1.5; }
  .board .t-love, .board .t-sleep { aspect-ratio: 2.2; }
  .board .label, .board .caption { font-size: clamp(15px, 4.2vw, 18px); line-height: 1.16; text-wrap: balance; }
  .board .label { top: 16px; padding: 0 10px; }
  .board .caption { padding: 0 10px; }
  .board .t-glass .caption { font-size: clamp(17px, 4.6vw, 21px) !important; }
  .board .tile.pic::after { content: ""; position: absolute; inset: 0 0 auto; height: 64px; pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,.7), transparent); }
  [data-theme="dark"] .board .tile.pic::after, .board .tile.pic:has(.on-dark)::after {
    background: linear-gradient(to bottom, rgba(0,0,0,.48), transparent); }
  .board .t-split .split-shot { top: 31%; width: 94%; }
  .board .t-love { gap: 8px; }
  .board .love-title { font-size: clamp(24px, 7vw, 28px); }
  .board .love-by { font-size: 23px; }
  .board .t-sleep { gap: 8px; }
  .board .t-sleep .sym { height: 50px; }
  .foot { padding: 80px 20px calc(48px + env(safe-area-inset-bottom, 0px)); }
  .foot-sub { max-width: 28ch; text-wrap: balance; }
  .foot-people { flex-wrap: wrap; justify-content: center; }
  .bar { top: max(14px, env(safe-area-inset-top, 0px)); }
  .theme { min-width: 44px; min-height: 44px; }
}

@media (max-width: 600px) {
  html { scroll-padding-top: calc(80px + env(safe-area-inset-top, 0px)); }
  .window .requires { color: rgba(255, 255, 255, .82); text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
  .foot-fine { color: var(--sub); }
}

/* The MacBook is part of the opening hero and fades as the window joins the grid. */
.window-content { left: calc(50% - 25% * var(--full, 1)); }
.hero-device { position: absolute; z-index: 1; right: 2%; top: 50%; width: min(53%, 1050px); height: auto;
  transform: translateY(-50%); opacity: var(--full, 1); pointer-events: none; }
@media (max-width: 860px) {
  .window-content { left: 50%; top: 34%; }
  .hero-device { left: 5%; right: auto; top: auto; bottom: 7%; width: 90%; transform: none; }
}

.bar-links { margin-left: auto; display: flex; align-items: center; }
.bar-links a { padding: 9px 12px; border-radius: 20px; font-size: 14px; font-weight: 600; text-decoration: none; }
.bar-links a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- Header pop: the glass is its own layer so it can shrink to a blob and grow back.
   main.js runs the motion; these are only the resting states. ---------- */
.bar { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.bar::before { content: ""; position: absolute; left: 50%; top: 50%; z-index: -1;
  width: 100%; height: 100%; translate: -50% -50%; border-radius: 26px; background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8); }
.bar.away { translate: 0 -96px; visibility: hidden; pointer-events: none; }

/* The bento's entrance: tiles pop in one after another on a spring. The hover rules above
   dropped the stagger, so until the board has settled this wins. */
.board.in:not(.settled) .tile:not(.slot) {
  transition: opacity .5s var(--ease) calc(var(--i, 0) * 60ms),
              transform var(--tile-ms, .8s) var(--tile-spring, var(--spring)) calc(var(--i, 0) * 60ms),
              filter .45s var(--hover), background-color .4s var(--ease);
}
.tile:not(.slot) { transform: translateY(calc(var(--u) * 26)) scale(.9); }

/* Safari, pulling past the top of the page: the header's glass (its ::before) was drawn over the
   masked theme icon. The glass and the contents get explicit layers so the order can't flip. */
.bar { isolation: isolate; }
.bar::before { z-index: 0; }
.bar > * { position: relative; z-index: 1; }
.theme .ms { transform: translateZ(0); }
[data-theme="dark"] .theme .ms { transform: scaleX(-1) translateZ(0); }

/* Safari, while scrolling the hero: the masked envelope icon lost its place in the layering
   and flashed on top of the page as the button faded. The button gets its own layer, so the
   icon fades and moves with it. */
form.waitlist.cta { isolation: isolate; transform: translateZ(0); will-change: opacity; }
form.waitlist.cta:hover { transform: translateZ(0); }
.cta .ms, .waitlist .cta-sym { transform: translateZ(0); }
form.waitlist.cta:active { transform: translateZ(0) scale(.98); }

/* Download: the hero capsule is a link to the latest beta. */
a.cta.download { display: flex; width: fit-content; margin-inline: auto; }
.card-wl a.cta.download { transform: scale(.62); transform-origin: left center; margin: 0; background: #e8e8ed; }
[data-theme="dark"] .card-wl a.cta.download { background: #f5f5f7; }
