/* sonicboomdetector.com — minimal, mobile-first, light theme */

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

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-card-bg: #f9fafb;
  --color-confirmed: #059669;
  --color-suspected: #d97706;
  --color-detection: #ff6600;
  --max-width: 960px;
  --nav-height: 56px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--color-accent-hover);
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 1rem;
}

.nav-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo {
  width: 24px;
  height: 24px;
}

.nav-brand:hover {
  text-decoration: none;
  color: var(--color-text);
}

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

.nav-links a {
  color: var(--color-muted);
  font-size: 0.9rem;
}

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

/* Main content */
.content {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Hero */
.hero {
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero p {
  color: var(--color-muted);
  font-size: 1.1rem;
  max-width: none;
}

/* Section headings */
.section-heading {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}

/* Event cards */
.event-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 3rem;
}

@media (min-width: 600px) {
  .event-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.event-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: border-color 0.15s;
}

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

.event-card a {
  display: block;
  padding: 1.25rem;
  color: inherit;
}

.event-card a:hover {
  text-decoration: none;
}

.event-card-date {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 0.25rem;
}

.event-card-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.event-card-desc {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.5;
}

.event-card-meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15em 0.5em;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.badge-confirmed {
  background: #d1fae5;
  color: var(--color-confirmed);
}

.badge-suspected {
  background: #fef3c7;
  color: var(--color-suspected);
}

/* Event detail page */
.event-header {
  margin-bottom: 2rem;
}

.event-header h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.event-header .event-date {
  color: var(--color-muted);
  font-size: 1rem;
}

.event-description {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 0;
  max-width: none;
}

.event-top-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 600px) {
  .event-top-row {
    grid-template-columns: auto 1fr;
  }
}

.event-description-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 600px) {
  .detail-cards {
    grid-template-columns: auto 1fr;
  }
}

.detail-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.25rem;
}

.detail-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.detail-card-value-lg {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.detail-card-sub {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

.intensity-bar {
  display: flex;
  gap: 3px;
  margin-bottom: 0.4rem;
}

.intensity-segment {
  width: 100%;
  height: 8px;
  border-radius: 2px;
  background: #e5e7eb;
}

.intensity-segment.active[data-level="1"],
.intensity-segment.active[data-level="2"],
.intensity-segment.active[data-level="3"] { background: #22c55e; }
.intensity-segment.active[data-level="4"],
.intensity-segment.active[data-level="5"] { background: #eab308; }
.intensity-segment.active[data-level="6"],
.intensity-segment.active[data-level="7"] { background: #f97316; }
.intensity-segment.active[data-level="8"],
.intensity-segment.active[data-level="9"],
.intensity-segment.active[data-level="10"] { background: #dc2626; }

.intensity-label {
  font-size: 1.1rem;
  font-weight: 700;
}

.detail-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.city-badge {
  display: inline-block;
  font-size: 0.85rem;
  padding: 0.3em 0.75em;
  background: #e5e7eb;
  color: var(--color-text);
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

.city-badge-sm {
  font-size: 0.75rem;
  padding: 0.2em 0.6em;
}

.locations-section {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.locations-section .detail-card-badges {
  margin-top: 0.5rem;
  gap: 0.4rem;
}

a.city-badge:hover {
  background: #2563eb;
  color: #fff;
}

/* Map */
.map-container {
  width: 100%;
  height: 450px;
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--color-border);
  border-bottom: none;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

@media (max-width: 599px) {
  .map-container {
    height: 300px;
  }
}

.timeline-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 0 0 8px 8px;
  margin-bottom: 2rem;
}

.timeline-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-text);
}

.timeline-btn:hover {
  background: var(--color-border);
}

.timeline-btn.playing {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

.timeline-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--color-border);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
}

.timeline-time {
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.85rem;
  color: var(--color-muted);
  white-space: nowrap;
  min-width: 5.5em;
  text-align: right;
}

.timeline-time .event-marker {
  color: var(--color-detection);
  font-weight: 700;
}

/* City page */
.city-description {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* About page */
.about-content {
  max-width: none;
}

.about-content h2 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.about-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* Footer */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: auto;
}

/* Classification note */
.classification-note {
  background: #eff6ff;
  border-left: 3px solid var(--color-accent);
  padding: 0.75rem 1rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  border-radius: 0 4px 4px 0;
}
