/* ============================================================
   gymfreak.media — shared stylesheet
   Editorial grid · warm near-black · vermilion accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Archivo:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg:       #0c0a09;
  --bg-2:     #141110;
  --bg-3:     #1b1715;
  --ink:      #f4f1ea;
  --ink-dim:  #cfc7bd;
  --muted:    #897f74;
  --line:     rgba(244, 241, 234, 0.12);
  --line-2:   rgba(244, 241, 234, 0.06);
  --accent:   oklch(0.605 0.205 30);     /* vermilion red */
  --accent-h: oklch(0.685 0.195 33);     /* brighter on hover */
  --accent-d: oklch(0.45 0.16 29);

  --serif: "Space Grotesk", system-ui, sans-serif;
  --sans:  "Archivo", system-ui, sans-serif;
  --mono:  "Space Mono", ui-monospace, monospace;

  --maxw: 1320px;
  --pad:  clamp(20px, 5vw, 72px);
  --nav-h: 76px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #fff; }

/* ---------- type helpers ---------- */
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  margin: 0;
}
.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}
.kicker.no-rule::before { display: none; }

.display {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

h1.display { font-size: clamp(46px, 8.4vw, 122px); }
h2.display { font-size: clamp(34px, 5.4vw, 76px); }
h3.display { font-size: clamp(24px, 3vw, 38px); }

.serif-italic { font-style: normal; font-weight: 700; color: var(--accent); }

.accent { color: var(--accent); }

p.lead {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.6;
  color: var(--ink-dim);
  max-width: 56ch;
}

.muted { color: var(--muted); }

/* ---------- layout ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
  width: 100%;
}

section { position: relative; }

.section-pad { padding-block: clamp(72px, 11vw, 150px); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.sec-head .index {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

/* ---------- buttons ---------- */
.btn {
  --bg-btn: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 15px 26px;
  background: var(--bg-btn);
  color: #fff;
  border: 1px solid var(--bg-btn);
  border-radius: 2px;
  cursor: pointer;
  transition: background .25s, border-color .25s, color .25s, transform .25s;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-h); border-color: var(--accent-h); transform: translateY(-1px); }
.btn .arr { transition: transform .25s; }
.btn:hover .arr { transform: translateX(3px); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn.ghost:hover { background: transparent; border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }

.link-arrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  transition: color .2s, border-color .2s;
}
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }
.link-arrow .arr { transition: transform .2s; }
.link-arrow:hover .arr { transform: translateX(4px); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
}
/* bar background as its own layer so the mobile menu can tuck BEHIND it */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background .3s, box-shadow .3s, border-color .3s;
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  position: relative;
  z-index: 3;
}
.brand .dot { width: 9px; height: 9px; background: var(--accent); border-radius: 50%; display: inline-block; }
.brand .tld { color: color-mix(in srgb, var(--muted) 62%, var(--bg)); font-weight: 400; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 38px);
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 3;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-dim);
  position: relative;
  padding: 4px 0;
  transition: color .2s;
}
.nav-links .ico { display: none; }
.nav-links .ico svg { width: 22px; height: 22px; display: block; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
}
.nav-cta { display: flex; align-items: center; gap: 16px; position: relative; z-index: 3; }

.nav-toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; }
.nav-toggle svg { display: block; }

