/* The home page's own stylesheet (Oct 31, 2026). Nothing here is shared with
   the other pages, which use site.css.

   Color system, used exactly and nowhere else:
     primary   #07080A  backgrounds and primary surfaces (about 60%)
     secondary #15181D  cards, the nav and dividers only (about 30%); card borders #232830
     accent    #3DF2A0  CTAs, active states and key numbers only (about 10%)
     text      #F2F4F3 headings and body; #9AA3AD secondary lines
   The aurora is the accent alone, blurred, behind the hero and pricing. */

@font-face { font-family: 'Clash Display'; src: url('/assets/fonts/clash-display-700-normal.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/assets/fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --bg: #07080A;
  --panel: #15181D;
  --line: #232830;
  --accent: #3DF2A0;
  --text: #F2F4F3;
  --muted: #9AA3AD;
  --heading: 'Clash Display', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --section-pad: 120px;
  --block-gap: 80px;
  --para-gap: 40px;
  --wrap: 1200px;
  --gutter: 24px;
  --radius: 24px;
  --nav-h: 72px; /* the sticky bar; links to a section stop just below it */
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 17px/1.75 var(--mono);
  background: var(--bg);
  color: var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* The background is dark tread plate (Jake, Nov 1 2026): raised diamond lugs,
   lit from straight above so both directions match, slightly soft, with uneven
   patches and a fine grain in the steel. It is drawn on body::before at 18%
   opacity over the base black and spans the whole page, so it scrolls with the
   content. The textures are SVG images inside data: URLs (the CSP allows data:
   images); their colors are only ever seen at that 18%. .surface stays fixed
   and only darkens the corners. */
body { position: relative; }
body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.18;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cdefs%3E%3Cpath id='u' d='M-15 0C-7-4.2 7-4.2 15 0Z'/%3E%3Cpath id='d' d='M-15 0C-7 4.2 7 4.2 15 0Z'/%3E%3Cpath id='a' d='M-15 0C-7-4.2 7-4.2 15 0C7 4.2-7 4.2-15 0Z'/%3E%3ClinearGradient id='gu' gradientUnits='userSpaceOnUse' x1='0' y1='-3' x2='0' y2='0'%3E%3Cstop offset='0' stop-color='%2316191E'/%3E%3Cstop offset='1' stop-color='%23262A31'/%3E%3C/linearGradient%3E%3ClinearGradient id='gd' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='0' y2='3'%3E%3Cstop offset='0' stop-color='%230C0D10'/%3E%3Cstop offset='1' stop-color='%23050607'/%3E%3C/linearGradient%3E%3Cfilter id='f' x='-50%25' y='-50%25' width='200%25' height='200%25'%3E%3CfeGaussianBlur stdDeviation='0.9'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url%28%23f%29'%3E%3Cuse href='%23a' transform='translate%28-30.0 -28.3%29 rotate%2845%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%28-30.0 -30.0%29 rotate%2845%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%28-30.0 11.7%29 rotate%2845%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%28-30.0 10.0%29 rotate%2845%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%28-30.0 51.7%29 rotate%2845%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%28-30.0 50.0%29 rotate%2845%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%2810.0 -28.3%29 rotate%2845%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%2810.0 -30.0%29 rotate%2845%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%2810.0 11.7%29 rotate%2845%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%2810.0 10.0%29 rotate%2845%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%2810.0 51.7%29 rotate%2845%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%2810.0 50.0%29 rotate%2845%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%2850.0 -28.3%29 rotate%2845%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%2850.0 -30.0%29 rotate%2845%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%2850.0 11.7%29 rotate%2845%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%2850.0 10.0%29 rotate%2845%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%2850.0 51.7%29 rotate%2845%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%2850.0 50.0%29 rotate%2845%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%28-10.0 -8.3%29 rotate%28-45%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%28-10.0 -10.0%29 rotate%28-45%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%28-10.0 31.7%29 rotate%28-45%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%28-10.0 30.0%29 rotate%28-45%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%28-10.0 71.7%29 rotate%28-45%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%28-10.0 70.0%29 rotate%28-45%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%2830.0 -8.3%29 rotate%28-45%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%2830.0 -10.0%29 rotate%28-45%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%2830.0 31.7%29 rotate%28-45%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%2830.0 30.0%29 rotate%28-45%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%2830.0 71.7%29 rotate%28-45%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%2830.0 70.0%29 rotate%28-45%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%2870.0 -8.3%29 rotate%28-45%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%2870.0 -10.0%29 rotate%28-45%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%2870.0 31.7%29 rotate%28-45%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%2870.0 30.0%29 rotate%28-45%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3Cuse href='%23a' transform='translate%2870.0 71.7%29 rotate%28-45%29' fill='black' fill-opacity='0.75'/%3E%3Cg transform='translate%2870.0 70.0%29 rotate%28-45%29'%3E%3Cuse href='%23u' fill='url%28%23gu%29'/%3E%3Cuse href='%23d' fill='url%28%23gd%29'/%3E%3Cpath d='M-13 0L13 0' stroke='white' stroke-opacity='0.13' stroke-width='0.7'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") 0 0 / 40px 40px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='640'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.009375' numOctaves='3' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.95 0 0 0 0 0.96 0 0 0 0 0.95 0.16 0 0 0 -0.05'/%3E%3C/filter%3E%3Crect width='640' height='640' filter='url%28%23n%29'/%3E%3C/svg%3E") 0 0 / 640px 640px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.95 0 0 0 0 0.96 0 0 0 0 0.95 0.26 0 0 0 -0.1'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 220px 220px,
    var(--bg);
}
main, .foot { position: relative; z-index: 1; }
.surface {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 90% 70% at 50% 50%, rgba(7, 8, 10, 0) 55%, rgba(0, 0, 0, 0.6) 100%);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; max-width: 64ch; }
p + p { margin-top: var(--para-gap); }

