/* FlowX website. Colours, type, shapes and sizes follow the FlowX Android app. */

/* WOFF2 files hold the Latin characters only (subsets made with fontTools); the WOFF files are the full fonts. */
@font-face { font-family: "FlowX Display"; src: url("fonts/unbounded.woff2") format("woff2"), url("fonts/unbounded.woff") format("woff"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "FlowX Body"; src: url("fonts/space-grotesk.woff2") format("woff2"), url("fonts/space-grotesk.woff") format("woff"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "FlowX Mono"; src: url("fonts/jetbrains-mono.woff2") format("woff2"), url("fonts/jetbrains-mono.woff") format("woff"); font-weight: 100 800; font-display: swap; }

:root {
  /* App palette */
  --flowx-background: #0A0A10;                       /* Ink */
  --flowx-surface: #15151D;                          /* Surf */
  --flowx-surface-secondary: #1E1E29;                /* Raised */
  --flowx-primary: #C8FF3D;                          /* Lime */
  --flowx-primary-soft: rgba(200, 255, 61, 0.122);   /* Lime, 12% */
  --flowx-accent: #FF4F64;                           /* Coral */
  --flowx-accent-soft: rgba(255, 79, 100, 0.141);    /* Coral, 14% */
  --flowx-text: #F3EFE6;                             /* Paper */
  --flowx-text-muted: rgba(243, 239, 230, 0.6);      /* Dim */
  --flowx-text-faint: rgba(243, 239, 230, 0.361);    /* Mute: hints and tick marks only, never body text */
  --flowx-border: rgba(243, 239, 230, 0.078);        /* Line */
  --flowx-border-strong: rgba(243, 239, 230, 0.161); /* Line2 */
  --flowx-dot: rgba(243, 239, 230, 0.035);           /* background dot grid */
  --flowx-break: rgba(243, 239, 230, 0.349);         /* break segments */

  /* App fonts */
  --font-display: "FlowX Display", "Arial Black", system-ui, sans-serif;               /* Unbounded */
  --font-body: "FlowX Body", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; /* Space Grotesk */
  --font-mono: "FlowX Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;       /* JetBrains Mono */

  /* App shapes */
  --r-card: 24px;
  --r-chip: 12px;
  --r-tile: 13px;
  --r-pill: 999px;

  --gutter: 16px;
  --max: 1160px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--flowx-background);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

/* No background here: the canvas is painted by html, so the backdrop layer below shows through. */
body {
  margin: 0;
  min-height: 100vh;
  color: var(--flowx-text);
  font: 500 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

:focus-visible { outline: 2px solid var(--flowx-primary); outline-offset: 3px; }

.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;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--flowx-primary); color: var(--flowx-background);
  font-weight: 700; text-decoration: none; transition: top 0.15s;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%; max-width: var(--max); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ── The app's canvas: ink, one soft lime glow (radius 380) and a faint 1.2px dot every 24px.
      Like the app, the glow sits behind the ring at first and glides to the top right. ── */
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background-image: conic-gradient(at 1.2px 1.2px, transparent 75%, var(--flowx-dot) 0);
  background-size: 24px 24px;
  background-position: 11.4px 11.4px;
}
.glow {
  position: absolute; left: -380px; top: -380px; width: 760px; height: 760px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(200, 255, 61, 0.11), rgba(200, 255, 61, 0));
  transform: translate(calc(100vw - 30px), 40px);
  transition: transform 0.5s ease-in-out;
}
.backdrop.at-hero .glow { transform: translate(var(--hero-x, 50vw), var(--hero-y, 40vh)); }

/* ── Type ── */
.display { font-family: var(--font-display); font-weight: 900; line-height: 1.12; }
.h1 { font-size: clamp(38px, 10.2vw, 76px); }
.h2 { font-size: clamp(28px, 6.6vw, 46px); }
.h3 { font-size: clamp(24px, 5.4vw, 30px); }
.lime { color: var(--flowx-primary); }

/* Mono label: JetBrains Mono 700, 10px, uppercase, 0.18em tracking, lime by default */
.mono {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 10px/1.3 var(--font-mono); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--flowx-primary);
}
.mono.dim { color: var(--flowx-text-muted); }

