/*
  Tally website styles.
  Brand colors come from the app icon gradient (#FFD45A → #F7681F) and the app theme color #FEBB36.
  Sections alternate light / cream / dark; every color flows through the custom properties below
  so the dark color scheme only needs to override tokens.
*/

:root {
  --event-plants: #30B0C7;
  --event-pushups: #5CA4F8;
  --event-pages: #FF8A3D;
  --event-visitors: #E77CA1;
  --brand: #FEBB36;
  --brand-deep: #F7681F;
  --brand-gradient: linear-gradient(135deg, #FFD45A 0%, #FDB33A 45%, #F7681F 100%);
  --ink: #1D1D1F;
  --ink-on-brand: #1E1406;
  --muted: #6E6E73;
  --surface: #FFFFFF;
  --surface-cream: #FFF7EA;
  --surface-card: #FFFFFF;
  --surface-dark: #15110C;
  --surface-dark-card: #231C14;
  --line: rgba(29, 29, 31, 0.1);
  --on-dark: #F5F2EC;
  --on-dark-muted: #A79F94;

  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;

  --container: 1150px;
  --gutter: clamp(20px, 5vw, 40px);
  --safe-gutter: max(var(--gutter), env(safe-area-inset-left), env(safe-area-inset-right));
  --section-space: clamp(80px, 11vw, 140px);
  --radius: 22px;
  --radius-lg: 32px;
  --shadow-device: 0 40px 80px -24px rgba(60, 30, 0, 0.35), 0 12px 24px -12px rgba(60, 30, 0, 0.25);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F5F5F7;
    --muted: #A1A1A6;
    --surface: #0D0D0E;
    --surface-cream: #17130E;
    --surface-card: #1E1914;
    --line: rgba(255, 255, 255, 0.12);
    --shadow-device: 0 40px 80px -24px rgba(0, 0, 0, 0.7), 0 12px 24px -12px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--surface);
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

/* Paint the browser canvas behind the home hero, including overscroll edges. */
html.home-page { background: #FDB33A; }

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--brand-deep);
  outline-offset: 3px;
  border-radius: 8px;
}

.sprite { display: none; }

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon .fill, #i-apple .fill { fill: currentColor; stroke: none; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

.center { text-align: center; }

/* ---------- Typography ---------- */

.display {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 108px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.display-sm { font-size: clamp(48px, 7vw, 84px); }

.headline {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.4vw, 64px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-deep);
}
.eyebrow-dark { color: var(--ink-on-brand); opacity: 0.7; }
.eyebrow-brand { color: var(--brand); }

.lede {
  max-width: 34em;
  margin-top: 24px;
  font-size: clamp(19px, 1.9vw, 22px);
  line-height: 1.5;
  color: var(--muted);
}
.center .lede { margin-inline: auto; }

.body { margin-top: 20px; color: var(--muted); }

.fineprint { margin-top: 32px; font-size: 14px; color: var(--muted); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--brand-deep);
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ink-on-brand);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background-color 0.2s;
}
.button:hover { transform: translateY(-1px); }
@media (prefers-color-scheme: dark) {
  .site-header.is-scrolled .button { background: var(--brand); color: var(--ink-on-brand); }
}
.button-small { padding: 8px 18px; font-size: 15px; }

