/* ============================================
   BREACH CULTURE — Design System
   A parkour and street culture media platform.
   Dark. Cinematic. Editorial. Unapologetic.
   ============================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Brand Colours */
  --color-bg: #0a0a0a;
  --color-bg-elevated: #111111;
  --color-bg-card: #161616;
  --color-bg-hover: #1c1c1c;
  --color-surface: #1a1a1a;
  --color-border: #2a2a2a;
  --color-border-light: #333333;

  /* Text */
  --color-text: #f0ede8;
  --color-text-secondary: #a8a39c;
  --color-text-muted: #6b6660;
  --color-text-inverse: #0a0a0a;

  /* Accent */
  --color-accent: #E8552E;
  --color-accent-hover: #f06a45;
  --color-accent-dark: #c4421f;

  /* Typography */
  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-body: 'Crimson Pro', 'Georgia', serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-ui: 'Barlow', sans-serif;

  /* Type Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.85rem);
  --text-sm: clamp(0.85rem, 0.8rem + 0.25vw, 0.95rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.35rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  --text-2xl: clamp(2rem, 1.5rem + 2vw, 3rem);
  --text-3xl: clamp(2.5rem, 1.8rem + 3vw, 4.5rem);
  --text-4xl: clamp(3.5rem, 2rem + 5vw, 7rem);
  --text-hero: clamp(4rem, 2.5rem + 7vw, 10rem);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 128px;

  /* Layout */
  --max-width: 1400px;
  --max-width-content: 800px;
  --max-width-wide: 1200px;
  --gutter: clamp(16px, 4vw, 48px);

  /* Animation */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 0.15s;
  --duration-base: 0.3s;
  --duration-slow: 0.6s;

  /* Borders */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

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

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-accent);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* --- Skip to Content --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  background: var(--color-accent);
  color: var(--color-text);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  z-index: 10000;
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-md);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text);
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: 1.5em;
  max-width: 70ch;
}

.label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
}

.label-muted {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-lg);
  margin: var(--space-2xl) 0;
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 60ch;
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-narrow {
  width: 100%;
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-wide {
  width: 100%;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--space-4xl) 0;
}

.section-tight {
  padding: var(--space-3xl) 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  transition: background-color var(--duration-base) var(--ease-out),
              padding var(--duration-base) var(--ease-out);
}

.nav.scrolled {
  background-color: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav-logo img {
  height: 24px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: opacity var(--duration-fast) var(--ease-out);
}

.nav-logo:hover img {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-secondary);
  position: relative;
  padding: var(--space-xs) 0;
  transition: color var(--duration-fast) var(--ease-out);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--duration-base) var(--ease-out);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--duration-base) var(--ease-out),
              opacity var(--duration-fast) var(--ease-out);
}

.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);
}

/* Mobile Nav */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--color-bg);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-2xl);
    transition: right var(--duration-slow) var(--ease-out);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-link {
    font-size: var(--text-lg);
    font-family: var(--font-display);
    letter-spacing: 0.08em;
  }
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.95) 0%,
    rgba(10, 10, 10, 0.6) 30%,
    rgba(10, 10, 10, 0.2) 60%,
    rgba(10, 10, 10, 0.3) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-4xl) var(--gutter) var(--space-3xl);
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.hero-label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  display: inline-block;
}

.hero-title {
  font-size: var(--text-hero);
  line-height: 0.95;
  margin-bottom: var(--space-lg);
  max-width: 12ch;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 50ch;
  line-height: 1.6;
  margin-bottom: var(--space-xl);
  font-weight: 300;
}

/* --- Page Hero (for inner pages) --- */
.page-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--color-surface);
}

.page-hero-small {
  min-height: 35vh;
}

.page-hero .hero-media::after {
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 1) 0%,
    rgba(10, 10, 10, 0.7) 40%,
    rgba(10, 10, 10, 0.3) 100%
  );
}

