/* ==============================
   Ryk Benade — site styles
   ============================== */

:root {
  --bg: #ffffff;
  --ink: #0e0e0f;
  --ink-soft: #4a4a4d;
  --line: #e6e6e6;
  --accent: #ff3a1f;
  --max: 1440px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

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

/* NAV */
nav.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,0.0);
  transition: background .25s ease, border-color .25s ease, color .25s ease;
  border-bottom: 1px solid transparent;
}
nav.top.over-hero { color: #fff; }
nav.top.scrolled {
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
nav.top .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
nav.top .brand {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600; font-size: 18px; letter-spacing: -0.01em;
  color: inherit;
}
nav.top ul { list-style: none; display: flex; gap: 28px; }
nav.top a {
  font-size: 14px; font-weight: 500;
  color: inherit; opacity: 0.75;
  transition: opacity .2s;
}
nav.top a:hover, nav.top a.active { opacity: 1; }

/* CINEMATIC HERO */
header.cinematic {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
header.cinematic .bg {
  position: absolute; inset: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
}

/* Hero video — full-bleed YouTube/Vimeo iframe sized to always cover.
   Desktop only — mobile uses the static .bg image fallback.
   (iOS blocks YouTube autoplay reliably; iframe thumbnail also distorts on portrait viewports.) */
header.cinematic .video-bg {
  position: absolute; inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
}
header.cinematic .video-bg iframe {
  position: absolute;
  top: 50%; left: 50%;
  /* iframe sized larger than viewport to maintain 16:9 cover */
  width: 177.78vh;   /* 16:9 of vh */
  height: 56.25vw;   /* 16:9 of vw */
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}
@media (max-width: 900px), (orientation: portrait) {
  /* Hide video on mobile + portrait — show static hero image instead */
  header.cinematic .video-bg { display: none; }
}
header.cinematic .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.05) 35%, rgba(0,0,0,0.65) 100%);
  z-index: 1;
}
header.cinematic .wrap {
  position: relative;
  z-index: 2;
  padding-top: 120px;
  padding-bottom: 80px;
  width: 100%;
}
header.cinematic .eyebrow { color: #fff; opacity: 0.9; margin-bottom: 24px; }
header.cinematic h1.display {
  color: #fff;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(44px, 6.5vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 18ch;
  margin-bottom: 28px;
}
header.cinematic h1.display em { font-style: italic; }
header.cinematic .lede {
  color: rgba(255,255,255,0.9);
  font-size: clamp(17px, 1.3vw, 20px);
  max-width: 56ch;
}
header.cinematic .scroll-cue {
  position: absolute; left: 50%; bottom: 32px;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 11px; letter-spacing: 0.25em;
  text-transform: uppercase; color: rgba(255,255,255,0.7);
}

/* generic header for non-hero pages */
header.hero { padding: 152px 0 80px; border-bottom: 1px solid var(--line); }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 24px;
}
h1.display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 14ch;
  margin-bottom: 32px;
}
h1.display em { font-style: italic; color: var(--accent); }

header.page { padding: 152px 0 48px; }
header.page .eyebrow { margin-bottom: 16px; }
header.page h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
header.page p.sub {
  margin-top: 24px;
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 56ch;
}

/* SECTION */
section { padding: 96px 0; border-bottom: 1px solid var(--line); }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 48px;
}
.section-head h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500; font-size: 32px; letter-spacing: -0.015em;
}
.section-head a {
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
}
.section-head a:hover { color: var(--accent); }

/* ==============================
   ALIGNED UNIFORM GRID
   Every tile same aspect ratio so everything snaps to a baseline.
   ============================== */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.tile {
  position: relative;
  overflow: hidden;
  background: #1a1a1c;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  display: block;
}
.tile img,
.tile video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.tile:hover img,
.tile:hover video { transform: scale(1.04); }