/* Keep hit testing fixed while the entire visual surface lifts as one piece. */
.store-badge { position: relative; display: inline-flex; border-radius: 16px; color: #fff; text-decoration: none; }
.store-badge::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.store-badge-surface {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 10px 26px 10px 20px;
  border-radius: inherit;
  background: #000;
  pointer-events: none;
  /* Keep the SVG and text on the same stable composited surface during hover. */
  transform: translate3d(0, 0, 0);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .store-badge:hover .store-badge-surface { transform: translate3d(0, -3px, 0); box-shadow: 0 18px 32px -12px rgba(0, 0, 0, 0.55); }
}
.store-badge:active .store-badge-surface { transform: translate3d(0, -1px, 0) scale(0.98); }
.store-badge .icon { display: block; flex: 0 0 30px; width: 30px; height: 30px; }
.store-badge-surface > span { text-align: left; display: grid; font-size: 23px; font-weight: 600; line-height: 1.05; letter-spacing: -0.01em; }
.store-badge small { font-size: 12px; font-weight: 500; letter-spacing: 0.01em; }
@media (prefers-reduced-motion: reduce) {
  .store-badge:hover .store-badge-surface, .store-badge:active .store-badge-surface { transform: none; }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand,
.phone-heading {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  text-decoration: none;
}
.brand { flex-shrink: 0; white-space: nowrap; }
.brand img { width: 36px; height: 36px; flex-shrink: 0; border-radius: 22.5%; }

.site-header:not(.is-scrolled) .brand { color: var(--ink-on-brand); }

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 500;
}
.nav-links a, .blog-nav-link { text-decoration: none; opacity: 0.8; transition: opacity 0.2s; }
.nav-links a:hover, .blog-nav-link:hover { opacity: 1; }
.site-header:not(.is-scrolled) :is(.nav-links a, .blog-nav-link) { color: var(--ink-on-brand); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  margin-top: -64px;
  padding: calc(64px + clamp(48px, 7vw, 96px)) 0 clamp(64px, 8vw, 110px);
  overflow: hidden;
  background: var(--brand-gradient);
  color: var(--ink-on-brand);
}
.hero::before {
  content: "";
  position: absolute;
  inset: auto -10% -40% 40%;
  height: 90%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.35), transparent);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 48px;
}

.hero-lede {
  max-width: 26em;
  margin-top: 28px;
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.45;
}
.center .hero-lede { margin-inline: auto; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-top: 40px;
}

.rating {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  font-size: 15px;
  text-decoration: none;
}
.rating strong { font-size: 17px; }
.rating-stars { display: flex; gap: 2px; color: var(--ink-on-brand); }
.rating-stars .icon, .review-stars .icon { width: 17px; height: 17px; fill: currentColor; stroke: none; }

