/* ===========================================================
   The Middle Agent — homepage styles
   Theme: "Meeting Point" — a bright alpine trail-map world.
   Two trails (athlete = warm orange, brand = cool blue) that
   meet in the middle. Editable design tokens live in :root.
=========================================================== */

:root {
  /* Snow surfaces (light to deep) */
  --snow-0:   #f3f8fa;   /* page background, top */
  --snow-1:   #e9f1f5;   /* alt section */
  --snow-2:   #dae7ee;   /* deep snow / hero base */
  --paper:    #ffffff;   /* cards */

  /* Ink */
  --ink:      #20303a;   /* headings, strong text */
  --ink-soft: #3a4b57;   /* body text */
  --muted:    #5f7381;   /* secondary text */

  /* The two trails */
  --warm:      #e2622c;  /* athletes + primary accent */
  --warm-deep: #b4571f;
  --cool:      #1f6fb2;  /* brands */
  --cool-deep: #155086;

  /* Lines */
  --line:    #cdd9e0;
  --contour: #aec4d1;

  /* Type */
  --font-head: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Availability signal (e.g. "open to sponsorship") */
  --go: #2f8a55;

  /* Layout */
  --wrap: 1140px;
  --radius: 16px;

  /* Back-compat aliases — let the athlete profile page (built on the old
     token names) inherit the new Meeting Point palette automatically. */
  --accent:   var(--warm);
  --accent-2: var(--cool);
  --card:     var(--paper);
  --text:     var(--ink);
  --bg:       var(--snow-0);
  --bg-alt:   var(--snow-1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--snow-0);
  color: var(--ink-soft);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; margin: 0; color: var(--ink); }
a { color: inherit; text-decoration: none; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243,248,250,0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; }
.logo-mark { color: var(--warm); font-size: 22px; }
.logo-text { font-size: 17px; letter-spacing: -0.01em; color: var(--ink); }
/* New TMA lockup logo (image). Black on light headers, white reversed for the
   homepage hero (transparent header over the dark video); swaps back on scroll. */
.logo-img { height: 46px; width: auto; display: block; }
.logo-img-light { display: none; }
.home .site-header .logo-img-dark { display: none; }
.home .site-header .logo-img-light { display: block; }
.home .site-header.scrolled .logo-img-dark { display: block; }
.home .site-header.scrolled .logo-img-light { display: none; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { color: var(--muted); font-weight: 500; font-size: 15px; transition: color .2s; }
.main-nav a:hover { color: var(--ink); }
.main-nav a.btn { color: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--warm); color: #fff; box-shadow: 0 8px 22px rgba(226,98,44,0.28); }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(226,98,44,0.4); }
.btn-cool { background: var(--cool); color: #fff; box-shadow: 0 8px 22px rgba(31,111,178,0.26); }
.btn-cool:hover { box-shadow: 0 12px 28px rgba(31,111,178,0.4); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--warm); color: var(--warm); }
.btn-lg { padding: 17px 32px; font-size: 17px; }
.btn-small { padding: 9px 18px; font-size: 14px; }

/* ===== Hero: interactive split ("pick your side") ===== */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 660px;
  background: #14171d;
  --hero-accent: #ff9a5c;            /* neutral + athlete = warm ember */
}
.hero[data-side="brand"] { --hero-accent: #5ab0ff; }   /* brand flips to ice blue */

/* left panel */
.hero-panel {
  position: relative; z-index: 3;
  width: 47%;
  display: flex; align-items: center;
  padding: 118px 52px 72px;
}
.hero-panel-inner { max-width: 520px; width: 100%; }

/* right photo */
.hero-photo { position: relative; width: 53%; overflow: hidden; }
/* .hero-shift = the audience "nudge"; .hero-bg = the continuous ambient motion */
.hero-shift { position: absolute; inset: 0; z-index: 0; transition: transform .6s ease; }
.hero[data-side="athlete"] .hero-shift { transform: scale(1.04) translateX(-1.4%); }
.hero[data-side="brand"]   .hero-shift { transform: scale(1.04) translateX(1.4%); }
/* looping snowboard clip fills the pane; the clip provides its own motion */
.hero-vid {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
/* still fallback (used if <video> can't render) */
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: 50% center;
}
.hero-photo::before {           /* soft seam blending photo into the panel */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, #14171d 0%, rgba(20,23,29,0) 22%);
}
/* audience tint over the photo */
.hero-tint {
  position: absolute; inset: 0; z-index: 1; transition: background .45s ease;
  background: linear-gradient(180deg, rgba(9,13,24,0.15), rgba(9,13,24,0.45));
}
.hero[data-side="athlete"] .hero-tint { background: linear-gradient(205deg, rgba(226,98,44,0.32) 0%, rgba(9,13,24,0.2) 55%, rgba(9,13,24,0.5) 100%); }
.hero[data-side="brand"]   .hero-tint { background: linear-gradient(205deg, rgba(31,111,178,0.36) 0%, rgba(9,13,24,0.2) 55%, rgba(9,13,24,0.5) 100%); }

/* Falling snow (populated by js/app.js; motion-gated) */
.snow { position: absolute; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; }
.flake { position: absolute; top: -14px; border-radius: 50%; background: #ffffff; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .flake { animation: fall linear infinite; }
  @keyframes fall {
    0%   { transform: translate3d(0, 0, 0); opacity: 0; }
    14%  { opacity: 0.7; }
    90%  { opacity: 0.5; }
    100% { transform: translate3d(var(--dx, 18px), 720px, 0); opacity: 0; }
  }
}
@media (prefers-reduced-motion: reduce) { .hero-shift { transition: none; } }

/* panel content */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 700;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: #ffe0cf; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px; padding: 7px 15px; margin: 0 0 24px;
}
.eyebrow .mark { color: var(--warm); }
.hero-title {
  font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -0.03em;
  color: #ffffff; text-wrap: balance; line-height: 1.08; min-height: 2.3em;
}
.accent { color: var(--hero-accent); transition: color .3s ease; }
.hero-sub { color: rgba(226,232,242,0.78); font-size: 16.5px; max-width: 430px; margin: 18px 0 30px; }

