/* ============================================================
   MILITARY CALISTHENICS — field-manual design system
   bg #0B0B0B · surface #161616 · olive #8FA05A · gold #C9A227
   ============================================================ */

:root {
  --bg: #0b0b0b;
  --bg-2: #101008;
  --surface: #161616;
  --surface-2: #1d1d16;
  --line: #2a2a20;
  --olive: #8fa05a;
  --olive-deep: #5c6b38;
  --gold: #c9a227;
  --gold-bright: #e6c14a;
  --text: #e8e6dd;
  --muted: #a3a396;
  --dim: #6f6f63;
  --display: "Bebas Neue", "Oswald", sans-serif;
  --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* grain + camo atmosphere */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(143, 160, 90, 0.07), transparent 60%),
    radial-gradient(ellipse 50% 35% at 90% 90%, rgba(201, 162, 39, 0.045), transparent 60%);
}

main, header, footer { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--olive); text-decoration: none; }
a:hover { color: var(--gold-bright); }

::selection { background: var(--olive); color: #0b0b0b; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- type ---------- */
h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.02;
  color: var(--text);
}

h1 { font-size: clamp(3rem, 8vw, 6.2rem); }
h2 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); margin-bottom: 0.5em; }
h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: 0.06em; }

.kicker {
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.kicker::before {
  content: "";
  width: 34px; height: 2px;
  background: var(--gold);
  flex: none;
}

.lede { font-size: 1.16rem; color: var(--muted); max-width: 60ch; }

/* ---------- stencil brackets ---------- */
.brackets { position: relative; }
.brackets::before, .brackets::after {
  content: "";
  position: absolute;
  width: 26px; height: 26px;
  border: 2px solid var(--olive);
  opacity: 0.75;
}
.brackets::before { top: -14px; left: -14px; border-right: 0; border-bottom: 0; }
.brackets::after { bottom: -14px; right: -14px; border-left: 0; border-top: 0; }

/* ---------- hazard stripe divider ---------- */
.stripes {
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    var(--gold) 0 14px,
    transparent 14px 28px
  );
  opacity: 0.5;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 11, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.logo:hover { color: var(--text); }
.logo .tag { color: var(--olive); }
.logo img { width: 30px; height: 30px; border-radius: 7px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav a:hover { color: var(--gold-bright); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 13px 26px;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  white-space: nowrap;
}
.btn-gold {
  background: var(--gold);
  color: #0b0b0b;
}
.btn-gold:hover { background: var(--gold-bright); color: #0b0b0b; transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--olive);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--gold); color: var(--gold-bright); }
.btn-sm { padding: 9px 18px; font-size: 0.76rem; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); font-size: 1.2rem; padding: 6px 12px; cursor: pointer; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  filter: brightness(0.68) saturate(0.92);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11,11,11,0.95) 0%, rgba(11,11,11,0.74) 42%, rgba(11,11,11,0.12) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 30%);
}
.hero-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 110px 24px 90px;
  width: 100%;
}
.hero h1 { max-width: 12ch; margin-bottom: 22px; }
.hero h1 em {
  font-style: normal;
  color: var(--olive);
  display: block;
}
.hero .lede { margin-bottom: 36px; }

