/* Base */

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

:root {
  --bg: #020617;
  --bg-alt: #050816;
  --card: #0f172a;
  --card-alt: #020617;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.2);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: rgba(148, 163, 184, 0.4);
  --radius-lg: 1.25rem;
  --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.7);
  --max-width: 1100px;
}

html {
  scroll-behavior: smooth;
}

/* Weather–driven page backgrounds
   (applied to <body> by JS based on current conditions) */

body {
  /* existing body styles stay as your default fallback */
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #020617, #020617 45%, #020617);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Clear / mostly clear */
.weather-bg-clear {
  background:
    linear-gradient(
      to bottom,
      rgba(15, 23, 42, 0.92),
      rgba(15, 23, 42, 0.96)
    ),
    radial-gradient(circle at top, #0f172a, #0369a1 45%, #020617);
}

/* Partly to mostly cloudy */
.weather-bg-cloudy {
  background:
    linear-gradient(
      to bottom,
      rgba(15, 23, 42, 0.94),
      rgba(15, 23, 42, 0.98)
    ),
    radial-gradient(circle at top, #020617, #1e293b 40%, #020617 100%);
}

/* Light rain / showers */
.weather-bg-rain {
  background:
    linear-gradient(
      to bottom,
      rgba(15, 23, 42, 0.94),
      rgba(15, 23, 42, 0.99)
    ),
    radial-gradient(circle at top, #0f172a, #1d4ed8 40%, #020617 100%);
}

/* Thunderstorms / severe */
.weather-bg-storm {
  background:
    linear-gradient(
      to bottom,
      rgba(15, 23, 42, 0.96),
      rgba(15, 23, 42, 0.99)
    ),
    radial-gradient(circle at top, #020617, #4c1d95 35%, #030712 100%);
}

/* Snow / wintry */
.weather-bg-snow {
  background:
    linear-gradient(
      to bottom,
      rgba(15, 23, 42, 0.9),
      rgba(15, 23, 42, 0.96)
    ),
    radial-gradient(circle at top, #e5e7eb, #93c5fd 45%, #020617 100%);
}

/* Fog / mist */
.weather-bg-fog {
  background:
    linear-gradient(
      to bottom,
      rgba(15, 23, 42, 0.94),
      rgba(15, 23, 42, 0.99)
    ),
    radial-gradient(circle at top, #6b7280, #020617 55%);
}


img, a, button {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

/* Layout helpers */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 3.5rem 0;
}

.section-alt {
  padding: 3.5rem 0;
  background: radial-gradient(circle at top, #020617, #020617 45%, #020617);
}

/* Header & Nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.95),
    rgba(2, 6, 23, 0.85),
    transparent
  );
  border-bottom: 1px solid rgba(15, 23, 42, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0.75rem 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 0.75rem;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--accent-soft);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Desktop nav links */

.nav-link {
  position: relative;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--muted);
  padding-bottom: 2px;
}

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

.nav-link-active {
  color: var(--accent);
}

/* pseudo underline for better readability / focus */
.main-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -0.25rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.9;
  transition: width 0.18s ease-out;
}

.main-nav .nav-link:hover::after,
.main-nav .nav-link.nav-link-active::after {
  width: 55%;
}

/* Hero */

.hero {
  padding: 3.5rem 0 3rem;
}

.hero-compact {
  padding: 2.75rem 0 2.25rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(1.9rem, 3.1vw, 2.5rem);
  margin: 0 0 0.5rem;
}

.hero-tagline {
  margin: 0.5rem 0 1.75rem;
  color: var(--muted);
  max-width: 32rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}


.hero-media {
  display: flex;
  justify-content: flex-end;
}

.hero-image {
  width: 100%;
  max-width: 360px;
  border-radius: 1.5rem;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    border-color 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
  color: #0b1120;
  box-shadow: 0 15px 35px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(56, 189, 248, 0.4);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 1);
}

/* Local Forecast */

.forecast-section {
  padding: 3.25rem 0 3.5rem;
  background: radial-gradient(circle at top, #020617, #020617 45%, #020617);
  border-top: 1px solid rgba(15, 23, 42, 0.75);
  border-bottom: 1px solid rgba(15, 23, 42, 0.75);
}

.forecast-inner h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.forecast-status {
  margin: 0.5rem 0 1.5rem;
  color: var(--muted);
}

.current-conditions {
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.current-location {
  font-size: 0.85rem;
  color: var(--muted);
}

.current-temp {
  margin: 0.4rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.current-details {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.daily-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.daily-card {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.85rem;
}

.daily-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.daily-temp {
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.forecast-note {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Sections & content */

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 2.5rem;
}

.about-image-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image {
  width: 200px;
  height: 200px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
  border: 0px solid var(--accent-soft);
}

.section h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.4rem;
}

.section p {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

/* NWS Alerts Card (Hero Section) */

.alert-card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-soft);
  width: 100%;
  max-width: 360px;
}

.alert-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
}

.alert-message {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  white-space: pre-line;
}

.alert-areas {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.85;
}

/* Intro text under headings (used on HREF page, etc.) */

.section-intro {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Link grid */

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* max 3 per row */
  gap: 1rem;
  margin-top: 1.25rem;
}

/* Tablet: 2 per row (optional but nice for spacing) */
@media (max-width: 900px) {
  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile: 1 per row */
@media (max-width: 640px) {
  .link-grid {
    grid-template-columns: 1fr;
  }
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
}

.link-card:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.7);
}

.link-title {
  font-weight: 500;
}

.link-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Embedded tools (SPC HREF, etc.) */

.embed-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 ratio */
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #020617;
  box-shadow: var(--shadow-soft);
}

.embed-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.embed-note {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.8);
  padding: 1.25rem 0;
  background: #020617;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  gap: 0.75rem;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--accent);
}

/* Full-page radar + HREF */

.radar-fullscreen,
.href-fullscreen {
  position: relative;
  width: 100%;
  height: calc(100vh - 64px); /* full height minus header */
  background: #000;
  overflow: hidden;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
}

.radar-fullscreen iframe,
.href-fullscreen iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.radar-fallback,
.href-fallback {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(2, 6, 23, 0.8);
  padding: 0.5rem 0.75rem;
  border-radius: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  backdrop-filter: blur(6px);
}

.radar-fallback a,
.href-fallback a {
  color: var(--accent);
  text-decoration: none;
}

.radar-fallback a:hover,
.href-fallback a:hover {
  text-decoration: underline;
}

/* Mobile nav toggle & full-screen menu */

.nav-toggle {
  display: none;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #e5e7eb;
  cursor: pointer;
}

.nav-toggle:active {
  transform: translateY(1px);
}

/* Close button (hidden by default, shown in mobile MQ) */
.nav-close {
  display: none;
  background: transparent;
  border: none;
  color: #e5e7eb;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.nav-close-label {
  font-size: 0.9rem;
}

.nav-close-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid #e5e7eb;
  font-size: 1rem;
}

/* Overlay behind the menu (under nav) */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
  z-index: 10; /* below header (20) and nav (40) */
}

.nav-open .nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile layout & menu */
/* Desktop nav layout (override mobile wrappers) */
@media (min-width: 961px) {
  /* Hide mobile-only bits on desktop */
  .nav-close,
  .nav-mobile-logo,
  .nav-mobile-social {
    display: none;
  }

  /* Make the inner panel behave like a normal nav row */
  .nav-panel-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
  }

  /* Links in a row on desktop */
  .nav-mobile-links {
    display: flex;
    flex-direction: row;
    gap: 1.25rem;
  }

  /* Use your existing desktop link look */
  .nav-mobile-links .nav-link {
    font-size: 0.9rem;
    color: var(--muted);
    padding-bottom: 2px;
  }

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

  .nav-mobile-links .nav-link.nav-link-active {
    color: var(--accent);
  }
}



@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 3.5rem 1.75rem 2.5rem;
    background: linear-gradient(to bottom, #0b2540, #020617);
    display: flex;
    justify-content: center;   /* center panel horizontally */
    align-items: center;       /* center panel vertically */
    transform: translateX(100%);
    transition: transform 0.22s ease-out;
    z-index: 40;
    text-align: center;
  }

  .nav-open .main-nav {
    transform: translateX(0);
  }

  /* Close button only on mobile menu */
  .nav-close {
    display: flex;
    position: absolute;
    top: 18px;
    right: 18px;
    align-items: center;
    gap: 0.35rem;
    z-index: 41;
  }

  /* Centered column: logo → links → socials */
  .nav-panel-inner {
    width: 100%;
    max-width: 360px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
  }

  .nav-mobile-logo {
    width: 90px;
    height: 90px;
    border-radius: 999px;
    object-fit: cover;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  }

  .nav-mobile-links {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
  }

  .nav-mobile-links .nav-link {
    font-size: 1.1rem;
    color: #f9fafb;
    text-decoration: none;
    padding: 0;
  }

  .nav-mobile-links .nav-link:hover,
  .nav-mobile-links .nav-link.nav-link-active {
    color: var(--accent);
  }

  .nav-mobile-social {
    display: flex;
    gap: 1.75rem;
    margin-top: 2.5rem;
  }

  .nav-social-link {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 2px solid #f9fafb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #f9fafb;
    text-decoration: none;
  }

  .nav-social-link:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .header-inner {
    gap: 0.5rem;
  }

  body.nav-open {
    overflow: hidden; /* lock scroll when menu open */
  }
}