/* the two interactive doors */
.hero-doors { display: flex; flex-direction: column; gap: 12px; }
.door {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border-radius: 13px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.04);
  text-decoration: none; color: #f0ede7; cursor: pointer;
  transition: border-color .25s, background .25s, transform .18s;
}
.door:hover, .door:focus-visible { transform: translateY(-2px); outline: none; }
.door b { font-family: var(--font-head); font-size: 16.5px; font-weight: 700; }
.door-sub { display: block; font-size: 13px; color: rgba(240,237,231,0.6); margin-top: 3px; }
.door-ar { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--hero-accent); transition: transform .2s, color .3s; }
.door:hover .door-ar { transform: translateX(4px); }
.door-athlete:hover, .hero[data-side="athlete"] .door-athlete { border-color: rgba(226,98,44,0.6); background: rgba(226,98,44,0.12); }
.door-brand:hover,   .hero[data-side="brand"]   .door-brand   { border-color: rgba(31,111,178,0.65); background: rgba(31,111,178,0.14); }

.hero-note { color: rgba(226,232,242,0.55); font-size: 13px; margin: 24px 0 0; }

/* glass secondary button (kept for use elsewhere on dark) */
.btn-glass { background: rgba(255,255,255,0.10); color: #fff; border-color: rgba(255,255,255,0.34); }
.btn-glass:hover { background: rgba(255,255,255,0.18); border-color: #fff; }

@media (max-width: 900px) {
  .hero { flex-direction: column-reverse; min-height: 0; }
  .hero-panel, .hero-photo { width: 100%; }
  .hero-photo { height: 240px; }
  .hero-photo::before { background: linear-gradient(0deg, #14171d 0%, rgba(20,23,29,0) 46%); }
  .hero-panel { padding: 36px 26px 52px; }
  .hero-title { min-height: 0; }
}

/* Transparent header floating over the hero (home only); solidifies on scroll */
.site-header.scrolled { box-shadow: 0 6px 20px -8px rgba(32,48,58,0.25); }
.home .site-header { position: fixed; top: 0; left: 0; right: 0; background: transparent; backdrop-filter: none; border-bottom-color: transparent; }
.home .site-header .logo-text { color: #fff; }
.home .site-header .logo-mark { color: #ff9a5c; }
.home .site-header .main-nav > a:not(.btn) { color: rgba(255,255,255,0.86); }
.home .site-header .main-nav > a:not(.btn):hover { color: #fff; }
.home .site-header .nav-toggle span { background: #fff; }
.home .site-header.scrolled { background: rgba(243,248,250,0.85); backdrop-filter: blur(12px); border-bottom-color: var(--line); }
.home .site-header.scrolled .logo-text { color: var(--ink); }
.home .site-header.scrolled .logo-mark { color: var(--warm); }
.home .site-header.scrolled .main-nav > a:not(.btn) { color: var(--muted); }
.home .site-header.scrolled .main-nav > a:not(.btn):hover { color: var(--ink); }
.home .site-header.scrolled .nav-toggle span { background: var(--ink); }

/* ===== Sections ===== */
.section { padding: 88px 0; }
.section-alt { background: var(--snow-1); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 700;
  font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--warm-deep); margin: 0 0 14px;
}
.kicker .mark { color: var(--warm); }
.kicker-cool { color: var(--cool-deep); }
.kicker-cool .mark { color: var(--cool); }
.kicker-light { color: rgba(255,255,255,0.85); }
.kicker-light .mark { color: #fff; }
.section-title { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; max-width: 640px; }

/* Steps — trail markers */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: 0 10px 26px -20px rgba(32,48,58,0.4);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.step:hover { transform: translateY(-4px); border-color: rgba(226,98,44,0.45); box-shadow: 0 18px 36px -22px rgba(32,48,58,0.5); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 34px; padding: 0 10px;
  border-radius: 9px;
  background: rgba(226,98,44,0.12);
  color: var(--warm-deep);
  font-family: var(--font-head); font-weight: 800; font-size: 15px;
  letter-spacing: 0.04em; margin-bottom: 18px;
}
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--muted); margin: 0; font-size: 15.5px; }

/* Two-side cards */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.side-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px 34px;
  overflow: hidden;
  box-shadow: 0 14px 34px -24px rgba(32,48,58,0.45);
}
.side-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; }
.side-athlete::before { background: var(--warm); }
.side-brand::before { background: var(--cool); }
.card-title { font-size: clamp(21px, 3vw, 27px); font-weight: 800; margin-bottom: 22px; letter-spacing: -0.01em; }
.ticks { list-style: none; padding: 0; margin: 0 0 30px; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 13px; color: var(--ink-soft); font-size: 16px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 6px;
  width: 15px; height: 8px;
  border-left: 2.5px solid var(--warm); border-bottom: 2.5px solid var(--warm);
  transform: rotate(-45deg);
}
.ticks-cool li::before { border-color: var(--cool); }
.soon-note { color: var(--muted); font-size: 13.5px; margin: 14px 0 0; }

/* ===== CTA band (the one dark "summit" moment) ===== */
.cta-band {
  background: var(--ink);
  color: #eef4f7;
  text-align: center;
  padding: 84px 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; opacity: 0.5; pointer-events: none;
  background:
    repeating-linear-gradient(115deg, transparent 0 44px, rgba(255,255,255,0.03) 44px 45px);
}
.cta-inner { position: relative; z-index: 2; }
.cta-inner .kicker { justify-content: center; }
.cta-title { font-size: clamp(26px, 4vw, 40px); font-weight: 800; color: #fff; letter-spacing: -0.02em; margin: 0 auto; max-width: 640px; }
.cta-sub { color: #b7c6d0; font-size: clamp(16px, 2.1vw, 18px); max-width: 560px; margin: 18px auto 0; }
.cta-band .hero-cta { margin-top: 34px; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--line); padding: 46px 0; background: var(--snow-1); }
.footer-inner { display: flex; flex-direction: column; gap: 14px; }
.footer-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--font-head); font-weight: 800; color: var(--ink); }
.footer-logo { height: 30px; width: auto; display: block; }
.footer-tag { flex-basis: 100%; color: var(--muted); font-family: var(--font-body); font-weight: 400; font-size: 14.5px; margin: 6px 0 0; }
.footer-fine { color: var(--muted); font-size: 13px; margin: 0; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px;
    display: none;
    box-shadow: 0 12px 24px -12px rgba(32,48,58,0.3);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
  .main-nav a.btn { margin-top: 14px; text-align: center; border-bottom: 0; }
  /* home nav opens as a light dropdown — force dark links even over the dark hero */
  .home .site-header .main-nav > a:not(.btn) { color: var(--ink); }
  .steps { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .hero-grid { min-height: 560px; padding-top: 96px; }
}

/* ===========================================================
   Athlete profile page (athlete.html)
   Re-themed for the "Meeting Point" light look.
=========================================================== */

.profile-main { padding-bottom: 84px; }

/* Cover banner — a bright alpine sweep instead of the old navy */
.cover {
  position: relative;
  height: 240px;
  background:
    radial-gradient(120% 140% at 18% 0%, rgba(226,98,44,0.20), rgba(226,98,44,0) 55%),
    radial-gradient(120% 160% at 92% 10%, rgba(31,111,178,0.20), rgba(31,111,178,0) 55%),
    linear-gradient(120deg, #dce9f0, #cbdce7 60%, #e6eef3);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.cover::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 90px;
  background: linear-gradient(transparent, rgba(243,248,250,0.92));
}

/* Identity row (avatar + name) overlapping the cover */
.identity {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-top: -70px;
  position: relative;
  z-index: 2;
}
.avatar {
  flex: 0 0 auto;
  width: 132px; height: 132px;
  border-radius: 24px;
  background: linear-gradient(150deg, var(--warm), var(--cool));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 44px;
  color: #fff;
  border: 4px solid var(--snow-0);
  box-shadow: 0 12px 30px rgba(32,48,58,0.25);
}
.identity-text { padding-bottom: 8px; }
.identity-text h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; }
.identity-sub { color: var(--muted); margin: 6px 0 0; font-size: 16px; }
.identity-sub .dot { margin: 0 8px; opacity: .5; }

/* Tags */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--bg-alt);
}
.tag-accent { color: var(--warm-deep); border-color: rgba(226,98,44,0.4); background: rgba(226,98,44,0.08); }
.tag-open {
  color: var(--go);
  border-color: rgba(47,138,85,0.4);
  background: rgba(47,138,85,0.08);
}

/* Top action buttons */
.profile-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Two-column profile layout */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  margin-top: 44px;
  align-items: start;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px;
  margin-bottom: 24px;
}
.panel h2 {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm-deep);
  font-weight: 700;
  margin: 0 0 16px;
}
.panel p { color: var(--muted); margin: 0; font-size: 16px; }
.panel p + p { margin-top: 12px; }