@media (max-width: 880px) {
  /* hamburger opens a grid of icon tiles with labels underneath - tucked behind the header bar */
  .nav-toggle { display: block; }
  .nav .desktop-cta { display: none; }
  .nav-links {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1;
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: calc(var(--nav-h) + 14px) clamp(12px, 4vw, 40px) 18px;
    transform: translateY(-100%); visibility: hidden;
    transition: transform .35s cubic-bezier(.2,.7,.2,1), visibility .35s ease;
  }
  .nav-links.open { transform: translateY(0); visibility: visible; }
  .nav-links a {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 11px 3px; width: auto;
    border: 1px solid var(--line); border-radius: 10px;
    color: var(--ink-dim);
    font-family: var(--mono); font-size: 8px; letter-spacing: 0.04em;
    text-transform: uppercase; text-align: center;
  }
  .nav-links a .ico { display: inline-flex; }
  .nav-links a .ico svg { width: 19px; height: 19px; }
  .nav-links a .lbl { white-space: nowrap; }
  .nav-links a .lbl { display: block; }
  .nav-links a:active { background: rgba(244,241,234,0.05); }
  .nav-links a.active { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
  .nav-links a.active::after { display: none; }
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding-block: clamp(38px, 5vw, 64px);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand { max-width: 46ch; }
.footer-brand .muted { margin: 14px 0 0; font-size: 14px; line-height: 1.6; max-width: 38ch; }

.footer-contact { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.footer-contact-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
}
.footer-contact-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.footer-btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.03em;
  color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 16px; transition: color .2s, border-color .2s, background .2s;
}
.footer-btn svg { width: 17px; height: 17px; flex: none; }
.footer-btn:hover { color: var(--accent); border-color: var(--accent); }
.footer-btn.wa:hover { color: #25d366; border-color: #25d366; }
@media (max-width: 640px) {
  .footer-contact { align-items: flex-start; }
  .footer-contact-row { justify-content: flex-start; }
}
.footer .big {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer-col a { color: var(--ink-dim); transition: color .2s; font-size: 15px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: clamp(26px, 4vw, 46px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer .big { grid-column: 1 / -1; margin-bottom: 12px; }
}

/* ---------- image slot styling ---------- */
image-slot {
  background: var(--bg-3);
  --slot-border: 1px solid var(--line);
}

/* generic media frame */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--bg-3);
}
.frame img, .frame image-slot { width: 100%; height: 100%; object-fit: cover; }

/* tag chip overlaid on imagery */
.img-tag {
  position: absolute;
  left: 14px; bottom: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px);
  padding: 6px 11px;
  border: 1px solid var(--line);
  z-index: 2;
}

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   FANCY LAYER — glassy cards, glow, pills, marquee, badges
   ============================================================ */

:root {
  --glow: oklch(0.62 0.22 30);
}

/* buttons + glow — radius matched to media cards */
.btn { border-radius: 20px; padding: 16px 30px; }
.btn:not(.ghost) { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 14px 40px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn:not(.ghost):hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-h) 50%, transparent), 0 18px 50px -10px color-mix(in srgb, var(--accent) 85%, transparent); }
.btn.sm { padding: 11px 20px; font-size: 11.5px; }
.filter { border-radius: 999px; }

/* glass card */
.glass {
  background: linear-gradient(160deg, rgba(244,241,234,0.06), rgba(244,241,234,0.015));
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 30px 70px -40px rgba(0,0,0,0.9), inset 0 1px 0 rgba(244,241,234,0.06);
}
.glass.red {
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent) 6%, transparent));
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: 0 30px 80px -40px color-mix(in srgb, var(--accent) 75%, transparent), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* stat card */
.stat-card { padding: 24px 26px; }
.stat-card .n { font-family: var(--serif); font-weight: 700; font-size: clamp(34px, 4vw, 50px); line-height: 0.95; letter-spacing: -0.01em; }
.stat-card .n.sm { font-size: clamp(22px, 2.4vw, 30px); }
.stat-card .l { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 12px; line-height: 1.5; }

/* glow halo behind imagery */
.glow-host { position: relative; isolation: isolate; }
.glow-host::before {
  content: "";
  position: absolute;
  inset: -12% -8%;
  background: radial-gradient(60% 55% at 60% 40%, color-mix(in srgb, var(--glow) 85%, transparent), transparent 70%);
  filter: blur(60px);
  z-index: -1;
  opacity: 0.55;
  pointer-events: none;
}

/* badge / pill chip */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 15px;
  background: rgba(244,241,234,0.03);
}
.badge .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%{ box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);} 70%{ box-shadow: 0 0 0 8px transparent;} 100%{ box-shadow: 0 0 0 0 transparent;} }

/* REC chip */
.rec { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); }
.rec .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink 1.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-2); }
.marquee .track { display: flex; gap: 0; width: max-content; animation: scroll-x 38s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee .item { display: inline-flex; align-items: center; gap: 22px; padding: 22px 0; }
.marquee .item span { font-family: var(--serif); font-weight: 600; font-size: clamp(18px, 2.2vw, 27px); letter-spacing: 0.04em; text-transform: uppercase; color: color-mix(in srgb, var(--muted) 78%, var(--bg)); padding: 0 30px; white-space: nowrap; }
.marquee .item .sep { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
@keyframes scroll-x { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: none; } }

/* rounded media card */
.media-card { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); position: relative; background: var(--bg-3); }
.media-card img, .media-card image-slot { width: 100%; height: 100%; object-fit: cover; }