.lead { font-size: clamp(17px, 2.2vw, 20px); line-height: 1.45; color: var(--flowx-text-muted); max-width: 34em; }
.sub { font-size: 17px; line-height: 1.5; color: var(--flowx-text-muted); max-width: 38em; }
.fine { font-size: 14px; color: var(--flowx-text-muted); }

/* The lime dot of "● FOCUS"; it pulses twice, then rests */
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--flowx-primary); flex: none; animation: live 2.4s ease-in-out 2; }
.live-dot.big { width: 12px; height: 12px; }
@keyframes live { 50% { opacity: 0.35; } }

/* ── Card: Surf, 1px Line border, radius 24 ── */
.card {
  background: var(--flowx-surface);
  border: 1px solid var(--flowx-border);
  border-radius: var(--r-card);
  padding: 20px;
}
@media (min-width: 720px) { .card { padding: 28px; } }

/* ── Icon tile: 40px, radius 13, lime 20px icon on Lime 12% ── */
.tile {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: var(--r-tile);
  background: var(--flowx-primary-soft); color: var(--flowx-primary);
}
.tile svg { width: 20px; height: 20px; }
.tile-coral { background: var(--flowx-accent-soft); color: var(--flowx-accent); }
.tile-raised { background: var(--flowx-surface-secondary); color: var(--flowx-text-muted); }

/* The app's icons: 20-unit strokes, width 2, round caps and joins */
svg:not(.mark) path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg:not(.mark) path.fill { fill: currentColor; stroke: none; }