/* Stat strip */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
}
.stat-num { font-family: var(--font-head); font-weight: 700; font-size: 22px; color: var(--text); }
.stat-label { color: var(--muted); font-size: 12.5px; margin-top: 4px; letter-spacing: 0.03em; }

/* Video edits */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.video-tile {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #dbe7ef, #c6d7e3);
  cursor: pointer;
  transition: transform .18s, border-color .2s;
}
.video-tile:hover { transform: translateY(-3px); border-color: rgba(226,98,44,0.45); }
.video-tile .play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-tile .play::before {
  content: "";
  width: 0; height: 0;
  border-left: 18px solid var(--ink);
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  margin-left: 5px;
  opacity: .82;
}
.video-tile .vlabel {
  position: absolute;
  left: 12px; bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-head);
  color: var(--ink);
  text-shadow: 0 1px 6px rgba(255,255,255,0.6);
}

/* Results / list rows */
.result-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.result-row:last-child { border-bottom: 0; }
.result-row .r-title { color: var(--text); font-weight: 500; }
.result-row .r-year { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* Sponsors */
.sponsor-row { display: flex; flex-wrap: wrap; gap: 10px; }
.sponsor-chip {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  color: var(--text);
}

/* Sidebar contact card */
.sticky-side { position: sticky; top: 88px; }
.contact-card { text-align: left; }
.contact-card .lead { color: var(--text); font-size: 16px; margin: 0 0 6px; font-family: var(--font-head); font-weight: 600; }
.contact-card .sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.contact-card .btn { width: 100%; margin-bottom: 10px; }
.side-meta { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.side-meta .row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14.5px; }
.side-meta .row span:first-child { color: var(--muted); }
.side-meta .row span:last-child { color: var(--text); font-weight: 500; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { margin: 0; }

@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
}
@media (max-width: 620px) {
  .identity { flex-direction: column; align-items: flex-start; gap: 14px; margin-top: -60px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .video-grid { grid-template-columns: 1fr 1fr; }
}

/* ===========================================================
   Athlete profile — edit / upload page
=========================================================== */

.edit-head { padding: 40px 0 8px; }
.edit-head h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -0.02em; }
.edit-head p { color: var(--muted); margin: 10px 0 0; font-size: 16px; max-width: 640px; }

.demo-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(226,98,44,0.07);
  border: 1px solid rgba(226,98,44,0.24);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 22px 0 8px;
  color: var(--ink-soft);
  font-size: 14.5px;
}
.demo-note strong { color: var(--warm-deep); }
.demo-note .n-ico { color: var(--warm); font-weight: 800; }

