/* =========================================================
   CLOSED COURSE MEDIA — Berlin brutalist system
   Palette: Pantone Hexachrome Orange (#FF6600), bone, ink
   ========================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange: #FF6600;      /* Pantone Hexachrome Orange */
  --orange-hot: #FF3D00;
  --ink: #0A0A0A;
  --bone: #F2EFE9;
  --line: #1a1a1a;
  --line-soft: rgba(255,255,255,0.14);
  --ease: cubic-bezier(.2,.7,.2,1);
}

html, body { background: var(--ink); color: var(--bone); }
body {
  font-family: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--orange); color: var(--ink); }

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* =========================================================
   TICKER
   ========================================================= */
.ticker {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 60;
  background: var(--orange);
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
  height: 32px;
  display: flex; align-items: center;
}
.ticker-track {
  display: flex; gap: 32px;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  animation: ticker 40s linear infinite;
  padding-left: 32px;
}
.ticker-track span { flex: 0 0 auto; }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; top: 32px; left: 0; right: 0;
  z-index: 55;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 18px 24px;
  background: rgba(10,10,10,0.65);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo-mark {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 20px;
  background: var(--orange);
  color: var(--ink);
  padding: 4px 10px 5px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.logo-mark.small { font-size: 14px; padding: 3px 8px 4px; }
.logo-name {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
}
.nav-links {
  display: flex; justify-content: center; gap: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em;
}
.nav-links a {
  display: inline-flex; gap: 8px; align-items: baseline;
  padding: 6px 0;
  position: relative;
  transition: color .25s var(--ease);
}
.nav-links a .num { color: var(--orange); }
.nav-links a:hover { color: var(--orange); }
.nav-status {
  justify-self: end;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.18em;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--bone);
}
.nav-status .dot {
  width: 8px; height: 8px;
  background: var(--orange);
  animation: blink 1.4s var(--ease) infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  height: 100vh; min-height: 700px;
  padding-top: 32px; /* ticker */
  overflow: hidden;
  border-bottom: 2px solid var(--orange);
}
.hero-video {
  position: absolute; inset: 32px 0 0 0;
  width: 100%; height: calc(100% - 32px);
  object-fit: cover;
  filter: brightness(0.55) contrast(1.05) saturate(0.85);
}
.hero-overlay {
  position: absolute; inset: 32px 0 0 0;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.4) 0%, rgba(10,10,10,0.1) 40%, rgba(10,10,10,0.9) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: normal;
}

/* Corner brackets */
.corner {
  position: absolute; width: 60px; height: 60px;
  border-color: var(--orange);
  z-index: 3;
  pointer-events: none;
}
.corner .corner-label {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.18em;
  color: var(--orange);
  white-space: nowrap;
}
.corner.tl { top: 130px; left: 24px; border-top: 2px solid; border-left: 2px solid; }
.corner.tl .corner-label { top: 8px; left: 68px; }
.corner.tr { top: 130px; right: 24px; border-top: 2px solid; border-right: 2px solid; }
.corner.tr .corner-label { top: 8px; right: 68px; }
.corner.bl { bottom: 24px; left: 24px; border-bottom: 2px solid; border-left: 2px solid; }
.corner.bl .corner-label { bottom: 8px; left: 68px; }
.corner.br { bottom: 24px; right: 24px; border-bottom: 2px solid; border-right: 2px solid; }
.corner.br .corner-label { bottom: 8px; right: 68px; }

/* Hero content */
.hero-content {
  position: relative; z-index: 4;
  height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px 60px 60px;
  max-width: 1600px; margin: 0 auto;
}
.hero-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.18em;
  color: var(--orange);
  display: flex; gap: 32px;
  margin-bottom: 24px;
  animation: rise 1s var(--ease) both;
}
.hero-title {
  font-weight: 700;
  font-size: clamp(64px, 13vw, 220px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.hero-title .line { display: block; animation: rise 1.1s var(--ease) both; }
.hero-title .line:nth-child(2) { animation-delay: 0.08s; }
.hero-title .line:nth-child(3) { animation-delay: 0.16s; font-size: 0.42em; margin-top: 24px; max-width: 640px; }
.hero-title .line-outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--orange);
}
.hero-title .slash { color: var(--orange); -webkit-text-stroke: 0; }