.page-hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-3xl) var(--gutter) var(--space-2xl);
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: var(--space-md) var(--space-xl);
  border: 2px solid transparent;
  transition: transform var(--duration-fast) var(--ease-out),
              background-color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.btn:hover {
  transform: translateY(-1px);
  color: var(--color-text);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-text);
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn-outline {
  border-color: var(--color-text);
  color: var(--color-text);
  background: transparent;
}

.btn-outline:hover {
  background: var(--color-text);
  color: var(--color-text-inverse);
}

.btn-ghost {
  color: var(--color-text-secondary);
  padding: var(--space-sm) 0;
  border: none;
}

.btn-ghost:hover {
  color: var(--color-accent);
}

.btn-ghost::after {
  content: '\2192';
  transition: transform var(--duration-fast) var(--ease-out);
}

.btn-ghost:hover::after {
  transform: translateX(4px);
}

/* --- Cards --- */
.card {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-card);
  transition: transform var(--duration-base) var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
}

.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-body {
  padding: var(--space-lg);
}

.card-tag {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
  display: inline-block;
}

.card-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
  line-height: 1.1;
}

.card-title a {
  transition: color var(--duration-fast) var(--ease-out);
}

.card-title a:hover {
  color: var(--color-accent);
}

.card-excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.card-meta {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Featured Card */
.card-featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 768px) {
  .card-featured {
    grid-template-columns: 1.2fr 1fr;
  }

  .card-featured .card-image {
    aspect-ratio: auto;
    min-height: 400px;
  }

  .card-featured .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-2xl) var(--space-xl);
  }
}

/* --- Content Grid --- */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .content-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .content-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.content-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .content-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Section Headers --- */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.section-header h2 {
  margin: 0;
}

.section-divider {
  width: 100%;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-4xl) 0;
}

/* --- Article Page --- */
.article-header {
  text-align: left;
  margin-bottom: var(--space-3xl);
  padding-top: var(--space-4xl);
}

.article-header .label {
  margin-bottom: var(--space-md);
}

.article-header h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-lg);
  max-width: 20ch;
}

.article-meta {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.article-body {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.article-body p {
  margin-bottom: 1.15em;
  max-width: 70ch;
}

.article-body h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-lg);
  color: var(--color-text);
}

.article-body h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-lg);
  color: var(--color-text);
}

.article-body blockquote {
  margin: var(--space-2xl) 0;
}

.article-body img {
  width: 100%;
  margin: var(--space-2xl) 0;
}

/* Reset margins on images inside proper containers */
.article-body .article-media img,
.article-body .article-media-grid img,
.article-body figure img {
  margin: 0;
}

.article-body a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body a:hover {
  color: var(--color-accent-hover);
}

.article-body a.btn {
  color: var(--color-text);
  text-decoration: none;
}

.article-body a.btn-ghost {
  color: var(--color-text-secondary);
}

/* Article inline images */
.article-image {
  margin: var(--space-2xl) 0;
  overflow: hidden;
}

.article-image img {
  display: block;
  width: 100%;
  border-radius: 4px;
}

/* Consistent media block: figures, image grids, embedded content */
.article-media {
  margin: var(--space-2xl) 0;
  overflow: hidden;
}

.article-media img {
  display: block;
  width: 100%;
  border-radius: 4px;
  margin: 0;
}

/* Two-column image grids */
.article-media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin: var(--space-2xl) 0;
  overflow: hidden;
}

.article-media-grid img {
  border-radius: 4px;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  margin: 0;
}

.article-body figure {
  overflow: hidden;
}

.article-body figure img,
.article-body > div img {
  display: block;
  margin: 0;
}

