/* ==========================================================
   WORKOUT WIRE — main.css
   Theme: app navy/blue palette (#0B1326 bg, #ADC6FF accent)
   ========================================================== */

:root {
  --ink:    #0b1326;
  --surface:#171f33;
  --nav-dark:#131b2e;
  --accent: #adc6ff;
  --accent-bright: #4d8eff;
  --muted:  #8c909f;
  --paper:  #fff;
  --soft:   #f0f3fb;
  --line:   #e2e6f2;
  --text-dark: #dae2fd;
  --text-dim:  #c2c6d6;
  --outline:   #424754;
  --max:    1160px;
}

/* ---------- reset & base ---------- */
* { box-sizing: border-box }
html { scroll-behavior: smooth }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none }

/* ---------- layout ---------- */
.container { width: min(var(--max), calc(100% - 40px)); margin: auto }
.narrow    { max-width: 840px }
.center    { text-align: center }
.skip { position: absolute; left: -9999px }
.skip:focus { left: 10px; top: 10px; z-index: 99; background: #fff; padding: 10px }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: #adc6ff;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.nav-wrap { height: 76px; display: flex; align-items: center; justify-content: space-between; background: #adc6ff }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 950; letter-spacing: -.04em; color: #fff }
.brand-icon { width: 44px; height: 44px; object-fit: contain; flex: 0 0 44px }
.brand span { color: #fff; padding: 3px 0; border-radius: 3px }
.nav { display: flex; gap: 30px; font-size: 14px; font-weight: 700 }
.nav a:hover { color: var(--accent-bright) }
.nav-toggle { display: none; border: 0; background: none; font-size: 24px }

/* ---------- hero ---------- */
.hero {
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  padding: 88px 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: center;
  gap: 80px;
}
.eyebrow {
  display: inline-block;
  color: #7a92b8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  margin-bottom: 10px;
}
.hero .eyebrow, .dark .eyebrow, .cta .eyebrow { color: var(--accent) }
h1, h2, h3, p { margin-top: 0 }
h1 {
  font-size: clamp(48px, 7vw, 88px);
  line-height: .93;
  letter-spacing: -.065em;
  margin-bottom: 26px;
}
.hero h1 span { color: var(--accent) }
.hero h2 { font-size: clamp(20px, 2.3vw, 30px); max-width: 650px; line-height: 1.15 }
.lead { font-size: 18px; color: var(--text-dim); max-width: 660px }
.app-icon { display: block; width: 76px; height: 76px; margin-bottom: 20px; border-radius: 18px; object-fit: cover }

/* ---------- store buttons ---------- */
.store-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px }
.store-btn {
  min-width: 160px;
  border: 1px solid var(--outline);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px 18px;
  color: #fff;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  line-height: 1.1;
  transition: border-color .2s, background .2s;
}
.store-btn:hover { border-color: var(--accent); background: #1e2a44 }
.store-btn .store-icon { width: 28px; height: 28px; flex: 0 0 28px }
.store-btn .store-copy { display: flex; flex-direction: column }
.store-btn small  { font-size: 9px; color: var(--text-dim) }
.store-btn strong { font-size: 18px }

/* ---------- phone frame (real screenshot wrapper) ---------- */
.phone-wrap { width: 280px; margin: auto }
.phone-frame {
  border: 9px solid #1e2640;
  border-radius: 44px;
  box-shadow:
    0 40px 100px rgba(0,0,0,.6),
    0 0 0 1px rgba(173,198,255,.12),
    inset 0 0 0 1px rgba(255,255,255,.05);
  overflow: hidden;
  background: var(--ink);
}
.phone-frame img { display: block; width: 100%; height: auto }

/* ---------- stats ---------- */
.stats { border-bottom: 1px solid var(--line) }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); padding: 30px 0 }
.stats-grid div { text-align: center; border-right: 1px solid var(--line) }
.stats-grid div:last-child { border: 0 }
.stats-grid b { display: block; font-size: 28px; color: var(--accent-bright) }
.stats-grid span { font-size: 12px; color: var(--muted) }

/* ---------- sections ---------- */
.section { padding: 100px 0 }
.section h2, .cta h2 { font-size: clamp(36px,4.7vw,60px); line-height: 1; letter-spacing: -.05em; margin-bottom: 24px }
.section p { color: var(--muted) }
.cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 45px }
.cards article, .post-card { border: 1px solid var(--line); padding: 30px; background: #fff }
.cards .icon {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--accent); color: var(--ink);
  display: grid; place-items: center;
  font-weight: 900; margin-bottom: 42px;
}
.cards h3 { font-size: 20px }

