/* ===========================================================
 * Fitzroy Body Gym — Design System
 * Reference: amp ("Warmly lit athletic minimalism")
 * Palette: FBG bronze transposed over amp neutrals
 * Mobile-first from 375px
 * =========================================================== */

/* ----- Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'PublicaSans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: #242424;
  background: #f7f4ee;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }

/* ----- Design Tokens ----- */
:root {
  /* Colors */
  --bronze:       #a56a43;
  --bronze-hover: #8f5937;
  --bronze-light: rgba(165,106,67,0.08);
  --ink:          #242424;
  --ink-soft:     #4b4b4b;
  --ink-mute:     #6f6f6f;
  --paper:        #f7f4ee;
  --paper-lift:   #fcfaf6;
  --stone:        #e7e2d9;
  --stone-deep:   #d7d1c7;
  --true-black:   #202120;
  --white:        #ffffff;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'PublicaSans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing (4px base) */
  --sp-4:    4px;
  --sp-8:    8px;
  --sp-12:   12px;
  --sp-16:   16px;
  --sp-24:   24px;
  --sp-32:   32px;
  --sp-40:   40px;
  --sp-48:   48px;
  --sp-64:   64px;
  --sp-80:   80px;
  --sp-112:  112px;

  /* Radii */
  --radius-card:   5px;
  --radius-image:  8px;
  --radius-body:   16px;
  --radius-btn:    24px;
  --radius-pill:   50px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(36,36,36,0.06);
  --shadow-md: 0 4px 12px rgba(36,36,36,0.08);
  --shadow-btn: rgba(165,106,67,0.35) 1px 6px 14px 0px, rgba(0,0,0,0.06) 0px 1px 4px 0px;

  /* Layout */
  --container: 1200px;
  --section-gap: 80px;
  --card-padding: 16px;
}

/* ----- Reduced Motion ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ----- Skip Link ----- */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 200;
  background: var(--bronze);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-btn);
  font-size: 0.85rem;
  font-weight: 500;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ----- Focus Visible ----- */
:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ----- Typography ----- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
}

.display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 0.98;
}
.display-xl { font-size: clamp(2.8rem, 7vw, 4.5rem); }
.display-lg { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.display-md { font-size: clamp(1.8rem, 4vw, 2.8rem); }

.section-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.75rem;
}

.section-body {
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.75;
  max-width: 600px;
}

/* ----- Container ----- */
.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}
@media (max-width: 420px) {
  .container { width: min(var(--container), calc(100% - 1.25rem)); }
}

/* ----- Header / Nav ----- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(247,244,238,0.88);
  border-bottom: 1px solid var(--stone);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-24);
}

.brand img { height: 40px; width: auto; }
@media (min-width: 480px) { .brand img { height: 44px; } }

.nav-desktop {
  display: none;
  list-style: none;
  gap: var(--sp-32);
  align-items: center;
}
.nav-desktop a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.2s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] { color: var(--bronze); }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 110;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0,0,0,0.5);
}
.mobile-overlay.open { display: block; }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 95;
  background: var(--white);
  padding: 5.5rem 1.5rem 2.5rem;
  transform: translateY(-100%);
  transition: transform 0.35s ease;
  border-bottom: 1px solid var(--stone);
}
.mobile-menu.open { transform: translateY(0); }

.mobile-menu a {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  padding: 1rem 0;
  border-bottom: 1px solid var(--stone);
  transition: opacity 0.2s;
  min-height: 44px;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { opacity: 0.6; }
.mobile-menu a[aria-current="page"] { color: var(--bronze); }

/* ----- Buttons ----- */
.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--sp-24);
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--bronze);
  color: var(--white);
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
  background: var(--bronze-hover);
  box-shadow: rgba(165,106,67,0.5) 1px 6px 18px 0px, rgba(0,0,0,0.08) 0px 1px 4px 0px;
}
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--stone-deep);
}
.btn-secondary:hover { background: var(--stone); }
.btn-secondary:active { transform: scale(0.97); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: none;
  min-height: auto;
  padding: 0;
  border-bottom: 1px solid var(--bronze);
  border-radius: 0;
  padding-bottom: 2px;
}
.btn-ghost:hover { color: var(--bronze); }

.btn-full { width: 100%; }

/* ----- Sections ----- */
section { padding: var(--sp-64) 0; }
.section-alt { background: rgba(231,226,217,0.35); }

.section-pad { padding: var(--sp-64) 0; }

