/* Standard Weather — shares the PastWeather look: dark indigo, glass panels, cyan → violet accent. */
:root {
  --bg: #070914;
  --bg-top: #161e48;
  --accent: #4ad1ff;
  --accent2: #8f6bff;
  --gradient: linear-gradient(135deg, var(--accent), var(--accent2));
  --text: #ffffff;
  --text2: rgba(255, 255, 255, 0.68);
  --text3: rgba(255, 255, 255, 0.42);
  --hairline: rgba(255, 255, 255, 0.10);
  --glass: rgba(22, 26, 48, 0.55);
  --glass-hi: rgba(32, 38, 68, 0.65);
  --field: rgba(255, 255, 255, 0.06);
  --err: #ff9f43;
  --tornado: #ff453a;
  --hail: #30d158;
  --wind: #0a84ff;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --brand: "Outfit", var(--font);
  --max: 52rem;
  --max-wide: 58rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 24px;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; background: var(--bg); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  /* Indigo → near-black with a soft light pool, like the PastWeather icon background. */
  background:
    radial-gradient(60vmax 45vmax at 50% 6%, rgba(18, 60, 120, 0.55), transparent 70%),
    radial-gradient(50vmax 40vmax at 88% 70%, rgba(143, 107, 255, 0.10), transparent 70%),
    linear-gradient(170deg, var(--bg-top) 0%, #0b0f26 40%, var(--bg) 100%);
  background-attachment: fixed;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: #8be3ff; }

.shell {
  width: min(100% - (var(--gutter) * 2), var(--max));
  margin: 0 auto;
  padding: 0 0 3.5rem;
  flex: 1;
}
.shell--wide { width: min(100% - (var(--gutter) * 2), var(--max-wide)); }

/* —— Site nav (frosted bar, like the app's brand bar) —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(8, 10, 22, 0.55);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 0.5px solid var(--hairline);
}
.site-nav__inner {
  width: min(100% - (var(--gutter) * 2), var(--max-wide));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  padding: 0.7rem 0;
}
.site-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #fff;
  font-family: var(--brand);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.005em;
}
.site-nav__brand:hover { color: #fff; }
.site-nav__brand img {
  width: 2rem;
  height: 2rem;
  display: block;
  filter: drop-shadow(0 0 6px rgba(74, 209, 255, 0.35));
}
.site-nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 500;
}
.site-nav__links a {
  display: block;
  text-decoration: none;
  color: var(--text2);
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s;
}
.site-nav__links a:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.site-nav__links a[aria-current="page"] {
  color: #fff;
  background: rgba(74, 209, 255, 0.14);
  border-color: rgba(74, 209, 255, 0.35);
}

/* —— Typography / layout —— */
.page-header {
  text-align: center;
  padding: clamp(2rem, 5vw, 3.25rem) 0 clamp(1.75rem, 4vw, 2.5rem);
}
.page-header .logo {
  display: block;
  width: min(100%, 10.5rem);
  height: auto;
  margin: 0 auto 1.4rem;
  filter: drop-shadow(0 0 24px rgba(74, 209, 255, 0.25));
}
.page-header h1 {
  margin: 0 0 0.5rem;
  font-family: var(--brand);
  font-size: clamp(2.1rem, 6vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-weight: 700;
  color: #fff;
}
.tagline {
  margin: 0 auto;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  width: fit-content;
}

section { margin-bottom: clamp(2.25rem, 5vw, 3.25rem); }

h2 {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
h2::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }

h3 {
  margin: 0 0 0.55rem;
  font-family: var(--brand);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: #fff;
  line-height: 1.25;
}

p {
  margin: 0 0 1.1rem;
  max-width: 42rem;
  color: var(--text2);
}

.lede { font-size: 1.12rem; max-width: 40rem; color: var(--text); }

.intro-grid { display: grid; gap: 1.15rem; }
@media (min-width: 720px) {
  .intro-grid { grid-template-columns: 1.35fr 1fr; gap: 1.5rem; align-items: start; }
}

/* Glass surfaces */
.callout, .service, .steps li, .panel, .handoff, #contact-form {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.35);
}

.callout {
  position: relative;
  overflow: hidden;
  padding: 1.25rem 1.3rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text);
}
.callout::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--gradient);
}
.callout strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
}

.services { display: grid; gap: 1rem; }
@media (min-width: 680px) {
  .services { grid-template-columns: 1fr 1fr; gap: 1.15rem; }
}