/* ── Chip: 24px, radius 12, 11.5px bold ── */
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 24px; padding: 0 10px; border-radius: var(--r-chip);
  font: 700 11.5px/1 var(--font-body); white-space: nowrap;
}
.chip-lime { background: var(--flowx-primary-soft); color: var(--flowx-primary); }
.chip-coral { background: var(--flowx-accent-soft); color: var(--flowx-accent); }
.chip-raised { background: var(--flowx-surface-secondary); color: var(--flowx-text-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
a.chip { text-decoration: none; }
a.chip:hover { text-decoration: underline; text-underline-offset: 0.2em; }

/* ── Pill buttons: 56px, 17px bold; presses sink to 97% ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 56px; padding: 6px 26px; border-radius: var(--r-pill);
  font: 700 17px/1.2 var(--font-body); text-decoration: none; text-align: center;
  border: 1.2px solid transparent; cursor: pointer;
  transition: transform 0.12s, box-shadow 0.25s, background-color 0.2s, border-color 0.2s;
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--flowx-primary); color: var(--flowx-background); }
.btn-primary:hover { box-shadow: 0 12px 36px -10px rgba(200, 255, 61, 0.55); }
.btn-secondary { background: var(--flowx-surface); color: var(--flowx-text); border-color: var(--flowx-border-strong); }
.btn-secondary:hover { border-color: rgba(243, 239, 230, 0.32); }
.btn-danger { background: var(--flowx-accent-soft); color: var(--flowx-accent); border-color: rgba(255, 79, 100, 0.55); }
.btn-danger:hover { border-color: var(--flowx-accent); }
.btn-ghost { background: transparent; color: var(--flowx-text); border-color: var(--flowx-border-strong); }
/* "Coming to Google Play": a label, not a link, until the listing is live */
.soon { cursor: default; color: var(--flowx-text-muted); }
.soon:active { transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.actions.center { justify-content: center; }
@media (max-width: 359.98px) { .btn { font-size: 16px; padding-inline: 18px; } }

/* ── Header: brand left, status right, an ink fade instead of a bar ── */
.top {
  position: fixed; inset: 0 0 auto; z-index: 20; height: var(--header-h);
  background: linear-gradient(to bottom, var(--flowx-background) 62%, rgba(10, 10, 16, 0));
}
.top-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; border-radius: 10px; }
.brand .mark { width: 30px; height: 30px; }
.brand span { font: 900 20px/1 var(--font-display); }
.brand.small .mark { width: 26px; height: 26px; }
.brand.small span { font-size: 18px; }
.top-chip .live-dot { width: 6px; height: 6px; }
/* Landscape phones: let the header scroll away so the page keeps its height */
@media (max-height: 500px) { .top { position: absolute; } }

/* ── Section nav: the app's floating bottom bar (Surf, radius 29, lime pill for the current item) ── */
.nav {
  position: fixed; z-index: 30; display: flex; align-items: center; gap: 2px;
  border-radius: 29px;
  background: var(--flowx-surface); border: 1px solid var(--flowx-border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}
.nav a {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; color: var(--flowx-text-muted); white-space: nowrap;
  transition: background-color 0.22s, color 0.22s;
}
.nav svg { width: 17px; height: 17px; flex: none; }
.nav a:hover { color: var(--flowx-text); }
.nav a.active { background: var(--flowx-primary); color: var(--flowx-background); font-weight: 700; }

/* Desktop: a slim pill in the middle of the header, text only. */
@media (min-width: 900px) {
  .nav { top: 12px; left: 50%; transform: translateX(-50%); padding: 5px; }
  .nav a { height: 40px; padding: 0 16px; border-radius: 20px; font: 600 14px/1.1 var(--font-body); }
  .nav a.active { font-weight: 700; }
  .nav svg { display: none; }
}
/* Phones and tablets: the app's bar. 58px tall, 6px inside, 20px from the edges; items are a 17px icon
   over a 10.5px label; the current one is a 40px lime pill with icon and 13px bold label. */
@media (max-width: 899.98px) {
  html { scroll-padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .nav {
    left: 50%; transform: translateX(-50%);
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: min(calc(100% - 40px), 560px); height: 58px; padding: 0 6px;
  }
  .nav a {
    flex: 1 1 0; min-width: 0; height: 100%; flex-direction: column; gap: 5px;
    border-radius: 24px; font: 600 10.5px/1.1 var(--font-body);
  }
  .nav a.active {
    flex: 1.8 1 0; min-width: max-content; height: 40px; flex-direction: row; gap: 7px;
    padding: 0 12px; border-radius: 20px; font: 700 13px/1.1 var(--font-body);
  }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
/* Very small phones: inactive items show only their icon (the label stays for screen readers). */
@media (max-width: 359.98px) {
  .nav { width: calc(100% - 24px); }
  .nav a:not(.active) span {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
}

/* ── Reveal: fade up 22px, like the app's screens ── */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ── 1. Hero ── */
.hero { padding: calc(var(--header-h) + 28px) 0 56px; }
.hero-grid { display: grid; gap: 44px; align-items: center; }
.hero-copy .mono { margin-bottom: 20px; }
.hero-copy .h1 { max-width: 11em; }
.hero-copy .lead { margin-top: 22px; }
.hero-copy .fine { margin-top: 18px; }
@media (min-width: 960px) {
  .hero { padding-top: calc(var(--header-h) + 64px); padding-bottom: 88px; min-height: min(100vh, 900px); display: flex; align-items: center; }
  .hero-grid { grid-template-columns: 1.08fr 0.92fr; gap: 56px; }
}

.hero-visual, .hero-art { display: grid; justify-items: center; gap: 22px; width: 100%; }
.js .hero-visual.reveal { transition-delay: 0.12s; }

/* Home's "Today's focus" card: 12/20/14 padding, value, caption 13px, 6px bar */
.today { width: min(100%, 380px); padding: 12px 20px 14px; }
.today .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 26px; }
.today-value { margin-top: 6px; font: 900 26px/1.12 var(--font-display); }
.today-value .of { font-weight: 700; font-size: 16px; color: var(--flowx-text-muted); }
.today-left { margin-top: 3px; font-size: 13px; line-height: 1.35; color: var(--flowx-text-muted); }
.bar { position: relative; height: 6px; margin-top: 14px; border-radius: 3px; background: var(--flowx-surface-secondary); overflow: hidden; }
.today .bar { margin-top: 6px; }
.bar-fill { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--flowx-primary); transition: width 1.3s var(--ease) 0.35s; }
.today .bar-fill { width: 37.5%; }
.js .today .bar-fill { width: 2%; }
.js .in .today .bar-fill { width: 37.5%; }

/* Streak chip: coral on Coral 14%, 26px, radius 13, with the flickering flame */
.streak {
  display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 10px 0 8px;
  border-radius: 13px; background: var(--flowx-accent-soft); color: var(--flowx-accent);
  font: 700 12px/1 var(--font-body); white-space: nowrap;
}
.flame { position: relative; width: 14px; height: 14px; }
.flame::before {
  content: ""; position: absolute; inset: -4.9px -6.3px -7.7px; border-radius: 50%;
  background: radial-gradient(circle closest-side, rgba(255, 79, 100, 0.4), rgba(255, 79, 100, 0));
  opacity: 0.6; animation: flame-glow 1.04s ease-in-out 4;
}
.flame svg { position: relative; width: 14px; height: 14px; transform-origin: 50% 95%; animation: flame-stretch 1.04s ease-in-out 4, flame-lean 1.68s ease-in-out 2; }
@keyframes flame-stretch { 25% { scale: 1.04 0.92; } 75% { scale: 0.97 1.06; } }
@keyframes flame-lean { 25% { rotate: -5deg; } 75% { rotate: 5deg; } }
@keyframes flame-glow { 25% { opacity: 0.45; } 75% { opacity: 1; } }

/* Timer ring: 60 ticks, 12px Raised track, lime arc with a soft glow and an ink knob */
.ring { position: relative; width: clamp(256px, 78vw, 400px); aspect-ratio: 1; container-type: inline-size; }
.ring svg { width: 100%; height: 100%; overflow: visible; }
.ticks line { stroke: var(--flowx-border-strong); stroke-width: 1; }
.ticks line.major { stroke: var(--flowx-text-faint); stroke-width: 1.6; }
.ring-track { fill: none; stroke: var(--flowx-surface-secondary); stroke-width: 12; }
/* Default state = 24:36 of 25:00 left (984/1000); the script animates from here. */
.arc { fill: none; stroke: var(--flowx-primary); stroke-linecap: round; stroke-dasharray: 984 1000; }
.arc.main { stroke-width: 12; }
.arc.glow-1 { stroke-width: 18; opacity: 0.14; }
.arc.glow-2 { stroke-width: 24; opacity: 0.08; }
.arc.glow-3 { stroke-width: 30; opacity: 0.05; }
.knob { transform-box: view-box; transform-origin: 150px 150px; transform: rotate(354.24deg); }
.knob circle { fill: var(--flowx-background); stroke: var(--flowx-primary); stroke-width: 3; }
.ring.empty .arc, .ring.empty .knob, .ring.full .knob { visibility: hidden; }
.ring.anim .arc { transition: stroke-dasharray 0.5s linear; }
.ring.anim .knob { transition: transform 0.5s linear; }
.ring.intro .arc { transition: stroke-dasharray 1.1s var(--ease); }
.ring.intro .knob { transition: transform 1.1s var(--ease); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; }
.ring-time { font: 900 60px/1 var(--font-display); font-size: 18.4cqw; font-variant-numeric: tabular-nums; }
/* "● FOCUS" scales with the ring, as in the app (10/248 of the ring, a still 6/248 dot) */
.ring-label { font-size: 12px; font-size: 4.03cqw; letter-spacing: 0.18em; gap: 4.4cqw; }
.ring-label .live-dot { width: 2.4cqw; height: 2.4cqw; animation: none; }
.timer-toggle { margin-top: -6px; }

/* ── 2. Status ── */
.status { padding: 8px 0 24px; }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 820px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 20px; } }
.status-card { display: flex; gap: 16px; align-items: flex-start; }
@media (max-width: 519.98px) { .status-card { flex-direction: column; } }
.status-card h3, .feature h3 { margin-top: 8px; font: 700 18px/1.3 var(--font-body); }
.status-card p:not(.mono):not(.chips) { margin-top: 8px; color: var(--flowx-text-muted); }

/* ── Section heads ── */
.section-head { display: grid; gap: 14px; margin-bottom: 36px; }
.section-head .sub { margin-top: 2px; }

/* ── 3. Screenshots ── */
.screens { padding: 72px 0 40px; overflow-x: clip; }
.carousel { --slide: clamp(224px, 64vw, 304px); --gap: clamp(18px, 4vw, 34px); position: relative; }
.track {
  position: relative; display: flex; gap: var(--gap);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 26px calc(50% - var(--slide) / 2) 12px;
  cursor: grab; outline-offset: -4px; border-radius: 28px;
}
.track::-webkit-scrollbar { display: none; }
.track.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.slide { flex: 0 0 var(--slide); scroll-snap-align: center; scroll-snap-stop: always; transition: opacity 0.3s; }
.phone {
  position: relative; border-radius: 30px; overflow: hidden; background: var(--flowx-surface);
  box-shadow: 0 0 0 3px rgba(243, 239, 230, 0.12), 0 30px 80px rgba(0, 0, 0, 0.55);
  transform-origin: 50% 60%; will-change: transform;
}
.phone img { width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.slide figcaption { display: grid; gap: 6px; justify-items: center; text-align: center; margin-top: 26px; padding: 0 4px; }
.slide figcaption strong { font: 700 18px/1.25 var(--font-display); }
.slide figcaption span:last-child { font-size: 15px; color: var(--flowx-text-muted); }
/* Lime glow behind the screenshots, as on the store frames */
.carousel::before {
  content: ""; position: absolute; left: 50%; top: 42%; width: min(720px, 100%); aspect-ratio: 7 / 6;
  transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(200, 255, 61, 0.13), rgba(200, 255, 61, 0));
}
.controls { display: none; align-items: center; justify-content: center; gap: 14px; margin-top: 26px; padding-inline: var(--gutter); }
.js .controls { display: flex; }
/* Round outlined buttons, like the app's month arrows */
.round {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; flex: none;
  border-radius: 50%; border: 1px solid var(--flowx-border-strong); background: var(--flowx-surface);
  color: var(--flowx-text); cursor: pointer; transition: border-color 0.2s, transform 0.12s;
}
.round:hover { border-color: rgba(243, 239, 230, 0.32); }
.round:active { transform: scale(0.94); }
.round svg { width: 18px; height: 18px; }
.round.play { margin-left: 6px; }
.round.play svg { width: 14px; height: 14px; }
.round.play .i-play { display: none; }
.round.play[aria-pressed="true"] .i-play { display: block; }
.round.play[aria-pressed="true"] .i-pause { display: none; }
.dots { display: flex; align-items: center; gap: 6px; }
/* Dots: a small pill, lime and wider when current */
.dot { width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dot::before { content: ""; width: 8px; height: 6px; border-radius: 3px; background: rgba(243, 239, 230, 0.42); transition: width 0.3s var(--ease), background-color 0.3s; }
.dot[aria-current="true"]::before { width: 22px; background: var(--flowx-primary); }

/* ── 4. Why ── */
.why { padding: 72px 0; }
.why-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .why-grid { grid-template-columns: 1.1fr 0.9fr; gap: 64px; } }
.why .h2 { margin-top: 14px; }
.why .sub { margin-top: 18px; }
.ticks-list { display: grid; gap: 14px; margin-top: 26px; }
.ticks-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
/* Status mark: lime circle with a bold ink tick (stroke 2.8) */
.tick, .status-mark {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px; margin-top: -1px;
  border-radius: 50%; background: var(--flowx-primary); color: var(--flowx-background);
}
.tick svg, .status-mark svg { width: 14px; height: 14px; }
.tick svg path, .status-mark svg path { stroke-width: 2.8; }

.rhythm-card { display: grid; gap: 22px; }
.technique h3 { font: 700 18px/1.3 var(--font-body); }
.technique .meta { margin-top: 4px; font-size: 14px; color: var(--flowx-text-muted); }
/* Rhythm bar: lime focus, paper breaks, 2px gaps, 6px tall */
.rhythm, .rhythm-labels { display: grid; gap: 2px; margin-top: 14px; }
.rhythm-labels { margin-top: 8px; }
.r-50 { grid-template-columns: 50fr 10fr 50fr 10fr 50fr 10fr; }
.r-80 { grid-template-columns: 80fr 20fr 80fr 20fr 80fr 20fr; }
.rhythm i { height: 6px; border-radius: 3px; transform-origin: left center; }
.rhythm i.f { background: var(--flowx-primary); }
.rhythm i.b { background: var(--flowx-break); }
.rhythm-labels span { font: 700 9px/1 var(--font-mono); color: var(--flowx-text-muted); text-align: center; }
.js .rhythm i { transform: scaleX(0); transition: transform 0.45s var(--ease); }
.js .in .rhythm i { transform: none; }
.js .in .rhythm i:nth-child(2) { transition-delay: 0.08s; }
.js .in .rhythm i:nth-child(3) { transition-delay: 0.16s; }
.js .in .rhythm i:nth-child(4) { transition-delay: 0.24s; }
.js .in .rhythm i:nth-child(5) { transition-delay: 0.32s; }
.js .in .rhythm i:nth-child(6) { transition-delay: 0.4s; }
.js .in .technique + .technique .rhythm i { transition-delay: 0.25s; }
.rhythm-card .note { font-size: 14px; color: var(--flowx-text-muted); }

/* ── 5. Features ── */
.features { padding: 40px 0 72px; }
.feature { display: flex; flex-direction: column; gap: 4px; transition: border-color 0.25s, transform 0.25s var(--ease); }
.feature:hover { border-color: var(--flowx-border-strong); transform: translateY(-3px); }
.feature h3 { margin-top: 16px; }
.feature p { margin-top: 4px; color: var(--flowx-text-muted); }
.mini { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--flowx-border); }
/* Home's duration chips: 32px, radius 16, Line2 edge; selected = Lime 12% fill and a 1.4px lime edge */
.durations { display: flex; flex-wrap: wrap; gap: 8px; }
.durations span {
  min-height: 32px; min-width: 52px; padding: 4px 12px; display: inline-grid; place-items: center;
  border-radius: 16px; border: 1px solid var(--flowx-border-strong); background: var(--flowx-surface);
  font: 700 13px/1 var(--font-body); color: var(--flowx-text-muted);
}
.durations span.on { background: var(--flowx-primary-soft); border: 1.4px solid var(--flowx-primary); color: var(--flowx-primary); }
.goal .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.goal-value { font: 900 16px/1 var(--font-display); }
.goal-value .of { font-weight: 700; font-size: 13px; color: var(--flowx-text-muted); }
.goal .bar-fill { width: 66.7%; }
.js .goal .bar-fill { width: 2%; }
.js .in .goal .bar-fill { width: 66.7%; }
.sessions { display: grid; }
.session { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.session + .session { border-top: 1px solid var(--flowx-border); }
.session strong { display: block; font: 700 15px/1.3 var(--font-body); }
.session div span { font-size: 13px; color: var(--flowx-text-muted); }
.sync { display: flex; align-items: center; gap: 12px; }
.sync-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.sync-text strong { font: 700 15px/1.3 var(--font-body); }
.sync-text span { font-size: 13px; color: var(--flowx-text-muted); }

/* ── 6. Privacy ── */
.privacy { padding: 24px 0 40px; }
.privacy-card { display: grid; gap: 18px; }
.privacy-copy .h3 { margin-top: 10px; }
.privacy-copy p:not(.mono) { margin-top: 10px; color: var(--flowx-text-muted); max-width: 38em; }
.privacy-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) {
  .privacy-card { grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; padding: 32px; }
  .privacy-actions { flex-direction: column; }
}
@media (max-width: 519.98px) { .privacy-actions .btn, .launch .actions .btn { flex: 1 1 100%; } }

/* ── 7. Launch ── */
.launch { padding: 40px 0 88px; }
.launch-card {
  position: relative; overflow: hidden; display: grid; justify-items: center; text-align: center; gap: 14px;
  padding: 44px 20px; border-color: rgba(200, 255, 61, 0.22);
  box-shadow: 0 24px 70px -30px rgba(200, 255, 61, 0.35);
}
.launch-card::before {
  content: ""; position: absolute; left: 50%; top: -40%; width: 120%; aspect-ratio: 2; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(200, 255, 61, 0.1), rgba(200, 255, 61, 0)); pointer-events: none;
}
.launch-card > * { position: relative; }
.launch-card .mark.big { width: 64px; height: 64px; margin-bottom: 6px; }
.launch-card .sub { margin: 4px auto 0; }
.launch-card .actions { margin-top: 18px; }
.launch-card .fine { margin-top: 6px; }
@media (min-width: 720px) { .launch-card { padding: 64px 40px; } }