.hero-foot {
  margin-top: 48px;
  display: flex; gap: 12px; flex-wrap: wrap;
  animation: rise 1.3s .25s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 26px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 2px solid;
  border-radius: 0;
  transition: all .25s var(--ease);
  position: relative;
}
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(6px); }
.btn-primary { background: var(--orange); color: var(--ink); border-color: var(--orange); }
.btn-primary:hover { background: var(--ink); color: var(--orange); }
.btn-ghost { background: transparent; color: var(--bone); border-color: var(--bone); }
.btn-ghost:hover { background: var(--bone); color: var(--ink); }

/* =========================================================
   MUTE
   ========================================================= */
.mute-toggle {
  position: absolute; z-index: 5;
  right: 100px; bottom: 24px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--orange);
  border: 2px solid var(--orange);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.18em;
  transition: all .25s var(--ease);
}
.mute-toggle:hover { background: var(--orange); color: var(--ink); }

/* =========================================================
   INFO STRIP
   ========================================================= */
.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--orange);
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}
.strip-item {
  padding: 40px 32px;
  border-right: 2px solid var(--ink);
  display: flex; align-items: baseline; gap: 20px;
}
.strip-item:last-child { border-right: 0; }
.strip-num {
  font-weight: 700;
  font-size: clamp(48px, 6vw, 96px);
  letter-spacing: -0.04em;
  line-height: 0.9;
}
.strip-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.4;
}

/* =========================================================
   PARALLAX REEL (scroll-pinned)
   ========================================================= */
.reel {
  position: relative;
  min-height: 100vh;          /* JS sets height = slideCount * 100vh */
  background: var(--ink);
  border-bottom: 2px solid var(--orange);
}
.reel-inner {
  position: sticky; top: 0;
  height: 100vh;
  overflow: hidden;
}
.reel-stage {
  position: relative;
  width: 100%; height: 100%;
}
.reel-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1s var(--ease);
  will-change: opacity, transform;
}
.reel-slide.is-active { opacity: 1; }
.reel-slide video {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 6s linear;
  filter: brightness(0.65) contrast(1.05) saturate(0.9);
}
.reel-slide.is-active video { transform: scale(1); }

.reel-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.15) 30%, rgba(10,10,10,0.85) 100%),
    linear-gradient(90deg, rgba(10,10,10,0.55) 0%, transparent 50%);
  z-index: 2;
  pointer-events: none;
}

.reel-hud {
  position: absolute; inset: 0;
  z-index: 3;
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 60px;
  pointer-events: none;
}
.reel-hud-top {
  display: flex; justify-content: space-between; align-items: center;
}
.reel-counter {
  font-size: 14px;
  letter-spacing: 0.22em;
  color: var(--orange);
  font-weight: 700;
}
.reel-counter #reel-current { font-size: 22px; }

.reel-captions {
  position: relative;
  max-width: 800px;
  height: 340px;
}
.reel-caption {
  position: absolute; inset: 0;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  will-change: opacity, transform;
}
.reel-caption.is-active { opacity: 1; transform: translateY(0); }
.reel-caption .reel-loc {
  display: inline-block;
  font-size: 12px; letter-spacing: 0.24em;
  color: var(--orange);
  padding: 6px 10px;
  border: 1px solid var(--orange);
  margin-bottom: 24px;
}
.reel-caption h3 {
  font-weight: 700;
  font-size: clamp(56px, 9vw, 140px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.reel-caption h3 .outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--orange);
}
.reel-caption p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; letter-spacing: 0.16em;
  color: rgba(242,239,233,0.85);
  text-transform: uppercase;
}