h1, h2, h3 {
  margin: 0;
  font-family: var(--heading);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--text);
}
h1 { font-size: clamp(48px, 6.4vw, 88px); line-height: 1.05; max-width: 12ch; }
h2 { font-size: clamp(40px, 5vw, 64px); }
h3 { font-size: 26px; line-height: 1.15; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg); }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin: 0 auto; }
.skip { position: absolute; left: var(--gutter); top: -100px; padding: 12px 16px; background: var(--accent); color: var(--bg); border-radius: 12px; font-weight: 600; z-index: 20; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The one button on the page, in the accent, used twice: the hero and Premium. */
.btn {
  display: inline-block;
  padding: 20px 32px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(61, 242, 160, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 16px 40px rgba(61, 242, 160, 0.3); }
.btn:active { transform: none; }
.text-link { color: var(--text); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; font-weight: 500; }
.text-link:hover { color: var(--accent); }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(21, 24, 29, 0.84);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--heading); font-size: 22px; letter-spacing: 0.02em; }
.logo { width: 30px; height: 30px; }
.nav nav ul { display: flex; gap: 32px; }
.nav nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--muted); padding: 10px 0; }
.nav nav a:hover { color: var(--text); }
.nav nav a[aria-current="true"] { color: var(--accent); }

/* Aurora: two or three blurred glows of the accent, drifting slowly. */
.aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.aurora i {
  position: absolute;
  display: block;
  width: 80vw;
  height: 80vw;
  max-width: 1100px;
  max-height: 1100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 242, 160, 0.2) 0%, rgba(61, 242, 160, 0.12) 28%, rgba(61, 242, 160, 0.05) 50%, rgba(61, 242, 160, 0) 70%);
  filter: blur(50px);
  will-change: transform;
}
.aurora .a1 { top: -15%; left: 42%; animation: drift-a 26s ease-in-out infinite alternate; }
.aurora .a2 { top: 30%; left: 62%; animation: drift-b 30s ease-in-out infinite alternate; }
.aurora .a3 { top: 40%; left: -35%; opacity: 0.6; animation: drift-c 24s ease-in-out infinite alternate; }
@keyframes drift-a { from { transform: translate(0, 0); } to { transform: translate(-12%, 10%); } }
@keyframes drift-b { from { transform: translate(0, 0); } to { transform: translate(10%, -12%); } }
@keyframes drift-c { from { transform: translate(0, 0); } to { transform: translate(14%, -6%); } }