.tile .meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 18px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.0) 100%);
  color: #fff;
  pointer-events: none;
}
.tile .label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; opacity: 0.85;
  margin-bottom: 4px;
}
.tile h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500; font-size: 18px;
  letter-spacing: -0.005em;
  line-height: 1.2;
}

/* video tile badge */
.tile.video::after {
  content: "▶";
  position: absolute; top: 14px; right: 14px;
  font-size: 11px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border-radius: 999px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  letter-spacing: -0.05em;
  padding-left: 2px;
  z-index: 3;
}

/* size variants kept for occasional emphasis */
.tile.wide { grid-column: span 2; aspect-ratio: 4 / 5; }
.tile.tall { grid-row: span 2; aspect-ratio: 4 / 5; }

.tile.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1a1c 0%, #2a2a2c 100%);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 16px;
}
.tile.placeholder .ph-text {
  font-family: 'Fraunces', serif;
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about p {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 24px;
}
.about p.kicker {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 28px;
  line-height: 1.35;
  margin-bottom: 32px;
}
.credits { font-size: 14px; color: var(--ink-soft); }
.credits dt {
  font-weight: 600; color: var(--ink); letter-spacing: 0.04em;
  text-transform: uppercase; font-size: 11px; margin-top: 24px;
}
.credits dt:first-child { margin-top: 0; }
.credits dd { margin-top: 6px; }
.credits a { border-bottom: 1px solid var(--ink); color: var(--ink); }

/* CASE STUDY */
.case-hero { margin-bottom: 48px; }
.case-hero img { border-radius: 2px; }

.case-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}
.case-meta dt {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft);
}
.case-meta dd { font-size: 16px; margin-top: 6px; }

.case-body {
  max-width: 64ch;
  font-size: 18px; line-height: 1.65;
  margin: 0 auto 64px;
}
.case-body p { margin-bottom: 18px; }

.case-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 64px;
}
.case-gallery img,
.case-gallery video {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 2px;
}
.case-gallery .full { grid-column: span 3; aspect-ratio: 16/9; }
.case-gallery .full img,
.case-gallery .full video { aspect-ratio: 16/9; }

