/* AptCoach website, shared by every page. The app's own look (lib/brand.ts): true black
   ground, white words, one accent (Blaze), Barlow Condensed for display and Barlow for
   reading. Fonts are self-hosted: the privacy policy promises no third-party requests. */

@font-face { font-family: 'Barlow Condensed'; src: url(fonts/barlow-condensed-800.woff2) format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url(fonts/barlow-condensed-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url(fonts/barlow-condensed-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(fonts/barlow-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(fonts/barlow-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(fonts/barlow-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --ground: #000000;
  --panel: #181b22;
  --row: #1e222a;
  --control: #232833;
  --control2: #2d323d;
  --ink: #f2f4f7;
  --soft: #c9d0da;
  --muted: #838d9b;
  --faint: #7a8492;
  --blaze: #ff3d12;
  --blaze-hover: #ff5a36;
  --on-blaze: #0a0c10;
  --blaze-soft: rgba(255, 61, 18, 0.15);
  --amber: #f5c451;
  --amber-soft: rgba(245, 196, 81, 0.13);
  --warm: #f97316;
  --danger: #ff5c5c;
  --protein: #4f8cf7;
  --carbs: #3cc47c;
  --fats: #f5b73b;
  --hair: rgba(255, 255, 255, 0.07);

  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 8.5vw, 124px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 800; }
:focus-visible { outline: 2px solid var(--blaze); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--ground); padding: 10px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.dot { color: var(--blaze); }
.num { font-variant-numeric: tabular-nums; }

/* ─── Buttons: flat, like the app's ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 14px; border: 0;
  font: 800 19px/1 var(--display); letter-spacing: 0.03em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-blaze { background: var(--blaze); color: var(--on-blaze); }
.btn-blaze:hover { background: var(--blaze-hover); }
.btn-quiet { background: var(--control); color: var(--ink); }
.btn-quiet:hover { background: var(--control2); }
.btn-lg { height: 58px; padding: 0 28px; font-size: 22px; border-radius: 16px; }

/* ─── Nav ───────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.74);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--hair); }
.nav-in { display: flex; align-items: center; gap: 32px; height: 76px; }
.logo { display: block; flex: none; }
.logo img { height: 44px; width: auto; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a, .signin {
  color: var(--soft); text-decoration: none; font: 500 15px/1 var(--body);
  transition: color 0.2s;
}
.nav-links a:hover, .signin:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 22px; }
.nav-cta .btn { height: 42px; padding: 0 18px; font-size: 18px; border-radius: 12px; }

/* ─── Section furniture ─────────────────────────────────────────────────────── */
.sec { padding: var(--section) 0; }
.h2 {
  font: 800 clamp(2.9rem, 6.2vw, 5.6rem)/0.9 var(--display);
  text-transform: uppercase; letter-spacing: -0.005em; text-wrap: balance;
}
.lead { font-size: clamp(1.1rem, 1.45vw, 1.3rem); line-height: 1.5; color: var(--soft); max-width: 36ch; text-wrap: pretty; }
.sec-head { display: grid; gap: 22px; margin-bottom: clamp(40px, 5vw, 64px); }
.sec-head .lead { max-width: 52ch; }
.h2 .l { display: block; }

/* A drawn app screen: its real size, zoomed to its column by the page's script. */
.screen { position: relative; width: 100%; min-width: 0; aspect-ratio: var(--w) / var(--h); overflow: hidden; }
.screen > .si { width: calc(var(--w) * 1px); height: calc(var(--h) * 1px); zoom: var(--z, 0.5); }

/* A photo, rounded like the app's cards. */
.photo { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: clamp(16px, 2vw, 24px); background: var(--panel); }

/* ─── Footer ────────────────────────────────────────────────────────────────── */
.foot { padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
.foot-in { display: flex; align-items: center; gap: 22px 32px; flex-wrap: wrap; }
.foot-in img { width: 52px; height: auto; }
.foot-in p { flex: 1; min-width: 240px; }
.foot-in nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-in nav a { text-decoration: none; color: var(--soft); }
.foot-in nav a:hover { color: var(--ink); }

/* ─── Motion: things rise into place once, as they come into view ───────────── */
.js [data-rise] { opacity: 0; transform: translateY(32px); transition: opacity 0.9s ease calc(var(--d, 0) * 120ms), transform 1.1s var(--ease) calc(var(--d, 0) * 120ms); }
.js [data-rise].in { opacity: 1; transform: none; }

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

/* ─── Narrower screens ──────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-in { height: 64px; gap: 16px; }
  .logo img { height: 38px; }
  .nav-cta { gap: 16px; }
}
@media (max-width: 420px) {
  .signin { display: none; }
}

/* Icons: one sprite in the page, stroked like the app's. */
.ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ─── See all features (2026-10-14): a theme's whole list, opened under it ─── */
.see-all { margin-top: 26px; gap: 10px; }
.see-all svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.see-all[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Every feature of a theme, opened under it by See all features: groups side by side, no boxes. */
.all { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 34px clamp(28px, 4vw, 56px); margin-top: clamp(48px, 6vw, 80px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--hair); }
.all[hidden] { display: none; }
.all:not([hidden]) { animation: all-in 0.5s var(--ease); }
@keyframes all-in { from { opacity: 0; transform: translateY(14px); } }
.all-g h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font: 800 clamp(1.25rem, 1.7vw, 1.5rem)/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.all-g h3 em { font: 600 12.5px/1 var(--body); font-style: normal; text-transform: none; letter-spacing: 0; color: var(--soft); padding: 6px 10px; border-radius: 999px; background: var(--control); }
.all-g ul { display: grid; gap: 10px; margin-top: 14px; }
.all-g li { display: flex; align-items: flex-start; gap: 10px; color: var(--soft); font-size: 15.5px; line-height: 1.4; }
.all-g li svg { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--blaze); stroke-width: 2.6; }
html:not(.js) .see-all { display: none; }
html:not(.js) .all[hidden] { display: grid; }
@media (prefers-reduced-motion: reduce) { .all:not([hidden]) { animation: none; } .see-all svg { transition: none; } }

/* AI is an optional extra (2026-10-14, the user: "AI is extra 'optional'"): a quiet pill over its theme. */
.opt-tag { justify-self: start; display: inline-block; margin-bottom: 14px; padding: 7px 12px; border-radius: 999px; background: var(--control); color: var(--soft); font: 600 13px/1 var(--body); letter-spacing: 0.02em; }