/* ----- Hero ----- */
.hero { padding: var(--sp-80) 0; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-40);
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: var(--sp-16);
}

.hero h1 {
  max-width: 12ch;
}

.hero-lead {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.8;
  margin-top: var(--sp-20);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: var(--sp-12);
  flex-wrap: wrap;
  margin-top: var(--sp-28);
}

/* ----- Trust Bar (standalone strip between sections) ----- */
.trust-section {
  padding: var(--sp-8) 0 var(--sp-32);
  background: var(--paper);
}

.trust-wrap {
  overflow: hidden;
  position: relative;
  -webkit-mask: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
  mask: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.trust-track {
  display: flex;
  gap: var(--sp-16);
  width: max-content;
  animation: trust-scroll 24s linear infinite;
  padding: var(--sp-4) 0;
}
.trust-wrap:hover .trust-track {
  animation-play-state: paused;
}

.trust-track span {
  display: flex;
  align-items: center;
  white-space: nowrap;
  padding: var(--sp-10) var(--sp-18);
  background: var(--paper-lift);
  border: 1px solid var(--stone-deep);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  font-size: 0.82rem;
  color: var(--ink-mute);
  gap: var(--sp-8);
}

@keyframes trust-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (min-width: 768px) {
  .trust-section {
    padding: var(--sp-4) 0 var(--sp-48);
  }
  .trust-wrap {
    -webkit-mask: none;
    mask: none;
    overflow: visible;
  }
  .trust-track {
    display: flex;
    justify-content: center;
    gap: var(--sp-24);
    animation: none;
    padding: var(--sp-14) var(--sp-24);
    background: var(--paper-lift);
    border: 1px solid var(--stone-deep);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    margin: 0 auto;
    width: max-content;
  }
  .trust-track span {
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    white-space: normal;
    font-size: 0.85rem;
  }
  .trust-wrap:hover .trust-track { animation: none; }
}

.hero-image-wrap {
  border: 1px solid var(--stone-deep);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.hero-image {
  aspect-ratio: 4/5;
  object-fit: cover;
  width: 100%;
}

/* ----- Cards ----- */
.card {
  background: var(--paper-lift);
  border: 1px solid var(--stone-deep);
  border-radius: var(--radius-card);
  padding: var(--sp-28);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s;
}
.card:hover { box-shadow: var(--shadow-md); }

.card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card-actions { margin-top: auto; padding-top: var(--sp-28); }

.card h3 {
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: var(--sp-8);
}

.card p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* Bronze rule */
.rule {
  width: 48px;
  height: 1px;
  background: var(--bronze);
  opacity: 0.5;
  margin-bottom: var(--sp-16);
}

/* Grids */
.grid-3, .grid-2 {
  display: grid;
  gap: var(--sp-24);
  margin-top: var(--sp-48);
}
.grid-3 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ----- Lists ----- */
.list {
  margin-top: var(--sp-20);
  padding: 0;
  list-style: none;
}
.list li {
  display: flex;
  gap: var(--sp-12);
  align-items: flex-start;
  margin-top: var(--sp-12);
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 0.9rem;
}
.list-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--bronze);
  margin-top: 10px;
  flex: 0 0 6px;
}

/* ----- Split Layout ----- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-40);
  align-items: start;
}
.split-center { align-items: center; }

@media (min-width: 768px) {
  .split { grid-template-columns: 0.9fr 1.1fr; gap: var(--sp-64); }
}

/* ----- Mini Grid (philosophy stats) ----- */
.mini-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-16);
  margin-top: var(--sp-28);
}
@media (min-width: 480px) { .mini-grid { grid-template-columns: repeat(3, 1fr); } }

.mini-card {
  background: var(--paper-lift);
  border: 1px solid var(--stone-deep);
  border-radius: var(--radius-card);
  padding: var(--sp-20);
  box-shadow: var(--shadow-sm);
}
.mini-card p {
  margin-top: var(--sp-8);
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 0.85rem;
}
.mini-title {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ----- Coach Cards ----- */
.coach-grid {
  display: grid;
  gap: var(--sp-24);
  margin-top: var(--sp-48);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .coach-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .coach-grid { grid-template-columns: repeat(3, 1fr); } }

.coach-card { padding: 0; overflow: hidden; }
.coach-photo {
  aspect-ratio: 4/4.2;
  width: 100%;
  object-fit: cover;
  object-position: center top;
}
@media (max-width: 639px) { .coach-photo { aspect-ratio: 4/3; } }
.coach-content { padding: var(--sp-24) var(--sp-28) var(--sp-28); }

.coach-meta {
  margin-top: var(--sp-6);
  font-size: 0.82rem;
  color: var(--ink-mute);
  line-height: 1.7;
}

/* ----- Pricing ----- */
.pricing-grid {
  display: grid;
  gap: var(--sp-24);
  margin-top: var(--sp-48);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }

.price {
  margin-top: var(--sp-8);
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
}
.price small {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-mute);
}

