/* ============================================
   КОД — Theme Overrides
   Amber / Industrial / Pipeline Map
   ============================================ */

/* Accent: amber (same as base default, keeping for explicitness) */
:root {
  --accent: #D4920B;
  --accent-glow: rgba(212, 146, 11, 0.15);
  --accent-dim: rgba(212, 146, 11, 0.4);
  --accent-bright: #F0A820;
}

/* --- Coordinate Grid Overlay (КОД: янтарная сетка) --- */
.kod-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(212, 146, 11, 0.04) 59px, rgba(212, 146, 11, 0.04) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(212, 146, 11, 0.04) 59px, rgba(212, 146, 11, 0.04) 60px),
    repeating-linear-gradient(0deg, transparent, transparent 9px, rgba(212, 146, 11, 0.015) 9px, rgba(212, 146, 11, 0.015) 10px),
    repeating-linear-gradient(90deg, transparent, transparent 9px, rgba(212, 146, 11, 0.015) 9px, rgba(212, 146, 11, 0.015) 10px);
}

/* КОД: спрятать стандартный grid-bg */
.grid-bg { display: none; }

/* --- Pipeline Route SVG Map --- */
.route-map {
  position: relative;
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.route-map svg {
  width: 100%;
  height: auto;
  display: block;
}

.route-path {
  fill: none;
  stroke: var(--accent-dim);
  stroke-width: 2;
  stroke-dasharray: 6 4;
}

.route-path-active {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.station-dot {
  fill: var(--bg-elevated);
  stroke: var(--accent-dim);
  stroke-width: 2;
  cursor: pointer;
  transition: fill 0.3s, stroke 0.3s, r 0.2s;
}

.station-dot:hover,
.station-dot.active {
  fill: var(--accent);
  stroke: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.station-dot-label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--text-dim);
  pointer-events: none;
  transition: fill 0.3s;
}

.station-dot.active ~ .station-dot-label,
.station-dot:hover ~ .station-dot-label {
  fill: var(--accent);
}

.map-label {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}

/* --- Code Reveal Banner --- */
.code-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  margin: var(--space-lg) 0;
}

.code-letter {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 600;
  color: var(--accent);
  width: 1.4em;
  height: 1.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent-dim);
  background: var(--bg-surface);
  position: relative;
  transition: border-color 0.3s, background 0.3s;
}

.code-letter.locked {
  color: var(--bg-elevated);
  border-color: rgba(255,255,255,0.04);
  background: var(--bg-surface);
}

.code-letter.locked::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
}

/* --- Metrics Block --- */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.04);
  margin: var(--space-xl) 0;
}

.metric-item {
  background: var(--bg-surface);
  padding: var(--space-md);
  text-align: center;
}

/* --- Station Grid for KOD --- */
.stations-grid-kod {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

/* --- Opening Film Note --- */
.film-note {
  background: var(--bg-surface);
  border-left: 3px solid var(--accent);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-xl) 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-lg);
}

.film-note-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  align-self: center;
}

/* --- Artifact Visual --- */
.artifact-visual {
  aspect-ratio: 16/9;
  background: var(--bg-surface);
  border: var(--border-subtle);
  overflow: hidden;
  position: relative;
}

.artifact-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  filter: brightness(0.6) contrast(1.1);
  transition: opacity 0.4s, filter 0.4s;
}

.artifact-visual:hover img {
  opacity: 0.9;
  filter: brightness(0.75) contrast(1.0);
}

/* --- Act Card --- */
.act-card {
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-top: 3px solid var(--accent-dim);
  padding: var(--space-md);
  transition: border-top-color 0.3s;
}

.act-card:hover { border-top-color: var(--accent); }

.act-card.act-main {
  border-top-color: var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
}

/* --- Capsule / Closing Element --- */
.capsule-block {
  background: var(--bg-surface);
  border: var(--border-accent);
  padding: var(--space-lg);
  text-align: center;
  position: relative;
}

.capsule-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* --- Nominations featured override --- */
.nomination-card.featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(212,146,11,0.05) 100%);
}

/* --- Station active highlight --- */
.station-card.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

@media (max-width: 768px) {
  .metrics-strip { grid-template-columns: repeat(2, 1fr); }
  .stations-grid-kod { grid-template-columns: 1fr; }
  .film-note { grid-template-columns: 1fr; }
}
