:root {
  /* Wanda Analytics – light theme with stronger contrast */
  --wa-bg: #eef5fc;
  --wa-bg-alt: #e0eef8;
  --wa-card: #ffffff;
  --wa-card-alt: #e3f2fd;
  --wa-accent: #0277bd;
  --wa-accent-light: #039be5;
  --wa-accent-bg: rgba(2, 119, 189, 0.1);
  --wa-indigo: #3949ab;
  --wa-text: #0d1b4d;
  --wa-text-dim: #37474f;
  --wa-muted: #546e7a;
  --wa-border: #90caf9;
  --wa-border-strong: #64b5f6;
  --wa-footer-bg: #01579b;
  --wa-footer-text: #e3f2fd;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--wa-bg);
  color: var(--wa-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--wa-border);
  box-shadow: 0 2px 8px rgba(2, 119, 189, 0.08);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.logo-text {
  font-weight: 600;
  font-size: 1.25rem;
  color: #4527a0;
  letter-spacing: 0.02em;
}

.logo {
  text-decoration: none;
  color: inherit;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--wa-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

/* Hero */
.landing {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.hero {
  text-align: center;
  margin-bottom: 4rem;
}

.hero-combined {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(13, 71, 161, 0.25);
}

.hero-image {
  width: 100%;
  max-height: 70vh;
  min-height: 380px;
  display: block;
  object-fit: contain;
  object-position: center;
  vertical-align: bottom;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13, 71, 161, 0.95) 0%,
    rgba(21, 101, 192, 0.75) 30%,
    rgba(33, 150, 243, 0.35) 55%,
    transparent 100%
  );
  pointer-events: none;
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 1.5rem 1rem 2rem;
  text-align: center;
  box-sizing: border-box;
  pointer-events: auto;
}

@media (min-width: 600px) {
  .hero-content {
    padding: 2rem 1.5rem 2.5rem;
  }
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.tagline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.hero-desc {
  color: rgba(255, 255, 255, 0.9);
  max-width: 520px;
  margin: 0 auto 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.btn-primary {
  background: #fff;
  color: var(--wa-accent);
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.feature-card {
  background: var(--wa-card);
  border: 1px solid var(--wa-border-strong);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(2, 119, 189, 0.08);
  border-top: 4px solid var(--wa-accent);
}

.feature-card:nth-child(1) {
  background: linear-gradient(180deg, #e3f2fd 0%, #ffffff 35%);
  border-top-color: #1565c0;
}

.feature-card:nth-child(2) {
  background: linear-gradient(180deg, #e8f5e9 0%, #ffffff 35%);
  border-top-color: #2e7d32;
}

.feature-card:nth-child(3) {
  background: linear-gradient(180deg, #fce4ec 0%, #ffffff 35%);
  border-top-color: #c2185b;
}

.feature-card:hover {
  border-color: var(--wa-accent);
  box-shadow: 0 6px 20px rgba(2, 119, 189, 0.18);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--wa-text);
}

.feature-card p {
  color: var(--wa-text-dim);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.link-arrow {
  color: var(--wa-accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.link-arrow:hover {
  text-decoration: underline;
}

/* Page layout */
.page-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--wa-text);
}

.page-header p {
  color: var(--wa-text-dim);
  font-size: 1rem;
}

.page-hint {
  font-size: 0.85rem;
  margin-top: 0.5rem;
  opacity: 0.8;
}

code {
  background: var(--wa-bg-alt);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Video demo page */
.video-container {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--wa-border-strong);
  margin-bottom: 2rem;
  box-shadow: 0 4px 16px rgba(2, 119, 189, 0.12);
  border-top: 4px solid var(--wa-accent);
}

.video-container video {
  width: 100%;
  display: block;
}

.video-caption {
  color: var(--wa-text-dim);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.video-error {
  padding: 1rem;
  background: #ffebee;
  color: #c62828;
  margin: 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.video-download {
  margin-top: 1rem;
}

.btn-download {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--wa-accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.btn-download:hover {
  background: #01579b;
}

/* Rail map / Findings map page */
.rail-map-section {
  margin-bottom: 2rem;
}

.findings-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--wa-text-dim);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.2);
}

.legend-dot.type-Roof_Liner { background: #e74c3c; }
.legend-dot.type-Springs { background: #f39c12; }
.legend-dot.type-Side_Bearing { background: #3498db; }
.legend-dot.type-Wheels { background: #9b59b6; }

.ribbon-wrap {
  position: relative;
  background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 25%);
  border: 1px solid var(--wa-border-strong);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 1rem;
  box-shadow: 0 4px 16px rgba(2, 119, 189, 0.1);
  border-left: 4px solid var(--wa-accent);
}

.ribbon-scroll {
  overflow-x: auto;
  padding: 1rem;
  max-height: 80vh;
}

.scrubber-wrap {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--wa-border);
}

.scrubber-label {
  font-size: 0.85rem;
  color: var(--wa-text-dim);
  margin-bottom: 0.5rem;
}

.findings-scrubber {
  position: relative;
  height: 32px;
  background: var(--wa-bg-alt);
  border-radius: 8px;
  border: 1px solid var(--wa-border-strong);
}

.scrubber-tick {
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 24px;
  border-radius: 2px;
  cursor: pointer;
  transform: translateX(-50%);
  transition: transform 0.15s, opacity 0.15s;
}

.scrubber-tick:hover {
  transform: scaleY(1.2);
  opacity: 1;
}

.scrubber-tick { background: var(--wa-accent); }
.scrubber-tick.type-Roof_Liner { background: #e74c3c; }
.scrubber-tick.type-Springs { background: #f39c12; }
.scrubber-tick.type-Side_Bearing { background: #3498db; }
.scrubber-tick.type-Wheels { background: #9b59b6; }

.ribbon-img {
  display: block;
  height: 320px;
  width: auto;
  min-width: 100%;
  object-fit: contain;
  object-position: center;
}

.finding-marker {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-radius: 50%;
  cursor: pointer;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: auto;
  transition: transform 0.2s, box-shadow 0.2s;
}

.finding-marker:hover {
  transform: translate(-50%, -50%) scale(1.4);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* Color-coded by finding type (default: accent for unknown types) */
.finding-marker { background: var(--wa-accent); }
.finding-marker.type-Roof_Liner { background: #e74c3c; }
.finding-marker.type-Springs { background: #f39c12; }
.finding-marker.type-Side_Bearing { background: #3498db; }
.finding-marker.type-Wheels { background: #9b59b6; }

.finding-panel {
  background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 40%);
  border: 1px solid #81c784;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
  box-shadow: 0 4px 16px rgba(46, 125, 50, 0.12);
  border-left: 4px solid #2e7d32;
}

.finding-panel h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.finding-panel .class-name {
  color: var(--wa-accent);
  font-weight: 500;
}

.finding-panel img {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 0.75rem;
}

/* Opportunities page */
.opp-section {
  margin-bottom: 3rem;
}

.opp-section h2 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: var(--wa-accent);
}

.opp-section p, .opp-section li {
  color: var(--wa-text-dim);
  margin-bottom: 0.75rem;
}

.opp-section ul {
  margin-left: 1.5rem;
}

.opp-img {
  width: 100%;
  max-width: 900px;
  border-radius: 12px;
  border: 1px solid var(--wa-border-strong);
  margin: 1rem 0;
  box-shadow: 0 4px 16px rgba(2, 119, 189, 0.1);
}

.opp-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border-radius: 8px;
  border: 1px solid var(--wa-border-strong);
  border-left: 4px solid var(--wa-accent);
}

.opp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.opp-table th, .opp-table td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--wa-border);
  background: var(--wa-card);
}

.opp-table th {
  color: var(--wa-accent);
  font-weight: 500;
  background: var(--wa-bg-alt);
}

/* Footer – dark accent band for stronger contrast */
.site-footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
  background: var(--wa-footer-bg);
  color: var(--wa-footer-text);
  font-size: 0.9rem;
}

.site-footer a {
  color: #90caf9;
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}
