/* SunSense — kid-friendly sun-safety site for K-12 Florida (voice tuned for ages 8-12) */

:root {
  --orange: #FF8C1A;
  --orange-deep: #E96E00;
  --yellow: #FFC93C;
  --yellow-warm: #FFA41B;
  --yellow-soft: #FFE38A;
  --cream: #FFF3C7;
  --cream-pale: #FFF9E6;
  --ink: #1A1A1A;
  --ink-soft: #3D3D3D;
  --white: #FFFFFF;
  --pink: #FF8A6E;
  --sky: #5DB8E8;
  --sky-deep: #2E8FCB;
  --grass: #5BC282;
  --danger: #E84545;
  --shadow: 0 8px 24px rgba(232, 110, 0, 0.18);
  --shadow-soft: 0 4px 12px rgba(26, 26, 26, 0.08);
  --radius: 18px;
  --radius-lg: 28px;
  --max-w: 1100px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: linear-gradient(180deg, var(--cream-pale) 0%, #ffffff 400px);
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: 0.6rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }
a { color: var(--orange-deep); text-decoration: none; font-weight: 700; }
a:hover { text-decoration: underline; }

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

/* Layout */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3.5rem 0; }
.section--cream { background: var(--cream); }
.section--white { background: var(--white); }
.section-title { text-align: center; margin-bottom: 0.4rem; }
.section-sub { text-align: center; color: var(--ink-soft); margin-bottom: 2.5rem; font-size: 1.1rem; }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 4px solid var(--yellow);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-soft);
}
.site-header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--orange);
  text-decoration: none;
}
.brand img { width: 56px; height: 56px; }
.brand:hover { text-decoration: none; }

.nav-toggle {
  display: none;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 12px;
  width: 44px; height: 44px;
  font-size: 1.4rem;
  cursor: pointer;
}

.site-nav { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.site-nav a {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.98rem;
  transition: background 0.15s;
}
.site-nav a:hover { background: var(--yellow-soft); text-decoration: none; }
.site-nav a.active { background: var(--orange); color: var(--white); }

/* Hero */
.hero {
  padding: 4.5rem 0 3.5rem;
  background:
    radial-gradient(ellipse at top, var(--cream) 0%, transparent 65%),
    linear-gradient(180deg, var(--cream-pale) 0%, transparent 100%);
  text-align: center;
}
.hero__inner {
  display: flex;
  justify-content: center;
}
.hero__content {
  max-width: 760px;
}
.hero__title { margin-bottom: 1.25rem; }
.hero__title .accent { color: var(--orange); }
.hero__tagline {
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.hero__cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--orange);
  color: var(--white);
  padding: 0.9rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: var(--shadow);
  border: 3px solid var(--ink);
  transition: transform 0.15s;
}
.hero__cta:hover { transform: translateY(-2px); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--orange);
  color: var(--white);
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  border: 3px solid var(--ink);
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
}
.btn:hover { background: var(--orange-deep); text-decoration: none; }
.btn--ghost {
  background: var(--white);
  color: var(--ink);
}
.btn--ghost:hover { background: var(--yellow-soft); }

