/* ==========================================================================
   TED — editorial case study
   Bisous-inspired: 4-col grid, cinematic frames, production rail,
   letter opacity, continuous next. Does not touch the home cover.
   ========================================================================== */

.ted {
  --ted-a: #EF4444;
  --ted-ink: #0B0B0B;
  --ted-paper: #F4F1EA;
  --ted-mute: rgba(244,241,234,0.55);
  --ted-line: rgba(244,241,234,0.12);
  --ted-gutter: 1.25rem;
  --ted-rail: 72px;
  background: var(--ted-ink);
  color: var(--ted-paper);
  position: relative;
  overflow: hidden;
}

.ted-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--ted-gutter);
  padding-left: calc(var(--ted-rail) + 2.5rem);
  padding-right: 2.5rem;
  max-width: 1680px;
  margin: 0 auto;
}

.ted-grid > .span-2 { grid-column: span 2; }
.ted-grid > .span-3 { grid-column: span 3; }
.ted-grid > .span-4 { grid-column: span 4; }

.ted-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ted-a);
  font-family: ui-monospace, 'TX-02', monospace;
}

.ted-body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ted-mute);
  max-width: 38rem;
}
.ted-body p + p { margin-top: 1.1rem; }

.ted-mono {
  font-family: ui-monospace, 'TX-02', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Production rail — Codrops / Bisous “software UI” reinterpreted */
.ted-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--ted-rail);
  z-index: 180;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6.5rem 0 1.5rem;
  border-right: 1px solid var(--ted-line);
  background: rgba(11,11,11,0.72);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}
.ted-rail__id {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: ui-monospace, 'TX-02', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--ted-a);
  margin-bottom: 1.25rem;
}
.ted-rail__track {
  flex: 1;
  width: 1px;
  background: rgba(244,241,234,0.12);
  position: relative;
  margin: 0.5rem 0 1rem;
}
.ted-rail__bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--ted-a);
}
.ted-rail__chapters {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.2rem;
}
.ted-rail__chapters a {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(244,241,234,0.35);
  display: block;
  position: relative;
}
.ted-rail__chapters a.is-active {
  background: var(--ted-a);
  border-color: var(--ted-a);
}
.ted-rail__pct {
  font-family: ui-monospace, 'TX-02', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--ted-mute);
}

/* 00 — cinematic opener */
.ted-opener {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.ted-opener__frame {
  position: absolute;
  inset: 0;
}
.ted-opener__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08) saturate(0.85);
  transform: scale(1.08);
}
.ted-opener__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,11,11,0.92) 0%, rgba(11,11,11,0.15) 45%, rgba(11,11,11,0.35) 100%);
}
.ted-opener__letterbox {
  position: absolute;
  left: 0; right: 0;
  height: 48px;
  background: #000;
  z-index: 2;
}
.ted-opener__letterbox--top { top: 0; }
.ted-opener__letterbox--bot { bottom: 0; }
.ted-opener__copy {
  position: relative;
  z-index: 3;
  padding: 0 2.5rem 6rem calc(var(--ted-rail) + 2.5rem);
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
}
.ted-opener__meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--ted-mute);
  margin-bottom: 1.5rem;
}
.ted-opener__title {
  font-size: clamp(4.2rem, 14vw, 12rem);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}
.ted-opener__title .ch {
  display: inline-block;
  opacity: 0;
}
.ted-opener__sub {
  font-size: clamp(1.1rem, 2.4vw, 1.8rem);
  font-weight: 350;
  font-style: italic;
  color: var(--ted-mute);
  max-width: 28rem;
}

/* 01 — chapter index */
.ted-index { padding: 7rem 0 6rem; border-top: 1px solid var(--ted-line); }
.ted-index__row {
  display: contents;
}
.ted-index a {
  display: block;
  padding: 1.1rem 0;
  border-top: 1px solid var(--ted-line);
  transition: color 0.25s;
}
.ted-index a:hover { color: var(--ted-a); }
.ted-index__num { display: block; color: var(--ted-a); margin-bottom: 0.35rem; }
.ted-index__name { font-size: 1.15rem; font-weight: 500; }

