/* ═══════════════════════════════════════════════════════
   project.css — shared layout styles for all project pages
   Inherits CSS variables from ../style.css
═══════════════════════════════════════════════════════ */

/* ── LAYOUT ─────────────────────────────────────────── */
.project-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 140px var(--pad-x) 100px;
}

/* ── BACK BUTTON (pill — matches nav-cta / card-cta DNA) */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--head);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: #f5f5f5;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(18, 18, 18, 0.12);
  margin: 48px 0;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}
.back-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}
.back-btn svg { stroke: currentColor; fill: none; width: 16px; height: 16px; flex-shrink: 0; }

/* ── PROJECT HEADER ──────────────────────────────────── */
.proj-header {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0 60px;
  margin-bottom: 100px;
  align-items: center;
}
.proj-meta-col {
  border-right: 1px solid var(--line);
  padding-right: 40px;
}
.proj-meta-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.proj-meta-item:first-child { padding-top: 0; }
.proj-meta-item:last-child  { border-bottom: none; }
.proj-meta-label {
  font-family: var(--head);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: block;
  margin-bottom: 6px;
}
.proj-meta-value {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.5;
}
.proj-title-col { padding-top: 4px; }
.proj-title {
  font-family: var(--head);
  font-size: clamp(2.4rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 24px;
}
.proj-desc {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-mid);
  font-weight: 400;
}
.proj-desc + .proj-desc { margin-top: 16px; }

/* ── HERO VIDEO ──────────────────────────────────────── */
.hero-video-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  margin-bottom: 80px;
  background: #f0f0f0;
}
.hero-video-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── YOUTUBE EMBED (responsive 16:9 iframe) ─────────── */
.yt-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  margin-bottom: 80px;
  background: #000;
}
.yt-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── SECTION ─────────────────────────────────────────── */
.section { margin-bottom: 80px; }
.section-header {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.section-title {
  font-family: var(--head);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 20px;
}
.section-desc {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-mid);
  font-weight: 400;
  max-width: 720px;
  margin: 0 auto;
}

/* ── SECTION LEAD-IN (contextual text above media) ───── */
.section-lead {
  font-family: var(--body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink-mid);
  max-width: 720px;
  margin: 48px auto 32px;
  text-align: center;
}
.section-lead-title {
  font-family: var(--head);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 12px;
}

/* ── GRIDS ───────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.grid-3 img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }

/* ── STATS ───────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 0 0 80px;
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
  justify-items: center;
}
/* Tighten the gap when section-header sits directly above stats */
.section-header + .stats-row { margin-top: -24px; }
.stat-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.stat-num {
  font-family: var(--head);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 10px;
}
.stat-label {
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 500;
}

/* ── MERCH HERO ──────────────────────────────────────── */
.merch-hero { width: 100%; aspect-ratio: 16/9; overflow: hidden; margin-bottom: 12px; }
.merch-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── BRAND LABEL ─────────────────────────────────────── */
.brand-label {
  font-family: var(--head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  display: block;
}

/* ── BRAND SECTION ───────────────────────────────────── */
.brand-section { margin-bottom: 60px; }

/* ── LOGO CARD ───────────────────────────────────────── */
.logo-card { overflow: hidden; }
.logo-card img {
  width: 100%;
  display: block;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.logo-card:hover img { transform: scale(1.04); }

/* ── PROGRAMME ───────────────────────────────────────── */
.prog-logos { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 52px; }
.prog-logos > * { overflow: hidden; }
.prog-logos img { width: 100%; display: block; }

.prog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 60px; }
.prog-item-title {
  font-family: var(--head);
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 12px;
}
.prog-item-text {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-mid);
  font-weight: 400;
}