.case-nav {
  display: flex;
  justify-content: space-between;
  padding-top: 48px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.case-nav a {
  color: var(--ink-soft);
  font-weight: 500;
}
.case-nav a:hover { color: var(--accent); }

/* FOOTER */
footer {
  padding: 64px 0;
  background: var(--ink);
  color: rgba(255,255,255,0.7);
}
footer .wrap {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 24px;
}
footer .brand {
  font-family: 'Fraunces', serif; color: #fff;
  font-size: 18px; font-weight: 500;
}
footer ul { list-style: none; display: flex; gap: 28px; flex-wrap: wrap; }
footer a { font-size: 14px; }
footer a:hover { color: #fff; }

/* Career timeline (about page) */
.career-list {
  display: flex; flex-direction: column;
  gap: 0;
}
.career-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.career-row:last-child { border-bottom: 1px solid var(--line); }
.career-when {
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding-top: 4px;
}
.career-what h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 24px; font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.career-where {
  font-size: 13px; font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.career-what p {
  font-size: 16px; line-height: 1.65;
  max-width: 60ch;
  color: var(--ink);
}
.career-what p a {
  border-bottom: 1px solid var(--ink-soft);
  font-weight: 500;
}
.career-what p a:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 800px) {
  .career-row { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .career-when { padding-top: 0; }
}

/* Homepage stat strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 64px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat-strip .stat-num {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 8px;
}
.stat-strip .stat-num em { font-style: italic; color: var(--accent); }
.stat-strip .stat-label {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.45;
  max-width: 28ch;
}
@media (max-width: 900px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); gap: 24px; padding: 48px 0; }
}
@media (max-width: 480px) {
  .stat-strip { grid-template-columns: 1fr; }
}

/* Homepage 'Currently / Previously' band */
.career-band {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.career-band h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.career-band p.lede {
  font-size: 18px; line-height: 1.6;
  color: var(--ink); margin-bottom: 24px;
}
.career-band .marquee {
  display: flex; flex-wrap: wrap;
  gap: 12px 18px;
}
.career-band .marquee span {
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.career-band .marquee strong {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.career-band a.cta {
  display: inline-block;
  margin-top: 16px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--ink);
  font-size: 14px; font-weight: 500;
}
.career-band a.cta:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 900px) {
  .career-band { grid-template-columns: 1fr; gap: 40px; padding: 56px 0; }
}

/* 3-column brand portal grid (homepage TM/CS/GB section) — fills full row width */
.grid.brand-portals {
  grid-template-columns: repeat(3, 1fr);
}
.grid.brand-portals .tile {
  grid-column: auto;
  aspect-ratio: 4 / 5;
}
@media (max-width: 1100px) {
  .grid.brand-portals { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .grid.brand-portals { grid-template-columns: 1fr; }
}

/* Responsive Vimeo / YouTube embed (16:9) */
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 32px 0;
  background: #000;
  border-radius: 2px;
}
.video-embed iframe,
.video-embed video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
  object-fit: cover;
}

/* Full-bleed inline video (autoplay, loop, muted — like a moving image) */
.inline-video {
  width: 100%;
  border-radius: 2px;
  display: block;
  margin: 0;
}

/* ==============================
   BRAND-THEMED CASE STUDY VARIANTS
   Each brand swaps key tokens via a body class so layouts feel distinct
   while sharing the same component system.
   ============================== */

/* TrainMore — editorial campaign, warm red accent */
body.brand-trainmore { --accent: #ff3a1f; }
body.brand-trainmore header.page h1 { font-style: italic; }
body.brand-trainmore .case-pull {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.2;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.015em;
  max-width: 24ch;
  margin: 64px auto;
  text-align: center;
}

/* Clubsportive — wellness, calm, sage */
body.brand-clubsportive {
  --accent: #4a6b5f;
  background: #fafaf7;
}
body.brand-clubsportive section { background: #fafaf7; }
body.brand-clubsportive header.page { padding: 200px 0 64px; }
body.brand-clubsportive header.page h1 { font-weight: 400; }
body.brand-clubsportive .case-body { font-size: 19px; line-height: 1.75; }
body.brand-clubsportive .case-gallery img { border-radius: 8px; }

/* Gymbox — loud, edgy, dark */
body.brand-gymbox {
  --bg: #0a0a0a;
  --ink: #ffffff;
  --ink-soft: rgba(255,255,255,0.7);
  --line: rgba(255,255,255,0.12);
  --accent: #ffeb00;
  background: var(--bg);
  color: var(--ink);
}
body.brand-gymbox section { background: var(--bg); }
body.brand-gymbox nav.top.scrolled {
  background: rgba(10,10,10,0.94);
  border-bottom-color: var(--line);
}
body.brand-gymbox nav.top a { color: rgba(255,255,255,0.85); }
body.brand-gymbox header.page h1 {
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.95;
}
body.brand-gymbox .eyebrow { color: var(--accent); }
body.brand-gymbox .case-meta { border-color: var(--line); }
body.brand-gymbox .case-meta dt { color: var(--ink-soft); }
body.brand-gymbox .case-body strong { color: var(--accent); }
body.brand-gymbox .case-nav { border-color: var(--line); }
body.brand-gymbox .case-gallery img,
body.brand-gymbox .case-hero img { border-radius: 0; }

/* UGG — corporate, structured */
body.brand-ugg { --accent: #1a3a6b; }
body.brand-ugg header.page h1 { font-family: 'Inter', sans-serif; font-weight: 600; }
body.brand-ugg .case-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 48px 0 64px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
body.brand-ugg .case-pillars .pillar h4 {
  font-family: 'Fraunces', serif;
  font-size: 14px; font-weight: 600;
  color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 12px;
}
body.brand-ugg .case-pillars .pillar p {
  font-size: 15px; line-height: 1.6; color: var(--ink-soft);
}

/* Treatwell — social-grid feel, tight */
body.brand-treatwell .case-gallery.tight {
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
body.brand-treatwell .case-gallery.tight img {
  aspect-ratio: 1 / 1;
  border-radius: 0;
}
body.brand-treatwell { --accent: #ff5e7a; }

/* Spree — magazine alternating */
body.brand-spree { --accent: #d4391c; }
body.brand-spree .magazine-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin: 64px 0;
}
body.brand-spree .magazine-row.reverse > :first-child { order: 2; }
body.brand-spree .magazine-row img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: 2px;
}
body.brand-spree .magazine-row h3 {
  font-family: 'Fraunces', serif;
  font-size: 28px; font-weight: 500;
  margin-bottom: 16px;
}
body.brand-spree .magazine-row p { font-size: 17px; line-height: 1.65; color: var(--ink-soft); }

/* kidofdoom — dark, moody, full-bleed */
body.brand-kidofdoom {
  --bg: #0c0c0e;
  --ink: #f0f0f2;
  --ink-soft: rgba(240,240,242,0.6);
  --line: rgba(255,255,255,0.1);
  --accent: #c8a165;
  background: var(--bg);
  color: var(--ink);
}
body.brand-kidofdoom section { background: var(--bg); }
body.brand-kidofdoom nav.top.scrolled {
  background: rgba(12,12,14,0.94);
  border-bottom-color: var(--line);
}
body.brand-kidofdoom nav.top a { color: rgba(240,240,242,0.7); }
body.brand-kidofdoom .case-meta { border-color: var(--line); }
body.brand-kidofdoom .case-meta dt { color: var(--ink-soft); }
body.brand-kidofdoom .case-nav { border-color: var(--line); }
body.brand-kidofdoom header.page h1 {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
}
body.brand-kidofdoom .case-pull {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(24px, 2.5vw, 36px);
  line-height: 1.4;
  font-style: italic;
  color: var(--accent);
  max-width: 32ch;
  margin: 64px auto;
  text-align: center;
}
body.brand-kidofdoom .full-bleed-img {
  margin: 64px calc(50% - 50vw);
  width: 100vw;
}
body.brand-kidofdoom .full-bleed-img img {
  width: 100%; height: auto;
}

/* Logos — clean white grid */
body.brand-logos { --accent: #000000; }
body.brand-logos .logo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 32px 0;
}
body.brand-logos .logo-grid .logo-cell {
  aspect-ratio: 1 / 1;
  background: #f6f6f6;
  display: grid; place-items: center;
  padding: 0;
  border-radius: 2px;
  overflow: hidden;
}
body.brand-logos .logo-grid img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  max-width: 70%;
  max-height: 70%;
  display: block;
}

/* Mobile adjustments for brand variants */
@media (max-width: 800px) {
  body.brand-treatwell .case-gallery.tight { grid-template-columns: repeat(2, 1fr); }
  body.brand-spree .magazine-row { grid-template-columns: 1fr; gap: 24px; margin: 32px 0; }
  body.brand-spree .magazine-row.reverse > :first-child { order: 0; }
  body.brand-ugg .case-pillars { grid-template-columns: 1fr; gap: 24px; }
  body.brand-logos .logo-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}

/* MOBILE */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .wrap { padding: 0 20px; }
  nav.top ul { gap: 18px; }
  nav.top a { font-size: 13px; }
  header.cinematic { min-height: 80vh; }
  header.cinematic .wrap { padding-top: 96px; padding-bottom: 64px; }
  header.hero, header.page { padding: 120px 0 48px; }
  section { padding: 64px 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tile.wide { grid-column: span 2; }
  .tile.tall { grid-row: auto; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .case-meta { grid-template-columns: 1fr 1fr; }
  .case-gallery { grid-template-columns: 1fr; }
  .case-gallery .full { grid-column: auto; aspect-ratio: 4/3; }
  .case-gallery .full img,
  .case-gallery .full video { aspect-ratio: 4/3; }
}
