/* OPT — Optimal Performance Training — Mesa, AZ
   ----------------------------------------------
   Clean, warm, fitness-confident static-site stylesheet.
   No frameworks. Mobile-first. CSS variables drive the palette
   so a brand refresh = one block of edits.
*/

:root {
  /* Palette pulled from the OPT Bird Tribe shirt — a sun-bleached
     desert-day version of the split-complementary : warm cream
     anchor, dark warm text, with the same coral + yellow + sky-blue
     + magenta triad as accents. The shirt's body is sky-blue ; its
     circle is dark ; its textile pulls hot accents. We invert into
     a light register that reads in daylight.

     Color-science layout (60-30-10) :
       60%  warm cream anchor (bg, bg-alt, bg-card, bg-deep)
       30%  warm dark text (ink) + warm grey (muted)
       10%  triadic accents :
              coral       (primary CTA, links)
              yellow      (secondary accent)
              sky-blue    (deeper variant for legibility on cream)
              magenta     (sparingly)

     Dark-on-bg contrast ≈ 14:1 ; coral-on-bg ≈ 4.6:1 — WCAG AA.
     For coral buttons we keep dark text on coral (≈ 5.5:1 contrast). */

  --bg:           #faf6ee;   /* warm cream, page background */
  --bg-alt:       #f1ede4;   /* deeper cream for section variation */
  --bg-card:      #ffffff;   /* white cards, lifted from cream */
  --bg-deep:      #ede5d3;   /* footer, deepest cream */
  --ink:          #1a1614;   /* warm dark text */
  --muted:        #6b5f54;   /* warm grey for secondary text */
  --rule:         #d4cdb8;   /* soft warm divider */
  --rule-2:       #b8ad97;   /* stronger divider for inputs */
  --accent:        #ed4924;  /* coral — primary brand CTA */
  --accent-2:      #c83a18;  /* hover — deeper coral */
  --accent-yellow: #f5c518;  /* sunshine yellow */
  --accent-sky:    #5a8cbe;  /* deeper sky-blue */
  --accent-turquoise: #2bb4cc; /* turquoise */
  --accent-magenta:#c93876;  /* deeper magenta */
  --accent-green:  #6b9d6e;  /* sage */

  /* Gradient signatures — pulled from the shirt's sun + textile.
     Used on hero bg, CTA buttons, hero text fill, footer stripe. */
  --grad-sunrise: linear-gradient(135deg, #fbd72f 0%, #ed4924 55%, #c93876 100%);
  --grad-day:     linear-gradient(135deg, #fcf3d3 0%, #fde2da 55%, #e0eef3 100%);
  --grad-cool:    linear-gradient(135deg, #2bb4cc 0%, #5a8cbe 100%);
  --grad-rainbow: linear-gradient(90deg,
                    #ed4924 0%, #fbd72f 25%, #2bb4cc 50%,
                    #5a8cbe 75%, #c93876 100%);
  --grad-button:  linear-gradient(135deg, #ed4924 0%, #c93876 100%);
  --grad-button-hover: linear-gradient(135deg, #ff5a30 0%, #d83f80 100%);
  --max:           72rem;
  --sans:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --serif:         Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 200ms ease; }
a:hover { color: var(--accent-2); }

/* ── Layout ──────────────────────────────────────────────── */

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

section { padding: 4rem 0; }
section.alt { background: var(--bg-alt); }

/* Tinted section backgrounds — keep alpha low so text stays
   readable. The triadic palette gives each section a different
   sun-bleached pulse without losing rhythm. */
section.bg-sky      { background: #e0eef3; }   /* soft sky tint */
section.bg-yellow   { background: #fcf3d3; }   /* soft sun tint */
section.bg-coral    { background: #fde2da; }   /* soft coral wash */
section.bg-deep     { background: var(--bg-deep); }
section.bg-cool     { background: var(--grad-cool); color: #fff; }
section.bg-cool h2,
section.bg-cool .lead,
section.bg-cool p { color: #fff; }
section.bg-cool h2::after { background: var(--accent-yellow); }
section.bg-sunrise  { background: var(--grad-sunrise); color: #fff; }
section.bg-sunrise h2,
section.bg-sunrise .lead,
section.bg-sunrise p { color: #fff; }
section.bg-sunrise h2::after { background: #fff; }

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}
h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; margin-top: 0; }
h3 { font-size: 1.25rem; }
@media (min-width: 768px) {
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.5rem; }
}

/* H2 accent underline — every section heading gets a sunrise
   gradient signature. Auto-centered for .text-center contexts. */
section h2 { position: relative; padding-bottom: 0.4rem; }
section h2::after {
  content: ""; display: block;
  width: 3rem; height: 4px;
  background: var(--grad-button); border-radius: 2px;
  margin-top: 0.7rem;
}
section h2.text-center::after,
.text-center > h2::after { margin-left: auto; margin-right: auto; }

p { margin: 0 0 1rem; max-width: 40rem; }
p.lead { font-size: 1.2rem; color: var(--muted); }

ul.clean { list-style: none; padding: 0; margin: 0; }
ul.checks { list-style: none; padding: 0; margin: 0 0 1.5rem; }
ul.checks li { padding-left: 1.75rem; position: relative; margin-bottom: 0.5rem; }
ul.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 700;
}

/* ── Header / nav ─────────────────────────────────────────── */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 100;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; padding-bottom: 1rem;
}
.site-header .brand {
  font-weight: 800; font-size: 1.5rem; letter-spacing: 0.08em;
  color: var(--ink); text-decoration: none;
}
.site-header .brand-sub {
  font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); display: block; margin-top: 2px;
}
.site-header nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; align-items: center; gap: 2rem;
}
.site-header nav a {
  color: var(--ink); font-weight: 500; font-size: 0.95rem;
  border-bottom: 2px solid transparent; padding: 0.25rem 0;
  transition: border-color 150ms ease;
}
.site-header nav a:hover,
.site-header nav a.active { border-bottom-color: var(--accent); color: var(--ink); }

.site-header nav .menu-cta {
  background: var(--accent); color: var(--ink) !important;
  padding: 0.6rem 1.2rem; border-radius: 4px;
  border-bottom: none !important; font-weight: 700;
}
.site-header nav .menu-cta:hover { background: var(--accent-2); color: var(--ink) !important; }

/* Dropdown — selectors written with extra specificity so the inner
   <ul.dropdown-menu> overrides the outer "nav ul { display: flex }"
   rule and stays hidden until :hover / :focus-within. */
.dropdown { position: relative; }
.dropdown > a::after { content: " ▾"; font-size: 0.7em; opacity: 0.6; }

.site-header nav ul.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0;
  flex-direction: column; align-items: stretch; gap: 0;
  background: var(--bg); border: 1px solid var(--rule); border-top: 2px solid var(--accent);
  min-width: 14rem; padding: 0.5rem 0; box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.site-header nav .dropdown:hover ul.dropdown-menu,
.site-header nav .dropdown:focus-within ul.dropdown-menu { display: flex; }

.site-header nav ul.dropdown-menu li { display: block; }
.site-header nav ul.dropdown-menu a {
  display: block; padding: 0.5rem 1rem; border-bottom: none !important;
  font-size: 0.9rem;
}
.site-header nav ul.dropdown-menu a:hover { background: var(--bg-alt); }

/* Hamburger : the checkbox is purely a state holder ; it's never
   shown. The label IS the visible icon, hidden on desktop and
   revealed on mobile via the media query below. CSS-only — no JS. */
.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; }

/* Mobile : nav collapses behind the hamburger. */
@media (max-width: 900px) {
  .site-header .container {
    flex-direction: column; align-items: flex-start;
    padding-top: 1rem; padding-bottom: 1rem;
    position: relative;
  }

  /* Hamburger icon — top-right of the header. Toggles ✕ when open. */
  .nav-toggle-label {
    display: block;
    position: absolute; right: 1.5rem; top: 1.1rem;
    z-index: 110;
    font-size: 1.6rem; line-height: 1;
    padding: 0.4rem 0.6rem;
    color: var(--ink);
    user-select: none;
  }
  .nav-toggle-label::before { content: "☰"; }
  .nav-toggle:checked ~ .nav-toggle-label::before { content: "✕"; }

  /* Nav collapsed by default ; shown when toggle is checked.
     Open nav is height-capped to the viewport minus the brand bar
     and scrolls internally — so the last items (Stories, Free Trial)
     are reachable on phones where the menu is taller than the screen. */
  .site-header nav { width: 100%; margin-top: 1rem; display: none; }
  .nav-toggle:checked ~ nav {
    display: block;
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-header nav ul {
    flex-direction: column; align-items: stretch; gap: 0.5rem;
    width: 100%;
  }
  .site-header nav a { padding: 0.5rem 0; }

  /* Dropdowns inline on mobile (no hover available). */
  .site-header nav ul.dropdown-menu {
    position: static; display: flex; border: 0; padding-left: 1rem;
    box-shadow: none; min-width: 0; background: transparent;
    border-top: 0;
  }
  .site-header nav ul.dropdown-menu a { padding: 0.4rem 0; font-size: 0.85rem; }
  .dropdown > a::after { display: none; }
  .site-header nav .menu-cta { text-align: center; margin-top: 0.5rem; }
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  padding: 5rem 0 4rem; text-align: center;
  background: var(--grad-day);
  position: relative; overflow: hidden;
}
.hero::before {
  /* Soft sun-glow blob behind the H1 — pulled from the shirt's
     yellow sun rising over the eagles. Subtle, decorative, no
     content. Positioned via position: absolute on the hero. */
  content: ""; position: absolute;
  width: 32rem; height: 32rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 215, 47, 0.35) 0%,
                                       rgba(251, 215, 47, 0) 65%);
  top: -10rem; left: 50%; transform: translateX(-50%);
  pointer-events: none;
}
.hero > .container { position: relative; }
.hero h1 {
  max-width: 30ch; margin-left: auto; margin-right: auto;
  background: var(--grad-sunrise);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { margin-left: auto; margin-right: auto; }
.hero p.lead { max-width: 36rem; }

/* Trainer-page hero keeps a left-aligned layout ; gradient bg
   still applies, but the H1 stays solid (the trainer's name reads
   better as a single weight than as a gradient fill). */
.trainer-hero h1 { background: none; color: var(--ink); }

/* ── Buttons ─────────────────────────────────────────────── */

.btn, button.btn {
  display: inline-block; padding: 0.95rem 1.8rem;
  font-family: inherit; font-size: 1.05rem; font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 4px; border: 0; cursor: pointer;
  text-decoration: none; transition: all 150ms ease;
  margin: 0.5rem 0.25rem;
}
/* Primary CTA : coral → magenta gradient with white text. Punchy
   on the cream bg, strong WCAG contrast, sun-warmed glow on hover. */
.btn-primary {
  background: var(--grad-button); color: #fff !important;
  box-shadow: 0 3px 14px rgba(237, 73, 36, 0.32);
}
.btn-primary:hover {
  background: var(--grad-button-hover); color: #fff !important;
  box-shadow: 0 8px 26px rgba(237, 73, 36, 0.5);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent; color: var(--ink);
  border: 2px solid var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--bg) !important; }

/* ── Cards / grids ────────────────────────────────────────── */

.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card); border: 1px solid var(--rule);
  padding: 1.75rem; border-radius: 6px;
  position: relative; overflow: hidden;
  transition: border-color 150ms ease, transform 150ms ease,
              background 150ms ease, box-shadow 200ms ease;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 4px; background: var(--accent);
  transform: scaleX(1); transform-origin: left;
  transition: height 220ms ease;
}
.card:hover {
  border-color: var(--accent); transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}
.card:hover::before { height: 6px; }

/* Color-modifier classes for the card top stripe — drop one of
   these on the .card to give it its own color identity. */
.card.stripe-coral::before     { background: var(--accent); }
.card.stripe-yellow::before    { background: var(--accent-yellow); }
.card.stripe-sky::before       { background: var(--accent-sky); }
.card.stripe-turquoise::before { background: var(--accent-turquoise); }
.card.stripe-magenta::before   { background: var(--accent-magenta); }
.card.stripe-green::before     { background: var(--accent-green); }
.card.stripe-rainbow::before   { background: var(--grad-rainbow); }
.card h3 { margin-top: 0; }

/* Card icons : emoji shown plain, no badge. Color modifiers still
   apply to glyph-based (non-emoji) icons via the foreground color ;
   emoji ignore CSS color and render in their own native palette. */
.card .icon {
  display: block; font-size: 2.25rem; margin-bottom: 0.75rem;
  color: var(--accent); line-height: 1;
}
.card .icon.icon-coral     { color: var(--accent); }
.card .icon.icon-yellow    { color: #b88f00; }
.card .icon.icon-sky       { color: var(--accent-sky); }
.card .icon.icon-turquoise { color: var(--accent-turquoise); }
.card .icon.icon-magenta   { color: var(--accent-magenta); }
.card .icon.icon-green     { color: var(--accent-green); }
.card .photo {
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--bg-deep); margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--muted); border: 2px solid var(--rule-2);
  overflow: hidden;
}
.card .photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Trainer-page hero — side-by-side photo + intro */
.trainer-hero {
  display: grid; grid-template-columns: 360px 1fr;
  gap: 3rem; align-items: center;
  max-width: 56rem; margin: 0 auto;
}
.trainer-hero .trainer-photo img {
  width: 100%; height: auto; border-radius: 8px; display: block;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
.trainer-hero h1 { margin-bottom: 0.5rem; }
.trainer-hero .role-line {
  font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.25rem;
}
@media (max-width: 768px) {
  .trainer-hero { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .trainer-hero .trainer-photo { max-width: 280px; margin: 0 auto; }
}
.card.trainer { text-align: center; }
.card.trainer h3 { margin-bottom: 0.25rem; }
.card.trainer .role {
  font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem; font-weight: 600;
}

/* Trainer-page hero role-line in coral — gives the bio entry a
   warm brand pulse. */
.trainer-hero .role-line { color: var(--accent); font-weight: 700; }

/* ── Forms ────────────────────────────────────────────────── */

.form { max-width: 36rem; margin: 0 auto; }
.form label { display: block; font-weight: 500; margin: 1rem 0 0.4rem; }
.form input, .form textarea, .form select {
  width: 100%; padding: 0.7rem 0.85rem;
  border: 1px solid var(--rule-2); border-radius: 4px;
  font-family: inherit; font-size: 1rem;
  background: var(--bg-card); color: var(--ink);
}
.form input::placeholder, .form textarea::placeholder { color: var(--muted); }
.form input:focus, .form textarea:focus, .form select:focus {
  outline: 0; border-color: var(--accent); background: var(--bg-deep);
}
.form textarea { min-height: 6rem; resize: vertical; }
.form .radio-group { margin: 0.4rem 0 1rem; }
.form .radio-card {
  display: block; padding: 1rem; border: 1px solid var(--rule-2);
  border-radius: 4px; margin-bottom: 0.5rem; cursor: pointer;
  background: var(--bg-card);
  transition: border-color 150ms ease, background 150ms ease;
}
.form .radio-card:hover { background: var(--bg-deep); border-color: var(--muted); }
.form .radio-card input { width: auto; margin-right: 0.5rem; }
.form .radio-card.selected,
.form .radio-card:has(input:checked) {
  border-color: var(--accent); background: var(--bg-deep);
}
.form .helptext {
  font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem;
}
.form .submit-row { margin-top: 2rem; text-align: center; }

/* ── Footer ───────────────────────────────────────────────── */

.site-footer {
  background: var(--bg-deep); color: var(--muted);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
  /* Rainbow stripe where the footer meets the page — coral, yellow,
     turquoise, sky, magenta. Pure brand signature. */
  border-top: 4px solid;
  border-image: var(--grad-rainbow) 1;
}
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--accent-2); }
.site-footer .brand-line {
  text-align: center; font-weight: 700; letter-spacing: 0.08em;
  font-size: 1.1rem; padding-bottom: 1.5rem; color: var(--ink);
  border-bottom: 1px solid var(--rule); margin-bottom: 2rem;
}
.site-footer .brand-line .sub {
  display: block; font-size: 0.7rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); font-weight: 400; margin-top: 0.25rem;
}
.site-footer .footer-cta {
  text-align: center; padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule); margin-bottom: 2rem;
}
/* Compact footer button — the page-content CTAs above carry the
   primary call-to-action weight ; the footer button is a quiet
   "second chance" sized accordingly. */