/* ---------- instructor directory ---------- */
.instructor-section { background: var(--soft) }
.instructor-section-head { align-items: end }
.instructor-section-head > div { max-width: 680px }
.instructor-section-head h2 { margin-bottom: 14px }
.instructor-section-head p { max-width: 610px; margin-bottom: 0 }
.ranking-note { color: var(--accent-bright); font-size: 12px; font-weight: 900; white-space: nowrap; padding-bottom: 7px }
.instructor-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 18px; margin-top: 42px }
.instructor-card { display: flex; flex-direction: column; min-height: 420px; padding: 28px; background: var(--paper); border: 1px solid var(--line); transition: transform .2s, border-color .2s, box-shadow .2s }
.instructor-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 18px 42px rgba(11,19,38,.1) }
.instructor-card-featured { background: var(--ink); color: #fff; border-color: var(--ink) }
.instructor-card-top { display: flex; align-items: start; justify-content: space-between; margin-bottom: 30px }
.instructor-avatar { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; color: var(--ink); font-size: 15px; font-weight: 950; letter-spacing: .04em }
.avatar-apex { background: var(--accent) }
.avatar-zen { background: #cce8df }
.avatar-north { background: #ffd7a8 }
.instructor-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit }
.avatar-0 { background: var(--accent) }
.avatar-1 { background: #cce8df }
.avatar-2 { background: #ffd7a8 }
.instructor-rank { color: var(--accent-bright); font-size: 12px; font-weight: 950; letter-spacing: .12em }
.instructor-card-copy { display: flex; flex-direction: column; flex: 1 }
.instructor-label { color: var(--accent-bright); font-size: 10px; font-weight: 950; letter-spacing: .13em; text-transform: uppercase }
.instructor-card h3 { margin: 10px 0 8px; font-size: 25px; line-height: 1.08 }
.instructor-card p { color: #697184; font-size: 14px }
.instructor-card-featured p { color: var(--text-dim) }
.instructor-members { margin-bottom: 18px }
.instructor-members strong { color: var(--accent-bright); font-size: 22px; margin-right: 4px }
.instructor-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: auto 0 20px }
.instructor-tags span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); font-size: 10px; font-weight: 800 }
.instructor-card-featured .instructor-tags span { border-color: rgba(173,198,255,.3); color: var(--text-dark) }
.instructor-qualifications { border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 0 }
.instructor-card-featured .instructor-qualifications { border-color: rgba(255,255,255,.14) }
.instructor-qualifications b { display: block; color: var(--ink); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 5px }
.instructor-card-featured .instructor-qualifications b { color: var(--accent) }
.instructor-disclaimer { margin: 20px 0 0; color: var(--muted); font-size: 11px; text-align: right }

/* ---------- dark section ---------- */
.dark { background: var(--ink); color: #fff }
.dark p { color: var(--text-dim) }

/* ---------- split layout ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center }

/* ---------- tick lists ---------- */
.ticks { list-style: none; padding: 0 }
.ticks li { border-bottom: 1px solid rgba(150,160,180,.18); padding: 12px 0 }
.ticks li:before { content: "✓"; color: var(--accent-bright); font-weight: 900; margin-right: 12px }
.dark .ticks li:before { color: var(--accent) }

/* ---------- screenshot gallery section ---------- */
.screens {
  background: var(--ink);
  padding: 100px 0;
  overflow: hidden;
}
.screens h2 { color: var(--text-dark) }
.screens p  { color: var(--text-dim) }
.screens-grid {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 50px;
}
.screens-grid .phone-wrap { width: 200px }

/* ---------- blog ---------- */
.soft { background: var(--soft) }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 34px }
.section-head h2 { margin-bottom: 0 }
.text-link, .post-card b { font-weight: 800; color: var(--accent-bright) }
.blog-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px }
.post-card span { font-size: 10px; letter-spacing: .14em; color: var(--accent-bright); font-weight: 900 }
.post-card h3 { font-size: 25px; line-height: 1.12; margin: 18px 0 }
.post-card:hover { transform: translateY(-4px); transition: .2s }
.post-card img { display: block; width: calc(100% + 60px); height: 200px; object-fit: cover; margin: -30px -30px 24px }

/* ---------- testimonials ---------- */
.quotes { display: grid; gap: 12px }
.quotes blockquote { margin: 0; border: 1px solid var(--line); padding: 28px; font-size: 19px }
.quotes footer { margin-top: 15px; color: var(--accent-bright); font-size: 12px; font-weight: 900 }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0 }
.faq summary { cursor: pointer; font-size: 18px; font-weight: 800 }
.faq details p { padding-top: 12px }

