/* Rann Vijay — design system. "Small victories, every day." */
:root {
  --rv-bg: #fffdf7;
  --rv-bg-card: #ffffff;
  --rv-text: #23202b;
  --rv-text-muted: #6b6478;
  --rv-border: #ece4d6;
  --rv-sun: #ffb703;
  --rv-sun-hover: #fb8c00;
  --rv-sky: #219ebc;
  --rv-sky-hover: #126782;
  --rv-victory: #8338ec;
  --rv-victory-hover: #6423c7;
  --rv-success: #2a9d5c;
  --rv-radius: 16px;
  --rv-radius-sm: 10px;
  --rv-max-width: 1100px;
  --rv-font-display: "Baloo 2", "Segoe UI Rounded", system-ui, sans-serif;
  --rv-font-body: "Nunito", system-ui, sans-serif;
  --rv-shadow: 0 10px 30px -12px rgba(35, 32, 43, 0.18);
}

[data-theme="dark"] {
  --rv-bg: #171423;
  --rv-bg-card: #211d31;
  --rv-text: #f6f2ff;
  --rv-text-muted: #b6aecb;
  --rv-border: #33304a;
  --rv-sun: #ffca4d;
  --rv-sun-hover: #ffdb85;
  --rv-sky: #4fc3e0;
  --rv-sky-hover: #7ad6ec;
  --rv-victory: #b085f5;
  --rv-victory-hover: #cbaefb;
  --rv-success: #4cc987;
  --rv-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--rv-font-body);
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--rv-text);
  background: var(--rv-bg);
  background-image:
    radial-gradient(circle at 8% 12%, color-mix(in srgb, var(--rv-sun) 14%, transparent) 0, transparent 40%),
    radial-gradient(circle at 92% 88%, color-mix(in srgb, var(--rv-sky) 14%, transparent) 0, transparent 40%);
  background-attachment: fixed;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--rv-sky); text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
a:hover { color: var(--rv-sky-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--rv-victory);
  outline-offset: 2px;
}
h1, h2, h3, h4 { font-family: var(--rv-font-display); font-weight: 700; line-height: 1.2; margin: 0 0 0.5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.rv-shell { max-width: var(--rv-max-width); margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.rv-header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rv-border);
}
.rv-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.rv-brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--rv-text); }
.rv-brand__mark { width: 40px; height: 40px; flex: none; }
.rv-brand__name { font-family: var(--rv-font-display); font-weight: 800; font-size: 1.3rem; }
.rv-brand__name span { color: var(--rv-victory); }
.rv-header__nav { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; }
.rv-header__nav a {
  font-family: var(--rv-font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--rv-text);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.rv-header__nav a:hover { background: var(--rv-bg-card); color: var(--rv-victory); }
.rv-theme-btn {
  border: 1px solid var(--rv-border);
  background: var(--rv-bg-card);
  border-radius: 999px;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem;
}

/* Buttons */
.rv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font-family: var(--rv-font-display); font-weight: 700; font-size: 0.98rem;
  padding: 0.75rem 1.4rem; border-radius: 999px; text-decoration: none;
  min-height: 48px; border: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.rv-btn:hover { transform: translateY(-2px); }
.rv-btn--sun { background: var(--rv-sun); color: #2b1900; }
.rv-btn--sun:hover { background: var(--rv-sun-hover); color: #2b1900; }
.rv-btn--sky { background: var(--rv-sky); color: #fff; }
.rv-btn--sky:hover { background: var(--rv-sky-hover); color: #fff; }
.rv-btn--outline { background: transparent; border: 2px solid var(--rv-border); color: var(--rv-text); }
.rv-btn--outline:hover { border-color: var(--rv-victory); color: var(--rv-victory); }

/* Hero */
.rv-hero { padding: 3rem 0 2rem; text-align: center; }
.rv-hero__mascot { width: 140px; height: 140px; margin: 0 auto 1rem; }
.rv-hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin-bottom: 0.4rem; }
.rv-hero__tagline { font-size: 1.2rem; color: var(--rv-text-muted); max-width: 46ch; margin: 0 auto 1.75rem; }

/* Age picker cards */
.rv-picker {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem; margin: 2rem 0;
}
.rv-age-card {
  display: block; text-decoration: none; color: var(--rv-text);
  background: var(--rv-bg-card); border: 2px solid var(--rv-border);
  border-radius: var(--rv-radius); padding: 1.5rem 1.25rem; text-align: center;
  box-shadow: var(--rv-shadow); transition: transform 0.15s ease, border-color 0.15s ease;
}
.rv-age-card:hover { transform: translateY(-4px); border-color: var(--rv-accent-card, var(--rv-victory)); color: var(--rv-text); }
.rv-age-card__emoji { font-size: 2.75rem; display: block; margin-bottom: 0.5rem; }
.rv-age-card__range { font-family: var(--rv-font-display); font-weight: 800; font-size: 1.3rem; }
.rv-age-card__label { color: var(--rv-text-muted); font-size: 0.95rem; margin-top: 0.15rem; }

/* Band accent themes */
.rv-band--little { --rv-band: var(--rv-sun); }
.rv-band--rising { --rv-band: var(--rv-sky); }
.rv-band--junior { --rv-band: var(--rv-victory); }
.rv-band--legend { --rv-band: var(--rv-success); }

.rv-band-hero {
  border-radius: var(--rv-radius); padding: 2.25rem 1.5rem; margin: 1.5rem 0 2rem;
  background: color-mix(in srgb, var(--rv-band) 12%, var(--rv-bg-card));
  border: 2px solid color-mix(in srgb, var(--rv-band) 35%, var(--rv-border));
  text-align: center;
}
.rv-band-hero__badge {
  display: inline-block; font-family: var(--rv-font-display); font-weight: 700; font-size: 0.85rem;
  background: var(--rv-band); color: #fff; padding: 0.3rem 0.9rem; border-radius: 999px; margin-bottom: 0.75rem;
}
.rv-band-hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }

.rv-section { margin: 2.5rem 0; }
.rv-section h2 { font-size: 1.5rem; color: var(--rv-band, var(--rv-victory)); }
.rv-section > p.rv-lead { color: var(--rv-text-muted); margin-top: -0.25rem; }

/* Card grid (stories, affirmations) */
.rv-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.1rem; }
.rv-card {
  background: var(--rv-bg-card); border: 2px solid var(--rv-border); border-radius: var(--rv-radius);
  padding: 1.35rem; box-shadow: var(--rv-shadow);
}
.rv-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--rv-band, var(--rv-victory)); }
.rv-card p { margin: 0; color: var(--rv-text-muted); font-size: 0.96rem; }

