/* ==========================================================================
   Fcoach design system — shared by every page on fcoach.net
   Monochrome, mirroring the app: near-black canvas, graphite cards,
   one bright "spotlight" card per view, pill buttons, Inter throughout.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111111;
  --bg-deep: #0A0A0A;
  --surface: #1C1C1C;
  --surface-2: #242424;
  --surface-3: #2E2E2E;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #FFFFFF;
  --text-2: #A6A6A6;
  --text-3: #8C8C8C;
  --text-dim: #666666;
  --inverse: #FFFFFF;
  --inverse-text: #0A0A0A;
  --inverse-text-2: #6B6B6B;
  --inverse-line: rgba(0, 0, 0, 0.08);
  --gold: #F2B640;
  --nav-bg: rgba(17, 17, 17, 0.72);
  --shadow-lg: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --logo-filter: none;
  --glow: rgba(255, 255, 255, 0.07);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F3F3F3;
  --bg-deep: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F0F0F0;
  --surface-3: #E6E6E6;
  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.14);
  --text: #0A0A0A;
  --text-2: #555555;
  --text-3: #6B6B6B;
  --text-dim: #8A8A8A;
  --inverse: #0A0A0A;
  --inverse-text: #FFFFFF;
  --inverse-text-2: #A6A6A6;
  --inverse-line: rgba(255, 255, 255, 0.12);
  --gold: #B57A12;
  --nav-bg: rgba(243, 243, 243, 0.78);
  --shadow-lg: 0 40px 80px -40px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04);
  --logo-filter: invert(1);
  --glow: rgba(0, 0, 0, 0.05);
}

:root {
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --pill: 999px;
  --container: 1200px;
  --gutter: 24px;
  --nav-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
main { overflow-x: clip; }
img, svg, video, picture { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.fcoach-header a, .site-footer a, .fcoach-mobile-drawer a, .store { text-decoration: none; }
.site-footer li { margin: 0; font-size: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
::selection { background: var(--inverse); color: var(--inverse-text); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 1000;
  padding: 10px 16px; border-radius: var(--pill);
  background: var(--inverse); color: var(--inverse-text); font-weight: 600; font-size: 14px;
  transform: translateY(-160%); transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- Type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px 0 10px;
  border: 1px solid var(--line-2); border-radius: var(--pill);
  color: var(--text-2); font-size: 13px; font-weight: 600; letter-spacing: -0.005em;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 4px var(--glow); }
.display {
  font-size: clamp(44px, 7.4vw, 96px);
  line-height: 0.98; letter-spacing: -0.045em; font-weight: 800;
}
.h2 {
  font-size: clamp(34px, 4.8vw, 60px);
  line-height: 1.02; letter-spacing: -0.04em; font-weight: 800;
}
.h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--text-2); letter-spacing: -0.01em; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--pill);
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--inverse); color: var(--inverse-text); }
.btn-primary:hover { opacity: .88; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 16px; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* App store badges */
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 22px 0 18px; border-radius: 16px;
  background: var(--inverse); color: var(--inverse-text);
  transition: transform .2s var(--ease), opacity .2s ease;
}
.store:hover { opacity: .9; transform: translateY(-1px); }
.store:active { transform: scale(.98); }
.store svg { width: 26px; height: 26px; flex: none; }
.store .s-txt { display: flex; flex-direction: column; line-height: 1.1; }
.store .s-small { font-size: 11px; font-weight: 500; opacity: .7; letter-spacing: .01em; }
.store .s-big { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.store .s-small { white-space: nowrap; }
.store-alt { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.store-alt:hover { background: var(--surface); opacity: 1; }

/* ---------- Header ---------- */
.fcoach-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
  border-bottom: 1px solid transparent;
}
.fcoach-header.scrolled {
  background: var(--nav-bg);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; flex: none; }
.logo .wordmark { height: 19px; width: auto; filter: var(--logo-filter); }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: var(--pill);
  color: var(--text-2); font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em;
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface); }
.nav-cta { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--text);
  transition: background .15s ease;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn svg { width: 17px; height: 17px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }

.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none; cursor: pointer;
  height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--pill);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { background: var(--surface); }