/* Force 7-day forecast to 2 columns on small screens */
@media (max-width: 640px) {
  .daily-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Existing <=768px layout tweaks */

@media (max-width: 768px) {
  .header-inner {
    padding-inline: 1rem;
    gap: 0.5rem;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .hero-media {
    justify-content: stretch;
  }

  .hero {
    padding-top: 2.25rem;
  }

  .two-column {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }
}

/* =========================================================
   HERO – Weather Background System
   ========================================================= */

/* .hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
} */

.hero {
  position: relative;
  min-height: 75svh;        /* 👈 make hero tall on all devices */
  display: flex;
  align-items: center;      /* vertically center content */
  padding: 4rem 0;          /* keep some breathing room */
  background-size: cover;
  background-position: center;
}


/* Dark overlay for readability */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
}

/* Ensure hero content stays above overlay */
.hero .hero-inner,
.hero * {
  position: relative;
  z-index: 2;
}

/* Theme backgrounds */
.hero-clear-day    { background-image: url("../images/clear-day2.webp"); }
.hero-clear-night  { background-image: url("../images/clear-night2.webp"); }
.hero-cloudy-day   { background-image: url("../images/cloudy-day.webp"); }
.hero-cloudy-night { background-image: url("../images/cloudy-night.webp"); }
.hero-rain         { background-image: url("../images/rain.webp"); }
.hero-snow         { background-image: url("../images/snow.webp"); }
.hero-storm        { background-image: url("../images/storm.webp"); }
.hero-fog          { background-image: url("../images/fog.webp"); }