/* Hero (Nov 2, 2026, Jake): the headline, one CTA and the note on the left,
   one phone on the right showing the logo. The hero and the parts tablet
   under it are plain black; the brushed metal comes in with the first
   section, fading in over 240px centred on the gap between the "01" label
   and the heading (the label ends 23px below the section padding, then a
   20px gap: centre = padding + 33px), so there is no line anywhere. */
.hero { position: relative; padding: var(--section-pad) 0; background: var(--bg); }
.parts-wrap + .section { background: linear-gradient(180deg, var(--bg) calc(var(--section-pad) - 87px), rgba(7, 8, 10, 0) calc(var(--section-pad) + 153px)); }
.parts-wrap + .section::before { display: none; }
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: var(--block-gap);
}
.hero-cta { margin-top: var(--para-gap); }
.hero-note { margin-top: 24px; color: var(--muted); font-size: 14px; line-height: 1.75; }

/* Phones keep the hero as it was before Nov 2, 2026 (Jake: "it shouldn't
   change at all for the phone, only desktop"): the two screenshot iPhones,
   no logo phone, no parts tablet. They are hidden here and shown in the
   phone block at the bottom, where the old rules live. */
.hero-phones { display: none; }

/* The phone: the home page's frame around a drawn screen. The screen's own
   black (#0B0C10, the app's) and the four tile colors come from the markup,
   so the page's six colors stay the page's. */
