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

/* Shared brand tokens. Keep --white a foreground; remap old panels below. */
:root {
  --navy: #111d2b;
  --panel: #172838;
  --ice: #d9ecf7;
  --muted: #a4bbc9;
  --vermilion: #ff593d;
  --font-heading: "Space Grotesk", sans-serif;
  --font-body: "Manrope", sans-serif;
  --font-label: "DM Mono", monospace;
  --ink: var(--ice);
  --ink-soft: var(--muted);
  --blue: var(--ice);
  --blue-deep: var(--ice);
  --blue-bright: var(--ice);
  --mist: var(--panel);
  --mist-strong: #203547;
  --paper: var(--navy);
  --white: var(--ice);
  --line: #30485a;
  --line-strong: #557185;
  --coral: var(--vermilion);
  --kelp: var(--panel);
  --lemon: var(--panel);
  --shadow: 0 18px 48px rgb(0 0 0 / 14%);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --page: min(1240px, calc(100% - 80px));
}

body.branded-site {
  margin: 0;
  min-width: 0;
  color: var(--ice);
  background: var(--navy);
  font-family: var(--font-body);
  line-height: 1.65;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}

.branded-site *,
.branded-site *::before,
.branded-site *::after {
  box-sizing: border-box;
  min-width: 0;
}

.branded-site main {
  width: var(--page);
  max-width: 1240px;
  margin-inline: auto;
}

.branded-site :where(img, video, canvas, iframe) {
  max-width: 100%;
}

.branded-site :where(p, li, dd, a, h1, h2, h3, h4) {
  overflow-wrap: anywhere;
}

.branded-site :where(h1, h2, h3, h4, blockquote) {
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.branded-site h1 {
  font-size: clamp(3rem, 5.5vw, 5rem);
}

.branded-site h2 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
}

.branded-site :where(a) {
  text-underline-offset: 0.22em;
}

.branded-site :focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px var(--navy);
}

.branded-site :where([id]) {
  scroll-margin-top: 120px;
}

.branded-site ::selection {
  color: var(--navy);
  background: var(--ice);
}

.branded-site .skip-link {
  color: var(--navy);
  background: var(--ice);
  font-weight: 700;
}

/* Shared chrome, including the independently authored homepage. */
.branded-site .site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: min(1240px, calc(100% - 80px));
  min-height: 96px;
  margin: 0 auto;
  padding: 16px 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgb(17 29 43 / 94%);
  box-shadow: none;
  backdrop-filter: blur(18px);
  font-family: var(--font-body);
}

.branded-site .wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ice);
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.branded-site .wordmark > span:last-child {
  text-transform: lowercase;
}

