/* TriSport.me — site styles. No external dependencies: fonts are served from /assets/fonts. */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/Inter-Regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/Inter-Medium.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/Inter-SemiBold.woff") format("woff"); }
@font-face { font-family: "Inter Display"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/InterDisplay-SemiBold.woff") format("woff"); }
@font-face { font-family: "Inter Display"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/InterDisplay-Bold.woff") format("woff"); }
@font-face { font-family: "Inter Display"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/InterDisplay-ExtraBold.woff") format("woff"); }

:root {
  --bg: #080d17;
  --bg-raised: #0d1422;
  --panel: #111a2c;
  --panel-2: #162136;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --fg: #eef2f8;
  --fg-soft: #c5cedc;
  --muted: #93a0b5;

  --swim: #3b9df2;
  --bike: #f2992e;
  --run: #ec5466;
  --green: #35c491;

  --accent: var(--swim);
  --radius: 18px;
  --radius-sm: 12px;
  --wrap: 1160px;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--swim); color: #04101f; }
:focus-visible { outline: 2px solid var(--swim); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--fg); color: #04101f; padding: 10px 14px; border-radius: 10px; font-weight: 600; z-index: 100; }
.skip:focus { top: 12px; }

/* ---------- Independence notice strip ---------- */
.notice {
  background: #0b1120;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--fg-soft);
}
.notice .wrap { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 9px; padding-bottom: 9px; text-align: center; flex-wrap: wrap; }
.notice .icon { color: var(--bike); }
.notice a { color: var(--fg); font-weight: 600; border-bottom: 1px solid var(--line-strong); }
.notice a:hover { border-color: var(--fg); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 13, 23, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand small { font-family: var(--body); font-weight: 500; color: var(--muted); font-size: 0.72em; letter-spacing: 0; }
.mark { display: inline-flex; align-items: flex-end; gap: 4px; height: 26px; }
.mark span { width: 7px; border-radius: 3px; }
.mark span:nth-child(1) { height: 13px; background: var(--swim); }
.mark span:nth-child(2) { height: 19px; background: var(--bike); }
.mark span:nth-child(3) { height: 26px; background: var(--run); }

.nav { display: flex; align-items: center; gap: 30px; font-size: 14.5px; font-weight: 500; color: var(--fg-soft); }
.nav a:not(.btn):hover { color: #fff; }
.menu-btn { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 10px; width: 42px; height: 42px; align-items: center; justify-content: center; }
.menu-btn .icon { width: 20px; height: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px;
  border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--fg); color: #07101f; }
.btn--primary:hover { background: #fff; }
.btn--ghost { background: rgba(255,255,255,0.04); border-color: var(--line-strong); color: var(--fg); }
.btn--ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.28); }
.btn--sm { min-height: 38px; padding: 0 15px; font-size: 14px; border-radius: 10px; }
.btn--store { background: #fff; color: #07101f; padding: 0 18px 0 14px; min-height: 50px; gap: 11px; }
.btn--store .icon { width: 22px; height: 22px; }
.btn--store span { display: grid; text-align: left; gap: 3px; }
.btn--store small { font-size: 10.5px; font-weight: 500; letter-spacing: 0.02em; opacity: .7; }
.btn--store b { font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 96px; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 420px at 12% -8%, rgba(59,157,242,0.20), transparent 70%),
    radial-gradient(620px 420px at 92% 8%, rgba(236,84,102,0.13), transparent 70%),
    radial-gradient(520px 380px at 62% 105%, rgba(242,153,46,0.10), transparent 70%);
}
.hero::after { /* three course lines: swim, bike, run */
  content: ""; position: absolute; left: -10%; right: -10%; bottom: 0; height: 3px; pointer-events: none;
  background: linear-gradient(90deg, var(--swim) 0 33.3%, var(--bike) 33.3% 66.6%, var(--run) 66.6% 100%);
  opacity: .55;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 64px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--swim), var(--bike), var(--run)); }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.15rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; margin-top: 22px; }
.hero h1 em { font-style: normal; background: linear-gradient(95deg, var(--swim) 5%, var(--bike) 52%, var(--run) 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin-top: 24px; font-size: 1.14rem; line-height: 1.62; color: var(--fg-soft); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .icon { color: var(--green); }

/* App shelf in hero */
.shelf { background: linear-gradient(180deg, rgba(22,33,54,0.92), rgba(13,20,34,0.92)); border: 1px solid var(--line-strong); border-radius: 26px; padding: 12px; box-shadow: 0 40px 90px -40px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.02) inset; }
.shelf-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.shelf-head b { color: var(--fg-soft); font-weight: 600; }
.shelf-row { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 16px; border: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease; }
.shelf-row + .shelf-row { margin-top: 2px; }
.shelf-row:hover { background: rgba(255,255,255,0.045); border-color: var(--line); }
.shelf-row .txt { min-width: 0; flex: 1; }
.shelf-row h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.shelf-row p { font-size: 13.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shelf-row .go { color: var(--muted); display: inline-flex; }
.shelf-row:hover .go { color: #fff; }

/* App icon tiles (illustrative; replace with real icons in assets/img) */
.app-icon { width: 56px; height: 56px; flex: none; border-radius: 23%; display: grid; place-items: center; color: #fff; box-shadow: 0 10px 24px -10px var(--tile-shadow, rgba(0,0,0,.6)), inset 0 1px 0 rgba(255,255,255,0.28); background: var(--tile); }
.app-icon .icon { width: 50%; height: 50%; stroke-width: 2; }
.app-icon--lg { width: 72px; height: 72px; }
.t-carbon   { --tile: linear-gradient(145deg, #4bd6a3, #12805c); --tile-shadow: rgba(53,196,145,.55); --accent: var(--green); }
.t-anatomy  { --tile: linear-gradient(145deg, #f57586, #b9233a); --tile-shadow: rgba(236,84,102,.55); --accent: var(--run); }
.t-official { --tile: linear-gradient(145deg, #5db3fb, #1863b6); --tile-shadow: rgba(59,157,242,.55); --accent: var(--swim); }
.t-sched    { --tile: linear-gradient(145deg, #f9b658, #c96b0b); --tile-shadow: rgba(242,153,46,.55); --accent: var(--bike); }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 20px 56px; align-items: end; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 800; letter-spacing: -0.03em; margin-top: 14px; }
.section-head p { color: var(--fg-soft); font-size: 1.03rem; }

/* App cards */
.apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.app {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 30px;
  overflow: hidden; transition: border-color .2s ease, transform .2s ease;
}
.app::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); opacity: .85; }
.app::after { content: ""; position: absolute; right: -120px; top: -140px; width: 340px; height: 340px; border-radius: 50%; background: var(--accent); opacity: .07; filter: blur(30px); pointer-events: none; }
.app:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.app-top { display: flex; align-items: center; gap: 18px; }
.app-top h3 { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.025em; }
.app-kind { font-size: 12.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 5px; }
.app-desc { margin-top: 20px; color: var(--fg-soft); font-size: 1.02rem; }
.app-feats { margin-top: 20px; display: grid; gap: 10px; font-size: 14.5px; color: var(--fg-soft); }
.app-feats li { display: flex; gap: 10px; align-items: flex-start; }
.app-feats .icon { color: var(--accent); margin-top: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12.5px; font-weight: 500; color: var(--fg-soft); background: rgba(255,255,255,0.03); }
.chip--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.app-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 28px; }

/* Scheduler web band */
.band { margin-top: 22px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 26px 30px; border-radius: 24px; border: 1px solid rgba(242,153,46,0.32); background: linear-gradient(100deg, rgba(242,153,46,0.13), rgba(242,153,46,0.03) 60%), var(--panel); }
.band h3 { font-size: 1.25rem; font-weight: 700; }
.band p { color: var(--fg-soft); margin-top: 6px; font-size: 15px; }
.band code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; color: var(--bike); }

/* ---------- Preview (tabs) ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tab { display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--fg-soft); font-weight: 600; font-size: 14.5px; transition: background-color .15s ease, color .15s ease; }
.tab:hover { background: rgba(255,255,255,0.07); color: #fff; }
.tab[aria-selected="true"] { background: var(--fg); color: #07101f; border-color: var(--fg); }
.stage { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 34px; min-height: 420px; }
.stage-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 24px; align-items: flex-start; margin-bottom: 26px; }
.stage-head h3 { font-size: 1.45rem; font-weight: 700; }
.stage-head p { color: var(--muted); font-size: 14.5px; margin-top: 6px; max-width: 46em; }
.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bike); background: rgba(242,153,46,0.12); border: 1px solid rgba(242,153,46,0.3); white-space: nowrap; }

.calc { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 34px; }
.field + .field { margin-top: 24px; }
.field label { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; color: var(--fg-soft); margin-bottom: 10px; }
.field output { color: var(--green); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--green); height: 28px; margin: 0; }
select { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg-raised); color: var(--fg); font: inherit; font-size: 15px; }
.result { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stat span { font-size: 13px; color: var(--muted); }
.stat b { display: block; font-family: var(--display); font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat b.green { color: var(--green); }
.bars { margin-top: 20px; display: grid; gap: 12px; font-size: 13px; color: var(--fg-soft); }
.bar-row { display: grid; grid-template-columns: 130px 1fr 52px; gap: 12px; align-items: center; }
.bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.07); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--green); transition: width .25s ease; }
.bar-row em { font-style: normal; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.fine { margin-top: 18px; font-size: 12.5px; color: var(--muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 620px; }
th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 14px 18px; background: var(--bg-raised); border-bottom: 1px solid var(--line); }
td { padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--fg-soft); }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--fg); font-weight: 600; }
td.pos { color: var(--bike); font-weight: 600; }
td.time { font-variant-numeric: tabular-nums; white-space: nowrap; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.seg button { text-align: left; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-raised); transition: border-color .15s ease, background-color .15s ease; }
.seg button small { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c); }
.seg button b { font-family: var(--display); font-size: 1.15rem; font-weight: 700; }
.seg button[aria-pressed="true"] { border-color: var(--c); background: var(--panel-2); }
.anat { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
.anat h4 { font-size: 1.25rem; font-weight: 700; }
.anat .muscles { margin-top: 12px; font-size: 14.5px; color: var(--fg-soft); }
.anat .muscles b { color: var(--run); font-weight: 600; }
.anat blockquote { margin: 16px 0 0; padding: 14px 16px; border-left: 3px solid var(--run); background: var(--panel-2); border-radius: 0 12px 12px 0; font-size: 14px; color: var(--fg-soft); }
.anat h5 { margin: 0 0 12px; font: 600 11.5px/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.anat li { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-size: 14.5px; color: var(--fg-soft); }
.anat li + li { margin-top: 8px; }
.anat li .icon { color: var(--run); margin-top: 3px; }

/* ---------- Roles ---------- */
.roles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.role { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.role .glyph { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 34%, transparent); }
.role .glyph .icon { width: 22px; height: 22px; }
.role h3 { font-size: 1.12rem; font-weight: 700; margin-top: 20px; }
.role p { color: var(--muted); font-size: 14.5px; margin-top: 10px; }

/* ---------- Disclaimer ---------- */
.indep { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; padding: 40px; border-radius: 26px; border: 1px solid rgba(242,153,46,0.35); background: linear-gradient(120deg, rgba(242,153,46,0.10), rgba(242,153,46,0.02) 55%), var(--panel); }
.indep .glyph { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: var(--bike); background: rgba(242,153,46,0.14); border: 1px solid rgba(242,153,46,0.36); }
.indep .glyph .icon { width: 28px; height: 28px; }
.indep h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); font-weight: 800; letter-spacing: -0.025em; }
.indep p { margin-top: 14px; color: var(--fg-soft); max-width: 62em; }
.indep ul { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.indep li { padding: 16px 18px; border-radius: 14px; background: rgba(8,13,23,0.55); border: 1px solid var(--line); font-size: 14.5px; color: var(--fg-soft); }
.indep li b { display: block; color: var(--fg); font-weight: 600; margin-bottom: 4px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: #060a12; padding: 56px 0 36px; font-size: 14.5px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); gap: 40px; }
.footer h4 { font: 600 12px/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-soft); margin-bottom: 16px; }
.footer li + li { margin-top: 10px; }
.footer a:hover { color: #fff; }
.footer .about { margin-top: 16px; max-width: 30em; }
.legal { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 13px; line-height: 1.6; }
.legal strong { color: var(--fg-soft); font-weight: 600; }

/* ---------- Sub-page (scheduler slot) ---------- */
.subpage { min-height: 70vh; display: grid; place-items: center; padding: 80px 0; text-align: center; }
.subpage .app-icon { margin: 0 auto 26px; }
.subpage h1 { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; }
.subpage p { color: var(--fg-soft); max-width: 36em; margin: 18px auto 0; }
.subpage .hero-cta { justify-content: center; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 24px); opacity: 0; pointer-events: none; background: var(--fg); color: #07101f; font-weight: 600; font-size: 14px; padding: 12px 18px; border-radius: 12px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.8); transition: opacity .2s ease, transform .2s ease; z-index: 80; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

[hidden] { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { grid-template-columns: minmax(0, 1fr); }
  .indep ul { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 24px 22px; background: rgba(8,13,23,0.98); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav .btn { margin-top: 16px; }
  .menu-btn { display: inline-flex; }
  .apps, .calc, .anat { grid-template-columns: minmax(0, 1fr); }
  .band { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .hero { padding: 56px 0 72px; }
  .stage { padding: 22px; }
  .app { padding: 24px; }
  .indep { grid-template-columns: 1fr; padding: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .roles, .seg, .result-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 96px 1fr 46px; }
  .hero-cta .btn, .app-actions .btn { flex: 1 1 100%; }
  .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Real app icon images ---------- */
.app-icon--img { background: none; box-shadow: 0 10px 24px -10px var(--tile-shadow, rgba(31,111,196,.7)); overflow: hidden; }
.app-icon--img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Screenshots ---------- */
.shot { margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-strong); background: #f4f6fa; box-shadow: 0 40px 80px -40px rgba(0,0,0,.9); }
.shot img { width: 100%; height: auto; }
.shot--phone { border-radius: 30px; border: 6px solid #1b2536; max-width: 300px; }
.shots { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 28px; align-items: end; }
.shots .shot--phone { justify-self: center; }

/* ---------- Scheduler pages ---------- */
.sub-hero { position: relative; overflow: hidden; padding: 72px 0 64px; }
.sub-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(700px 420px at 15% -10%, rgba(59,157,242,0.22), transparent 70%), radial-gradient(520px 380px at 95% 10%, rgba(242,153,46,0.10), transparent 70%); }
.sub-hero .wrap { position: relative; }
.sub-title { display: flex; align-items: center; gap: 22px; margin-top: 22px; }
.sub-title .app-icon { width: 84px; height: 84px; }
.sub-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); font-weight: 800; letter-spacing: -0.03em; }
.sub-hero .platforms { color: var(--muted); margin-top: 8px; font-size: 15px; }
.sub-hero .lede { max-width: 44em; }
.sub-hero .shots { margin-top: 56px; }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cols .role .glyph { color: var(--swim); background: rgba(59,157,242,.14); border-color: rgba(59,157,242,.34); }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.crumbs a:hover { color: #fff; }
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 800; letter-spacing: -0.03em; margin-top: 18px; }
.prose .meta { color: var(--muted); margin-top: 10px; font-size: 15px; }
.prose h2 { font-size: 1.3rem; font-weight: 700; margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--line); }
.prose p, .prose ol { color: var(--fg-soft); margin-top: 12px; }
.prose ol { padding-left: 1.3em; list-style: decimal; }
.prose li + li { margin-top: 8px; }
.prose a { color: var(--swim); border-bottom: 1px solid rgba(59,157,242,.4); overflow-wrap: anywhere; }
.prose strong { color: var(--fg); }
.prose .summary { margin-top: 26px; padding: 18px 20px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 20px; font-size: 14.5px; }

@media (max-width: 820px) {
  .shots { grid-template-columns: minmax(0, 1fr); }
  .shots .shot--phone { max-width: 240px; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .sub-title { gap: 16px; } .sub-title .app-icon { width: 64px; height: 64px; }
}

/* ---------- Photos ---------- */
.shelf-photo { position: relative; height: 210px; border-radius: 16px; overflow: hidden; margin-bottom: 4px; }
.shelf-photo img, .app-photo img, .role-photo img { width: 100%; height: 100%; object-fit: cover; }
.shelf-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,20,34,0) 35%, rgba(15,23,39,0.92) 100%); }
.app-photo { position: relative; height: 190px; margin: -30px -30px 0; overflow: hidden; }
.app-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,26,44,0.15) 0%, rgba(17,26,44,0.55) 55%, var(--panel) 100%); }
.app-photo img { transition: transform .6s ease; }
.app:hover .app-photo img { transform: scale(1.04); }
.app-photo + .app-top { position: relative; z-index: 1; margin-top: -38px; align-items: flex-end; }
.app::before { z-index: 2; }
.role { overflow: hidden; }
.role-photo { position: relative; height: 150px; margin: -26px -26px 0; overflow: hidden; }
.role-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,26,44,0) 30%, var(--panel) 100%); }
.role-photo + .glyph { position: relative; z-index: 1; margin-top: -22px; background: color-mix(in srgb, var(--c) 22%, #0d1422); backdrop-filter: blur(6px); }
@media (max-width: 820px) { .app-photo { margin: -24px -24px 0; height: 170px; } }
