/* home.css — CabLoot Iteration 3 Phase 1 */

/* 1. PHANTOM RIDE (Realistic Road) */
.cl-phantom-ride {
    position: fixed;
    left: 0;
    top: 0;
    width: 50px;
    height: 100vh;
    pointer-events: none;
    z-index: 1001;
    display: flex;
    justify-content: center;
    background: #1a1a1a; /* Dark asphalt */
    border-right: 2px solid #555;
    box-shadow: inset -10px 0 20px rgba(0,0,0,0.5);
}

.cl-phantom-track {
    width: 100%;
    height: 100%;
    /* Dashed yellow center line */
    background-image: linear-gradient(to bottom, var(--color-theme-yellow) 50%, transparent 50%);
    background-size: 4px 40px;
    background-repeat: repeat-y;
    background-position: center;
    opacity: 0.8;
}

.cl-phantom-cab {
    position: absolute;
    top: 0;
    width: 34px;
    height: 60px;
    transform: translate(0, -50%);
    transition: top 0.1s linear, transform 0.1s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* CSS-Drawn Top-Down Taxi */
.css-taxi {
    width: 34px;
    height: 60px;
    background: var(--color-theme-yellow); /* Taxi Yellow */
    border-radius: 8px 8px 12px 12px;
    transform: scaleY(-1);
    position: relative;
    box-shadow: 0 10px 15px rgba(0,0,0,0.4);
    border: 1px solid #c9a500;
}

/* Windshields */
.css-taxi::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 4px;
    width: 26px;
    height: 30px;
    background: #333; /* Glass */
    border-radius: 4px 4px 2px 2px;
}

/* Roof */
.css-taxi::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 6px;
    width: 22px;
    height: 20px;
    background: var(--color-theme-yellow);
    border-radius: 2px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

/* Headlights */
.css-taxi-lights {
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 6px;
    display: flex;
    justify-content: space-around;
}
.css-taxi-lights::before,
.css-taxi-lights::after {
    content: '';
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 15px #fff, 0 0 30px rgba(255,255,255,0.5);
}

.cab-bubble {
    position: fixed;
    left: 60px;
    top: 0;
    background: white;
    color: black;
    border: 3px solid black;
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 6px 6px 0px black;
    pointer-events: none;
    z-index: 1001;
}