/* Responsive: stack inline 2-column grids on mobile */
@media (max-width: 640px) {
  .article-body [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Tighten article spacing on mobile */
  .article-body figure,
  .article-body .article-media,
  .article-body .article-media-grid,
  .article-body > div[style*="margin"] {
    margin-top: var(--space-xl) !important;
    margin-bottom: var(--space-xl) !important;
  }

  .article-media-grid {
    grid-template-columns: 1fr !important;
  }

  .article-body img {
    margin: var(--space-xl) 0;
  }

  .article-body h2 {
    margin-top: var(--space-xl);
  }

  .article-body blockquote {
    margin: var(--space-lg) 0;
  }

  /* Gallery grid: 2 columns on mobile */
  .article-body .gallery-grid,
  .article-body [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Full bleed image in articles */
.article-image-full {
  width: 100vw;
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.article-image-full img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
}

/* --- Athlete Grid --- */
.athlete-card {
  position: relative;
  overflow: hidden;
}

.athlete-card .card-image {
  aspect-ratio: 3 / 4;
}

.athlete-card .card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.8) 0%, transparent 50%);
  z-index: 1;
}

.athlete-card .card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: var(--space-lg);
}

.athlete-card .card-title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
}

.athlete-card .card-meta {
  color: var(--color-text-secondary);
}

/* --- Crew Profile Cards --- */
.crew-card-clickable {
  cursor: pointer;
}

.crew-card-clickable .card-image::after {
  background: linear-gradient(to top, rgba(10,10,10,0.9) 0%, rgba(10,10,10,0.6) 40%, transparent 70%);
}

.crew-card-clickable .card-excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
  line-height: 1.5;
}

.crew-card-clickable::after {
  content: 'Read More';
  position: absolute;
  bottom: var(--space-lg);
  right: var(--space-lg);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
  z-index: 3;
}

.crew-card-clickable:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* --- Crew Profile Slide-Out Panel --- */
.crew-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.crew-panel-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.crew-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  width: 100%;
  max-width: 560px;
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.crew-panel.active {
  transform: translateX(0);
}

.crew-panel-close {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: var(--space-lg) var(--space-xl);
  background: linear-gradient(to bottom, var(--color-bg) 60%, transparent);
}

.crew-panel-close button {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.crew-panel-close button:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.crew-panel-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin-bottom: var(--space-xl);
}

.crew-panel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crew-panel-content {
  padding: 0 var(--space-xl) var(--space-3xl);
}

.crew-panel-name {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-xs);
}

.crew-panel-role {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-xl);
  display: block;
}

.crew-panel-bio {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.crew-panel-bio p {
  margin-bottom: 1.5em;
}

@media (max-width: 640px) {
  .crew-panel {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .crew-panel,
  .crew-panel-overlay {
    transition: none;
  }
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-3xl) 0;
  margin-top: var(--space-4xl);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
  }
}

.footer-brand img {
  filter: brightness(0) invert(1);
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  max-width: 35ch;
  margin-top: var(--space-md);
}