.reel-hud-bottom {
  display: flex; align-items: center; gap: 24px;
}
.reel-progress {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.14);
  position: relative;
  overflow: hidden;
}
.reel-progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--orange);
  transition: width .2s linear;
}
.reel-dots {
  display: flex; gap: 8px;
}
.reel-dots span {
  width: 10px; height: 10px;
  background: transparent;
  border: 1px solid var(--orange);
  transition: background .3s var(--ease);
}
.reel-dots span.is-active { background: var(--orange); }

@media (max-width: 800px) {
  .reel { height: 350vh; }
  .reel-hud { padding: 100px 20px 40px; }
  .reel-captions { height: 260px; }
}

/* =========================================================
   SECTIONS
   ========================================================= */
.section {
  padding: 120px 60px;
  max-width: 1600px; margin: 0 auto;
  border-bottom: 1px solid var(--line-soft);
}
.section-head {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 60px; align-items: end;
  margin-bottom: 80px;
}
.section-head h2 {
  font-weight: 700;
  font-size: clamp(56px, 9vw, 140px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin-top: 24px;
}
.section-head .outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--orange);
}
.section-head-right p {
  font-size: 18px;
  line-height: 1.5;
  max-width: 460px;
  color: rgba(242,239,233,0.75);
}
.tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--orange);
  padding-bottom: 4px;
  border-bottom: 2px solid var(--orange);
}

/* =========================================================
   WORK GRID
   ========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border: 2px solid var(--orange);
}
.tile {
  position: relative;
  grid-column: span 3;
  aspect-ratio: 4 / 3;
  border-right: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
  overflow: hidden;
  cursor: pointer;
  background: var(--ink);
}
.tile-wide { grid-column: span 6; aspect-ratio: 21 / 9; }
.tile:nth-last-child(1),
.tile:nth-last-child(2) { border-bottom: 0; }
.tile-frame {
  position: absolute; inset: 0;
  overflow: hidden;
}
.tile-frame video {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.4) brightness(0.7) contrast(1.05);
  transition: filter .5s var(--ease), transform .8s var(--ease);
}
.tile::before {
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, transparent 40%, rgba(10,10,10,0.9) 100%);
  pointer-events: none;
}
.tile::after {
  content: ''; position: absolute; inset: 12px; z-index: 3;
  border: 1px solid rgba(255,102,0,0);
  transition: border-color .3s var(--ease);
  pointer-events: none;
}
.tile:hover video { filter: grayscale(0) brightness(1) contrast(1.1); transform: scale(1.03); }
.tile:hover::after { border-color: var(--orange); }
.tile:hover .tile-num { background: var(--orange); color: var(--ink); }

.tile-meta {
  position: absolute; z-index: 4;
  left: 24px; right: 24px; bottom: 24px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px;
}
.tile-meta h3 {
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 32px);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 6px;
}
.tile-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.18em;
  color: rgba(242,239,233,0.7);
}
.tile-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em;
  padding: 4px 8px;
  border: 1px solid var(--orange);
  color: var(--orange);
  align-self: flex-start;
  transition: all .3s var(--ease);
}

/* re-order: number top-left, title bottom */
.tile-meta { flex-direction: row; }
.tile-meta > .tile-num { position: absolute; top: -240px; left: 0; }
.tile { padding-top: 24px; }
.tile-meta { align-items: flex-end; }

/* =========================================================
   ABOUT / INDEX TABLE
   ========================================================= */