/* crosshair deco */
.crosshair { position: absolute; width: 120px; height: 120px; pointer-events: none; opacity: 0.5; }
.crosshair::before, .crosshair::after { content:""; position:absolute; background: var(--line); }
.crosshair::before { left:50%; top:0; bottom:0; width:1px; transform: translateX(-50%); }
.crosshair::after { top:50%; left:0; right:0; height:1px; transform: translateY(-50%); }
.crosshair .ring { position:absolute; inset:34px; border:1px solid var(--accent); border-radius:50%; opacity:0.6; }

/* ============================================================
   APPLE-STYLE FLOW — centered intros, alternating feature rows
   ============================================================ */
.center-intro { text-align: center; max-width: 780px; margin-left: auto; margin-right: auto; margin-bottom: clamp(48px, 7vw, 96px); }
.center-intro .kicker { justify-content: center; }
.center-intro h2 { margin-top: 20px; }
.center-intro p.lead { margin: 22px auto 0; }
.center-intro .cta-below { margin-top: 32px; display: inline-flex; }

.feature-rows { display: grid; gap: clamp(72px, 10vw, 150px); }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 84px); align-items: center; }
.frow-media { border-radius: 24px; overflow: hidden; aspect-ratio: 4/3.4; position: relative; background: var(--bg-3); }
.frow-media img { width: 100%; height: 100%; object-fit: cover; }
.frow:nth-child(even) .frow-media { order: -1; }
.frow-copy .no { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.frow-copy h3 { font-family: var(--serif); font-weight: 700; font-size: clamp(28px, 3.8vw, 50px); line-height: 1.02; letter-spacing: -0.025em; margin: 18px 0 18px; text-wrap: balance; }
.frow-copy p { color: var(--ink-dim); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.62; max-width: 46ch; margin: 0; }
@media (max-width: 820px) {
  .frow { grid-template-columns: 1fr; gap: 26px; }
  .frow .frow-media, .frow:nth-child(even) .frow-media { order: -1; }
}

/* compact 3-up strip */
.strip3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.strip3 .media-card { aspect-ratio: 3/3.7; }
@media (max-width: 720px){ .strip3 { grid-template-columns: 1fr 1fr; } .strip3 .media-card:last-child{ display:none; } }

/* ---------- brand logo images ---------- */
.brand-logo { height: 21px; width: auto; display: block; }
@media (max-width: 880px){ .brand-logo { height: 19px; } }
.footer-logo { display: inline-block; }
.footer-logo img { height: clamp(26px, 3.4vw, 42px); width: auto; display: block; }

/* ============================================================
   MOTION — kinetic entrances, parallax, gloss (added)
   ============================================================ */

/* button gloss sweep + stronger lift */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ""; position: absolute; top: 0; left: -130%;
  width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.40), transparent);
  transform: skewX(-18deg); pointer-events: none;
  transition: left .6s cubic-bezier(.2,.7,.2,1);
}
.btn:hover::after { left: 150%; }
.btn:hover { transform: translateY(-2px); }

/* parallax images sit slightly zoomed so they have room to drift */
.parallax { will-change: transform; }

/* nav solidifies after scroll */
.nav.scrolled::before {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  box-shadow: 0 10px 40px -24px rgba(0,0,0,0.9);
  border-bottom-color: color-mix(in srgb, var(--ink) 16%, transparent);
}

/* hero entrance (only when JS motion is active) */
.js-motion .hero-copy > *,
.js-motion .hero-visual { opacity: 0; transform: translateY(30px); }
.js-motion .hero-copy > *.is-in,
.js-motion .hero-visual.is-in {
  opacity: 1; transform: none;
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.js-motion .about-hero .portrait { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .btn::after { display: none; }
  .btn:hover { transform: none; }
  .parallax { transform: none !important; }
  .js-motion .hero-copy > *,
  .js-motion .hero-visual { opacity: 1 !important; transform: none !important; }
}