.form-label {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  margin: 0 0 8px;
}
.field-hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

/* Upload dropzone */
.dropzone {
  display: block;
  border: 2px dashed var(--contour);
  border-radius: 16px;
  background: var(--snow-1);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--warm); background: rgba(226,98,44,0.05); }
.dropzone .dz-ico {
  width: 52px; height: 52px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: rgba(226,98,44,0.12);
  color: var(--warm);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.dropzone .dz-title { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 16px; }
.dropzone .dz-sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

/* Uploaded video previews */
.upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.upload-grid:empty { display: none; }
.upload-tile {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}
.upload-tile video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: #000; }
.upload-tile .u-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px;
  background: var(--paper);
}
.upload-tile .u-name {
  flex: 1; min-width: 0;
  font-size: 12.5px; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.upload-tile .u-remove {
  flex: 0 0 auto;
  border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: 18px; line-height: 1;
  padding: 2px 4px; border-radius: 6px;
}
.upload-tile .u-remove:hover { color: var(--warm); background: rgba(226,98,44,0.10); }

/* Text inputs */
.text-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  transition: border-color .2s;
}
.text-input:focus { outline: none; border-color: var(--warm); }
.input-prefix { position: relative; }
.input-prefix .pfx {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 15px; pointer-events: none;
}
.input-prefix .text-input { padding-left: 34px; }