/* ----- FAQ ----- */
.faq-inner { max-width: 720px; margin: 0 auto; }

details {
  border-top: 1px solid var(--stone);
  text-align: left;
}
details:last-of-type { border-bottom: 1px solid var(--stone); }

summary {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  padding: 1.2rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  transition: color 0.2s;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--bronze);
  font-weight: 300;
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 1rem;
}
details[open] summary { color: var(--bronze); }
details[open] summary::after { transform: rotate(45deg); }
details p {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ink-soft);
  opacity: 0.8;
  line-height: 1.75;
  padding-bottom: 1.2rem;
  padding-right: 2rem;
}

/* ----- Studio ----- */
.studio-image {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
  border-radius: var(--radius-image);
}

/* ----- Map ----- */
.map-wrap {
  border: 1px solid var(--stone-deep);
  border-radius: var(--radius-card);
  min-height: 300px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border: 0;
}

/* ----- Contact Info ----- */
.contact-block {
  margin-top: var(--sp-32);
}
.contact-block p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.75;
}
.contact-block strong { color: var(--ink); }
.contact-block .btn { margin-top: var(--sp-24); }

/* ----- CTA Section ----- */
.cta-section {
  text-align: center;
  background: var(--true-black);
  color: var(--white);
  padding: var(--sp-80) 0;
}
.cta-section h2 { color: var(--white); max-width: 600px; margin: 0 auto; }
.cta-section p {
  color: rgba(255,255,255,0.55);
  max-width: 440px;
  margin: var(--sp-16) auto var(--sp-28);
  font-weight: 300;
}
.cta-section .btn-primary { background: var(--bronze); color: var(--white); }

/* ----- Footer ----- */
footer {
  background: var(--true-black);
  padding: var(--sp-48) 0 var(--sp-32);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-32);
  padding-bottom: var(--sp-32);
  border-bottom: 1px solid rgba(231,226,217,0.1);
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-48); } }

.footer-brand img { height: 40px; width: auto; margin-bottom: var(--sp-12); }
.footer-brand p {
  font-size: 0.85rem;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  line-height: 1.75;
  max-width: 280px;
}

.footer-heading {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--bronze);
  opacity: 0.6;
  margin-bottom: var(--sp-16);
}
.footer-links a {
  display: block;
  margin-top: var(--sp-12);
  font-size: 0.85rem;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--bronze); }

.footer-copy {
  font-size: 0.85rem;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  line-height: 1.8;
}

.footer-bottom {
  margin-top: var(--sp-32);
  padding-top: var(--sp-24);
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  text-align: center;
}
@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-ack {
  font-size: 0.82rem;
  font-weight: 300;
  color: rgba(255,255,255,0.45);
  line-height: 1.8;
  max-width: 700px;
}
.footer-credit {
  margin-top: var(--sp-12);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
}
.footer-credit a { color: var(--bronze); opacity: 0.7; }
.footer-credit a:hover { opacity: 1; }

/* ----- Responsive: Tablet (768px+) ----- */
@media (min-width: 768px) {
  .nav-desktop { display: flex; }
  .hamburger { display: none; }
  .mobile-menu, .mobile-overlay { display: none !important; }

  .hero { padding: var(--sp-112) 0; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-64); }
  .hero-image { aspect-ratio: 4/5; }

  section { padding: var(--sp-80) 0; }
}

/* ----- Responsive: Desktop (1024px+) ----- */
@media (min-width: 1024px) {
  header { padding: 0; }
  .header-inner { min-height: 80px; }
  .hero { padding: var(--sp-112) 0; }
}

/* ----- Stat count-up (home hero) ----- */
.hero-stat span {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
}
.hero-stat small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: var(--sp-4);
}

/* ----- Utility ----- */
.intro { max-width: 760px; }
.subtle-caption {
  margin-top: var(--sp-12);
  font-size: 0.82rem;
  color: var(--ink-mute);
}
