/* Five Level Fit — single stylesheet. Palette from logo (docs/brand.md). */

:root {
  --l1: #0777bb; /* Level 1 Beginner — blue   */
  --l2: #1aa96b; /* Level 2 Novice   — green  */
  --l3: #f9aa1a; /* Level 3 Advanced — amber  */
  --l4: #eb4335; /* Level 4 Expert   — red    */
  --l5: #2f2f2f; /* Level 5 Pro      — black  */
  --ink: #232323;
  --muted: #5f6a72;
  --bg: #ffffff;
  --bg-soft: #f5f9fc;
  --line: #e3e9ee;
  --radius: 12px;
  --max: 1060px;
  font-size: 17px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

h1, h2, h3 { line-height: 1.2; font-weight: 800; }
h1 { font-size: 2.3rem; margin: 0 0 .5rem; }
h2 { font-size: 1.6rem; margin: 2.2rem 0 .8rem; }
h3 { font-size: 1.15rem; margin: 1.4rem 0 .4rem; }
p  { margin: .6rem 0; }
a  { color: var(--l1); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.2rem; }

/* Header / nav */
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
}
header.site .wrap {
  display: flex; align-items: center; gap: 1.2rem;
  min-height: 64px;
}
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.05rem; }
.logo img { height: 40px; width: auto; display: block; }
nav.main { margin-left: auto; display: flex; gap: 1.1rem; flex-wrap: wrap; }
nav.main a { text-decoration: none; color: var(--ink); font-weight: 600; padding: .2rem 0; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--l1); box-shadow: 0 2px 0 var(--l1); }

/* Hero (light variant, inner pages) */
.hero { background: linear-gradient(180deg, var(--bg-soft), var(--bg)); padding: 3.2rem 0 2.6rem; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 42rem; }