.service {
  padding: 1.35rem 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.service:hover { background: var(--glass-hi); border-color: rgba(74, 209, 255, 0.25); transform: translateY(-2px); }
.service p { margin: 0; flex: 1; font-size: 0.98rem; }

.soft-link { margin-top: 1rem; font-size: 0.95rem; }
.soft-link a { font-weight: 600; }

/* —— Forms —— */
form { display: grid; gap: 1rem; max-width: 34rem; }
#contact-form { padding: 1.35rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.field { display: grid; gap: 0.4rem; }
.field-row { display: grid; gap: 0.85rem; }
@media (min-width: 520px) {
  .field-row { grid-template-columns: 1.2fr 1fr; }
}
label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text3);
}
input, textarea, select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 0.8rem 0.95rem;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--text3); }
textarea { resize: vertical; min-height: 8rem; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(74, 209, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(74, 209, 255, 0.18);
}
input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.6; }

/* Primary call-to-action: gradient capsule. */
button, .btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--gradient);
  color: rgba(0, 0, 0, 0.9);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 22px rgba(74, 209, 255, 0.35);
  transition: transform 0.2s cubic-bezier(.3, 1.6, .5, 1), filter 0.15s;
}
button:hover, .btn:hover { filter: brightness(1.06); color: rgba(0, 0, 0, 0.9); }
button:active, .btn:active { transform: scale(0.97); }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button:disabled { background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.4); box-shadow: none; cursor: default; }
.btn--secondary {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border: 1px solid var(--hairline);
  box-shadow: none;
  min-height: 40px;
  font-size: 0.92rem;
  padding: 0 1rem;
}
.btn--secondary:hover { background: rgba(74, 209, 255, 0.16); color: #fff; }
.btn--block { width: 100%; justify-self: stretch; min-height: 54px; font-size: 1.05rem; }

/* —— About —— */
.about-seal {
  float: right;
  width: min(100%, 8.5rem);
  height: auto;
  margin: 0 0 1rem 1.5rem;
  shape-outside: circle(50%);
  opacity: 0.9;
}
.prose::after { content: ""; display: table; clear: both; }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  counter-reset: step;
}
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.steps li { padding: 1.2rem 1.25rem 1.3rem; counter-increment: step; }
.steps li strong {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  font-family: var(--brand);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}
.steps li strong::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--gradient);
  color: rgba(0, 0, 0, 0.85);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
}
.steps li p { margin: 0; max-width: none; font-size: 0.97rem; }

/* —— PastWeather —— */
.pw-brand { text-align: center; padding: clamp(1.75rem, 4vw, 2.5rem) 0 0.25rem; }
.pw-icon {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 1rem;
  border-radius: 22.5%;
  box-shadow: 0 0 0 0.5px var(--hairline), 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(74, 209, 255, 0.18);
}
.pw-brand .name {
  margin: 0 auto;
  max-width: none;
  font-family: var(--brand);
  font-size: clamp(2.1rem, 6vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #fff;
}
.pw-brand .name .past { font-weight: 500; color: rgba(255, 255, 255, 0.78); }
.pw-brand .name .weather { font-weight: 700; }
.pw-helper {
  text-align: center;
  color: var(--text2);
  margin: 0.6rem auto 1.5rem;
  font-size: 0.98rem;
}
.pw-query {
  margin: 0 auto 1.5rem;
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.35);
}
.pw-error { color: var(--err); font-size: 0.95rem; margin: 0; max-width: none; }
.pw-footnote {
  margin: 0.75rem auto 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text3);
  max-width: none;
  text-align: center;
}

.pw-results[hidden] { display: none !important; }
.pw-results { display: grid; gap: 1rem; margin-top: 0.5rem; }

.meta-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  justify-self: start;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  padding: 0.55rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.meta-chip.sub { font-size: 0.82rem; font-weight: 500; color: var(--accent); }

.panel { overflow: hidden; }
.panel > h2,
.panel__title {
  margin: 0;
  padding: 0.9rem 1rem 0.65rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  font-weight: 600;
}
.panel > h2::after, .panel__title::after { display: none; }

#radar-map { height: 280px; width: 100%; background: #0d1020; }
@media (min-width: 720px) {
  #radar-map { height: 360px; }
}
.radar-empty,
.radar-loading {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
  color: var(--text2);
  background: #0d1020;
  font-size: 0.95rem;
  font-weight: 500;
}
@media (min-width: 720px) {
  .radar-empty, .radar-loading { height: 360px; }
}
.radar-badge {
  position: absolute;
  right: 0.6rem;
  top: 0.6rem;
  z-index: 500;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text2);
  background: rgba(8, 10, 22, 0.7);
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  pointer-events: none;
}
.radar-wrap { position: relative; }

