/* RunFit — light theme only. Warm paper base, band-color theming. */

:root {
  /* base palette */
  --bg: #f6f4ee;
  --bg-soft: #fbfaf6;
  --surface: #ffffff;
  --ink: #1c1f24;
  --ink-soft: #4a5260;
  --muted: #6c7480;
  --line: #ebe5d6;
  --line-strong: #d9d2c0;
  --accent: #c9522b;
  --accent-soft: #f4d6c9;
  --good: #2f7a4d;
  --warn: #b25e10;
  --danger: #a72a2a;

  /* band tokens — overridden per [data-band] */
  --band: #c9522b;
  --band-soft: #f4d6c9;
  --band-ink: #762a13;
  --band-tint: #fff5f0;

  /* layout */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 0 rgba(28,31,36,.04);
  --shadow: 0 1px 0 rgba(28,31,36,.04), 0 6px 18px rgba(28,31,36,.05);
  --shadow-lg: 0 1px 0 rgba(28,31,36,.04), 0 12px 32px rgba(28,31,36,.07);
  --max-width: 1140px;
  --gap: 16px;

  /* type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

/* Band themes — set on <body data-band="..."> */
body[data-band="hot"]       { --band:#d97350; --band-soft:#fde0d4; --band-ink:#7a3318; --band-tint:#fff6f0; }
body[data-band="warm"]      { --band:#c9522b; --band-soft:#f4d6c9; --band-ink:#762a13; --band-tint:#fff5f0; }
body[data-band="cool"]      { --band:#4a9b8e; --band-soft:#d4ebe6; --band-ink:#22524a; --band-tint:#f1f8f6; }
body[data-band="cold"]      { --band:#4673a8; --band-soft:#d3e1ef; --band-ink:#1f3e63; --band-tint:#f0f5fa; }
body[data-band="very_cold"] { --band:#325b8c; --band-soft:#c8d6e6; --band-ink:#142f51; --band-tint:#eef3f9; }
body[data-band="frigid"]    { --band:#2a4571; --band-soft:#bdc8db; --band-ink:#0f213e; --band-tint:#edf1f7; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background .5s ease;
}

a { color: var(--band); border-bottom: 1px dotted currentColor; text-decoration: none; }
a:hover { border-bottom-style: solid; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

/* HERO */
.hero {
  position: relative;
  padding: 56px 0 32px;
  background:
    radial-gradient(1100px 500px at 80% -10%, var(--band-soft) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  transition: background .5s ease;
}
.hero h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 6vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--band);
  transition: color .4s ease;
}
.hero .tagline {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(15px, 2.4vw, 18px);
  max-width: 560px;
}

/* LAYOUT */
main.layout {
  padding: 28px 24px 64px;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
.col { display: flex; flex-direction: column; gap: var(--gap); }

@media (min-width: 920px) {
  main.layout {
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 24px;
    padding: 32px 24px 80px;
  }
  .col-inputs {
    position: sticky;
    top: 16px;
    align-self: start;
  }
}

/* CARDS */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  transition: box-shadow .2s ease;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card h2 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.h-icon { width: 18px; height: 18px; color: var(--band); }
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.card-head h2 { margin: 0; }
.hint { color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; }

/* BUTTONS */
button { font-family: inherit; cursor: pointer; }
.btn-primary, .btn-secondary {
  font-size: 14.5px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: var(--band);
  color: #fff;
  box-shadow: 0 2px 0 rgba(0,0,0,.06);
}
.btn-primary:hover { filter: brightness(.95); }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover { background: var(--bg); }
.btn-icon {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon svg { width: 16px; height: 16px; }
.btn-icon:hover { background: var(--bg); color: var(--band); }

/* LOCATION ROW */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}
.row .or { color: var(--muted); padding: 0 4px; font-size: 13px; }
#zip-input {
  flex: 1 1 180px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 14.5px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
}
#zip-input:focus { outline: 2px solid var(--band); outline-offset: -1px; border-color: transparent; }

.status { margin-top: 12px; font-size: 13.5px; }
.status.error { color: var(--danger); }
.status.ok { color: var(--good); }

/* WEATHER INPUT GRID */
.weather-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 920px) {
  .weather-grid { grid-template-columns: repeat(2, 1fr); }
}
.weather-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
}
.weather-grid .unit {
  color: var(--muted);
  font-weight: 400;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-left: 4px;
}
.weather-grid input {
  font-size: 17px;
  font-weight: 600;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  width: 100%;
  font-variant-numeric: tabular-nums;
  font-family: inherit;
  transition: border-color .15s ease;
}
.weather-grid input:hover { border-color: var(--line-strong); }
.weather-grid input:focus { outline: 2px solid var(--band); outline-offset: -1px; border-color: transparent; }

/* PREFS */
#prefs-card details { margin: 0; }
#prefs-card summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
#prefs-card summary::-webkit-details-marker { display: none; }
#prefs-card summary h2 { margin: 0; }
#prefs-card summary::after {
  content: "";
  margin-left: auto;
  width: 8px; height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .15s ease;
}
#prefs-card details[open] summary::after { transform: rotate(-135deg); }

.prefs-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.prefs-grid fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.prefs-grid legend {
  padding: 0 0 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  font-weight: 600;
}

/* Pill chip radio buttons */
.chip {
  display: inline-flex;
  align-items: center;
  margin: 0 6px 6px 0;
  position: relative;
}
.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.chip span {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .15s ease;
}
.chip:hover span { border-color: var(--band); color: var(--band); }
.chip input:checked + span {
  background: var(--band);
  border-color: var(--band);
  color: #fff;
}
.chip input:focus-visible + span {
  outline: 2px solid var(--band);
  outline-offset: 2px;
}

/* WEATHER HERO */
.weather-hero {
  background: linear-gradient(135deg, var(--band-tint) 0%, #fff 70%);
  border-color: var(--band-soft);
  overflow: hidden;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}
.hero-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--band-ink);
  font-weight: 600;
  margin-bottom: 4px;
  opacity: .8;
}
.hero-temp {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 12vw, 88px);
  line-height: 1;
  color: var(--band);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
}
.hero-deg {
  font-size: 0.4em;
  margin-left: 4px;
  font-weight: 500;
  opacity: .7;
}
.hero-condition {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--band-ink);
  letter-spacing: -0.005em;
}
.hero-meta {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.hero-wx {
  width: 88px;
  height: 88px;
  color: var(--band);
  opacity: .9;
}
@media (max-width: 480px) {
  .hero-wx { width: 64px; height: 64px; }
}
.hero-band-bar {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--band-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pill {
  display: inline-block;
  background: var(--band);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 5px 12px;
  border-radius: 999px;
}
.hero-adjust { font-size: 13px; }

/* HOURLY STRIP */
.hourly-strip {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--band-soft);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  text-align: center;
}
.hourly-strip[hidden] { display: none; }
.hourly-cell {
  padding: 8px 4px;
  border-radius: 8px;
  background: var(--band-tint);
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-variant-numeric: tabular-nums;
  transition: transform .12s ease;
}
.hourly-cell:hover { transform: translateY(-1px); }
.hourly-cell .hr {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  color: var(--muted);
}
.hourly-cell svg { width: 18px; height: 18px; color: var(--band); }
.hourly-cell .t {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.hourly-cell.now {
  background: var(--band);
  color: #fff;
}
.hourly-cell.now .hr { color: rgba(255,255,255,.85); }
.hourly-cell.now .t { color: #fff; }
.hourly-cell.now svg { color: #fff; }
@media (max-width: 600px) {
  .hourly-strip { grid-template-columns: repeat(6, 1fr); gap: 4px; }
  .hourly-cell { padding: 6px 2px; font-size: 11px; }
  .hourly-cell svg { width: 16px; height: 16px; }
}

/* OUTFIT GRID */
.outfit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.outfit-item {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: border-color .15s ease, transform .15s ease;
  animation: fadeUp .25s ease both;
}
.outfit-item:hover {
  border-color: var(--band);
  transform: translateY(-1px);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.outfit-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--band-soft);
  color: var(--band-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.outfit-icon svg { width: 18px; height: 18px; }
.outfit-body { min-width: 0; flex: 1; }
.outfit-slot {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 2px;
}
.outfit-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 2px;
}
.outfit-fabric {
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* FABRIC GUIDE */
.fabric-block {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.fabric-block:first-child { padding-top: 12px; border-top: 0; }
.fabric-block:last-child { padding-bottom: 0; }
.fabric-block h3 {
  margin: 0 0 8px;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--band-ink);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fabric-block h3::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--band);
  display: inline-block;
}
.fabric-block ul { list-style: none; margin: 0; padding: 0; }
.fabric-block li {
  padding: 8px 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.fabric-block li strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 1px;
  font-size: 14px;
}

/* WHY */
#why-list, #avoid-list { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 14px; }
#why-list li, #avoid-list li { padding: 4px 0; }
#avoid-list li strong { color: var(--ink); }

.avoid-card { background: #fff8ef; border-color: #f0e0c4; }
.avoid-card h2 { color: var(--warn); }

.safety {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fdf1e6;
  border-left: 3px solid var(--warn);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13.5px;
}
.safety.hidden { display: none; }
.safety p { margin: 4px 0; }

/* FOOTER */
footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 32px;
  margin-top: 32px;
  color: var(--muted);
  font-size: 13px;
  background: var(--bg-soft);
}
footer p { margin: 0; max-width: 600px; }

/* MOBILE TWEAKS */
@media (max-width: 600px) {
  .hero { padding: 36px 0 24px; }
  .card { padding: 18px; }
  .hero-temp { font-size: 64px; }
  .hero-wx { width: 56px; height: 56px; }
  .row { flex-direction: column; align-items: stretch; }
  .row .or { text-align: center; padding: 0; }
  #zip-input { flex-basis: auto; }
}