.edit-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* Cover / staple photo picker */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.photo-grid:empty { display: none; }
.photo-tile {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--line);
  cursor: pointer;
  background: var(--snow-1);
  transition: border-color .2s, transform .15s;
}
.photo-tile:hover { transform: translateY(-2px); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile .pick {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 8px; text-align: center;
  font-family: var(--font-body); font-weight: 600; font-size: 12.5px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  opacity: 0; transition: opacity .2s;
}
.photo-tile:hover .pick { opacity: 1; }
.photo-tile.is-cover { border-color: var(--warm); }
.photo-tile.is-cover .pick { opacity: 0; }
.photo-tile .cover-badge {
  position: absolute; top: 8px; left: 8px; display: none;
  align-items: center; gap: 5px;
  font-family: var(--font-body); font-weight: 700; font-size: 11px; letter-spacing: 0.03em;
  color: #fff; background: var(--warm); border-radius: 999px; padding: 4px 10px;
  box-shadow: 0 2px 8px rgba(226,98,44,0.4);
}
.photo-tile.is-cover .cover-badge { display: inline-flex; }
.photo-tile .p-remove {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,0.5); color: #fff; font-size: 15px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.photo-tile .p-remove:hover { background: var(--warm); }

@media (max-width: 720px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 460px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 720px) {
  .upload-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .upload-grid { grid-template-columns: 1fr; }
}

/* ===========================================================
   Heading font: Fraunces (editorial serif, variable weight).
   Keep the big display headings at a refined 600 (not chunky), and
   give the hero accent phrase an italic flourish for that premium feel.
=========================================================== */
.hero-title, .cta-title, .logo, .footer-brand,
.identity-text h1 {
  font-weight: 600;
}
.hero-title .accent { font-style: italic; }

/* ===========================================================
   Browse athletes page
=========================================================== */

/* Intro band */
.browse-intro { padding: 48px 0 20px; }
.browse-intro .kicker { margin-bottom: 12px; }
.browse-intro h1 { font-size: clamp(30px, 4.5vw, 44px); font-weight: 600; letter-spacing: -0.01em; }
.browse-intro h1 .accent { font-style: italic; color: var(--warm); }
.browse-intro p { color: var(--muted); font-size: 17px; max-width: 560px; margin: 12px 0 0; }

/* Filter bar */
.filters {
  position: sticky; top: 68px; z-index: 20;
  background: rgba(243,248,250,0.9);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  margin-top: 24px;
}
.filters-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search-wrap { position: relative; flex: 1 1 240px; min-width: 200px; }
.search-wrap .s-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; border: 2px solid var(--muted); border-radius: 50%;
}
.search-wrap .s-ico::after { content: ""; position: absolute; right: -5px; bottom: -4px; width: 7px; height: 2px; background: var(--muted); transform: rotate(45deg); }
.search-input {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 11px 16px 11px 38px; transition: border-color .2s;
}
.search-input:focus { outline: none; border-color: var(--warm); }