/* ── COLOUR PALETTE (brand guidelines) ──────────────── */
.palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.palette > div { display: flex; flex-direction: column; gap: 10px; }
.swatch-block { width: 100%; aspect-ratio: 3/2; border-radius: 6px; }
.swatch-name {
  font-family: var(--head);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.swatch-hex {
  font-family: var(--body);
  font-size: 12px;
  color: var(--ink-dim);
  font-weight: 400;
}

/* ── TYPOGRAPHY GRID (brand guidelines) ─────────────── */
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.type-card {
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: #f8f8f8;
  border-radius: 8px;
}
.type-specimen {
  font-family: var(--head);
  font-size: 5rem;
  font-weight: 600;
  line-height: 1;
  min-height: 100px;
  display: flex;
  align-items: baseline;
  margin-bottom: 16px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.type-meta { margin-bottom: 16px; }
.type-name {
  display: block;
  font-family: var(--head);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.type-role {
  display: block;
  font-family: var(--body);
  font-size: 11px;
  color: var(--ink-dim);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.type-desc {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-mid);
  font-weight: 400;
}
.type-chars {
  display: block;
  font-family: var(--body);
  font-size: 11px;
  color: #666666;
  margin-top: auto;
  padding-top: 20px;
  line-height: 1.6;
}

/* ── ICON GRID (brand guidelines) ───────────────────── */
.icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.icon-cell { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.icon-cell img { width: 100%; max-width: 120px; display: block; }
.icon-label {
  font-family: var(--body);
  font-size: 12px;
  color: var(--ink-dim);
  font-weight: 400;
}

/* ── BRAND DESCRIPTION ───────────────────────────────── */
.brand-desc {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-mid);
  font-weight: 400;
  margin-bottom: 32px;
  max-width: 680px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ── LOGO SHOWCASE ───────────────────────────────────── */
.logo-showcase {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background: #f8f8f8;
  border-radius: 8px;
  margin-bottom: 12px;
}
.logo-showcase img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ── SECTION DESC LABEL (bold sub-heading above desc) ──── */
.section-desc-label { margin-bottom: 4px; }

/* ── EMAIL GRID (side-by-side emails) ─────────────────── */
.email-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.email-grid img {
  width: 100%;
  display: block;
}

/* ── 3-COL GRID (Personal Projects) ─────────────────── */
.three-col-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* ── EXECUTIVE SUMMARY CARD (compact dark island) ──────── */
.exec-card {
  background: var(--card-bg);
  border-radius: 40px;
  padding: clamp(28px, 3.5vw, 44px);
  margin-bottom: 80px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0  1px  0 rgba(255, 255, 255, 0.04) inset,
    0 40px 80px rgba(0, 0, 0, 0.08),
    0  8px 24px rgba(0, 0, 0, 0.06);
}
.exec-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23grain)'/%3E%3C/svg%3E");
  background-size: 300px;
  opacity: 0.035;
  mix-blend-mode: overlay;
  border-radius: 40px;
  pointer-events: none;
  z-index: 0;
}
.exec-grid {
  display: grid;
  grid-template-columns: 1fr 0.65fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
  position: relative;
  z-index: 1;
}
.exec-statement {
  padding: 4px 8px 0 0;
}
.exec-heading {
  font-family: var(--head);
  font-size: clamp(20px, 2.4vw, 32px);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 16px;
}
.exec-body {
  font-family: var(--head);
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: #ffffff;
}
.exec-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0 4px;
}
.exec-row {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.exec-key {
  font-family: var(--head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 6px;
}
.exec-val {
  font-family: var(--head);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.55;
}

/* ── APPROACH CARD GRID (2×2, dark theme) ────────────── */
.approach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 16px;
}
.approach-grid--3col {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 48px;
}
.approach-card {
  display: flex;
  flex-direction: column;
  background: #111111;
  border-radius: 20px;
  padding: clamp(28px, 3.5vw, 40px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.approach-card-title {
  font-family: var(--head);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 14px;
}
.approach-card-desc {
  font-family: var(--body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: #E0E0E0;
}

/* ── LIGHT PAGE BACKGROUND ───────────────────────────── */
.page-light {
  background: var(--surface);
  background-attachment: unset;
}

/* ── APPROACH CARD — LIGHT VARIANT ────────────────────── */
.approach-card--light {
  background: #ffffff;
  border: none;
  box-shadow: none;
}
.approach-card--light .approach-card-title {
  color: #1d1d1f;
}
.approach-card--light .approach-card-desc {
  color: #424245;
}

/* ── SOCIAL PAIR (2-up → stacked on mobile) ─────────── */
.social-pair {
  display: flex;
  gap: 12px;
}
.social-pair img {
  flex: 1;
  display: block;
  min-width: 0;
}

/* ── NHL STATICS GRID (2 top + 1 full-width bottom) ──── */
.nhl-statics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.nhl-statics-grid img {
  width: 100%;
  display: block;
}

/* ── MOBILE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .project-wrap { padding-top: 120px; }
  .back-btn { margin: 32px 0 40px; }
  .proj-header { grid-template-columns: 1fr; gap: 0; }
  .proj-meta-col {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 28px;
    margin-bottom: 28px;
  }
  .exec-grid { grid-template-columns: 1fr; gap: 24px; }
  .exec-statement { padding-right: 0; }
  .exec-row { padding: 16px 0; }
  .exec-table { padding: 0; }
  .grid-2, .grid-3, .prog-logos, .prog-grid, .type-grid, .email-grid, .nhl-statics-grid { grid-template-columns: 1fr; }
  .social-pair { flex-direction: column; }
  .approach-grid, .approach-grid--3col { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 24px; padding: 40px 0; }
  .stats-row .stat-cell:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .icon-grid { grid-template-columns: repeat(2, 1fr); }
  .three-col-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .palette { grid-template-columns: 1fr; }
  .logo-showcase { padding: 32px; }
}
@media (max-width: 480px) {
  .three-col-grid { grid-template-columns: 1fr; }
}