/* 02 — brief, sticky still */
.ted-brief { padding: 4rem 0 7rem; }
.ted-brief__media {
  position: sticky;
  top: 5.5rem;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: #111;
}
.ted-brief__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.25) contrast(1.1);
}
.ted-brief__media::after {
  content: 'STILL  ·  PLACEHOLDER  ·  REV.A';
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  font-family: ui-monospace, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: var(--ted-a);
}
.ted-statline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.5rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ted-line);
}
.ted-statline strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ted-paper);
  margin-bottom: 0.2rem;
}
.ted-statline span { color: var(--ted-mute); }

/* 03 — goals marquee */
.ted-goals {
  border-top: 1px solid var(--ted-line);
  border-bottom: 1px solid var(--ted-line);
  overflow: hidden;
  padding: 1.1rem 0;
}
.ted-goals__track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: ted-marquee 28s linear infinite;
}
.ted-goals__item {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0 2rem;
  color: var(--ted-paper);
  border-right: 1px solid var(--ted-line);
  white-space: nowrap;
}
@keyframes ted-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* 04 — concept quote */
.ted-quote {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 8rem 0;
}
.ted-quote h2 {
  grid-column: 1 / -1;
  font-size: clamp(2.2rem, 6.5vw, 5.4rem);
  font-weight: 350;
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 18ch;
}
.ted-quote h2 em {
  font-style: italic;
  color: var(--ted-a);
  font-weight: 350;
}

/* 05 — filmstrip (horizontal pin) */
.ted-strip {
  background: #070707;
}
.ted-strip__pin {
  height: 100vh;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}
.ted-strip__head {
  position: absolute;
  top: 5.5rem;
  left: calc(var(--ted-rail) + 2.5rem);
  z-index: 2;
}
.ted-strip__track {
  display: flex;
  gap: 1.25rem;
  padding-left: calc(var(--ted-rail) + 2.5rem);
  will-change: transform;
}
.ted-strip__card {
  flex: 0 0 min(72vw, 720px);
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
  background: #161616;
}
.ted-strip__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  filter: contrast(1.12) saturate(0.7);
}
.ted-strip__card figcaption {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  right: 1.25rem;
}
.ted-strip__card h3 {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0.3rem 0 0;
}

/* crop variants on the same still */
.ted-crop { overflow: hidden; }
.ted-crop img { width: 140%; height: 140%; object-fit: cover; }
.ted-crop--a img { object-position: 20% 40%; filter: grayscale(0.4) contrast(1.2); }
.ted-crop--b img { object-position: 80% 30%; filter: hue-rotate(-10deg) contrast(1.15); }
.ted-crop--c img { object-position: 50% 80%; filter: grayscale(1) contrast(1.3) brightness(0.85); }
.ted-crop--d img { object-position: 10% 70%; filter: sepia(0.25) contrast(1.1); }
.ted-crop--e img { object-position: 70% 50%; }

/* 06 — legend */
.ted-legend { padding: 8rem 0; }
.ted-legend__shot {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #111;
}
.ted-legend__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08);
}
.ted-hot {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--ted-a);
  border-radius: 50%;
  background: rgba(240,225,74,0.15);
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.ted-hot::after {
  content: attr(data-id);
  position: absolute;
  left: 18px;
  top: -2px;
  font-family: ui-monospace, monospace;
  font-size: 0.65rem;
  color: var(--ted-a);
  letter-spacing: 0.08em;
}
.ted-legend__list { padding-top: 0.4rem; }
.ted-legend__list li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--ted-line);
  color: var(--ted-mute);
  font-size: 0.92rem;
}
.ted-legend__list li span:first-child { color: var(--ted-a); }