.hero-meta {
  max-width: 30em;
  margin-top: 32px;
  font-size: 15px;
  opacity: 0.75;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 560px;
}
.hero-phone { width: min(300px, 72vw); transform: rotate(4deg); }
.hero-phone { container-type: inline-size; }
.hero-phone .phone-home { background: #f7f7fa; color: #202126; font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
.phone-status { display: flex; align-items: center; justify-content: space-between; padding: 5cqw 9cqw; font-size: 3.8cqw; font-weight: 650; }
.phone-status i { width: 6cqw; height: 2.8cqw; border-radius: 1cqw; background: currentColor; }
.phone-heading { display: block; margin: 3cqw 6cqw 5cqw; font-size: 10cqw; }
.phone-tabbar {
  position: absolute;
  inset: auto 17% 3cqw;
  display: flex;
  padding: 1cqw;
  border-radius: 99px;
  background: #fff;
  box-shadow: 0 1cqw 3cqw #0002;
  pointer-events: none;
}
.phone-tabbar span { flex: 1; display: grid; place-items: center; height: 11cqw; }
.phone-tabbar .selected { border-radius: 99px; color: #febb36; background: #f2f2f5; }
.phone-tabbar svg { width: 6cqw; height: 6cqw; fill: currentColor; }
.phone-counters { display: grid; gap: 3cqw; margin: 0; padding: 0 3cqw; list-style: none; }
.phone-counter { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; padding: 3.5cqw 3cqw; border-radius: 5cqw; background: var(--row-bg); color: #fff; text-align: center; }
.phone-counter[data-counter="plants"] { --row-bg: var(--event-plants); }
.phone-counter[data-counter="pushups"] { --row-bg: var(--event-pushups); }
.phone-counter[data-counter="pages"] { --row-bg: var(--event-pages); }
.phone-counter[data-counter="visitors"] { --row-bg: var(--event-visitors); }
.phone-counter strong, .phone-counter b, .phone-counter small { display: block; }
.phone-counter strong { font: 700 4.2cqw/1.25 "Arial Rounded MT Bold", ui-rounded, system-ui, sans-serif; }
.phone-counter b { font: 500 10.4cqw/1.2 ui-rounded, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.phone-counter small { font-size: 3cqw; font-weight: 500; }
.phone-counter button { display: grid; place-items: center; width: 14cqw; height: 14cqw; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.phone-counter button img { width: 9cqw; height: 9cqw; }
.device.hero-watch {
  z-index: 1;
  position: absolute;
  left: 2%;
  bottom: 6%;
  width: 150px;
  transform: rotate(-6deg);
}

.try-card {
  width: 250px;
  position: absolute;
  right: -2%;
  top: 14%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 14px 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink-on-brand);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 40px -18px rgba(80, 40, 0, 0.45);
  animation: float 6s ease-in-out infinite;
}
/* Keep the former icon allowance on the right, so both rows start at the same
   left edge without changing the card size. The title fits within that allowance. */
.try-title-row { position: relative; height: 1.55em; }
.try-title-row #try-title { position: absolute; top: 0; left: 1.35em; }
.try-emoji { font-size: inherit; line-height: inherit; }
.try-text { display: grid; padding-right: 58px; font-size: 13px; font-weight: 600; white-space: nowrap; opacity: 0.9; }
.try-text strong {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.try-text small { font-size: 14px; font-weight: 600; opacity: 0.6; }
#try-value { display: inline-block; min-width: 2ch; }
#try-value.bump { animation: bump 0.35s var(--ease); }
.try-plus {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--event-pushups);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background-color 0.3s;
}
.try-plus .icon { width: 22px; height: 22px; stroke-width: 2.6; }
.try-plus:active { transform: scale(0.9); }

/* ---------- Devices & placeholders ---------- */

.device {
  position: relative;
  display: flow-root;
  align-self: center;
  flex-shrink: 0;
  margin: 0;
}

.iphone {
  --screen-ratio: 1290 / 2796;
  --bezel: 3%;
  border-radius: 15% / 7%;
  background: linear-gradient(145deg, #3A3A3C, #0B0B0C 40%, #1C1C1E);
  box-shadow: var(--shadow-device), inset 0 0 0 1.5px rgba(255, 255, 255, 0.12);
}
.iphone .screen { border-radius: 12% / 5.6%; }

.watch {
  --screen-ratio: 416 / 496;
  container-type: inline-size;
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #fff;
}
.watch-demo { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 3cqw; padding: 4cqw; color: white; font-family: var(--font-display); }
.watch-detail-head { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 2cqw; font-size: 7cqw; }
.watch-detail-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-demo button { border: 0; color: white; cursor: pointer; font: inherit; }
.watch-dial { display: grid; place-items: center; width: 56cqw; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--event-pushups) var(--progress, 75%), color-mix(in srgb, var(--event-pushups) 30%, black) 0); }
#watch-plus { display: grid; place-content: center; width: 88%; aspect-ratio: 1; border: 2cqw solid black; border-radius: 50%; background: var(--event-pushups); line-height: 1; }
#watch-value { font-size: 23cqw; font-variant-numeric: tabular-nums; }
#watch-plus small { font-size: 7cqw; }
.watch-actions { gap: 2cqw; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 88%; overflow: hidden; border-radius: 999px; font-size: 7cqw; }
.watch-actions button { border-radius: 2cqw; background: #303034; padding: 2cqw 4cqw; }
.watch-actions button:focus-visible { outline-offset: -2px; }
#watch-history { cursor: default; opacity: 1; background: var(--event-pushups); }
.watch-showcase { position: absolute; inset: 0; display: grid; align-content: center; gap: 4cqw; padding: 7cqw; color: white; font-family: var(--font-display); }
.watch-showcase button { border: 0; color: inherit; font: inherit; cursor: pointer; }
.watch-list-demo { grid-template-rows: auto minmax(0, 1fr); align-content: stretch; padding: 6cqw 4cqw 0; gap: 2cqw; }
/* Keep the scroll layer inside the glass even when focus moves to a row button. */
.watch-pair .watch-showcase { clip-path: inset(0 round 28% / 23%); }
.watch-list-demo > .watch-detail-head { padding-inline: 5cqw; }
.watch-pair .screen { overflow: clip; }
.watch-list-demo ul { padding-bottom: 9cqw; min-height: 0; overscroll-behavior: contain; display: grid; align-content: start; overflow-y: auto; scrollbar-width: none; gap: 2cqw; }
.watch-list-demo li { background: var(--row-color); border-radius: 7cqw; padding: 3cqw; text-align: center; font-size: 7cqw; }
.watch-row-controls { display: flex; align-items: center; justify-content: space-between; }
.watch-row-controls button { display: grid; place-items: center; padding: 0; width: 15cqw; height: 15cqw; border-radius: 50%; background: rgb(0 0 0 / 15%); font-size: 10cqw; line-height: 1; }
.watch-row-controls .icon { width: 58%; height: 58%; }
.watch-row-controls b { font-size: 12cqw; font-variant-numeric: tabular-nums; }
.watch-timer-demo { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; align-content: stretch; gap: 3cqw; padding: 9cqw 0 13cqw; --timer-tint: #497fbb; }
.watch-duration { align-self: center; text-align: center; font: 700 20cqw/1 var(--font-display); font-variant-numeric: tabular-nums; }
.watch-duration.long-duration { font-size: 14cqw; }
.watch-timer-demo > .watch-detail-head { width: auto; }
.watch-timer-demo > :is(.watch-detail-head, .watch-start, .watch-finish) { margin-inline: 5.75cqw; justify-self: stretch; }
.watch-timer-demo .watch-start { min-height: 20cqw; padding: 3cqw; border-radius: 99px; background: var(--timer-tint); font-size: 8cqw; }
.watch-finish { --offset: 0px; --thumb: 17cqw; position: relative; height: 20cqw; border-radius: 99px; background: #272729; user-select: none; }
.watch-finish::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--thumb) + 3cqw + var(--offset)); background: var(--timer-tint); opacity: .9; border-radius: inherit; }
.finish-label { position: absolute; inset: 0; display: grid; place-items: center; padding-left: 9cqw; font-size: 5.8cqw; font-weight: 600; }
.watch-finish .finish-thumb { appearance: none; display: flex; align-items: center; justify-content: center; position: absolute; top: 50%; left: 1.5cqw; width: var(--thumb); height: var(--thumb); padding: 0; border-radius: 50%; background: var(--timer-tint); transform: translate(var(--offset), -50%); font-size: 11cqw; line-height: 1; touch-action: none; cursor: grab; }
.finish-thumb .icon { display: block; width: 54%; height: 54%; stroke-width: 3; }
.watch-finish:not(.dragging) .finish-thumb { transition: transform .3s ease-out; }
.watch-finish:not(.dragging)::before { transition: width .3s ease-out; }
.screen[hidden] { display: none; }
/* Margins resolve against the device itself; the screenshot owns the aspect ratio.
   Keep content out of normal flow so placeholder text cannot stretch small devices. */
.device .screen {
  width: calc(100% - var(--bezel) * 2);
  height: auto;
  margin: var(--bezel);
  aspect-ratio: var(--screen-ratio);
}
/* One border owns both case and screen corners. Content-box keeps the native
   screenshot ratio inside the border; cqw scales its thickness with the Watch. */
.device.watch .screen {
  box-sizing: content-box;
  width: 90%;
  margin: 0 auto;
  border: 5cqw solid #222;
  border-radius: 30% / 25%;
  background: #000;
  box-shadow: 0 0 0 1px #444, 0 12px 20px rgba(0, 0, 0, 0.22);
}
/* Paint the timer background inside the bezel, including during composited interactions. */
.watch-small .screen { background-clip: padding-box; }
.watch-pair .watch-timer-demo {
  border-radius: 25cqw / calc(25% - 2.5cqw);
  overflow: hidden;
  isolation: isolate;
  clip-path: border-box;
  background: #000;
}
.device .screen > .placeholder { position: absolute; inset: 0; }
.screen > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.device .screen > img { position: absolute; inset: 0; }
/* Let the native screenshot size the split-section screen at fractional viewport widths. */
.split-visual .iphone .screen.has-image {
  aspect-ratio: auto;
  background: transparent;
}
.split-visual .iphone .screen.has-image > img {
  position: static;
  height: auto;
}
/* Screenshots already contain their status bar / camera cutout; do not cover them. */

.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  padding: 14% 10%;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.4;
  color: #8A6A3A;
  background:
    repeating-linear-gradient(135deg, rgba(254, 187, 54, 0.1) 0 10px, transparent 10px 20px),
    #FFF9EE;
}
.placeholder strong { font-size: 16px; color: #5A3E12; }
.placeholder code {
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  font: 600 10.5px/1.3 ui-monospace, "SF Mono", Menlo, monospace;
  background: rgba(254, 187, 54, 0.22);
  color: #6B4A12;
  word-break: break-all;
}
.ph-tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--brand);
  color: var(--ink-on-brand);
}
.placeholder-dark {
  color: #B9A78A;
  background:
    repeating-linear-gradient(135deg, rgba(254, 187, 54, 0.08) 0 10px, transparent 10px 20px),
    #1E1912;
}
.placeholder-dark strong { color: #F5E6CC; }
.placeholder-dark code { background: rgba(254, 187, 54, 0.16); color: #F3D49A; }
.watch .placeholder { padding: 10%; gap: 5px; font-size: 10px; }
.watch .placeholder strong { font-size: 13px; }
.watch .placeholder code { font-size: 8.5px; }

/* ---------- Sections ---------- */

.section { padding: var(--section-space) 0; }
.section-light { background: var(--surface); }
.section-cream { background: var(--surface-cream); }
.section-dark {
  background: var(--surface-dark);
  color: var(--on-dark);
  --muted: var(--on-dark-muted);
  --line: rgba(255, 255, 255, 0.12);
  --shadow-device: 0 40px 80px -24px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.section-head { margin-bottom: clamp(48px, 6vw, 72px); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(48px, 7vw, 100px);
}
.split-reverse .split-copy { order: 2; }
.split-visual { display: flex; justify-content: center; position: relative; }
.split-visual > .iphone { width: min(320px, 66vw); }

/* Anything countable */
.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 900px;
  margin: 56px auto 0;
}
.chip-cloud li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px 12px 16px;
  border-radius: 999px;
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 600;
  background: color-mix(in srgb, var(--c) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
  transition: transform 0.25s var(--ease);
}
.chip-cloud li::before {
  content: "+1";
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  background: var(--c);
  color: #fff;
}
.chip-cloud li:hover { transform: translateY(-3px) rotate(-1deg); }

/* Types */
.type-tabs {
  display: inline-flex;
  gap: 6px;
  margin-top: 36px;
  padding: 6px;
  border-radius: 999px;
  background: var(--surface-card);
  box-shadow: 0 0 0 1px var(--line);
}
.type-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s;
}
.type-tabs button[aria-selected="true"] { background: var(--brand); color: var(--ink-on-brand); }
.type-panel { min-height: 6em; margin-top: 24px; max-width: 30em; color: var(--muted); }
.type-panel p { animation: fade-in 0.4s var(--ease); }

/* Goals */
.check-list { display: grid; gap: 14px; margin-top: 32px; font-size: 18px; font-weight: 600; }
.check-list li { display: flex; align-items: center; gap: 12px; }
.check-list .icon {
  width: 28px;
  height: 28px;
  padding: 6px;
  border-radius: 50%;
  stroke-width: 3;
  background: var(--brand);
  color: var(--ink-on-brand);
}

.week-card {
  position: absolute;
  left: max(-4%, -24px);
  bottom: 12%;
  width: 230px;
  padding: 18px 20px 20px;
  border-radius: var(--radius);
  background: var(--surface-card);
  box-shadow: 0 24px 48px -20px rgba(60, 30, 0, 0.35), 0 0 0 1px var(--line);
}
.week-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--muted); }
.week-card > strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
}
.week-card > strong small { font-size: 22px; color: var(--muted); }
.week-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 14px; }
.week-days li {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.week-days .done { background: var(--brand); color: var(--ink-on-brand); }
.week-days .today { box-shadow: inset 0 0 0 2px var(--brand-deep); color: var(--brand-deep); }

/* Insights */
/* One responsive group at every breakpoint. Reserve space for rotated corners
   and lower edges so the composition stays inside its section without clipping. */
.phone-fan {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  width: 100%;
  max-width: 840px;
  margin: clamp(56px, 7vw, 88px) auto 0;
  padding: 2% 3% 6%;
}
.phone-fan .iphone { width: 100%; }
.phone-fan .iphone:nth-child(1) { transform: translateX(14%) translateY(6%) rotate(-7deg); }
.phone-fan .iphone:nth-child(2) { z-index: 1; }
.phone-fan .iphone:nth-child(3) { transform: translateX(-14%) translateY(6%) rotate(7deg); }

.insight-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: clamp(64px, 8vw, 96px);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--line);
  text-align: left;
}
.insight-stats li { display: grid; gap: 6px; padding: 26px 24px; background: var(--surface-dark-card); }
.insight-stats strong { font-family: var(--font-display); font-size: 21px; color: var(--brand); }
.insight-stats span { font-size: 15px; color: var(--on-dark-muted); }