.lang-switch summary svg { width: 15px; height: 15px; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 168px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px;
  box-shadow: var(--shadow-lg); display: grid; gap: 2px;
}
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--text-2);
}
.lang-menu a:hover { background: var(--surface-2); color: var(--text); }
.lang-menu a[aria-current="true"] { color: var(--text); }
.lang-menu a[aria-current="true"]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text); }

/* ---------- Mobile drawer ---------- */
.fcoach-mobile-trigger { display: none; }
.fcoach-mobile-layer { position: fixed; inset: 0; z-index: 200; visibility: hidden; pointer-events: none; }
.fcoach-mobile-layer.open { visibility: visible; pointer-events: auto; }
.fcoach-mobile-backdrop { position: absolute; inset: 0; width: 100%; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .28s ease; }
.fcoach-mobile-layer.open .fcoach-mobile-backdrop { opacity: 1; }
.fcoach-mobile-drawer {
  position: absolute; inset: 0 0 auto 0; max-height: 100dvh; overflow: auto;
  background: var(--bg); border-bottom: 1px solid var(--line);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 0 var(--gutter) 24px;
  transform: translateY(-16px); opacity: 0;
  transition: transform .32s var(--ease), opacity .24s ease;
}
.fcoach-mobile-layer.open .fcoach-mobile-drawer { transform: none; opacity: 1; }
.fcoach-mobile-drawer-head { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; }
.fcoach-mobile-drawer-links { display: grid; gap: 2px; padding: 8px 0 18px; border-bottom: 1px solid var(--line); }
.fcoach-mobile-drawer-links a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; color: var(--text);
}
.fcoach-mobile-drawer-links a::after { content: "→"; color: var(--text-3); font-weight: 500; font-size: 18px; }
.fcoach-mobile-drawer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 18px; }
.fcoach-mobile-drawer-actions .btn-primary { flex: 1 1 100%; height: 52px; font-size: 16px; order: 3; }
.fcoach-mobile-drawer-actions .lang-menu { position: static; box-shadow: none; margin-top: 8px; }
.fcoach-mobile-drawer-actions .lang-switch[open] { flex: 1 1 100%; }
.fcoach-mobile-close, .fcoach-mobile-trigger {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2);
  place-items: center; color: var(--text);
}
.fcoach-mobile-close { display: grid; }
.fcoach-mobile-close svg, .fcoach-mobile-trigger svg { width: 18px; height: 18px; }
body.fcoach-drawer-open { overflow: hidden; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .nav-cta .lang-switch, .nav-cta .theme-toggle { display: none; }
  .fcoach-mobile-trigger { display: grid; }
  .fcoach-mobile-drawer .lang-switch, .fcoach-mobile-drawer .theme-toggle { display: inline-flex; }
}
@media (max-width: 420px) {
  .nav-cta .btn-primary { display: none; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-deep); padding: 72px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-brand .logo .wordmark { height: 20px; }
.footer-brand p { margin-top: 18px; max-width: 320px; color: var(--text-2); font-size: 14.5px; }
.footer-brand .store-row { margin-top: 24px; }
.footer-brand .store { height: 48px; padding: 0 16px 0 14px; border-radius: 13px; }
.footer-brand .store svg { width: 21px; height: 21px; }
.footer-brand .store .s-big { font-size: 16px; }
.footer-col h2 { font-size: 13px; font-weight: 600; color: var(--text-3); letter-spacing: 0; margin-bottom: 14px; }
.footer-col ul { list-style: none; display: grid; gap: 10px; padding: 0; margin: 0; }
.footer-bottom a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.footer-bottom a:hover { color: var(--text); }
.footer-col a { font-size: 14.5px; color: var(--text-2); transition: color .15s ease; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--text-3);
}
.footer-mega {
  margin-top: 48px; user-select: none; pointer-events: none;
  display: flex; justify-content: center;
}
.footer-mega img { width: 100%; height: auto; opacity: .06; filter: var(--logo-filter); }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .footer-grid { gap: 32px 20px; }
  .footer-brand .store-row { flex-wrap: nowrap; }
  .footer-brand .store { flex: 1 1 0; justify-content: center; padding: 0 10px; min-width: 0; }
}
@media (max-width: 360px) {
  .footer-brand .store-row { flex-wrap: wrap; }
  .footer-brand .store { flex: 1 1 100%; }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
html:not(.js) .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