.hero-ctas { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

.hero-meta {
  margin-top: 46px;
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.hero-meta div { border-left: 2px solid var(--olive-deep); padding-left: 14px; }
.hero-meta strong {
  font-family: var(--display);
  font-size: 1.7rem;
  letter-spacing: 0.05em;
  color: var(--gold);
  display: block;
}
.hero-meta span { font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

/* App Store badge */
.appstore-badge { display: inline-flex; transition: transform 0.15s ease, opacity 0.15s ease; }
.appstore-badge:hover { transform: translateY(-2px); opacity: 0.92; }
.appstore-badge svg { height: 56px; width: auto; display: block; }

/* ---------- sections ---------- */
section { padding: 96px 0; }
section.tight { padding: 64px 0; }
.section-head { max-width: 720px; margin-bottom: 56px; }

/* ---------- screenshot strip ---------- */
.screens {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  align-items: start;
}
.screens figure {
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.screens figure:nth-child(even) { transform: translateY(26px); }
.screens figure:hover { transform: translateY(-6px); border-color: var(--olive-deep); }
.screens figure:nth-child(even):hover { transform: translateY(20px); }

/* ---------- feature grid ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.feature {
  background: var(--surface);
  padding: 38px 32px;
  position: relative;
  transition: background 0.2s ease;
}
.feature:hover { background: var(--surface-2); }
.feature .num {
  position: absolute;
  top: 20px; right: 24px;
  font-family: var(--display);
  font-size: 1rem;
  color: var(--dim);
  letter-spacing: 0.1em;
}
.feature svg { width: 40px; height: 40px; stroke: var(--olive); margin-bottom: 20px; }
.feature h3 { margin-bottom: 10px; }
.feature p { color: var(--muted); font-size: 0.98rem; }

/* ---------- program cards ---------- */
.programs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.program {
  position: relative;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.program:hover { transform: translateY(-5px); border-color: var(--olive-deep); }
.program img { aspect-ratio: 16/10; object-fit: cover; filter: saturate(0.85) brightness(0.85); }
.program-body { padding: 24px; }
.program-body h3 { margin-bottom: 8px; }
.program-body p { color: var(--muted); font-size: 0.95rem; margin-bottom: 16px; }
.chip {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.45);
  padding: 5px 12px;
  margin-bottom: 14px;
}
.arrow-link {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.arrow-link::after { content: " →"; }

/* ---------- checklist ---------- */
.check-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.check-list { list-style: none; display: grid; gap: 18px; }
.check-list li { display: flex; gap: 16px; align-items: flex-start; color: var(--muted); }
.check-list li strong { color: var(--text); display: block; font-weight: 600; }
.check-list .tick {
  flex: none;
  width: 26px; height: 26px;
  margin-top: 3px;
  display: grid;
  place-items: center;
  background: rgba(143, 160, 90, 0.14);
  border: 1px solid var(--olive-deep);
  color: var(--olive);
  font-weight: 700;
  font-size: 0.85rem;
}
.framed-img {
  border: 1px solid var(--line);
  outline: 1px solid var(--line);
  outline-offset: 10px;
  filter: saturate(0.9);
}

/* ---------- CTA band ---------- */
.cta-band {
  margin: 56px 0;
  padding: 40px 42px;
  background:
    linear-gradient(120deg, rgba(143, 160, 90, 0.12), rgba(201, 162, 39, 0.06)),
    var(--surface);
  border: 1px solid var(--olive-deep);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
}
.cta-band::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: repeating-linear-gradient(-45deg, var(--gold) 0 10px, transparent 10px 20px);
  opacity: 0.6;
}
.cta-band h3 { font-size: 1.7rem; margin-bottom: 6px; }
.cta-band p { color: var(--muted); font-size: 0.98rem; max-width: 48ch; }

/* ---------- big CTA ---------- */
.final-cta {
  position: relative;
  text-align: center;
  padding: 130px 24px;
  overflow: hidden;
  border-top: 1px solid var(--line);
}
.final-cta .hero-bg { background-position: center 30%; }
.final-cta h2 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin-bottom: 18px; }
.final-cta .lede { margin: 0 auto 40px; }
.final-cta .hero-inner { padding: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details {
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 12px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.02rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--gold);
  flex: none;
}
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { color: var(--gold-bright); }
.faq .faq-a { padding: 0 24px 22px; color: var(--muted); }
.faq .faq-a a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 40px;
  background: var(--bg-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-grid p { color: var(--muted); font-size: 0.92rem; max-width: 38ch; margin-top: 14px; }
.footer-grid h4 {
  font-family: var(--body);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 18px;
}
.footer-grid ul { list-style: none; display: grid; gap: 10px; }
.footer-grid ul a { color: var(--muted); font-size: 0.95rem; }
.footer-grid ul a:hover { color: var(--gold-bright); }
.footer-base {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--dim);
  font-size: 0.84rem;
}

/* ---------- article / guide pages ---------- */
.article-hero {
  padding: 90px 0 56px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 90% at 80% 0%, rgba(143, 160, 90, 0.09), transparent 65%),
    var(--bg);
}
.article-hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); max-width: 18ch; margin-bottom: 20px; }
.breadcrumb {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 28px;
}
.breadcrumb a { color: var(--dim); }
.breadcrumb a:hover { color: var(--gold-bright); }
.breadcrumb span { color: var(--olive); }