/* Widgets */
.widget-showcase {
  display: flex;
  justify-content: center;
  gap: clamp(32px, 6vw, 80px);
}
.showcase-item { display: grid; justify-items: center; gap: 22px; }
.showcase-item .iphone { width: min(300px, 40vw); }
.showcase-item figcaption { font-weight: 600; color: var(--muted); }

/* Watch */
.watch-pair { align-items: flex-end; gap: 28px; }
.watch-large { width: min(240px, 42vw); }
.watch-small { width: min(170px, 30vw); margin-bottom: 8%; }

/* Quick entry */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 64px;
  text-align: left;
}
.quick-card {
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--surface-cream);
  transition: transform 0.3s var(--ease);
}
.quick-card:hover { transform: translateY(-4px); }
.quick-card h3, .detail-grid h3 { margin-top: 20px; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.quick-card p, .detail-grid p { margin-top: 8px; font-size: 15px; color: var(--muted); }
.quick-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--c);
  color: #fff;
}
.quick-icon .icon { width: 26px; height: 26px; }

/* Details */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px 32px;
}
.detail-grid .icon {
  width: 34px;
  height: 34px;
  stroke-width: 1.8;
  color: var(--brand-deep);
}

/* Reviews */
.review-grid {
  columns: 3 300px;
  column-gap: 20px;
}
.review {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface-cream);
  break-inside: avoid;
}
.review-featured { background: var(--brand-gradient); color: var(--ink-on-brand); }
.review-stars { display: flex; gap: 2px; color: var(--brand-deep); }
.review-featured .review-stars { color: var(--ink-on-brand); }
.review blockquote { font-size: 17px; line-height: 1.55; }
.review figcaption { font-size: 15px; font-weight: 600; color: var(--muted); }
.review-featured figcaption { color: inherit; opacity: 0.75; }
.review-grid + p { margin-top: 28px; }