.branded-site .brand-mark {
  display: block;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.branded-site .site-nav {
  grid-column: auto;
  justify-self: end;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  padding: 0;
  gap: clamp(18px, 2.5vw, 36px);
  border: 0;
}

.branded-site :is(.site-nav, .footer-links) a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.branded-site :is(.site-nav, .footer-links) a:is(:hover, :focus-visible, [aria-current="page"]) {
  color: var(--ice);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

.branded-site .header-cta {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 18px;
  color: var(--ice);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  transition: color 160ms ease, background-color 160ms ease;
}

.branded-site .header-cta:is(:hover, :focus-visible) {
  color: var(--navy);
  background: var(--ice);
  border-color: var(--ice);
  transform: none;
}

.branded-site :is(.menu-button, .mobile-nav-cta) {
  display: none;
}

.branded-site .site-footer {
  width: min(1240px, calc(100% - 80px));
  margin-inline: auto;
  padding: 48px 0 32px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 32px;
  color: var(--ice);
  border-top: 1px solid var(--line);
  background: transparent;
  font-family: var(--font-body);
}

.branded-site .site-footer p {
  max-width: 52ch;
  color: var(--muted);
  line-height: 1.7;
}

.branded-site .footer-links {
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding-top: 20px;
}

.branded-site .footer-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.branded-site .footer-note {
  font-family: var(--font-label);
  letter-spacing: 0.06em;
}

/* Legacy content only. No home-* layout or component overrides live here. */
.branded-site.legacy-page {
  --barkley-ink: var(--ice);
  --barkley-gold: var(--ice);
  --barkley-cream: var(--navy);
}

.branded-site.legacy-page main {
  overflow: visible;
  font-family: var(--font-body);
}

.branded-site.legacy-page :is(h1, h2, h3, h4, blockquote) {
  color: var(--ice);
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.branded-site.legacy-page h1 {
  font-size: clamp(3rem, 5.5vw, 5rem);
}

.branded-site.legacy-page h2 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
}

.branded-site.legacy-page h3 {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.branded-site.legacy-page :is(h1, h2, h3, blockquote) :is(em, strong) {
  color: inherit;
  font-style: normal;
  font-weight: 700;
}

.branded-site.legacy-page :is(.collection-lede, .about-introduction, .about-copy p,
  .about-story-conclusion, .about-audience > :where(p:last-child), .academy-gateway-tagline,
  .barkley-tagline, .console-title, .practice-item strong, .about-path strong,
  .case-study-outcomes strong, .games-hero-console strong) {
  color: var(--ice);
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.branded-site.legacy-page p.about-introduction {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 1.3;
}

.branded-site.legacy-page p.collection-lede-compact {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.5;
}

.branded-site.legacy-page :is(.eyebrow, .barkley-kicker, .barkley-card-kicker,
  .console-topline, .console-label, .console-note, .card-index, .project-status,
  .collection-project-index, .practice-number, .case-study-card > span,
  .case-study-outcomes span, .about-facts dt, .shelf-group-jump small) {
  color: var(--muted);
  font-family: var(--font-label);
}

/* Explicit surfaces avoid turning foreground --white into a pale background. */
.branded-site.legacy-page :is(.hero-console, .feature-card, .feature-card-visual,
  .project-card, .process-card, .closing-banner, .collection-band,
  .collection-series-intro, .collection-project, .collection-aside,
  .case-study-heading, .case-study-card, .case-study-outcomes, .learning-offer,
  .work-category, .work-project-spotlight, .work-project-visual, .about-note,
  .about-thesis, .about-story-conclusion, .about-principle, .about-audience,
  .games-hero-console, .academy-gateway, .game-card, .game-preview,
  .games-learning-note, .barkley-game-card, .barkley-hero-frame,
  .barkley-dean, .barkley-dean-portrait, .barkley-making, .barkley-disclaimer) {
  color: var(--ice);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: none;
}

.branded-site.legacy-page :is(.feature-card-visual, .game-preview, .work-project-visual) {
  background: var(--navy);
}

.branded-site.legacy-page :is(.hero-console::after, .brand-masthead-art::before) {
  content: none;
}

.branded-site.legacy-page :is(.about-capabilities, .about-principle-ai > p,
  .games-hero-console small, .game-deck, .case-study-heading > p,
  .barkley-making > p, .feature-card-copy > p, .work-category > p:not(.eyebrow)) {
  color: var(--muted);
}

.branded-site .button,
.branded-site.legacy-page :is(.barkley-button, .barkley-card-button) {
  max-width: 100%;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ice);
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
  text-decoration: none;
  box-shadow: none;
  transform: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.branded-site .button-primary,
.branded-site.legacy-page .barkley-button {
  color: var(--navy);
  background: var(--vermilion);
  border-color: var(--vermilion);
}

.branded-site .button-light {
  color: var(--navy);
  background: var(--ice);
  border-color: var(--ice);
}

.branded-site .button:is(:hover, :focus-visible),
.branded-site.legacy-page :is(.barkley-button, .barkley-card-button):is(:hover, :focus-visible) {
  border-color: var(--ice);
  transform: none;
}

.branded-site :is(.button-secondary, .button-outline-light):hover,
.branded-site.legacy-page .barkley-card-button:hover {
  background: var(--mist-strong);
}

.branded-site.legacy-page :is(.project-status, .development-badge, .live-label,
  .episode-chip, .game-tags li, .barkley-chips li, .about-identity-row span,
  .about-identity-row a, .signal-list span, .project-meta span, .artifact-row span,
  .collection-tags span) {
  max-width: 100%;
  color: var(--muted);
  background: var(--navy);
  border: 1px solid var(--line-strong);
  font-family: var(--font-label);
  line-height: 1.5;
  white-space: normal;
}

.branded-site.legacy-page .status-dot {
  background: var(--vermilion);
  box-shadow: none;
}

.branded-site.legacy-page :is(.text-link, .text-link-light, .about-introduction strong) {
  color: var(--ice);
}

.branded-site.legacy-page :is(.hero, .page-hero, .games-hero, .about-hero, .barkley-hero) {
  min-height: 0;
  padding-block: clamp(64px, 7vw, 104px);
  gap: clamp(32px, 5vw, 64px);
}

.branded-site.legacy-page :is(.section, .games-series, .about-story,
  .about-background, .barkley-catalogue) {
  padding-block: clamp(64px, 7vw, 96px);
}

.branded-site.legacy-page :is(.academy-gateway, .about-thesis, .about-principles,
  .about-audience, .work-project-spotlight, .games-learning-note,
  .barkley-dean, .barkley-making, .barkley-disclaimer) {
  margin-bottom: clamp(64px, 7vw, 96px);
}

.branded-site.legacy-page :is(.work-category, .project-card, .game-card,
  .feature-card, .about-principle, .case-study-card) {
  min-height: 0;
}

.branded-site.legacy-page :is(.work-category h2, .project-card h3,
  .game-card-copy h3, .case-study-card h3, .work-project-copy h2) {
  margin-top: 32px;
}

.branded-site.legacy-page .about-principle h2 {
  margin: 32px 0 24px;
}

.branded-site.legacy-page .collection-body {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: clamp(32px, 5vw, 64px);
}

.branded-site.legacy-page .collection-project {
  grid-template-columns: 32px minmax(0, 1fr);
  padding: 28px;
  gap: 16px;
}

.branded-site.legacy-page .collection-project .project-status {
  grid-column: 2;
  justify-self: start;
}

.branded-site.legacy-page .collection-aside {
  top: 120px;
}

.branded-site.legacy-page :is(.game-preview, .work-project-visual, .barkley-dean-portrait) {
  min-height: 0;
  height: clamp(240px, 32vw, 440px);
  max-height: 440px;
}

.branded-site.legacy-page :is(.game-preview, .work-project-visual, .barkley-dean-portrait) img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
  transform: none;
}

.branded-site.legacy-page :is(.barkley-hero, .barkley-catalogue,
  .barkley-dean, .barkley-making, .barkley-disclaimer) {
  width: 100%;
  max-width: 100%;
}

.branded-site.legacy-page .academy-gateway {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
}

/* In-flow thumbnails reserve their space; only image regions have fixed bounds. */
.branded-site.legacy-page :is(.academy-gateway-gallery, .barkley-hero-gallery) {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-height: 0;
  height: clamp(280px, 34vw, 420px);
  max-height: 420px;
  margin: 0;
  padding: 6px;
}

.branded-site.legacy-page :is(.academy-gateway-gallery a, .barkley-hero-frame) {
  position: static;
  inset: auto;
  z-index: auto;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 260px;
  margin: 0;
  aspect-ratio: auto;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--navy);
  box-shadow: none;
  transform: none;
}

.branded-site.legacy-page :is(.academy-gateway-gallery a:first-child, .barkley-hero-frame-main) {
  grid-column: 1 / -1;
}

.branded-site.legacy-page :is(.academy-gateway-gallery, .barkley-hero-gallery) img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.branded-site.legacy-page .barkley-game-card {
  grid-template-rows: auto 1fr;
  border-radius: var(--radius-md);
}

.branded-site.legacy-page .barkley-game-card > img {
  height: auto;
  max-height: 300px;
  aspect-ratio: 1470 / 870;
  object-fit: contain;
  background: var(--navy);
  border-bottom: 1px solid var(--line);
}

.branded-site.legacy-page .barkley-promotions {
  border: 1px solid var(--line);
}

.branded-site.legacy-page .barkley-promotions span {
  color: var(--muted);
  background: var(--navy);
  border-color: var(--line);
  font-family: var(--font-body);
}

.branded-site.legacy-page .barkley-promotion-caption {
  margin-top: 0;
  color: var(--muted);
}

.branded-site.legacy-page .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (max-width: 1100px) {
  .branded-site.legacy-page :is(.hero, .page-hero, .games-hero, .about-hero,
    .academy-gateway, .barkley-hero, .about-thesis, .about-story,
    .about-background, .about-audience, .barkley-dean, .barkley-making,
    .games-learning-note, .case-study-heading, .learning-offer) {
    grid-template-columns: minmax(0, 1fr);
  }

  .branded-site.legacy-page :is(.academy-gateway-gallery, .barkley-hero-gallery) {
    max-width: 640px;
    height: 420px;
    margin-inline: auto;
  }
}

@media (max-width: 980px) {
  .branded-site.legacy-page .collection-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .branded-site.legacy-page .collection-aside {
    position: static;
  }
}

@media (max-width: 1040px) {
  :root {
    --page: calc(100% - 40px);
  }

  .branded-site .site-header {
    width: var(--page);
    min-height: 88px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 12px;
    padding-block: 12px;
  }

  .branded-site .wordmark {
    gap: 2px;
    font-size: 1.125rem;
  }

  .branded-site .header-cta {
    display: none;
  }

  .branded-site .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    min-height: 44px;
    padding: 8px 12px;
    color: var(--ice);
    background: var(--panel);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-label);
    font-size: 0.75rem;
    cursor: pointer;
  }

  .branded-site .site-nav {
    grid-column: 1 / -1;
    display: none;
    width: 100%;
    max-height: calc(100dvh - 100px);
    margin-top: 12px;
    padding: 16px 6px 8px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    overflow-y: auto;
    border-top: 1px solid var(--line);
    background: var(--navy);
  }

  .branded-site .site-nav.is-open,
  .no-js .branded-site .site-nav {
    display: flex;
  }

  .no-js .branded-site .menu-button {
    display: none;
  }

  .branded-site .site-nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 10px 12px;
  }

  .branded-site .site-nav .mobile-nav-cta {
    display: inline-flex;
    justify-content: center;
    margin-top: 12px;
    color: var(--ice);
    background: var(--panel);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
  }

  .branded-site .site-footer {
    width: var(--page);
    grid-template-columns: minmax(0, 1fr);
    padding-block: 36px 24px;
    gap: 20px;
  }

  .branded-site .footer-links {
    padding-top: 0;
    gap: 8px 24px;
  }

  .branded-site.legacy-page p.about-introduction {
    font-size: 1.6rem;
  }

  .branded-site.legacy-page :is(.academy-gateway-gallery, .barkley-hero-gallery) {
    height: clamp(260px, 68vw, 360px);
    max-height: 360px;
    gap: 10px;
  }

  .branded-site.legacy-page :is(.game-card-copy, .work-project-copy,
    .barkley-game-copy, .work-category) {
    padding: 28px 22px;
  }

  .branded-site.legacy-page :is(.game-preview, .work-project-visual, .barkley-dean-portrait) {
    height: clamp(200px, 60vw, 360px);
    max-height: 360px;
  }

  .branded-site.legacy-page .collection-project {
    padding: 24px 20px;
    grid-template-columns: minmax(0, 1fr);
  }

  .branded-site.legacy-page .collection-project .project-status {
    grid-column: 1;
  }
}