/* segmented sport toggle */
.segment { display: inline-flex; background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
.segment button {
  font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--muted);
  background: none; border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: color .2s, background .2s;
}
.segment button.active { background: var(--warm); color: #fff; }

.filter-select {
  font-family: var(--font-body); font-size: 14.5px; font-weight: 500; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 10px 16px; cursor: pointer; transition: border-color .2s;
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%235f7381' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px;
}
.filter-select:focus { outline: none; border-color: var(--warm); }

.result-count { color: var(--muted); font-size: 14.5px; margin: 22px 0 18px; }
.result-count b { color: var(--ink); font-weight: 600; }

/* Athlete grid */
.athlete-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding-bottom: 80px; }
.a-card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.a-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px -18px rgba(32,48,58,0.4); border-color: rgba(226,98,44,0.4); }

/* reel thumbnail */
.a-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.a-thumb .grad { position: absolute; inset: 0; }
.a-thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.a-card:hover .a-thumb-img { transform: scale(1.04); }
.a-thumb-img { transition: transform .3s ease; }
.a-card:nth-child(6n+1) .grad { background: linear-gradient(140deg, #2b4a63, #16324f); }
.a-card:nth-child(6n+2) .grad { background: linear-gradient(140deg, #6a3a24, #3a2114); }
.a-card:nth-child(6n+3) .grad { background: linear-gradient(140deg, #26506a, #14384d); }
.a-card:nth-child(6n+4) .grad { background: linear-gradient(140deg, #7a4a2c, #402413); }
.a-card:nth-child(6n+5) .grad { background: linear-gradient(140deg, #33566b, #1b2f42); }
.a-card:nth-child(6n+6) .grad { background: linear-gradient(140deg, #5f4433, #2e2016); }
.a-thumb .play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 2px 7px rgba(0,0,0,0.55));
}
.a-thumb .play::before {
  content: ""; width: 0; height: 0; margin-left: 4px;
  border-left: 16px solid rgba(255,255,255,0.92);
  border-top: 10px solid transparent; border-bottom: 10px solid transparent;
}
.a-sport {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--font-body); font-weight: 700; font-size: 11.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: #fff; background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; padding: 5px 11px;
  backdrop-filter: blur(4px);
}
.a-open {
  position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body); font-weight: 600; font-size: 11px; color: #eafff4;
  background: rgba(20,60,40,0.55); border: 1px solid rgba(124,245,200,0.5); border-radius: 999px; padding: 5px 10px;
}
.a-open .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); }

/* card body */
.a-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.a-name { font-family: var(--font-head); font-weight: 600; font-size: 21px; color: var(--ink); margin: 0; }
.a-meta { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.a-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.a-tag { font-size: 12px; font-weight: 500; color: var(--ink-soft); background: var(--snow-1); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.a-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.a-level { font-size: 13px; color: var(--muted); }
.a-level b { color: var(--ink); font-weight: 600; }
.a-view { font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--warm); display: inline-flex; align-items: center; gap: 5px; }

.no-results { display: none; text-align: center; color: var(--muted); padding: 50px 0 80px; font-size: 16px; }

@media (max-width: 900px) { .athlete-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .athlete-grid { grid-template-columns: 1fr; }
  .filters { top: 60px; }
  .segment { width: 100%; justify-content: center; }
}