.index-table {
  border: 2px solid var(--bone);
  margin-bottom: 60px;
}
.index-row {
  display: grid;
  grid-template-columns: 80px 1.6fr 1fr 100px;
  gap: 24px;
  padding: 22px 28px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; letter-spacing: 0.1em;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.index-row:last-child { border-bottom: 0; }
.index-row.index-head {
  background: var(--bone); color: var(--ink);
  font-weight: 700;
  font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase;
}
.index-row:not(.index-head):hover {
  background: var(--orange); color: var(--ink);
}
.index-row:not(.index-head):hover span:first-child { font-weight: 700; }

.kit {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 32px; align-items: center;
  padding-top: 40px;
  border-top: 1px solid var(--line-soft);
}
.kit-list {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.kit-list span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em;
  padding: 10px 14px;
  border: 1px solid var(--bone);
  transition: all .25s var(--ease);
}
.kit-list span:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { text-align: left; }
.contact-title {
  font-weight: 700;
  font-size: clamp(72px, 12vw, 200px);
  line-height: 0.85;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  margin: 24px 0 80px;
}
.contact-title .outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--orange);
}
.contact-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 2px solid var(--orange);
}
.contact-card {
  padding: 40px 32px;
  border-right: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
  display: grid; grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: 24px;
  transition: background .25s var(--ease), color .25s var(--ease);
  position: relative;
}
.contact-card:nth-child(2n) { border-right: 0; }
.contact-card:nth-last-child(-n+2) { border-bottom: 0; }
.contact-card:hover { background: var(--orange); color: var(--ink); }

.contact-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 0.22em;
  color: var(--orange);
}
.contact-card:hover .contact-label { color: var(--ink); }
.contact-value {
  font-weight: 700;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.contact-card .arrow {
  font-size: 24px;
  transition: transform .3s var(--ease);
}
.contact-card:hover .arrow { transform: translate(6px, -6px); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  padding: 28px 60px;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 24px; align-items: center;
  background: var(--ink);
  color: var(--bone);
  border-top: 2px solid var(--orange);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.footer > div:nth-child(2) { text-align: center; }
.footer > div:last-child { text-align: right; }
.footer .logo-mark { margin-right: 8px; }

/* =========================================================
   REVEAL
   ========================================================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip-item:nth-child(2) { border-right: 0; }
  .strip-item:nth-child(-n+2) { border-bottom: 2px solid var(--ink); }
  .section-head { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 800px) {
  .ticker { height: 28px; }
  .nav { top: 28px; grid-template-columns: 1fr auto; padding: 14px 18px; gap: 12px; }
  .nav-links { display: none; }
  .nav-status { display: none; }
  .logo-name { display: none; }
  .hero { padding-top: 28px; min-height: 620px; }
  .hero-video, .hero-overlay { inset: 28px 0 0 0; height: calc(100% - 28px); }
  .hero-content { padding: 100px 20px 40px; }
  .corner { width: 40px; height: 40px; }
  .corner.tl { top: 100px; left: 16px; } .corner.tl .corner-label { left: 48px; }
  .corner.tr { top: 100px; right: 16px; } .corner.tr .corner-label { right: 48px; }
  .corner.bl { bottom: 16px; left: 16px; } .corner.bl .corner-label { left: 48px; }
  .corner.br { bottom: 16px; right: 16px; } .corner.br .corner-label { right: 48px; }
  .mute-toggle { right: 16px; bottom: 70px; }
  .section { padding: 80px 20px; }
  .grid { grid-template-columns: 1fr; }
  .tile, .tile-wide { grid-column: span 1; aspect-ratio: 16/10; border-right: 0; }
  .tile:nth-last-child(2) { border-bottom: 2px solid var(--orange); }
  .index-row { grid-template-columns: 60px 1fr; gap: 12px; padding: 16px; font-size: 11px; }
  .index-row > span:nth-child(3), .index-row > span:nth-child(4) { display: none; }
  .kit { grid-template-columns: 1fr; gap: 16px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 1fr auto; border-right: 0; }
  .contact-card .contact-label { grid-column: 1 / -1; }
  .contact-card:nth-last-child(-n+2) { border-bottom: 2px solid var(--orange); }
  .contact-card:last-child { border-bottom: 0; }
  .strip-item { padding: 24px; gap: 12px; flex-direction: column; align-items: flex-start; }
  .footer { grid-template-columns: 1fr; text-align: center !important; padding: 24px 20px; }
  .footer > div { text-align: center !important; }
}