.hero-phone {
  position: relative;
  z-index: 3;
  width: min(340px, 72%);
  justify-self: center;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 44px;
  box-shadow: inset 0 1px 0 rgba(242, 244, 243, 0.1), 0 40px 90px rgba(0, 0, 0, 0.6);
}
.hero-phone .screen { position: relative; aspect-ratio: 660 / 1498; border-radius: 34px; background: var(--screen); display: flex; align-items: center; justify-content: center; }
.island { position: absolute; left: 50%; top: 5.2%; width: 31%; height: 4.3%; border-radius: 999px; background: #000; box-shadow: inset 0 0 0 1px rgba(242, 244, 243, 0.07); transform: translateX(-50%); }
.home-bar { position: absolute; left: 50%; bottom: 2.4%; width: 36%; height: 4px; border-radius: 2px; background: rgba(242, 244, 243, 0.35); transform: translateX(-50%); }
/* The logo, built from four pieces so they can leave: each tile sits where
   it sits in the icon (a 696-unit square: tiles of 314 at 8.5 and 373, the
   badge 356 wide in the middle), lit the same way. */
.mark { position: relative; width: 90%; aspect-ratio: 1; }
.piece {
  position: absolute;
  width: 45.1%;
  height: 45.1%;
  border-radius: 30.6%;
  background: var(--c);
  color: var(--text);
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(242, 244, 243, 0.22);
  pointer-events: none;
}
/* The icon is in its own box, placed against its own tile, so it can move
   and grow on its own: in the logo it sits toward the tile's outer corner,
   clear of the badge (its middle at 40% of the tile each way), at 46% of
   the tile; in a card it is in the middle at 62%. The flight (home.js)
   moves it the 10% and grows it the 62/46 between the two. */
.ico { position: absolute; display: grid; place-items: center; width: 46%; height: 46%; will-change: transform; }
.ico svg { width: 100%; height: 100%; }
.piece-gym { left: 1.2%; top: 1.2%; }
.piece-food { left: 53.6%; top: 1.2%; }
.piece-hub { left: 1.2%; top: 53.6%; }
.piece-memos { left: 53.6%; top: 53.6%; }
.piece-gym .ico { left: 17%; top: 17%; }
.piece-food .ico { right: 17%; top: 17%; }
.piece-hub .ico { left: 17%; bottom: 17%; }
.piece-memos .ico { right: 17%; bottom: 17%; }
/* The badge stays on top of everything, flying pieces included (Jake, Nov 2 2026). */
.badge { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 8; pointer-events: none; }
.badge svg { width: 100%; height: 100%; display: block; }
/* The app's launch splash, on the logo, when the page opens (Jake, Nov 2
   2026: "it would be cool if the pulse in the logo beats like it does in the
   app's splash screen"): the tiles fly in from their corners and lock
   together (once only), the badge pops in, and the pulse is traced left to
   right behind an orange blip like a heart monitor. Then the heart keeps
   going: every 3s the blip runs the line again, and the badge beats twice as
   it does, on the first bump and on the second, like a real heartbeat (Jake:
   "lub" on the first bump, again at the second), while the tiles pop out a
   little with the first beat. Same clock as the app's splash
   (src/features/splash/splash-timeline.ts: tiles from 40ms, 70ms apart;
   badge at 430ms; trace 760–1400ms). CSS only, so it runs without
   JavaScript; nothing moves with Reduce Motion on.
   The tiles use translate/rotate/scale rather than transform, which home.js
   owns for the flight; the two compose. */
/* Each tile's corner, when it flies in, and when it pops (35ms apart). */
.mark .piece-gym { --dx: -1; --dy: -1; --fly: 40ms; --pop: 760ms; }
.mark .piece-food { --dx: 1; --dy: -1; --fly: 110ms; --pop: 795ms; }
.mark .piece-hub { --dx: -1; --dy: 1; --fly: 180ms; --pop: 830ms; }
.mark .piece-memos { --dx: 1; --dy: 1; --fly: 250ms; --pop: 865ms; }
@keyframes piece-fly {
  from { translate: calc(var(--dx) * 56%) calc(var(--dy) * 56%); rotate: calc(25deg * var(--dx) * var(--dy)); scale: 0.5; }
  to { translate: 0 0; rotate: 0deg; scale: 1; }
}
@keyframes piece-show { from { opacity: 0; } to { opacity: 1; } }
/* One 3s cycle, from 760ms (the same clock as the beat below): the pop
   rides the first beat, peaking with it (160ms in) and settling by 360ms;
   a quarter of the splash's breath, so it reads as a flutter. */
@keyframes piece-pop {
  0%, 1.7% { translate: 0 0; scale: 1; animation-timing-function: ease-out; }
  5.33% { translate: calc(var(--dx) * 7%) calc(var(--dy) * 7%); scale: 1.03; animation-timing-function: ease-in-out; }
  12%, 100% { translate: 0 0; scale: 1; }
}
.mark .piece {
  animation:
    piece-fly 580ms cubic-bezier(0.34, 1.56, 0.64, 1) var(--fly) both,
    piece-show 360ms linear var(--fly) both,
    piece-pop 3000ms linear var(--pop) infinite;
}
@keyframes badge-pop { from { scale: 0.2; } to { scale: 1; } }
@keyframes badge-show { from { opacity: 0; } to { opacity: 1; } }
.badge {
  animation:
    badge-pop 380ms cubic-bezier(0.34, 1.56, 0.64, 1) 430ms both,
    badge-show 190ms linear 430ms both;
}
/* One 3s cycle, from 760ms: the trace is its first 640ms (drawn once, then
   left drawn) and the blip runs the line in the same 640ms every cycle. */
@keyframes pulse-trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.pulse { stroke-dasharray: 1 1; stroke-dashoffset: 0; animation: pulse-trace 640ms linear 760ms both; }
@keyframes blip-run {
  0% { offset-distance: 0%; opacity: 0; }
  1.9% { opacity: 1; }
  20.4% { opacity: 1; }
  21.33% { offset-distance: 100%; }
  24% { opacity: 0; }
  100% { offset-distance: 100%; opacity: 0; }
}
.blip { display: none; opacity: 0; }
@supports (offset-path: path("M0 0 L1 1")) {
  .blip {
    display: block;
    offset-path: path("M217.5 352H267L304 282.5L348 422.5L384 309.5L406 352H477.5");
    offset-rotate: 0deg;
    animation: blip-run 3000ms linear 760ms infinite;
  }
}
/* The two beats: the blip is at the first bump a quarter of the way along
   the line (160ms into its 640ms run) and at the second bump at 77%
   (491ms); the face swells to meet it each time (about 110ms up and 150ms
   down, the pace of the app's beat), the second a little less, and is
   back at rest as the blip leaves the line. */
@keyframes face-beat {
  0%, 1.7% { scale: 1; animation-timing-function: ease-out; }
  5.33% { scale: 1.12; animation-timing-function: ease-in-out; }
  10.5% { scale: 1; }
  13% { scale: 1; animation-timing-function: ease-out; }
  16.4% { scale: 1.07; animation-timing-function: ease-in-out; }
  21.33%, 100% { scale: 1; }
}
.face { transform-box: fill-box; transform-origin: center; animation: face-beat 3000ms linear 760ms infinite; }
/* While the pieces fly they sit above everything on the page (see home.js). */
.mark .piece { z-index: 1; will-change: transform; }
.flying .mark .piece { z-index: 6; }
.landed .mark .piece { visibility: hidden; }

/* The parts tablet: four thin cards, one per piece of the logo, each opening
   that part of the page. The pieces land in the cards' slots; the cards' own
   copies show once they have (or always, without JavaScript or with reduced
   motion), so a landed card can be clicked and hovered like any card. */
.parts-wrap { position: relative; padding: 0 0 var(--section-pad); background: var(--bg); }
.tablet {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: inset 0 1px 0 rgba(242, 244, 243, 0.1), 0 40px 90px rgba(0, 0, 0, 0.6);
}
.parts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 16px; border-radius: 22px; background: var(--screen); }
.part {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 30px 16px 24px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--c) 9%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line));
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}
.part:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 60%, var(--line)); background: color-mix(in srgb, var(--c) 14%, var(--panel)); }
.part-slot { position: relative; width: 64px; height: 64px; }
.part-slot .piece { left: 0; top: 0; width: 100%; height: 100%; visibility: hidden; }
/* In a card the icon fills its tile; it grows to this on the way down. */
.part-slot .ico { left: 19%; top: 19%; right: auto; bottom: auto; width: 62%; height: 62%; transform: none; }
.landed .part-slot .piece, .no-js .part-slot .piece { visibility: visible; }
.part-name { font-family: var(--heading); font-weight: 700; font-size: 22px; letter-spacing: 0.02em; }
.part-go { margin-top: auto; font-size: 13px; color: var(--muted); }
.part-go::after { content: ' \2192'; }
.part:hover .part-go { color: var(--c); }