/* Hero "Ascent" (home) — dark stage, WebGL particle climb behind content */
.hero-wow {
  position: relative; overflow: hidden; color: #f2f6f8;
  background: radial-gradient(120% 90% at 70% 10%, #16222c 0%, #0c1116 60%, #0c1116 100%);
  height: min(88vh, 780px); min-height: 540px;
}
.hero-wow canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-wow .content {
  position: relative; z-index: 5; height: 100%;
  display: flex; flex-direction: column; justify-content: center; gap: 1.1rem;
}
.hero-mark { width: clamp(150px, 22vw, 240px); filter: drop-shadow(0 10px 34px rgba(0,0,0,.55)); }
.hero-wow h1 {
  color: #fff; font-size: clamp(2.3rem, 6vw, 4.4rem);
  letter-spacing: -.02em; line-height: 1.04; margin: 0; text-wrap: balance;
}
.hero-wow p.lead { color: #c4d2da; font-size: clamp(1rem, 1.6vw, 1.25rem); max-width: 36rem; margin: 0; }
.btn.cta-amber { background: var(--l3); color: #2f2f2f; } /* brand guide §4: dark text on amber */
.btn.ghost { background: transparent; border: 2px solid rgba(255,255,255,.45); color: #fff; }
.btn.ghost:hover { border-color: #fff; filter: none; }
@media (max-width: 820px) {
  .hero-wow { height: auto; min-height: 0; padding: 3.2rem 0; }
  .hero-wow .content { height: auto; }
}

/* Buttons */
.btn {
  display: inline-block; padding: .7rem 1.3rem; border-radius: var(--radius);
  background: var(--l1); color: #fff; text-decoration: none; font-weight: 700;
  border: 0; cursor: pointer; font-size: 1rem;
}
.btn:hover { filter: brightness(1.1); }
.btn.secondary { background: var(--bg); color: var(--l1); border: 2px solid var(--l1); }
.btn.big { font-size: 1.15rem; padding: .9rem 1.7rem; }

/* Level system */
.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; margin: 1.6rem 0; }
.level-card {
  border-radius: var(--radius); padding: 1rem .8rem; color: #fff; text-align: center;
}
.level-card .num { font-size: 1.9rem; font-weight: 800; display: block; }
.level-card .name { font-weight: 700; }
.lv1 { background: var(--l1); } .lv2 { background: var(--l2); }
.lv3 { background: var(--l3); color: #2f2f2f; } /* brand guide §4: dark text on amber */
.lv4 { background: var(--l4); }
.lv5 { background: var(--l5); }

.level-chip {
  display: inline-block; color: #fff; border-radius: 999px;
  padding: .1rem .7rem; font-weight: 700; font-size: .9rem;
}

/* Cards / grids */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.4rem 0; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem;
  background: var(--bg);
}
.card h3 { margin-top: 0; }
.card .meta { color: var(--muted); font-size: .95rem; }

/* Download tables */
table.downloads { width: 100%; border-collapse: collapse; margin: 1rem 0 2rem; }
table.downloads th, table.downloads td { padding: .55rem .6rem; text-align: left; border-bottom: 1px solid var(--line); }
table.downloads th { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* Quiz */
.quiz { max-width: 560px; }
.quiz .step { margin: 1.4rem 0; }
.quiz label { font-weight: 700; display: block; margin-bottom: .5rem; }
.quiz input[type="number"] {
  font-size: 1.3rem; padding: .55rem .8rem; width: 9rem;
  border: 2px solid var(--line); border-radius: var(--radius);
}
.choice-row { display: flex; gap: .7rem; flex-wrap: wrap; }
.choice {
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--bg);
  padding: .8rem 1.2rem; font-size: 1.05rem; font-weight: 700; cursor: pointer;
}
.choice:hover, .choice.selected { border-color: var(--l1); color: var(--l1); }
.result-card {
  border-radius: var(--radius); color: #fff; padding: 1.6rem; margin-top: 1.5rem;
}
.result-card h2 { margin: 0 0 .4rem; }
.result-card a { color: #fff; }
.result-card .btn { background: rgba(255,255,255,.18); border: 2px solid #fff; margin-top: .8rem; }
.hint { color: var(--muted); font-size: .95rem; }

/* Blog two-column (per original FLF blog concept: text left, levels right) */
.blog-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: start; }
.blog-cols aside { position: sticky; top: 84px; }
.step-level { border-left: 6px solid; border-radius: 6px; background: var(--bg-soft); padding: .7rem .9rem; margin-bottom: .7rem; }
.step-level strong { display: block; }
.footnotes { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1rem; }
.footnotes li { margin-bottom: .5rem; overflow-wrap: anywhere; }
sup a { text-decoration: none; }

/* Email signup */
.signup { background: var(--l5); color: #fff; border-radius: var(--radius); padding: 1.8rem; margin: 3rem 0 2rem; }
.signup h2 { margin: 0 0 .3rem; }
.signup p { color: #cfd4d8; margin-top: 0; }
.signup form { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.signup input[type="email"] {
  flex: 1 1 240px; padding: .7rem .9rem; border-radius: var(--radius);
  border: 0; font-size: 1rem;
}
.signup .btn { background: var(--l3); color: var(--l5); }
.signup .ok { color: var(--l2); font-weight: 700; }

/* Footer */
footer.site { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.6rem 0 2.2rem; color: var(--muted); font-size: .95rem; }
footer.site .wrap { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: space-between; }
footer.site a { color: var(--muted); }

/* Responsive */
@media (max-width: 820px) {
  .levels { grid-template-columns: repeat(5, 1fr); gap: .4rem; }
  .level-card { padding: .6rem .3rem; }
  .level-card .num { font-size: 1.3rem; }
  .level-card .name { font-size: .75rem; }
  .grid3 { grid-template-columns: 1fr; }
  .blog-cols { grid-template-columns: 1fr; }
  .blog-cols aside { position: static; }
  h1 { font-size: 1.8rem; }
}
