:root {
  color-scheme: dark;
  --ink: #0b0d10;
  --paper: #f2efe8;
  --coral: #ff6846;
  --cobalt: #1758d5;
}

* { box-sizing: border-box; }
html { background: var(--ink); }
body { margin: 0; overflow-x: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--coral); outline-offset: 4px; }

.hero-overlay {
  background: linear-gradient(180deg, rgba(11, 13, 16, .08) 15%, rgba(11, 13, 16, .3) 50%, rgba(11, 13, 16, .97) 100%),
              linear-gradient(90deg, rgba(11, 13, 16, .72), transparent 60%);
}

.noise {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.nav-link { position: relative; transition: color .2s ease; }
.nav-link::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 1px; background: var(--coral); transform: scaleX(0); transform-origin: right; transition: transform .25s ease; }
.nav-link:hover { color: white; }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.metric-card { min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; transition: background .25s ease, color .25s ease; }
.metric-card:hover { background: var(--coral); }
.metric-label, .metric-unit { font-size: .625rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; opacity: .55; }
.metric-value { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 300; letter-spacing: -.06em; line-height: .9; margin: 1.5rem 0; }

.eyebrow { margin-bottom: 1.25rem; font-size: .625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .22em; color: rgba(255,255,255,.45); }
.section-title { font-size: clamp(3.4rem, 7vw, 7.5rem); font-weight: 400; line-height: .86; letter-spacing: -.065em; }

.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.media-card { position: relative; grid-column: span 4; min-height: 430px; overflow: hidden; background: #15191f; }
.media-card--tall { grid-column: span 7; grid-row: span 2; min-height: 700px; }
.media-card--wide { grid-column: span 8; min-height: 460px; }
.media-card img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); filter: saturate(.82); transition: transform 1s cubic-bezier(.2,.8,.2,1), filter .6s ease, opacity .5s ease; }
.media-card:not(.is-loaded) img { opacity: 0; }
.media-card:hover img { transform: scale(1.075); filter: saturate(1); }
.media-card figcaption { position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; padding: 4rem 1rem 1rem; background: linear-gradient(transparent, rgba(0,0,0,.75)); font-size: .625rem; text-transform: uppercase; letter-spacing: .14em; }
.stat-tile { grid-column: span 5; min-height: 300px; display: flex; flex-direction: column; justify-content: space-between; padding: 2rem; }

.control-button { border: 1px solid rgba(11,13,16,.25); border-radius: 999px; padding: .75rem 1rem; font-size: .625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; transition: all .2s ease; }
.control-button:hover { background: var(--ink); color: var(--paper); }
.video-shell { position: relative; overflow: hidden; border-radius: 1.25rem; background: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.15); }

.primary-button, .secondary-button { border-radius: 999px; padding: .85rem 1.1rem; font-size: .625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; transition: transform .2s ease, background .2s ease, color .2s ease; }
.primary-button { background: var(--coral); color: var(--ink); }
.secondary-button { border: 1px solid rgba(255,255,255,.2); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.secondary-button:hover { border-color: var(--coral); color: var(--coral); }
.primary-button:active, .secondary-button:active { transform: translateY(0); }

.experiment-card { min-height: 250px; display: flex; flex-direction: column; justify-content: space-between; background: var(--ink); padding: 1.5rem; transition: background .25s ease, transform .35s ease; }
.experiment-card:hover { background: #131820; }
.experiment-card .index { font-size: .625rem; color: rgba(255,255,255,.35); letter-spacing: .15em; }
.experiment-card h3 { margin-top: 2rem; font-size: 1.5rem; line-height: 1.05; letter-spacing: -.03em; }
.experiment-card p { margin-top: .75rem; color: rgba(255,255,255,.45); font-size: .75rem; line-height: 1.6; }
.tag { align-self: flex-start; margin-top: 2rem; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; padding: .4rem .65rem; color: var(--coral); font-size: .55rem; text-transform: uppercase; letter-spacing: .15em; }
.data-skeleton { min-height: 250px; background: linear-gradient(100deg, #0b0d10 20%, #171b20 40%, #0b0d10 60%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }

.marquee-track { width: max-content; display: flex; align-items: center; gap: 2.5rem; animation: marquee 24s linear infinite; }
.marquee-track span { color: var(--coral); }

.reveal { opacity: 0; transform: translateY(25px); animation: reveal .85s cubic-bezier(.2,.7,.2,1) forwards; }
.reveal:nth-child(2) { animation-delay: .12s; }

@keyframes reveal { to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position-x: -200%; } }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .media-card, .media-card--tall, .media-card--wide, .stat-tile { grid-column: span 1; min-height: 420px; }
}

@media (max-width: 600px) {
  .gallery-grid { display: block; }
  .media-card, .stat-tile { min-height: 470px; margin-bottom: 1rem; }
  .stat-tile { min-height: 270px; }
  .metric-card { min-height: 165px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