/* 07 — HUD / interface */
.ted-hud {
  padding: 6rem 0 8rem;
  background: #050505;
}
.ted-hud__screen {
  aspect-ratio: 16/10;
  background: #0A0C08;
  border: 1px solid rgba(240,225,74,0.22);
  position: relative;
  overflow: hidden;
  font-family: ui-monospace, 'TX-02', monospace;
}
.ted-hud__screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(240,225,74,0.03) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.ted-hud__top {
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  color: var(--ted-a);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  border-bottom: 1px solid rgba(240,225,74,0.15);
}
.ted-hud__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0;
  height: calc(100% - 42px);
}
.ted-hud__map {
  border-right: 1px solid rgba(240,225,74,0.12);
  position: relative;
  padding: 1.2rem;
}
.ted-hud__map svg { width: 100%; height: 100%; }
.ted-hud__cell {
  padding: 1.2rem;
  border-right: 1px solid rgba(240,225,74,0.12);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.ted-hud__cell:last-child { border-right: 0; }
.ted-hud__value {
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--ted-a);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.ted-hud__label { color: rgba(240,225,74,0.55); font-size: 0.65rem; letter-spacing: 0.16em; }
.ted-hud__modes { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 1.5rem; }
.ted-hud__modes span {
  border: 1px solid rgba(240,225,74,0.25);
  padding: 0.35rem 0.55rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: rgba(240,225,74,0.7);
}
.ted-hud__modes span.is-on {
  background: var(--ted-a);
  color: #0B0B0B;
  border-color: var(--ted-a);
}

/* 08 — exploded (reuses pin pattern) */
.ted-xray { background: #000; color: var(--ted-paper); }
.ted-xray__pin {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ted-xray__stage {
  width: min(640px, 70vw);
  height: min(640px, 70vw);
  position: relative;
}
.ted-xray__part { position: absolute; width: 100%; }
.ted-xray__label {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}
.ted-xray__label h3 { font-size: 1.8rem; font-weight: 350; margin-top: 0.3rem; }
.ted-xray__progress {
  position: absolute;
  top: 50%;
  right: 2.5rem;
  width: 2px;
  height: 180px;
  background: rgba(255,255,255,0.12);
  transform: translateY(-50%);
}
.ted-xray__bar { position: absolute; top: 0; left: 0; width: 100%; height: 0; background: var(--ted-a); }

/* 09 — case / transport */
.ted-case { padding: 8rem 0; }
.ted-case__plate {
  aspect-ratio: 16/9;
  background: #121212;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.ted-case__plate svg { position: absolute; inset: 12%; width: 76%; height: 76%; }
.ted-case__plate span { position: relative; z-index: 1; color: var(--ted-a); }

/* 10 — specs */
.ted-specs { padding: 0 0 6rem; }
.ted-specs table { width: 100%; border-collapse: collapse; }
.ted-specs th, .ted-specs td {
  text-align: left;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--ted-line);
  font-size: 0.92rem;
}
.ted-specs th {
  width: 34%;
  color: var(--ted-mute);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* 11 — continuous next (Bisous) */
.ted-next {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.ted-next img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45) contrast(1.1);
  transform: scale(1.12);
}
.ted-next__copy {
  position: relative;
  z-index: 1;
  padding: 0 2.5rem 5rem calc(var(--ted-rail) + 2.5rem);
}
.ted-next__copy h2 {
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  margin: 0.3rem 0 0;
}

@media (max-width: 900px) {
  .ted { --ted-rail: 0px; }
  .ted-rail { display: none; }
  .ted-grid { padding-left: 1.25rem; padding-right: 1.25rem; grid-template-columns: 1fr 1fr; }
  .ted-grid > .span-2, .ted-grid > .span-3, .ted-grid > .span-4 { grid-column: 1 / -1; }
  .ted-opener__copy { padding: 0 1.25rem 4.5rem; }
  .ted-brief__media { position: relative; top: 0; aspect-ratio: 16/10; margin-bottom: 2rem; }
  .ted-hud__grid { grid-template-columns: 1fr; }
  .ted-strip__head { left: 1.25rem; }
  .ted-strip__track { padding-left: 1.25rem; }
  .ted-strip__card { flex-basis: 84vw; }
  .ted-next__copy { padding: 0 1.25rem 3.5rem; }
  .ted-opener__letterbox { height: 28px; }
}

/* ===== V7 band (added) + debug annotation ===== */
.ted-debug { max-width:1176px; margin:14px auto 0; padding:9px 18px; font-family:'Courier New',monospace;
  font-size:11.5px; letter-spacing:.04em; color:#3DDC84; background:rgba(61,220,132,.07);
  border:1px dashed rgba(61,220,132,.45); border-radius:8px; text-align:center; }
.ted-v7 { background:#0D0D0F; color:#F2F0EA; padding-bottom:70px; }
.ted-v7 .ted-sechead { text-align:center; }
.ted-v7 .ted-kicker { color:var(--ted-accent, #E8443A); letter-spacing:.18em; text-transform:uppercase; font-size:11px; margin:0 0 26px; }
.ted-v7__hero { max-width:1440px; margin:0 auto; padding:0 32px; }
.ted-v7__hero img { width:100%; border-radius:12px; display:block; box-shadow:0 40px 110px rgba(232,68,58,.12); }
.ted-v7__row { display:flex; gap:16px; max-width:1440px; margin:16px auto 0; padding:0 32px; }
.ted-v7__row figure { flex:1; margin:0; border-radius:10px; overflow:hidden; }
.ted-v7__row img { width:100%; aspect-ratio:16/10; object-fit:cover; display:block;
  filter:brightness(.94) saturate(1.05); transition:filter .4s, transform .6s cubic-bezier(.2,.7,.2,1); }
.ted-v7__row figure:hover img { filter:brightness(1.05); transform:scale(1.04); }
.ted-v7__cap { text-align:center; font-size:11.5px; letter-spacing:.14em; text-transform:uppercase;
  color:rgba(242,240,234,.55); margin-top:26px; }
@media (max-width:900px){ .ted-v7__row{flex-direction:column;} }

/* ============ landscape opener + vistas (2026-08-29) ============ */
.ted-opener--landscape { min-height: 100vh; }
.ted-opener__landscape {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02);
}
.ted-opener--landscape .ted-opener__veil { background: linear-gradient(to top, rgba(11,11,11,0.5) 0%, rgba(11,11,11,0) 40%); }
.ted-opener--landscape .ted-opener__title {
  color: #fff; mix-blend-mode: difference; font-weight: 500;
  text-shadow: none;
}
.ted-opener--landscape .ted-opener__meta { color: rgba(255,255,255,.85); mix-blend-mode: difference; }
.ted-opener--landscape .ted-opener__sub { color: rgba(255,255,255,.9); mix-blend-mode: difference; }
.ted-opener__credit {
  position: absolute; top: 14px; right: 18px; z-index: 4;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.75); mix-blend-mode: difference;
}
@media (max-width: 900px) {
  .ted-opener__credit { top: auto; bottom: 10px; right: 12px; }
}

/* full-page landscape interstitials */
.ted-vista { position: relative; min-height: 92vh; display: flex; align-items: flex-end; overflow: hidden; }
.ted-vista img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ted-vista__copy { position: relative; z-index: 2; width: 100%; max-width: 1680px; margin: 0 auto; padding: 0 2.5rem 9vh; }
.ted-vista h2 {
  font-size: clamp(3.4rem, 11vw, 11rem); font-weight: 500; line-height: .88;
  letter-spacing: -.04em; margin: 0 0 1.2rem; color: #fff; mix-blend-mode: difference;
}
.ted-vista p { margin: 0; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.8); mix-blend-mode: difference; }

/* SVG ink accents — yellow removed, brand red in */
.ted-hud__map path, .ted-hud__map circle { stroke: var(--ted-a); }
.ted-hud__map circle { fill: var(--ted-a); }
.ted-xray__part circle { fill: var(--ted-a); }
.ted-xray__part svg line { stroke: var(--ted-a); }
.ted-case__plate rect, .ted-case__plate path { stroke: var(--ted-a); }
.ted-case__plate rect[fill], .ted-case__plate path[fill] { fill: var(--ted-a); }