/* ---------- CTA ---------- */
.cta { background: var(--ink); color: #fff; padding: 90px 0 }
.cta p { font-size: 18px; color: var(--text-dim) }
.cta .store-btn { text-align: left }
.center-row { justify-content: center }

/* ---------- footer ---------- */
.footer { background: #060c1c; color: #fff; padding: 70px 0 24px }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px }
.footer p { color: var(--text-dim); max-width: 400px }
.footer h3 { font-size: 12px; color: #7a8499; text-transform: uppercase; letter-spacing: .1em }
.footer a:not(.brand) { display: block; color: var(--text-dim); margin: 7px 0 }
.footer .brand span { background: var(--accent); color: var(--ink) }
.brand.light span  { background: var(--accent); color: var(--ink) }
.copyright { border-top: 1px solid #1e2640; margin-top: 45px; padding-top: 20px; font-size: 11px; color: #4a5470 }

/* ---------- article / blog post ---------- */
.article { padding: 75px 0 110px }
.article .meta { color: var(--accent-bright); font-weight: 800; font-size: 12px; letter-spacing: .12em }
.article h1 { font-size: clamp(40px,6vw,72px); line-height: 1; margin: 18px 0 30px }
.article h2 { font-size: 30px; margin-top: 45px }
.article h3 { font-size: 21px; margin-top: 30px }
.article p, .article li { font-size: 17px; color: #48514b }
.article li { margin-bottom: 8px }
.article-img { width: 100%; height: 400px; object-fit: cover; border-radius: 12px; margin: 28px 0 36px; display: block }
.article-cta { border-left: 5px solid var(--accent); background: var(--soft); padding: 25px; margin-top: 50px }

/* ---------- blog listing ---------- */
.listing-hero { padding: 80px 0 40px; background: var(--ink); color: #fff }
.listing { padding: 60px 0 100px }
.listing .blog-grid { grid-template-columns: repeat(2,1fr) }

/* ---------- policy ---------- */
.policy { padding: 70px 0 }
.policy h1 { font-size: 52px }
.policy h2 { margin-top: 40px }
.policy p, .policy li { color: #48514b }

/* ---------- invitation fallback ---------- */
.invite-page { background: var(--ink); min-height: calc(100vh - 76px); color: #fff }
.invite-hero { padding: 80px 0 }
.invite-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 70px;
  align-items: center;
}
.invite-copy h1 {
  font-size: clamp(44px, 6vw, 76px);
  line-height: .96;
  max-width: 760px;
}
.invite-code-panel {
  display: grid;
  gap: 10px;
  width: min(100%, 430px);
  margin: 30px 0;
  padding: 24px;
  border: 1px solid rgba(173,198,255,.32);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
}
.invite-code-panel span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.invite-code-panel strong {
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(28px, 6vw, 44px);
  letter-spacing: .08em;
  overflow-wrap: anywhere;
}
.copy-code, .primary-btn {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: var(--ink);
  padding: 12px 18px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.primary-btn { margin-bottom: 18px }
.copy-code:hover, .primary-btn:hover { background: #d5e2ff }
.invite-message {
  width: min(100%, 520px);
  margin: 28px 0;
  padding: 18px;
  border-left: 4px solid #ffcc66;
  background: rgba(255,255,255,.08);
  color: var(--text-dark);
}
.invite-actions .store-row { margin-top: 0 }
.invite-phone { width: 260px }
.invite-code-panel[hidden], .invite-message[hidden], .primary-btn[hidden] { display: none }

/* ---------- responsive ---------- */
@media (max-width: 800px) {
  .nav-toggle { display: block }
  .nav {
    display: none; position: absolute;
    top: 76px; left: 0; right: 0;
    background: #fff; padding: 20px;
    flex-direction: column;
    border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex }
  .hero { padding: 55px 0 }
  .hero-grid, .split { grid-template-columns: 1fr; gap: 50px }
  .phone-wrap { width: 240px }
  .stats-grid { grid-template-columns: 1fr 1fr }
  .stats-grid div:nth-child(2) { border-right: 0 }
  .stats-grid div { padding: 10px }
  .cards, .blog-grid, .listing .blog-grid { grid-template-columns: 1fr }
  .instructor-grid { grid-template-columns: 1fr }
  .instructor-card { min-height: 0 }
  .ranking-note, .instructor-disclaimer { white-space: normal; text-align: left }
  .section { padding: 70px 0 }
  .reverse > div:first-child { order: 2 }
  .footer-grid { grid-template-columns: 1fr }
  .section-head { align-items: start; gap: 20px; flex-direction: column }
  .screens-grid .phone-wrap { width: 155px }
  .policy h1 { font-size: 40px }
  .invite-hero { padding: 55px 0 }
  .invite-grid { grid-template-columns: 1fr; gap: 45px }
  .invite-phone { width: 220px }
}