.case-feature { display:grid; grid-template-columns:1.1fr 1fr; gap:60px; align-items:center; padding:40px; margin:10px 0 60px; border:1px solid var(--line-strong); border-radius:16px; background:linear-gradient(125deg,#1c3040,#142331 75%); }
.branded-site .case-feature h2 { font-size:clamp(1.9rem,3.2vw,2.9rem); line-height:1.13; letter-spacing:-.045em; margin:18px 0 22px; }
.case-feature-copy > p:not(.eyebrow) { color:var(--muted); font-size:.9rem; line-height:1.85; max-width:60ch; }
.case-feature-actions { display:flex; flex-wrap:wrap; align-items:center; gap:22px; margin:28px 0; font-size:.8rem; }
.case-feature-actions .button-primary { border-radius:999px; color:var(--navy); background:var(--vermilion); border-color:var(--vermilion); font-weight:800; }
.case-feature-copy .case-feature-note { font-size:.69rem !important; }
.case-feature-preview { background:#e1edf0; color:#142737; padding:26px 30px; border-radius:8px; box-shadow:0 18px 40px #08142055; }
.case-feature-preview > p { font:.58rem/1.8 var(--font-label); text-transform:uppercase; color:#4f6976; }
.branded-site .case-feature-preview h3 { font-size:clamp(1.65rem,2.5vw,2.1rem); line-height:1.1; letter-spacing:-.04em; margin:18px 0 24px; color:#142737; }
.case-feature-preview ol { list-style:none; margin:0; padding:0; }
.case-feature-preview li { display:grid; grid-template-columns:95px 1fr; gap:14px; border-top:1px solid #b9ced7; padding:12px 0; font-size:.73rem; line-height:1.7; }
.case-feature-preview > div { font-size:.7rem; font-weight:800; border-top:2px solid #557b8d; padding-top:16px; margin-top:12px; }
@media(max-width:980px) { .case-feature { gap:30px; padding:28px; }.case-feature-preview { padding:22px; }.case-feature-preview li { grid-template-columns:1fr; gap:4px; } }
@media(max-width:720px) { .case-feature { grid-template-columns:1fr; gap:26px; padding:24px 20px; margin-bottom:42px; }.case-feature-preview li { grid-template-columns:90px 1fr; gap:10px; }.case-feature-actions { align-items:start; flex-direction:column; gap:20px; }.case-feature-preview > p { font-size:.54rem; } }

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .branded-site *,
  .branded-site *::before,
  .branded-site *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }

  .branded-site .reveal {
    opacity: 1;
    transform: none;
  }
}
