/* ============================================================
   ThisStormSeason.com — Main Stylesheet
   Dark storm-season theme | Mobile-first | No frameworks
   ============================================================ */

:root {
  --bg:          #07090f;
  --bg-card:     #0f1623;
  --bg-card-alt: #141d2e;
  --border:      #1e2d3d;
  --border-light:#263549;
  --text:        #e2e8f0;
  --text-muted:  #8b9ab1;
  --text-dim:    #4a5568;
  --accent:      #f59e0b;
  --accent-dark: #d97706;
  --danger:      #ef4444;
  --danger-dark: #dc2626;
  --safe:        #10b981;
  --info:        #3b82f6;
  --warning:     #f97316;
  --storm:       #60a5fa;
  --font-main:   'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:   'Courier New', monospace;
  --radius:      8px;
  --radius-lg:   12px;
  --shadow:      0 2px 12px rgba(0,0,0,0.5);
  --shadow-lg:   0 4px 24px rgba(0,0,0,0.7);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.65;
  min-height: 100vh;
}

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

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
}

h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); }
h4 { font-size: 1rem; }

p { margin-bottom: 0.85em; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.3em; }

/* ── Layout ── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 3rem 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

/* ── Topbar / Header ── */
.topbar {
  background: #04060c;
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
  gap: 1rem;
}

.site-logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-decoration: none;
}

.site-logo span { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: rgba(245,158,11,0.1);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 1.4rem;
  padding: 0.25rem;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #04060c;
    border-bottom: 2px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1rem 1rem;
    gap: 0.1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 0.9rem; padding: 0.5rem 0.75rem; width: 100%; }
}

/* ── Alert banner ── */
.alert-banner {
  background: linear-gradient(90deg, #3d0000, #1a0000);
  border-bottom: 2px solid var(--danger);
  padding: 0.65rem 1rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fca5a5;
  display: none;
}

.alert-banner.visible { display: block; }
.alert-banner a { color: #fca5a5; font-weight: 700; text-decoration: underline; }

/* ── Hero ── */
.hero {
  background: linear-gradient(160deg, #0a0e1a 0%, #050812 60%, #0a0e1a 100%);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(96,165,250,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: #fff;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.15s;
  text-decoration: none;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }

.btn-primary { background: var(--accent); color: #000; }
.btn-secondary { background: var(--info); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border-light); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }

.btn-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

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

/* ── Section header ── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-unused    { background: rgba(148,163,184,0.15); color: #94a3b8; border: 1px solid #2d3f54; }
.badge-watching  { background: rgba(245,158,11,0.15);  color: var(--accent); border: 1px solid #6b4c00; }
.badge-active    { background: rgba(239,68,68,0.2);    color: #f87171; border: 1px solid #7f1d1d; animation: pulse-badge 2s infinite; }
.badge-landfall  { background: rgba(239,68,68,0.3);    color: #fca5a5; border: 1px solid #991b1b; }
.badge-dissipated{ background: rgba(16,185,129,0.12);  color: #6ee7b7; border: 1px solid #065f46; }
.badge-retired   { background: rgba(167,139,250,0.15); color: #c4b5fd; border: 1px solid #4c1d95; }

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

/* ── Storm tracker table ── */
.tracker-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

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

.tracker-table thead th {
  background: #0b1220;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.tracker-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.tracker-table tbody tr:last-child { border-bottom: none; }
.tracker-table tbody tr:hover { background: rgba(255,255,255,0.03); }

.tracker-table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.tracker-table .name-cell {
  font-weight: 700;
  color: #fff;
}

.tracker-table .name-cell small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.tracker-table .date-cell {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.tracker-table .resources-cell a {
  font-size: 0.78rem;
  margin-right: 0.5rem;
  white-space: nowrap;
}

/* "Next storm" highlight */
.tracker-table tr.next-up {
  background: rgba(245,158,11,0.04);
}

.tracker-table tr.next-up .name-cell::after {
  content: ' ← Next';
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 600;
  margin-left: 0.4rem;
}

/* ── Checklist ── */
.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
  margin-bottom: 0;
  /* check-cat is first child; label is second */
}

.checklist li > .check-cat {
  flex-shrink: 0;
  margin-top: 0.15em; /* align badge vertically with first line of text */
}

.checklist li:last-child { border-bottom: none; }

.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  flex: 1;
}

.checklist input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.1em;
  cursor: pointer;
}

.checklist input[type="checkbox"]:checked + .check-text {
  color: var(--text-muted);
  text-decoration: line-through;
}

.checklist .check-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.06em;
  padding: 0.1rem 0.5rem;
  background: rgba(245,158,11,0.1);
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.checklist-progress {
  background: var(--border);
  border-radius: 999px;
  height: 6px;
  margin: 1rem 0 0.4rem;
  overflow: hidden;
}

.checklist-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s;
}

.checklist-progress-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ── Affiliate cards ── */
.affiliate-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.affiliate-card h4 { font-size: 0.9rem; color: var(--text); }
.affiliate-card p  { font-size: 0.8rem; color: var(--text-muted); margin: 0; }

.affiliate-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 600;
}

/* ── NHC image embed ── */
.nhc-outlook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.nhc-outlook-frame {
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.nhc-outlook-frame .nhc-label {
  background: #0b1220;
  padding: 0.5rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.nhc-outlook-frame img {
  width: 100%;
  display: block;
}

/* ── FAQ ── */
.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child { border-bottom: none; }

.faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 600;
  text-align: left;
  padding: 1rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.faq-q::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s;
  line-height: 1;
}

.faq-q[aria-expanded="true"]::after { transform: rotate(45deg); }

.faq-a {
  display: none;
  padding-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.faq-a.open { display: block; }

/* ── Season outlook bar ── */
.outlook-stat {
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-align: center;
}

.outlook-stat .stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.outlook-stat .stat-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Footer ── */
.site-footer {
  background: #04060c;
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.35rem; }
.footer-col ul a { color: var(--text-muted); font-size: 0.84rem; }
.footer-col ul a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin: 0;
}

.footer-bottom a { color: var(--text-dim); }
.footer-bottom a:hover { color: var(--text-muted); }

/* ── Utilities ── */
.text-accent  { color: var(--accent); }
.text-danger  { color: var(--danger); }
.text-muted   { color: var(--text-muted); }
.text-safe    { color: var(--safe); }
.text-info    { color: var(--info); }

.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.attribution {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
}

.disclaimer-box {
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  color: #fca5a5;
  line-height: 1.55;
}

/* ── Responsive tweaks ── */
@media (max-width: 600px) {
  .section { padding: 2rem 0; }
  .card    { padding: 1rem; }
  .tracker-table td, .tracker-table th { padding: 0.6rem 0.6rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