/* Phone frames: a dark bezel around a real screenshot, nothing drawn. */
.phone {
  margin: 0;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 44px;
  box-shadow: inset 0 1px 0 rgba(242, 244, 243, 0.1), 0 40px 90px rgba(0, 0, 0, 0.6);
}
.phone img { width: 100%; height: auto; border-radius: 34px; }

/* Sections and the bento grid */
.section { position: relative; padding: var(--section-pad) 0; }
/* The divider is a seam cut into the metal: a dark groove with a faint
   highlight under it, fading out toward both edges. */
.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-top: 1px solid rgba(0, 0, 0, 0.7);
  border-bottom: 1px solid rgba(242, 244, 243, 0.07);
  mask-image: linear-gradient(90deg, transparent, black 18%, black 82%, transparent);
  pointer-events: none;
}
.section-head { margin-bottom: var(--block-gap); }
/* The Food link lands on a tile, not a section, so give it room under the bar. */
#food { scroll-margin-top: 32px; }
.eyebrow { margin: 0 0 20px; font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ''; display: inline-block; width: 28px; height: 1px; margin: 0 12px 4px 0; background: var(--muted); }
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(0, auto);
  grid-auto-flow: dense;
  gap: 24px;
}
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-7 { grid-column: span 7; }
.rows-2 { grid-row: span 2; }
.tile {
  display: flex;
  flex-direction: column;
  padding: 36px;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
  background: linear-gradient(180deg, rgba(242, 244, 243, 0.035), rgba(242, 244, 243, 0) 45%), var(--panel);
  border: 1px solid rgba(242, 244, 243, 0.1);
  box-shadow: inset 0 1px 0 rgba(242, 244, 243, 0.09), 0 2px 6px rgba(0, 0, 0, 0.55), 0 32px 80px rgba(0, 0, 0, 0.7);
}
.tile:hover { transform: translateY(-3px); border-color: rgba(242, 244, 243, 0.16); }
.tile h3 { max-width: 20ch; }
.tile p { margin-top: 16px; color: var(--muted); font-size: 16px; }
.tile .num { margin-top: auto; padding-top: 48px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 14px; }
.tile .num b { font-family: var(--heading); font-weight: 700; font-size: clamp(64px, 6vw, 96px); line-height: 1; letter-spacing: 0.02em; color: var(--accent); }
/* The screenshot well: the top of a phone, cut off by the card's bottom edge. */
/* The phone sits at the card's bottom edge, cut off there; the frame is never stretched. */
.well { position: relative; margin: auto 0 -36px; padding-top: 40px; height: 360px; overflow: hidden; flex: none; display: flex; justify-content: center; align-items: flex-start; }
/* A tile whose screen matters lower down gets a taller well; two-row tiles get the tallest. */
.well-mid { height: 480px; }
.well-tall { height: 720px; }
.phone-sm { width: 300px; max-width: 100%; flex: none; border-radius: 40px; padding: 9px; }
.phone-sm img { border-radius: 31px; }
.tile-lg .phone-sm { width: 340px; }