.article-meta { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 26px; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.article-meta b { color: var(--olive); font-weight: 700; }

.article {
  max-width: 780px;
  padding: 64px 0 40px;
}
.article > p, .article > ul, .article > ol { margin-bottom: 24px; color: #cfcdc2; }
.article > ul, .article > ol { padding-left: 24px; }
.article li { margin-bottom: 8px; }
.article li::marker { color: var(--gold); }
.article h2 { margin: 64px 0 20px; scroll-margin-top: 90px; }
.article h3 { margin: 40px 0 14px; color: var(--olive); scroll-margin-top: 90px; }
.article strong { color: var(--text); }
.article a { text-decoration: underline; text-underline-offset: 3px; }
.article img { border: 1px solid var(--line); margin: 8px 0 24px; }

.toc {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 26px 30px;
  margin-bottom: 40px;
}
.toc h2 { font-size: 1.1rem; margin: 0 0 14px; letter-spacing: 0.16em; }
.toc ol { list-style: none; padding: 0; display: grid; gap: 8px; counter-reset: toc; }
.toc ol li { counter-increment: toc; margin: 0; }
.toc ol li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--display);
  color: var(--gold);
  margin-right: 12px;
}
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--gold-bright); }

.field-note {
  border-left: 3px solid var(--gold);
  background: rgba(201, 162, 39, 0.06);
  padding: 20px 26px;
  margin: 32px 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.field-note b {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

/* workout tables */
.wtable { width: 100%; border-collapse: collapse; margin: 24px 0 36px; font-size: 0.95rem; }
.wtable caption {
  text-align: left;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive);
  padding-bottom: 12px;
}
.wtable th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: 2px solid var(--olive-deep);
  padding: 10px 14px;
}
.wtable td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: #cfcdc2; }
.wtable tr:hover td { background: rgba(143, 160, 90, 0.05); }
.wtable td:first-child { font-weight: 600; color: var(--text); }
.table-scroll { overflow-x: auto; }

/* related guides */
.related { padding: 72px 0; border-top: 1px solid var(--line); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 26px;
  display: block;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.related-card:hover { border-color: var(--olive-deep); transform: translateY(-4px); }
.related-card .chip { margin-bottom: 12px; }
.related-card h3 { font-size: 1.25rem; margin-bottom: 8px; color: var(--text); }
.related-card p { color: var(--muted); font-size: 0.9rem; }

/* reveal animation — hidden state only applies once JS confirms it can reveal */
html.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .screens { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: 1fr 1fr; }
  .programs { grid-template-columns: 1fr 1fr; }
  .check-cols { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  section { padding: 64px 0; }
  .nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(11,11,11,0.98);
    border-bottom: 1px solid var(--line);
    padding: 20px 24px 28px;
    gap: 18px;
  }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .logo { font-size: 1.1rem; gap: 8px; }
  .logo img { width: 24px; height: 24px; }
  .btn-sm { padding: 8px 12px; font-size: 0.68rem; letter-spacing: 0.1em; }
}
@media (max-width: 460px) {
  .logo .tag { display: none; }
  .hero { min-height: 0; }
  .hero-inner { padding: 80px 24px 70px; }
  .screens { grid-template-columns: 1fr 1fr; }
  .screens figure:nth-child(n+5) { display: none; }
  .features { grid-template-columns: 1fr; }
  .programs { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .cta-band { padding: 30px 26px; }
}
