/* JackUWeather Forecasting. Colors and fonts follow config/brand.yaml. */
:root {
  --navy: #06112F; --navy-raised: #0E2250; --navy-panel: #0A1A40; --yellow: #FED238;
  --white: #FFFFFF; --sky: #C9DDF2; --map-label: #7FA6D6; --radar: #2F6DB5; --alert: #FF7A1A;
  --snow-1: #C9DDF2; --snow-2: #7FA6D6; --snow-3: #2F6DB5; --snow-4: #FED238; --snow-5: #FF7A1A;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--navy); color: var(--sky); font: 16px/1.55 Inter, system-ui, sans-serif; }
img { max-width: 100%; display: block; }
a { color: var(--yellow); }
h1, h2, h3, .anton { font-family: Anton, Impact, sans-serif; font-weight: 400; text-transform: uppercase; color: var(--white); letter-spacing: .01em; line-height: 1.08; margin: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.yellow { color: var(--yellow); }
.muted { color: var(--map-label); }
[hidden] { display: none !important; }

/* header */
.site-header { border-bottom: 1px solid rgba(47,109,181,.45); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.brand .wordmark { font-family: Anton, Impact, sans-serif; color: var(--white); font-size: 26px; line-height: 1; text-transform: uppercase; }
.brand .sub { display: block; font-family: Anton, Impact, sans-serif; color: var(--yellow); font-size: 11px; letter-spacing: .42em; margin-top: 4px; }
.nav { display: none; gap: 4px; margin-left: 16px; }
.nav a { color: var(--sky); text-decoration: none; padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.nav a[aria-current="page"] { color: var(--yellow); }
.header-cta { margin-left: auto; }
@media (min-width: 760px) { .nav { display: flex; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 2px solid var(--radar); background: transparent; color: var(--white); font: 600 16px Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.small { min-height: 44px; padding: 8px 14px; font-size: 15px; }

/* alert bar */
.alert-bar { background: var(--alert); color: #1B0E00; font-weight: 600; }
.alert-bar .wrap { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding-top: 10px; padding-bottom: 10px; }
.alert-bar a { color: #1B0E00; margin-left: auto; min-height: 44px; display: inline-flex; align-items: center; }

/* cards */
.card { background: var(--navy-raised); border-radius: 16px; padding: 18px; }
.frame { background: var(--navy-panel); border: 2px solid var(--radar); border-radius: 16px; overflow: hidden; }
.label { font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--yellow); }
.pill { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.pill.storm { background: var(--alert); color: #1B0E00; letter-spacing: .08em; }
section { margin: 28px 0; }
.section-title { font-size: 26px; margin-bottom: 14px; }

/* home hero */
.hero { display: grid; gap: 20px; }
.hero h1 { font-size: clamp(34px, 7vw, 62px); margin: 10px 0 14px; }
.hero .take p { margin: 0 0 12px; font-size: 17px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
@media (min-width: 900px) { .hero.with-map { grid-template-columns: 1.15fr 1fr; align-items: start; } .hero.storm-first .snow-card { order: -1; } }
.snow-card h2 { font-size: 22px; margin-bottom: 10px; }
.snow-card canvas { width: 100%; height: auto; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.legend .pill { color: var(--navy); }

/* map grid */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.map-card { display: block; text-decoration: none; color: var(--sky); background: var(--navy-raised); border-radius: 16px; overflow: hidden; }
.map-card .thumb { aspect-ratio: 1 / 1; overflow: hidden; background: var(--navy-panel); }
.map-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.map-card .meta { padding: 10px 12px 12px; font-size: 14px; }
.map-card .meta b { display: block; color: var(--white); font-size: 15px; }
.row { display: grid; gap: 12px; }
@media (min-width: 900px) { .row { grid-template-columns: repeat(2, 1fr); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { border: 1px solid var(--radar); border-radius: 999px; padding: 4px 12px; font-size: 14px; color: var(--sky); }

/* viewer */
.viewer-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 16px 0; }
.field-group { display: flex; flex-direction: column; gap: 4px; }
.field-group > span { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--map-label); }
select, input[type=text], input[type=email], textarea { min-height: 44px; background: var(--navy-panel); color: var(--white); border: 2px solid var(--radar); border-radius: 12px; padding: 8px 12px; font: 16px Inter, system-ui, sans-serif; max-width: 100%; }
textarea { width: 100%; min-height: 180px; }
.pills { display: flex; gap: 8px; }
.pills button { min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 2px solid var(--radar); background: transparent; color: var(--white); font: 700 15px Inter, sans-serif; cursor: pointer; }
.pills button[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.viewer-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.viewer-main { display: grid; gap: 14px; }
.field-list { display: none; flex-direction: column; gap: 6px; }
.field-list button { text-align: left; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 2px solid transparent; background: var(--navy-raised); color: var(--sky); font: 600 15px Inter, sans-serif; cursor: pointer; }
.field-list button[aria-pressed="true"] { border-color: var(--yellow); color: var(--yellow); }
.field-select { display: flex; }
@media (min-width: 900px) { .viewer-main { grid-template-columns: 230px 1fr; } .field-list { display: flex; } .field-select { display: none; } }
.map-title { font-size: clamp(22px, 4.5vw, 34px); color: var(--yellow); }
.map-valid { color: var(--white); font-weight: 600; margin: 4px 0 10px; }
.map-frame { position: relative; touch-action: pan-y; }
.map-frame img { width: 100%; height: auto; }
.map-frame .na { padding: 80px 20px; text-align: center; color: var(--map-label); font-weight: 600; }
.controls { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; }
.controls input[type=range] { flex: 1; min-width: 0; height: 44px; accent-color: var(--yellow); }
.round { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--radar); background: transparent; color: var(--white); font-size: 18px; cursor: pointer; flex: none; }
.round.play { width: 60px; height: 60px; background: var(--yellow); border-color: var(--yellow); color: var(--navy); font-size: 22px; }
.hour-text { text-align: center; font-weight: 600; color: var(--white); }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--white); color: var(--navy); padding: 10px 16px; border-radius: 12px; font-weight: 600; z-index: 20; }

/* footer and phone tab bar */
.site-footer { border-top: 1px solid rgba(47,109,181,.45); margin-top: 40px; padding: 22px 0 96px; font-size: 14px; text-align: center; }
.site-footer p { margin: 4px 0; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--navy-raised); border-top: 1px solid var(--radar); z-index: 10; padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; min-height: 56px; display: flex; align-items: center; justify-content: center; color: var(--sky); text-decoration: none; font-weight: 600; font-size: 14px; }
.tabbar a[aria-current="page"] { color: var(--yellow); }
@media (min-width: 760px) { .tabbar { display: none; } .site-footer { padding-bottom: 28px; } }

/* studio */
.studio { display: grid; gap: 16px; margin-top: 18px; }
@media (min-width: 900px) { .studio { grid-template-columns: 220px 1fr; } }
.studio nav { display: flex; gap: 6px; overflow-x: auto; }
.studio nav button { white-space: nowrap; min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 0; background: var(--navy-raised); color: var(--sky); font: 600 15px Inter, sans-serif; cursor: pointer; text-align: left; }
.studio nav button[aria-pressed="true"] { color: var(--navy); background: var(--yellow); }
.studio nav button:disabled { opacity: .45; }
@media (min-width: 900px) { .studio nav { flex-direction: column; } }
.panel { display: grid; gap: 12px; }
.panel label { display: grid; gap: 6px; font-weight: 600; color: var(--white); }
.switch { display: flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 600; color: var(--white); }
.switch input { width: 52px; height: 30px; accent-color: var(--yellow); }
.range-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.range-pills button { min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 3px solid transparent; font: 700 15px Inter, sans-serif; color: var(--navy); cursor: pointer; }
.range-pills button[aria-pressed="true"] { border-color: var(--white); box-shadow: 0 0 0 2px var(--navy); }
.draw-frame canvas { width: 100%; height: auto; display: block; touch-action: none; cursor: crosshair; }
.status { min-height: 24px; font-weight: 600; color: var(--white); }
.status.error { color: var(--alert); }

/* viewer on phones: keep the controls short so the map is on screen */
@media (max-width: 899px) {
  .viewer-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin: 12px 0; }
  .viewer-bar .field-group:first-child, .viewer-bar .field-select, .viewer-actions { grid-column: 1 / -1; }
  .viewer-bar .field-group:first-child > span { display: none; }
  .viewer-bar select { width: 100%; }
  .viewer-actions { margin-left: 0; }
  .viewer-actions .btn { flex: 1; }
  .pills button { flex: 1; }
  .map-valid { font-size: 15px; }
}

/* towns */
a.chip { text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
a.chip:hover { border-color: var(--yellow); color: var(--yellow); }
.search-row { display: flex; gap: 8px; margin: 8px 0 12px; }
.search-row input { flex: 1; min-width: 0; }
#town-results p { margin: 0 0 8px; color: var(--white); }
.town-name { font-size: clamp(40px, 10vw, 76px); margin: 6px 0 14px; }
.call-card { background: var(--yellow); color: var(--navy); }
.call-card .label { color: var(--navy); }
.call-card .call-range { color: var(--navy); font-size: clamp(40px, 9vw, 64px); margin: 6px 0; }
.call-card p { margin: 0; font-weight: 600; }
.model-cards { display: grid; gap: 12px; }
@media (min-width: 700px) { .model-cards { grid-template-columns: repeat(2, 1fr); } }
.model-card { display: block; text-decoration: none; color: var(--sky); }
.model-snow { color: var(--yellow); font-size: 64px; margin: 6px 0 2px; }
.model-low { margin-top: 8px; }
.model-low b { color: var(--white); }
.na-text { font-family: Inter, system-ui, sans-serif; font-size: 20px; font-weight: 600; color: var(--map-label); text-transform: none; letter-spacing: 0; }
.small-note { font-size: 14px; margin: 10px 0 0; }
.nws-row { display: grid; grid-template-columns: 110px 64px 1fr; gap: 10px; align-items: center; padding: 12px 14px; background: var(--navy-raised); border-radius: 12px; margin-bottom: 6px; }
.nws-row.night { background: var(--navy-panel); }
.nws-when { color: var(--white); font-weight: 700; }
.nws-temp { color: var(--yellow); font-weight: 700; font-size: 20px; }