/* Pricing */
.pricing { overflow: hidden; }
.pricing .wrap { position: relative; }
/* Both glows fade out before their section ends, so no hard edge shows where it stops. */
.hero .aurora, .pricing .aurora { mask-image: linear-gradient(180deg, black 50%, transparent 92%); }
.pricing .aurora .a1 { top: 10%; left: 15%; }
.pricing .aurora .a2 { top: 30%; left: 55%; }
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 960px;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: 40px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(242, 244, 243, 0.035), rgba(242, 244, 243, 0) 45%), var(--panel);
  border: 1px solid rgba(242, 244, 243, 0.1);
  box-shadow: inset 0 1px 0 rgba(242, 244, 243, 0.09), 0 2px 6px rgba(0, 0, 0, 0.55), 0 32px 80px rgba(0, 0, 0, 0.7);
}
.plan-premium { border-color: var(--accent); box-shadow: inset 0 1px 0 rgba(242, 244, 243, 0.09), 0 2px 6px rgba(0, 0, 0, 0.55), 0 30px 90px rgba(61, 242, 160, 0.16); }
.plan h3 { font-size: 28px; }
.price { margin-top: 24px; display: flex; align-items: baseline; gap: 12px; }
.price b { font-family: var(--heading); font-weight: 700; font-size: 56px; line-height: 1; letter-spacing: 0.02em; }
.price span { color: var(--muted); font-size: 16px; }
.price-alt { margin-top: 12px; color: var(--muted); font-size: 16px; }
.price-alt b { color: var(--text); font-weight: 600; }
.price-alt em { font-style: normal; font-weight: 600; color: var(--accent); margin-left: 8px; }
.plan ul { margin-top: 32px; display: grid; gap: 12px; }
.plan li { position: relative; padding-left: 24px; color: var(--text); font-size: 16px; line-height: 1.6; }
.plan li::before { content: ''; position: absolute; left: 0; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.plan-premium li::before { background: var(--accent); }
.plan-trial { margin-top: 32px; color: var(--muted); font-size: 15px; }
.plan-cta { margin-top: auto; padding-top: 40px; }
.plan-cta .btn { display: block; text-align: center; }

/* Support: two cards under pricing, on the plans' grid. */
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 960px; }
.help-card {
  display: flex;
  flex-direction: column;
  padding: 40px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(242, 244, 243, 0.035), rgba(242, 244, 243, 0) 45%), var(--panel);
  border: 1px solid rgba(242, 244, 243, 0.1);
  box-shadow: inset 0 1px 0 rgba(242, 244, 243, 0.09), 0 2px 6px rgba(0, 0, 0, 0.55), 0 32px 80px rgba(0, 0, 0, 0.7);
}
.help-card h3 { font-size: 28px; }
.help-card p { margin-top: 16px; color: var(--muted); font-size: 16px; }
.help-card .help-alt { margin-top: 12px; font-size: 15px; }
.help-alt a { color: var(--text); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.help-alt a:hover { color: var(--accent); }
.help-card .help-cta { margin-top: auto; padding-top: 40px; }
.help-link { color: var(--text); font-weight: 500; text-decoration: none; }
.help-link::after { content: ' \2192'; }
.help-link:hover { color: var(--accent); }

/* Footer */
/* The plate fades into the footer's own color from just above the bottom of
   the Support cards, reaching it exactly where the footer starts: no line. */
#support { background: linear-gradient(180deg, rgba(21, 24, 29, 0) calc(100% - var(--section-pad) - 60px), var(--panel) 100%); }
.foot { background: var(--panel); padding: 40px 0; color: var(--muted); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.foot nav { display: flex; gap: 32px; }
.foot a { text-decoration: none; color: var(--muted); }
.foot a:hover { color: var(--text); }

/* The only other motion: each section fades up once, 16px over 400ms. */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.4s ease, transform 0.4s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aurora i { animation: none; }
  .mark .piece, .badge, .pulse, .face { animation: none; }
  .blip { display: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .tile { transition: none; }
  .tile:hover { transform: none; }
}

/* Tablet */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-phone { width: min(320px, 60%); }
  .parts { gap: 10px; padding: 12px; }
  .part { padding: 24px 12px 20px; }
  .span-7, .span-5, .span-4 { grid-column: span 6; }
  /* Two columns: the odd tile out in a section goes full width. */
  .span-tab-12 { grid-column: span 12; }
  .well-tall { height: 560px; }
}

/* Phones: one column, tighter rhythm, the same rules. */
@media (max-width: 767px) {
  :root { --section-pad: 80px; --block-gap: 80px; --gutter: 20px; --nav-h: 104px; }
  .nav-in { flex-wrap: wrap; gap: 8px 24px; padding: 12px 0; min-height: 0; }
  .nav nav { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav nav ul { gap: 24px; white-space: nowrap; }
  .nav nav a { font-size: 14px; }
  h3 { font-size: 24px; }
  /* The hero exactly as it was before Nov 2, 2026: two screenshot phones side
     by side, the second a little lower; the logo phone and the parts tablet
     don't exist here (home.js flies nothing under 768px). */
  .hero { overflow: hidden; }
  .hero-phone, .parts-wrap { display: none; }
  .hero-phones { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; width: 100%; min-height: 0; margin: 0 auto; }
  .phone-a { z-index: 1; } /* the first phone over the second, so its shadow falls on it (a grid item's z-index counts) */
  .phone-b { margin-top: 48px; }
  .phone, .phone-sm { border-radius: 32px; padding: 7px; }
  .phone img, .phone-sm img { border-radius: 25px; }
  .bento { grid-template-columns: 1fr; }
  .span-7, .span-5, .span-4, .span-tab-12 { grid-column: span 1; }
  .rows-2 { grid-row: auto; }
  .tile { padding: 28px; }
  .well { margin: auto 0 -28px; padding-top: 32px; height: 332px; }
  .well-mid { height: 432px; }
  .well-tall { height: 480px; }
  .phone-sm, .tile-lg .phone-sm { width: 280px; }
  .tile .num b { font-size: 64px; }
  .plans, .help-grid { grid-template-columns: 1fr; }
  .plan, .help-card { padding: 32px; }
  .price b { font-size: 48px; }
  .btn { display: block; text-align: center; }
}