/* Arrow for bubble */
.cab-bubble::after {
    content: '';
    position: absolute;
    left: -13px;
    top: 10px;
    border-right: 10px solid black;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

/* Ensure sections are above background but below cab bubble if needed */
section, header, footer, .cl-ticker-wrap {
    position: relative;
    z-index: 10;
}

/* 3. HERO REFACTOR */
#hero {
  padding: 140px 5% 60px; /* Account for ticker */
  text-align: center;
  background: linear-gradient(90deg, var(--color-theme-yellow) 50%, #FFF 50%);
  border-bottom: var(--brutal-border);
}

.cl-hero-headline {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2rem, 8vw, 6rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.cl-hero-subline {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.2rem, 4vw, 3rem);
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.cl-hero-body {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 1rem;
  color: var(--text-secondary);
  font-weight: 900;
}

.cl-hero-sub-body {
  font-size: 0.9rem;
  max-width: 560px;
  margin: 0 auto 2.5rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  opacity: 0.75;
  line-height: 1.6;
}

.cl-stats-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.cl-stat {
  display: flex;
  flex-direction: column;
}

.cl-odometer {
  font-family: 'Space Mono', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cl-stat label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-top: 0.5rem;
}

.cl-ticker-wrap {
  margin-top: 4rem;
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
  padding: 1rem 0;
  overflow: hidden;
  white-space: nowrap;
}

.cl-ticker {
  display: inline-block;
  animation: ticker 40s linear infinite;
}

.cl-ticker span {
  display: inline-block;
  padding: 0 2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 900;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* 5. BRAND PORTALS */
.cl-portals-section {
  padding: 60px 5%;
}

.cl-portals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.cl-portal-card {
  background: var(--color-uber-white);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  border: var(--brutal-border);
  box-shadow: var(--brutal-shadow);
  transition: transform 0.1s, box-shadow 0.1s;
  text-decoration: none;
  color: var(--color-uber-black);
}

.cl-portal-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 12px 12px 0px var(--color-uber-black);
}

.cl-portal-logo {
  height: 60px;
  margin-bottom: 1.5rem;
  filter: grayscale(1);
  transition: filter 0.2s;
}

.cl-portal-card:hover .cl-portal-logo {
  filter: grayscale(0);
}

.uber-card:hover .cl-portal-logo {
  filter: grayscale(1) invert(1);
}

.cl-portal-logo img {
  height: 100%;
}

.cl-portal-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.cl-portal-count {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.cl-portal-cta {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Brand specifics for brutalist cards */
.ola-card:hover { background: var(--color-ola-pear); }
.ola-cta { background: white; border: 2px solid black; color: black; }
.ola-card:hover .ola-cta { background: black; color: white; }

.uber-card:hover { background: var(--color-uber-black); color: white; }
.uber-cta { background: white; border: 2px solid black; color: black; }
.uber-card:hover .uber-cta { background: white; color: black; border: 2px solid black; }

.rapido-card:hover { background: var(--color-rapido-red); color: white; }
.rapido-cta { background: white; border: 2px solid black; color: black; }
.rapido-card:hover .rapido-cta { background: black; color: white; }

/* Removed HUD Corners */
.cl-hud-corner { display: none; }

/* 6. FEATURED INCIDENT */
.cl-featured-section {
  padding: 60px 5%;
}

.cl-featured-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 4px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.cl-featured-card {
  max-width: 800px;
  margin: 0 auto;
  background: var(--card-surface);
  border: 1px solid var(--border-dim);
  padding: 3rem;
  position: relative;
}

.cl-featured-brand-badge {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid;
}

.cl-featured-meta {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.cl-featured-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.cl-featured-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.cl-featured-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cl-featured-upvotes {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--approved);
}

.cl-featured-link {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid;
}

/* 7. LOOT MAP */
.cl-map-section {
  padding: 80px 5%;
}

.cl-map-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.cl-map-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem;
}

.cl-live-badge {
  background: var(--rejected);
  color: white;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.cl-map-framing {
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.cl-map-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.cl-map-filter {
  background: none;
  border: 1px solid var(--border-dim);
  color: var(--text-muted);
  padding: 0.5rem 1.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cl-map-filter.active {
  border-color: #333;
  color: #fff;
  background: #000;
}
.cl-map-filter[data-brand="ola"].active {
  background: #D6DF22;
  color: #000;
  border-color: #D6DF22;
}
.cl-map-filter[data-brand="uber"].active {
  background: #276EF1;
  color: #fff;
  border-color: #276EF1;
}
.cl-map-filter[data-brand="rapido"].active {
  background: #FFD100;
  color: #000;
  border-color: #FFD100;
}

.cl-map-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  background: var(--card-surface);
  border: 1px solid var(--border-dim);
  padding: 2rem;
}

#india-map-container {
  height: 600px;
  position: relative;
}

.cl-evidence-feed {
  border-left: 1px solid var(--border-dim);
  padding-left: 2rem;
  height: 600px;
  display: flex;
  flex-direction: column;
}

.cl-feed-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--rejected);
  margin-bottom: 1.5rem;
}

#cl-evidence-list {
  flex: 1;
  overflow-y: hidden;
}

.map-legend {
  margin-top: 2rem;
  display: flex;
  gap: 2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
}

.ola-dot { background: var(--ola-pear); }
.uber-dot { background: var(--uber-blue); }
.rapido-dot { background: var(--rapido-yellow); }

/* 8. RESPONSE GENERATOR (Modern Brutalist) */
.cl-hook-section {
  padding: 80px 5%;
  text-align: center;
  background: white;
  border-top: var(--brutal-border);
  border-bottom: var(--brutal-border);
}

.cl-hook-card {
  max-width: 800px;
  margin: 0 auto 3rem;
  background: white;
  border: var(--brutal-border);
  padding: 0;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--brutal-shadow);
  text-align: left;
}

.cl-hook-brand-badge {
  background: var(--color-uber-black);
  color: white;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 900;
  padding: 10px 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.cl-hook-response {
  padding: 40px;
  font-size: 1.5rem;
  line-height: 1.4;
  font-weight: 700;
  color: var(--color-uber-black);
}

.cl-hook-actions {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.cl-hook-btn, .cl-hook-copy {
  background: white;
  border: var(--brutal-border);
  color: var(--color-uber-black);
  padding: 1rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 4px 4px 0px black;
  transition: transform 0.1s, box-shadow 0.1s;
}

.cl-hook-btn:hover, .cl-hook-copy:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px black;
}

.cl-hook-btn:active, .cl-hook-copy:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0px black;
}