.demo-radar {
  height: 280px;
  background:
    radial-gradient(circle at 35% 45%, rgba(40, 175, 95, 0.55), transparent 42%),
    radial-gradient(circle at 58% 52%, rgba(250, 205, 30, 0.4), transparent 35%),
    radial-gradient(circle at 48% 40%, rgba(225, 35, 30, 0.45), transparent 28%),
    linear-gradient(180deg, #1a2140 0%, #0d1020 100%);
  position: relative;
}
@media (min-width: 720px) {
  .demo-radar { height: 360px; }
}
.demo-radar .pin {
  position: absolute;
  left: 48%;
  top: 44%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2.5px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(74, 209, 255, 0.2);
}

.reports { margin: 0; padding: 0 0 4px; list-style: none; }
.reports li {
  position: relative;
  padding: 0.8rem 1rem 0.8rem 2.2rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text);
}
.reports li:not(.reports-empty)::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 1.15rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot, #8e8e93);
  box-shadow: 0 0 8px var(--dot, transparent);
}
.reports li.tornado { --dot: var(--tornado); }
.reports li.hail { --dot: var(--hail); }
.reports li.wind { --dot: var(--wind); }
.reports .t {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dot, var(--text2));
  margin-bottom: 0.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.reports .place { display: block; margin-top: 0.15rem; font-size: 0.85rem; color: var(--text2); }
.reports-empty {
  padding: 0.25rem 1rem 1rem !important;
  border-top: 0 !important;
  color: var(--text2) !important;
  font-size: 0.95rem;
  margin: 0;
  max-width: none;
}

.handoff { padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.65rem; }
.handoff .row { display: flex; align-items: flex-start; gap: 0.75rem; }
.handoff img { width: 40px; height: 40px; flex-shrink: 0; }
.handoff p { margin: 0; font-size: 0.95rem; line-height: 1.45; max-width: none; }

.status-bar { font-size: 0.85rem; color: var(--accent); min-height: 1.25rem; margin: 0; text-align: center; max-width: none; }

/* —— Leaflet in dark glass —— */
.leaflet-container { font: inherit; background: #0d1020; }
.leaflet-bar { border: 1px solid var(--hairline) !important; border-radius: 12px !important; overflow: hidden; box-shadow: none !important; }
.leaflet-bar a, .leaflet-bar a:hover {
  background: rgba(22, 26, 48, 0.8) !important;
  color: #fff !important;
  border-bottom-color: var(--hairline) !important;
}
.leaflet-control-attribution { background: rgba(8, 10, 22, 0.6) !important; color: var(--text3) !important; }
.leaflet-control-attribution a { color: var(--text2) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: rgba(22, 26, 48, 0.92); color: #fff; }
.leaflet-popup-content-wrapper { border: 1px solid var(--hairline); border-radius: 16px; }

/* —— Footer —— */
.site-footer {
  margin-top: auto;
  border-top: 0.5px solid var(--hairline);
  padding: 1.25rem var(--gutter) calc(1.25rem + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.78rem;
  color: var(--text3);
  background: rgba(8, 10, 22, 0.35);
}
.site-footer p { margin: 0 auto; max-width: none; color: inherit; }

/* PastWeather responsive */
.pw-helper { max-width: min(42rem, 100%); }
.pw-query { max-width: min(36rem, 100%); }
.pw-results { max-width: min(72rem, 100%); width: 100%; }
@media (min-width: 900px) {
  .shell--wide { max-width: 72rem; }
  .pw-results { max-width: 72rem; }
  .reports { display: grid; grid-template-columns: 1fr 1fr; }
  .reports li:nth-child(odd):not(.reports-empty) { border-right: 1px solid var(--hairline); }
  #radar-map,
  .radar-wrap #radar-map,
  .demo-radar,
  .radar-loading,
  .radar-empty {
    height: min(52vh, 560px) !important;
  }
}
@media (max-width: 639px) {
  .site-nav__inner { justify-content: center; }
  #radar-map,
  .demo-radar,
  .radar-loading,
  .radar-empty {
    height: 300px !important;
  }
}
.status-bar:empty { display: none; }
@media (max-width: 599px) {
  .about-seal { display: none; }
}