/* FAQ */
.faq {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
  font-size: 19px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .icon { width: 22px; height: 22px; color: var(--muted); transition: transform 0.3s var(--ease); }
.faq-list details[open] summary .icon { transform: rotate(180deg); }
.faq-list details p { padding: 0 40px 26px 0; color: var(--muted); }

/* Closing */
.closing {
  padding: clamp(96px, 12vw, 160px) 0;
  background: var(--brand-gradient);
  color: var(--ink-on-brand);
}
.closing-icon {
  margin: 0 auto 36px;
  border-radius: 22.5%;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.45), 0 28px 56px -16px rgba(80, 30, 0, 0.55);
}
.closing-actions { display: flex; justify-content: center; margin-top: 40px; }

/* Footer */
.site-footer { padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); background: var(--surface); }
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 40px;
}
.footer-grid .brand { font-size: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; font-size: 15px; }
.footer-links a { text-decoration: none; color: var(--muted); }
.footer-links a:hover { color: var(--ink); }
.footer-legal { flex-basis: 100%; font-size: 13px; color: var(--muted); }

/* ---------- Motion ---------- */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes bump {
  40% { transform: translateY(-4px) scale(1.18); }
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav { display: grid; grid-template-columns: auto auto; justify-content: space-between; gap: 16px; }
  .nav .button { margin-left: 0; min-height: 44px; white-space: nowrap; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: repeat(3, 1fr); }
  .insight-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hero-grid, .split, .faq { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { text-align: center; }
  .hero-lede, .hero-meta { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .rating { align-items: center; }
  /* Keep the hero artwork together at every single-column width. Child sizes
     share this container so a narrower phone does not leave floating accessories. */
  .hero-visual { container-type: inline-size; width: min(100%, 360px); min-height: 0; margin: 16px auto 0; }
  .hero-phone { width: 72%; }
  .device.hero-watch { left: 0; width: 36%; bottom: 6%; }
  .try-card { top: 14%; bottom: auto; right: 0; width: 66%; display: grid; grid-template-columns: minmax(0, 1fr) 11cqw; gap: 2cqw; padding: 3cqw; border-radius: 5cqw; animation: none; }
  .try-text { padding-right: 11cqw; font-size: 3.3cqw; }
  .try-text strong { font-size: 6cqw; }
  .try-text small { font-size: 3.3cqw; }
  .try-plus { width: 11cqw; height: 11cqw; }
  .try-plus .icon { width: 6cqw; height: 6cqw; }

  .split-copy { text-align: center; }
  .split-reverse .split-copy { order: 0; }
  .split .lede, .type-panel { margin-inline: auto; }
  .check-list { justify-content: center; text-align: left; width: fit-content; margin-inline: auto; }
  .week-card { left: 0; }

  .faq-head { text-align: center; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .type-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 360px); margin-inline: auto; gap: 2px; padding: 4px; }
  .type-tabs button { justify-content: center; min-width: 0; min-height: 44px; gap: 5px; padding: 8px 5px; font-size: 14px; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 20px; }
  .quick-grid { grid-template-columns: 1fr; }
  .insight-stats li { padding: 20px 18px; }
  .widget-showcase { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .showcase-item { min-width: 0; align-content: start; }
  .showcase-item .iphone { width: 100%; }
  .watch-pair { gap: 6%; }
  .watch-large { width: 52%; }
  .watch-small { width: 37%; }
  .split-visual > .iphone { width: 76%; max-width: 300px; }
  .placeholder { font-size: 10px; gap: 5px; padding: 12% 8%; }
  .placeholder strong { font-size: 12px; }
  .placeholder code { font-size: 8px; }
  .placeholder span:not(.ph-tag) { display: none; }
  .watch .placeholder code { display: none; }
  .week-card { width: 190px; padding: 14px 16px 16px; bottom: 6%; }
  .week-card > strong { font-size: 36px; }
  .faq-list summary { font-size: 17px; }
  .faq-list details p { padding-right: 0; }
  .store-badge-surface { min-height: 56px; }
}

/* The flag and native select occupy separate flex cells, independent of platform text insets. */
.language-picker { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; flex: 0 0 auto; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-card); color: var(--ink); }
.language-picker .language-flag { display: block; width: 20px; height: 14px; flex: 0 0 20px; object-fit: cover; border-radius: 2px; }
.language-picker select { width: 112px; min-width: 0; min-height: 34px; margin: 0; padding: 4px 20px 4px 0; border: 0; border-radius: 0; appearance: none; -webkit-appearance: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23888888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right center / 14px 14px; color: inherit; font: inherit; font-size: 14px; cursor: pointer; color-scheme: light dark; }
.language-picker select:focus { outline: none; }
.language-picker:has(select:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 600px) {
  .footer-links { flex-basis: 100%; gap: 12px 20px; }
  .language-picker { margin-left: 0; min-height: 44px; }
  .language-picker select { min-height: 42px; padding-block: 8px; }
}

.blog-nav-link { font-size: 15px; font-weight: 500; }
.blog-nav-link[aria-current] { opacity: 1; font-weight: 600; }
@media (max-width: 1024px) {
  .nav:has(.blog-nav-link) { grid-template-columns: 1fr auto auto; }
}
.blog-main { max-width: 780px; margin: 0 auto; padding: 56px 24px 88px; }
.blog-main h1 { font: 800 clamp(38px, 6vw, 66px)/1.06 var(--font-display); letter-spacing: -.045em; margin: 30px 0; }
.blog-main h2 { font: 700 clamp(23px, 4vw, 32px)/1.2 var(--font-display); margin: 38px 0 12px; }
.blog-main p { line-height: 1.7; font-size: 18px; margin-bottom: 16px; }
.blog-card { display: block; padding: clamp(24px, 5vw, 44px); border: 1px solid var(--line); border-top: 5px solid #FDB33A; border-radius: 18px; color: inherit; text-decoration: none; }
.blog-card h2 { margin-top: 0; }
.blog-card:hover h2 { text-decoration: underline; }
.blog-back { display: inline-block; margin-top: 32px; }

.blog-card + .blog-card { margin-top: 20px; }