/* 9. HOW IT WORKS */
.cl-how-section {
  padding: 80px 5%;
  text-align: center;
}

.cl-how-section h2 {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.cl-how-sub {
  color: var(--text-muted);
  margin-bottom: 4rem;
}

.cl-how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.cl-how-card {
  background: var(--card-surface);
  padding: 3rem 2rem;
  border: 1px solid var(--border-dim);
  position: relative;
}

.cl-how-num {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.5;
}

.cl-how-card i {
  color: var(--color-theme-yellow);
  margin-bottom: 1.5rem;
}

.cl-how-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.cl-how-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 10. QUICK SUBMIT */
.cl-submit-section {
  padding: 100px 5%;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
}

.cl-submit-section h2 {
  font-family: 'Syne', sans-serif;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.cl-submit-sub {
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.cl-submit-brands {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cl-submit-brand-btn {
  padding: 1rem 3rem;
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.cl-submit-brand-btn:hover {
  transform: scale(1.05);
}

.ola-btn { background: var(--ola-pear); color: var(--ola-dark); }
.uber-btn { background: var(--uber-blue); color: white; }
.rapido-btn { background: var(--rapido-yellow); color: var(--rapido-black); }

/* 11. FOOTER */
.cl-footer {
  padding: 60px 5%;
  border-top: 1px solid var(--border-dim);
  text-align: center;
}

.cl-footer-disclaimer {
  max-width: 800px;
  margin: 0 auto 2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.cl-footer-brands {
  margin-bottom: 3rem;
}

.cl-footer-brands p {
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.cl-footer-tagline {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* 12. FAB */
.cl-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--text-primary);
  color: var(--amalgam-bg);
  border: none;
  padding: 1rem 2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.cl-fab:hover {
  transform: translateY(-5px);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .cl-map-layout { grid-template-columns: 1fr; }
  .cl-evidence-feed { border-left: 0; border-top: 1px solid var(--border-dim); padding-left: 0; padding-top: 2rem; height: 300px; }
  #india-map-container { height: 400px; }
  
  .cl-phantom-ride { display: none; }
  .cab-bubble { display: none; }
  .cl-stats-row { gap: 1.5rem; flex-direction: column; align-items: center; }
  .cl-featured-card { padding: 1.5rem; }
  #hero { padding-top: 80px; }
  .cl-submit-brand-btn { width: 100%; box-sizing: border-box; }
}

/* =========================================
   MOBILE OPTIMIZATION — Added breakpoints
   ========================================= */

/* ---- 600px: large phone ---- */
@media (max-width: 600px) {
  #india-map-container {
    height: 320px;
  }
  .cl-evidence-feed {
    height: 220px;
    border-left: none;
    border-top: 2px solid #000;
  }
  .cl-portals-grid {
    grid-template-columns: 1fr;
  }
  .cl-portal-card {
    padding: 2rem 1.5rem;
  }
  .cl-hook-response {
    padding: 20px;
    font-size: 1.1rem;
  }
  .cl-hook-actions {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  .cl-hook-btn,
  .cl-hook-copy {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
  .cl-how-grid {
    grid-template-columns: 1fr;
  }
  .cl-how-card {
    padding: 2rem 1.25rem;
  }
}

/* ---- 479px: phone ---- */
@media (max-width: 479px) {
  #hero {
    padding-top: 60px;
    padding-bottom: 2rem;
  }
  .cl-hero-body {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  .cl-stats-row {
    gap: 1.5rem;
  }
  #india-map-container {
    height: 280px;
  }
  .cl-evidence-feed {
    height: 200px;
  }
  .cl-map-layout {
    padding: 1rem;
  }
  .cl-map-filters {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .cl-map-filter {
    padding: 0.4rem 0.8rem;
    font-size: 0.7rem;
  }
  .cl-map-header h2 {
    font-size: 1.5rem;
  }
  .cl-featured-card {
    padding: 1rem !important;
  }
  .cl-featured-brand-badge {
    position: static;
    display: block;
    margin-bottom: 0.75rem;
    width: fit-content;
  }
  .cl-featured-title {
    font-size: 1.3rem;
  }
  .cl-featured-footer {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
  .cl-map-section,
  .cl-portals-section,
  .cl-featured-section,
  .cl-how-section,
  .cl-hook-section,
  .cl-submit-section {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  .cl-submit-section h2 {
    font-size: 1.5rem;
  }
  .cl-submit-brand-btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
}