.footer-heading {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.footer-links a {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-xs) 0;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-copyright {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.footer-social a:hover {
  color: var(--color-accent);
}

/* --- Newsletter Form --- */
.newsletter {
  background: var(--color-surface);
  padding: var(--space-3xl);
  text-align: center;
}

.newsletter h3 {
  margin-bottom: var(--space-sm);
}

.newsletter p {
  color: var(--color-text-secondary);
  margin: 0 auto var(--space-xl);
}

.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  transition: border-color var(--duration-fast) var(--ease-out);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.newsletter-form input::placeholder {
  color: var(--color-text-muted);
}

@media (max-width: 480px) {
  .newsletter-form {
    flex-direction: column;
  }
}

/* --- Scroll Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
}

.reveal.visible {
  animation: revealUp var(--duration-slow) var(--ease-out) forwards;
}

.reveal-delay-1 { animation-delay: 0.1s !important; }
.reveal-delay-2 { animation-delay: 0.2s !important; }
.reveal-delay-3 { animation-delay: 0.3s !important; }
.reveal-delay-4 { animation-delay: 0.4s !important; }

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}

/* --- Featured Project Section --- */
.project-feature {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.project-feature .hero-media::after {
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.9) 0%,
    rgba(10, 10, 10, 0.4) 40%,
    rgba(10, 10, 10, 0.1) 100%
  );
}

.project-feature-content {
  position: relative;
  z-index: 1;
  padding: var(--space-2xl) var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

/* --- Video Embed --- */
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: var(--color-surface);
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Tag Cloud --- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tag {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              background-color var(--duration-fast) var(--ease-out);
}

.tag:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(232, 85, 46, 0.08);
}

/* --- Image Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform var(--duration-base) var(--ease-out);
  cursor: pointer;
}

.gallery-grid img:hover {
  transform: scale(1.02);
}

/* --- Contact Grid --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

/* --- Contact Form --- */
.contact-form {
  display: grid;
  gap: var(--space-lg);
  max-width: 600px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: var(--space-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: border-color var(--duration-fast) var(--ease-out);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  padding-top: calc(80px + var(--space-xl));
}

.breadcrumbs a {
  color: var(--color-text-muted);
}

.breadcrumbs a:hover {
  color: var(--color-accent);
}

.breadcrumbs span {
  margin: 0 var(--space-sm);
}

/* --- Ecosystem Links --- */
.ecosystem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .ecosystem-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ecosystem-card {
  background: var(--color-bg-card);
  padding: var(--space-xl);
  border: 1px solid var(--color-border);
  transition: border-color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.ecosystem-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.ecosystem-card h4 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

.ecosystem-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* --- Stat Counter --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

@media (min-width: 768px) {
  .stats-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

/* --- Utility Classes --- */
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }
.text-center { text-align: center; }
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
/* --- Intro Animation --- */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.intro-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.5;
}

.intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.intro-line {
  width: 0;
  height: 1px;
  background: var(--color-accent);
  box-shadow: 0 0 15px var(--color-accent),
              0 0 30px rgba(232, 85, 46, 0.3);
  margin-bottom: 48px;
  animation: introLine 0.7s 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.intro-logo {
  opacity: 0;
  transform: scale(0.8);
  animation: introLogoIn 1s 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.intro-logo img {
  width: 100px;
  height: auto;
  mix-blend-mode: screen;
}

.intro-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem);
  color: var(--color-text);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-top: 36px;
  opacity: 0;
  transform: translateY(20px);
  animation: introTextUp 0.7s 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.intro-est {
  font-family: var(--font-ui);
  font-size: clamp(0.65rem, 0.5rem + 0.5vw, 0.8rem);
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-top: 12px;
  opacity: 0;
  animation: introFadeIn 0.5s 2.1s ease forwards;
}

.intro-line-bottom {
  width: 0;
  height: 1px;
  background: var(--color-border-light);
  margin-top: 48px;
  opacity: 0;
  animation: introLineBottom 0.5s 2.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.intro-overlay.intro-exit {
  animation: introExit 0.9s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes introLine {
  to { width: 60px; }
}

@keyframes introLogoIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

@keyframes introTextUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes introFadeIn {
  to { opacity: 1; }
}

@keyframes introLineBottom {
  to {
    width: 40px;
    opacity: 1;
  }
}

@keyframes introExit {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-overlay {
    display: none !important;
  }
}

/* --- Page Transitions --- */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

.page-transition-panel {
  position: absolute;
  inset: 0;
  background: var(--color-bg);
  transform: scaleY(0);
  transform-origin: bottom;
}

/* Exit: panel wipes up covering the page */
.page-transition.exit .page-transition-panel {
  animation: ptPanelIn 0.5s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

/* Enter: panel wipes up revealing the new page */
.page-transition.enter .page-transition-panel {
  transform: scaleY(1);
  transform-origin: top;
  animation: ptPanelOut 0.5s cubic-bezier(0.76, 0, 0.24, 1) 0.15s forwards;
}

@keyframes ptPanelIn {
  0% { transform: scaleY(0); }
  100% { transform: scaleY(1); }
}

@keyframes ptPanelOut {
  0% { transform: scaleY(1); }
  100% { transform: scaleY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .page-transition { display: none !important; }
}

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