/* ── 8. Footer ── */
.foot { border-top: 1px solid var(--flowx-border); padding: 32px 0 40px; }
.foot-in { display: grid; gap: 18px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { color: var(--flowx-text-muted); text-decoration: none; font-size: 15px; border-radius: 6px; }
.foot-links a:hover { color: var(--flowx-text); text-decoration: underline; text-underline-offset: 0.2em; }
.foot-note { font-size: 14px; color: var(--flowx-text-muted); }
@media (min-width: 900px) { .foot-in { grid-template-columns: auto 1fr auto; align-items: center; } .foot-links { justify-content: center; } }

/* ── Content pages (focus timer, how it works, FAQ, support, Android, terms) ── */
.page-top { padding: calc(var(--header-h) + 28px) 0 40px; }
.page-head { display: grid; gap: 14px; margin-bottom: 32px; max-width: 46em; }
.page-head .lead { margin-top: 2px; }
.page-head .actions { margin-top: 12px; }
.page-section { padding: 32px 0 40px; }
.card-title { font: 700 19px/1.3 var(--font-body); }
.card > p, .card > ul { margin-top: 10px; color: var(--flowx-text-muted); }
.card > .actions { margin-top: 18px; }
.text-link { color: var(--flowx-primary); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; border-radius: 4px; }
.text-link:hover { text-decoration-thickness: 2px; }
.muted { color: var(--flowx-text-muted); }
.link-grid { margin-top: 8px; }
.plain-list { display: grid; gap: 10px; }
.plain-list strong { color: var(--flowx-text); }

/* Long-form text */
.prose { max-width: 46em; }
.prose > * + * { margin-top: 14px; }
.prose h2 { margin-top: 40px; font: 900 clamp(20px, 3.4vw, 26px)/1.2 var(--font-display); }
.prose h2.h3 { margin-top: 0; }
.prose h3 { margin-top: 26px; font: 700 18px/1.3 var(--font-body); }
.prose p, .prose li { color: rgba(243, 239, 230, 0.82); }
.prose ul { list-style: disc; padding-left: 1.3em; display: grid; gap: 8px; }
.prose ul li::marker { color: var(--flowx-primary); }
.prose .h2 { margin-top: 8px; }

/* Numbered steps (focus timer how-to) */
.steps { counter-reset: step; display: grid; gap: 14px; margin-top: 20px; padding: 0; list-style: none; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; color: rgba(243, 239, 230, 0.82); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--flowx-primary-soft); color: var(--flowx-primary); font: 700 14px/1 var(--font-mono);
}
.steps strong { color: var(--flowx-text); }