/* Cards */
.card {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s, box-shadow 0.18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__icon {
  width: 56px; height: 56px;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { margin-bottom: 1rem; }
.card a.card__link { font-weight: 700; }
.card a.card__link::after { content: " →"; }

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

/* Explore cards (homepage) */
.explore-card {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  display: block;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s;
}
.explore-card:hover { transform: translateY(-4px); text-decoration: none; box-shadow: var(--shadow); }
.explore-card__emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.7rem;
}
.explore-card h3 { color: var(--orange-deep); }

/* UV widget */
.uv-widget {
  background: linear-gradient(135deg, var(--sky) 0%, var(--sky-deep) 100%);
  color: var(--white);
  border: 4px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.uv-widget h2 { color: var(--white); margin-bottom: 0.4rem; }
.uv-widget__intro { font-size: 1.05rem; margin-bottom: 1.25rem; opacity: 0.95; }
.uv-form {
  display: flex; gap: 0.6rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.uv-form input[type="text"] {
  flex: 1; min-width: 160px;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 3px solid var(--ink);
  font-size: 1.05rem;
  font-family: inherit;
  background: var(--white);
  color: var(--ink);
}
.uv-form input[type="text"]:focus {
  outline: 4px solid var(--yellow);
}
.uv-form .btn { background: var(--yellow); color: var(--ink); }
.uv-form .btn:hover { background: var(--yellow-warm); }

.uv-result { margin-top: 1rem; }
.uv-current {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
}
.uv-badge {
  width: 90px; height: 90px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 2.2rem;
  color: var(--white);
  border: 4px solid var(--ink);
  flex-shrink: 0;
}
.uv-badge[data-level="low"] { background: var(--grass); }
.uv-badge[data-level="moderate"] { background: var(--yellow); color: var(--ink); }
.uv-badge[data-level="high"] { background: var(--yellow-warm); }
.uv-badge[data-level="very-high"] { background: var(--orange); }
.uv-badge[data-level="extreme"] { background: var(--danger); }

.uv-current__meta strong { font-size: 1.1rem; }
.uv-current__advice { margin-top: 0.4rem; font-weight: 600; }

.uv-hourly {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
}
.uv-hour {
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.6rem 0.4rem;
  text-align: center;
  font-size: 0.9rem;
}
.uv-hour__time { font-weight: 700; display: block; font-size: 0.85rem; }
.uv-hour__num {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
  background: var(--cream);
}
.uv-hour__num[data-level="low"] { background: #c8efd6; }
.uv-hour__num[data-level="moderate"] { background: var(--yellow-soft); }
.uv-hour__num[data-level="high"] { background: #ffd9a8; color: var(--ink); }
.uv-hour__num[data-level="very-high"] { background: #ffb88a; color: var(--white); }
.uv-hour__num[data-level="extreme"] { background: var(--danger); color: var(--white); }

.uv-error { color: #fff7d6; font-weight: 700; margin-top: 0.5rem; }
.uv-source { font-size: 0.85rem; margin-top: 0.8rem; opacity: 0.85; }
.uv-source a { color: var(--white); text-decoration: underline; }

/* UV legend (shown on first load) */
.uv-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}
.uv-legend__item {
  background: rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  font-size: 0.92rem;
}
.uv-legend__item strong { display: block; font-size: 0.95rem; }

/* Sun Tip of the Day card */
.tip-card {
  background: var(--orange);
  color: var(--white);
  border: 4px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.tip-card::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: var(--yellow);
  border-radius: 50%;
  opacity: 0.5;
}
.tip-card > * { position: relative; }
.tip-card__day {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
  margin-bottom: 0.4rem;
}
.tip-card__theme {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
  color: var(--white);
}
.tip-card__body { font-size: 1.05rem; }

/* Weekday calendar grid */
.weekday-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.weekday {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
  box-shadow: var(--shadow-soft);
}
.weekday__label {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange-deep);
  margin-bottom: 0.3rem;
}
.weekday__title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}
.weekday__emoji { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.weekday__caption {
  background: var(--cream);
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  font-size: 0.95rem;
  margin-top: 0.6rem;
}

/* ABCDE rule cards */
.abcde {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
}
.abcde__card {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.abcde__letter {
  display: inline-block;
  width: 60px; height: 60px;
  background: var(--orange);
  color: var(--white);
  border-radius: 50%;
  border: 3px solid var(--ink);
  font-family: 'Fredoka', sans-serif;
  font-size: 2rem;
  line-height: 54px;
  margin-bottom: 0.5rem;
}
.abcde__name {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  color: var(--orange-deep);
}

/* Steps list (numbered cards) */
.step-list { list-style: none; display: grid; gap: 1rem; }
.step-list li {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem 1.1rem 4rem;
  position: relative;
  box-shadow: var(--shadow-soft);
}
.step-list li::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  position: absolute; left: 1rem; top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  background: var(--orange);
  color: var(--white);
  border: 3px solid var(--ink);
  border-radius: 50%;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}
.step-list { counter-reset: step-counter; }

/* Topic blocks (Meet the Sun pages) */
.topic-block {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-soft);
}
.topic-block h3 {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--orange-deep);
  margin-bottom: 0.8rem;
  font-size: 1.5rem;
}
.topic-block ul { padding-left: 1.4rem; }
.topic-block li { margin-bottom: 0.4rem; }

/* Fact strip */
.fact-strip {
  background: var(--yellow);
  border: 4px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  text-align: center;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.3rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

/* Image frame */
.framed-image {
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
}

/* Big number callouts */
.big-num-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.big-num {
  text-align: center;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  box-shadow: var(--shadow-soft);
}
.big-num__value {
  font-family: 'Fredoka', sans-serif;
  font-size: 3rem;
  color: var(--orange);
  line-height: 1;
  display: block;
  margin-bottom: 0.4rem;
}
.big-num__label { font-weight: 700; font-size: 0.98rem; }

/* About / contact */
.contact-block {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}
.contact-block dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1rem;
  margin-top: 0.8rem;
}
.contact-block dt { font-weight: 700; color: var(--orange-deep); }

/* Founder portrait */
.founder {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
}
.founder__photo {
  width: 180px; height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--ink);
  box-shadow: var(--shadow);
  background: var(--cream);
  flex-shrink: 0;
}
@media (max-width: 560px) {
  .founder { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .founder__photo { width: 150px; height: 150px; }
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--cream-pale);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}
.site-footer a { color: var(--yellow); }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}
.site-footer h4 {
  color: var(--yellow);
  font-family: 'Fredoka', sans-serif;
  margin-bottom: 0.7rem;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer__bottom {
  border-top: 1px solid #444;
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #999;
}

/* Page header (non-home pages) */
.page-header {
  background: linear-gradient(180deg, var(--cream) 0%, transparent 100%);
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}
.page-header h1 .accent { color: var(--orange); }
.page-header__intro {
  max-width: 720px;
  margin: 0.5rem auto 0;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* Mobile */
@media (max-width: 760px) {
  .hero { padding: 3rem 0 2.5rem; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav {
    display: none; width: 100%; flex-direction: column; padding-top: 0.6rem;
  }
  .site-nav.is-open { display: flex; }
  .site-header__inner { flex-wrap: wrap; }
  .site-footer__grid { grid-template-columns: 1fr; }
}