.site-footer .footer-cta .btn {
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.site-footer .columns { display: grid; gap: 2rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) { .site-footer .columns { grid-template-columns: 1fr; } }
.site-footer h4 {
  font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 0.85rem; font-weight: 600;
}
.site-footer ul.clean li { margin-bottom: 0.5rem; }
.site-footer .legal-row {
  border-top: 1px solid var(--rule); margin-top: 2rem; padding-top: 1.25rem;
  text-align: center; font-size: 0.85rem; color: var(--muted);
}
.site-footer .legal-row a { color: var(--ink); }
.site-footer .legal-row a:hover { color: var(--accent-2); }

/* ── Misc ─────────────────────────────────────────────────── */

.text-center { text-align: center; }
/* Paragraphs (with their max-width: 40rem) need auto side-margins to
   actually CENTER inside a .text-center container — otherwise they're
   width-capped but left-flush, and the button inside reads off-center. */
.text-center p { margin-left: auto; margin-right: auto; }
.text-muted { color: var(--muted); }
.divider { height: 1px; background: var(--rule); margin: 3rem 0; }
.tag {
  display: inline-block; padding: 0.2rem 0.6rem;
  background: var(--bg-alt); color: var(--muted);
  font-size: 0.75rem; letter-spacing: 0.08em;
  border-radius: 3px; margin-right: 0.4rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