/* How it works */
.how-steps { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.how-step { display: grid; grid-template-columns: auto 1fr; gap: 16px 18px; align-items: start; }
.how-step h2 { font: 700 19px/1.3 var(--font-body); }
.how-step p { margin-top: 8px; color: var(--flowx-text-muted); }
.how-step .ticks-list { margin-top: 16px; }
.step-no {
  width: 40px; height: 40px; border-radius: var(--r-tile); display: grid; place-items: center;
  background: var(--flowx-primary); color: var(--flowx-background); font: 900 18px/1 var(--font-display);
}
.how-step .shot { grid-column: 1 / -1; width: min(240px, 70%); height: auto; justify-self: center; border-radius: 22px; border: 1px solid var(--flowx-border-strong); }
@media (min-width: 820px) {
  .how-step.with-shot { grid-template-columns: auto 1fr 200px; }
  .how-step.with-shot .shot { grid-column: auto; width: 200px; }
}
.shots { display: flex; gap: 16px; overflow-x: auto; margin-top: 32px; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.shots img { flex: 0 0 auto; width: min(220px, 60vw); height: auto; border-radius: 22px; border: 1px solid var(--flowx-border-strong); scroll-snap-align: center; }
.rhythm-grid { margin-top: 24px; }
.rhythm-grid h3, .card h3 { font: 700 18px/1.3 var(--font-body); }
.cta-card { display: grid; gap: 12px; }
.cta-card .sub { margin-top: 4px; }

/* FAQ: native details/summary, works without JavaScript */
.faq { display: grid; gap: 10px; max-width: 52em; }
.faq-group { margin: 22px 0 4px; }
.faq-group:first-child { margin-top: 0; }
.qa { border: 1px solid var(--flowx-border); border-radius: 18px; background: var(--flowx-surface); }
.qa summary {
  list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; position: relative;
  font: 700 17px/1.35 var(--font-body); border-radius: 18px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font: 700 22px/1 var(--font-mono); color: var(--flowx-primary);
}
.qa[open] summary::after { content: "–"; }
.qa > div { padding: 0 20px 18px; color: rgba(243, 239, 230, 0.82); }
.qa[open] { border-color: var(--flowx-border-strong); }

/* Online focus timer */
.timer-app { display: grid; gap: 22px; justify-items: center; max-width: 720px; margin-inline: auto; }
.timer-presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: 100%; }
@media (min-width: 620px) { .timer-presets { grid-template-columns: repeat(4, 1fr); } }
.preset {
  display: grid; gap: 4px; text-align: left; padding: 12px 14px; min-height: 64px; cursor: pointer;
  border-radius: 16px; border: 1px solid var(--flowx-border-strong); background: var(--flowx-surface-secondary);
  transition: border-color 0.2s, background-color 0.2s;
}
.preset strong { font: 700 16px/1.2 var(--font-body); }
.preset span { font-size: 13px; color: var(--flowx-text-muted); }
.preset[aria-pressed="true"] { background: var(--flowx-primary-soft); border: 1.4px solid var(--flowx-primary); }
.preset[aria-pressed="true"] strong { color: var(--flowx-primary); }
.timer-custom { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: center; }
.timer-custom label { display: grid; gap: 6px; font-size: 14px; color: var(--flowx-text-muted); }
.field { display: inline-flex; align-items: center; gap: 8px; color: var(--flowx-text); }
.field input {
  width: 92px; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--flowx-border-strong);
  background: var(--flowx-background); color: var(--flowx-text); font: 700 18px/1 var(--font-mono);
}
.timer-face { display: grid; justify-items: center; gap: 10px; }
.timer-ring { width: clamp(240px, 70vw, 340px); }
.timer-ring .arc { transition: stroke-dasharray 0.25s linear; }
.timer-ring.on-break .arc { stroke: var(--flowx-text); }
.timer-ring .ring-time { font-size: 17cqw; }
.timer-status { font: 600 15px/1.4 var(--font-mono); color: var(--flowx-text-muted); }
.timer-controls { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.timer-controls .btn { min-width: 150px; justify-content: center; }
button.btn { cursor: pointer; }
.timer-sound { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--flowx-text-muted); cursor: pointer; }
.timer-sound input { width: 18px; height: 18px; accent-color: var(--flowx-primary); }
.timer-note { max-width: 720px; margin: 14px auto 0; text-align: center; }
.timer-noscript { color: var(--flowx-accent); text-align: center; }
.js .timer-app:not(.ready) .timer-controls { visibility: hidden; }

/* Footer columns */
.foot-cols { display: grid; gap: 12px; }
@media (min-width: 900px) { .foot-cols { display: flex; gap: 10px 40px; justify-content: center; } }

/* ── Reduced motion: no movement, everything shown at once ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .rhythm i { transform: none; transition: none; }
  .bar-fill, .ring .arc, .ring .knob, .phone, .slide, .feature, .glow { transition: none !important; }
  .feature:hover { transform: none; }
}

/* ── High-contrast (forced colours) mode ── */
@media (forced-colors: active) {
  .dot::before { background: ButtonText; }
  .dot[aria-current="true"]::before { background: Highlight; }
  .nav a.active { outline: 2px solid Highlight; outline-offset: -2px; }
  .card, .round, .chip, .btn { border: 1px solid CanvasText; }
}

/* ── Print: content only ── */
@media print {
  .top, .nav, .controls, .backdrop, .skip, .timer-toggle, .timer-controls, .timer-presets { display: none !important; }
  body { padding-bottom: 0; }
  .js .reveal { opacity: 1; transform: none; }
}