/* Big affirmation card (3-5 band) */
.rv-affirm {
  background: var(--rv-bg-card); border: 3px solid color-mix(in srgb, var(--rv-band) 45%, var(--rv-border));
  border-radius: var(--rv-radius); padding: 2.5rem 1.5rem; text-align: center; box-shadow: var(--rv-shadow);
}
.rv-affirm__emoji { font-size: 4rem; display: block; margin-bottom: 0.75rem; }
.rv-affirm p { font-family: var(--rv-font-display); font-size: 1.6rem; font-weight: 700; margin: 0; color: var(--rv-text); }
.rv-affirm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }

/* Victory of the day */
.rv-votd {
  background: var(--rv-bg-card); border: 2px dashed color-mix(in srgb, var(--rv-band) 50%, var(--rv-border));
  border-radius: var(--rv-radius); padding: 1.75rem; text-align: center;
}
.rv-votd__label { font-family: var(--rv-font-display); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rv-band); }
.rv-votd__text { font-size: 1.25rem; font-weight: 700; margin: 0.5rem 0 1rem; font-family: var(--rv-font-display); }

/* Checklist / habit tracker */
.rv-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.rv-checklist li {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--rv-bg-card); border: 2px solid var(--rv-border); border-radius: var(--rv-radius-sm);
  padding: 0.8rem 1rem; font-weight: 600; cursor: pointer; user-select: none;
}
.rv-checklist li:has(input:checked) { border-color: var(--rv-success); background: color-mix(in srgb, var(--rv-success) 10%, var(--rv-bg-card)); }
.rv-checklist input { width: 22px; height: 22px; accent-color: var(--rv-success); flex: none; }
.rv-checklist li:has(input:checked) span { text-decoration: line-through; color: var(--rv-text-muted); }
.rv-streak { font-family: var(--rv-font-display); font-weight: 700; color: var(--rv-success); margin-top: 0.75rem; }

/* Quotes strip */
.rv-quotes { display: grid; gap: 1rem; }
.rv-quote {
  border-left: 4px solid var(--rv-band, var(--rv-victory)); background: var(--rv-bg-card);
  padding: 1rem 1.25rem; border-radius: 0 var(--rv-radius-sm) var(--rv-radius-sm) 0;
}
.rv-quote p { margin: 0 0 0.35rem; font-style: italic; }
.rv-quote cite { font-size: 0.85rem; color: var(--rv-text-muted); font-style: normal; }

/* Journal (12-14) */
.rv-journal textarea {
  width: 100%; min-height: 160px; font-family: var(--rv-font-body); font-size: 1rem;
  padding: 1rem; border-radius: var(--rv-radius-sm); border: 2px solid var(--rv-border);
  background: var(--rv-bg-card); color: var(--rv-text); resize: vertical;
}
.rv-journal-note { font-size: 0.85rem; color: var(--rv-text-muted); margin-top: 0.5rem; }

/* Footer */
.rv-footer {
  border-top: 1px solid var(--rv-border); margin-top: 3rem; padding: 2rem 0;
  color: var(--rv-text-muted); font-size: 0.9rem; text-align: center;
}
.rv-footer a { color: var(--rv-text-muted); }
.rv-footer nav { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 0.75rem; }

/* 404 */
.rv-404 { text-align: center; padding: 4rem 1rem; }
.rv-404 .rv-hero__mascot { width: 100px; height: 100px; }

@media (max-width: 640px) {
  .rv-header__nav a { font-size: 0.85rem; padding: 0.45rem 0.7rem; }
  .rv-hero { padding: 2rem 0 1rem; }
}
