/* ==========================================================================
   Roc.Star Kids — stylesheet

   EDIT ME: All brand colors and fonts live in the :root block right below.
   Swap the hex codes there to re-theme the entire site — you don't need to
   touch anything else in this file to change the color scheme.
   ========================================================================== */

:root {
  /* --- Brand colors --- */
  --color-accent: #B33A3A;       /* primary accent — buttons, progress bar, links (crimson) */
  --color-accent-dark: #8A2E2E;  /* accent hover/active state */
  --color-navy: #141414;         /* headings, header text, footer background (near-black, matches the logo) */
  --color-navy-soft: #404040;
  --color-cream: #FFF6EE;        /* warm background tint */
  --color-bg: #FFFFFF;
  --color-text: #333333;
  --color-text-muted: #6b6b6b;
  --color-border: #E8E0D8;
  --color-success-bg: #EAF7EE;
  --color-success-text: #256B3A;

  /* --- Type --- */
  --font-heading: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  /* --- Layout --- */
  --max-width: 1180px;
  --radius: 12px;
  --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-elevated: 0 12px 40px rgba(0, 0, 0, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

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

a { color: var(--color-accent-dark); }

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

/* ---------------------------------------------------------------------
   Header
   --------------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 16px;
}

.site-logo img {
  height: 88px;
  width: auto;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--color-navy);
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 0.95rem;
}

.site-nav a:hover { color: var(--color-accent); }

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */

.hero {
  background: linear-gradient(180deg, var(--color-cream) 0%, var(--color-bg) 100%);
  padding: 32px 0 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
  }
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.9rem);
  color: var(--color-navy);
  margin: 0 0 8px;
  line-height: 1.15;
}

.hero .subhead {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--color-accent-dark);
  font-weight: 600;
  margin: 0;
}

/* --- Fundraising progress card (in the hero, next to the headline) --- */

.progress-card {
  background: #fff;
  border-radius: var(--radius);
  border-top: 4px solid var(--color-accent);
  box-shadow: var(--shadow-elevated);
  padding: 18px 22px;
}

/* ---------------------------------------------------------------------
   Page grid — two columns on desktop, stacked on mobile
   --------------------------------------------------------------------- */

.page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-top: 16px;
  padding-bottom: 64px;
  align-items: start;
}

@media (min-width: 900px) {
  .page-grid {
    grid-template-columns: minmax(0, 66%) minmax(0, 34%);
  }
}

/* Below the two-column breakpoint, show the sponsorship sidebar above the
   story text. The HTML source order stays main-content-first (so screen
   readers/SEO still meet the story first) — this only changes the visual
   stacking order on narrower screens. */
@media (max-width: 899px) {
  .sponsor-sidebar {
    order: -1;
  }
}

/* ---------------------------------------------------------------------
   Main body / story column
   --------------------------------------------------------------------- */

/* Used on standalone single-column pages (e.g. about.html) that don't sit
   inside .page-grid, to keep the reading width comfortable. */
.narrow-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 0 64px;
}

/* ---------------------------------------------------------------------
   Contact page
   --------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 32px 0 64px;
  align-items: start;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 48px;
  }
}

.contact-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 28px;
}

.contact-card h2 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  font-size: 1.3rem;
  margin: 0 0 16px;
}

.contact-card address {
  font-style: normal;
  margin-bottom: 20px;
}

.contact-card address p {
  margin: 0 0 8px;
}

.main-content h2 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  font-size: 1.5rem;
  margin-top: 2.4em;
  margin-bottom: 0.5em;
}

.main-content h2:first-child { margin-top: 0; }

.main-content h3 {
  font-family: var(--font-heading);
  color: var(--color-accent-dark);
  font-size: 1.2rem;
  margin-top: 2em;
  margin-bottom: 0.5em;
  clear: both; /* keeps a floated photo from the previous section from bleeding into this heading */
}

.main-content p { margin: 0 0 1.1em; }

.main-content ul {
  margin: 0 0 1.4em;
  padding-left: 1.4em;
}

.main-content li { margin-bottom: 0.5em; }

/* --- Section photos (float so body text wraps around them) --- */

.section-photo {
  width: 220px;
  max-width: 42%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.section-photo.float-left {
  float: left;
  margin: 4px 20px 12px 0;
}

.section-photo.float-right {
  float: right;
  margin: 4px 0 12px 20px;
}

.main-content strong { color: var(--color-navy); }

.closing-callout {
  margin-top: 2.6em;
  padding: 28px;
  background: var(--color-cream);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-accent);
}

.closing-callout h2 {
  margin-top: 0 !important;
}

/* --- Photo collage --- */

.photo-collage {
  margin-top: 4.5em;
}

h3.collage-heading {
  font-family: var(--font-heading);
  color: var(--color-navy);
  font-size: 1.5rem;
  margin: 0 0 14px;
  margin-top: 0;
  text-align: left;
  clear: none;
}

.collage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-cream);
}

.collage-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease;
}

.collage-grid img:hover {
  transform: scale(1.03);
}

/* --- Video embed --- */

.video-block {
  margin: 2.2em 0;
}

.video-caption {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 10px;
  font-style: italic;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: var(--color-navy);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------------------------------------------------------------------
   Sponsorship sidebar
   --------------------------------------------------------------------- */

.sponsor-sidebar {
  background: var(--color-cream);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

@media (min-width: 900px) {
  .sponsor-sidebar {
    position: sticky;
    top: 96px;
  }
}

.sponsor-sidebar h2,
.progress-card h2 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  font-size: 1.2rem;
  margin: 0 0 4px;
}

.progress-card h2 {
  margin-bottom: 8px;
}

.sponsor-sidebar h2 {
  font-size: 1.4rem;
  text-align: center;
}

.sponsor-sidebar .goal-line,
.progress-card .goal-line {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0 0 14px;
}

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 16px 0;
}

/* --- Progress / thermometer --- */

.progress-amounts {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.progress-raised {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent-dark);
}

.progress-goal {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.progress-track {
  width: 100%;
  height: 12px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  border-radius: 999px 0 0 999px;
  transition: width 0.6s ease;
}

.progress-percent {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 6px;
  text-align: right;
}

.progress-pending {
  font-size: 0.8rem;
  color: #B8862B;
  margin-top: 2px;
  text-align: right;
}

.progress-pending[hidden] { display: none; }

/* --- Tier list --- */

.tier-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tier-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
}

.tier-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.tier-name {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-navy);
  font-size: 1rem;
}

.tier-amount {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-accent-dark);
  font-size: 1rem;
  white-space: nowrap;
}

.tier-spots {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.tier-spots strong { color: var(--color-navy); }

.tier-perks {
  margin: 12px 0 0;
  padding-left: 1.1em;
  font-size: 0.76rem;
  font-style: italic;
  color: var(--color-text-muted);
}

.tier-perks li { margin-bottom: 2px; }

.tier-perks li.perk-highlight {
  color: var(--color-accent);
  font-weight: 600;
}

.spot-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.spot-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

/* Platinum/Gold sponsor logo, shown inline with their name */
.badge-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
  border-radius: 6px;
  padding: 4px;
  line-height: 0;
}

.badge-logo {
  display: block;
  max-height: 34px;
  max-width: 84px;
  width: auto;
  height: auto;
}

.spot-badge.claimed {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  border: 1px solid transparent;
}

.spot-badge.claimed:hover { text-decoration: underline; }

.spot-badge.available {
  background: #fff;
  color: var(--color-text-muted);
  font-weight: 600;
  border: 1px dashed var(--color-border);
}

.spot-badge.pending {
  background: #FDF3E1;
  color: #8A6116;
  border: 1px solid #F0DBA8;
}

.claim-btn {
  margin-top: 0;
  width: 100%;
}

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover { background: var(--color-accent-dark); }

.btn-secondary {
  background: transparent;
  color: var(--color-navy);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover { border-color: var(--color-navy); }

.watch-before-btn {
  display: block;
  width: 100%;
  margin: 8px 0 16px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 400;
}

/* ---------------------------------------------------------------------
   Sponsor intake modal
   --------------------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}

.modal-overlay[hidden] { display: none; }

.modal-box {
  background: #fff;
  border-radius: var(--radius);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: var(--shadow-elevated);
  position: relative;
}

/* Wider variant for modals with a video (the sponsor-levels explainer) */
.modal-box-wide {
  max-width: 720px;
}

.modal-info-text p {
  margin: 0 0 1em;
  color: var(--color-text);
  line-height: 1.6;
}

.modal-info-text p:last-child { margin-bottom: 0; }

.modal-info-text strong { color: var(--color-navy); }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 6px;
}

.modal-close:hover { color: var(--color-navy); }

.modal-box h2 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.modal-box .modal-subtext {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0 0 20px;
}

.form-row {
  margin-bottom: 16px;
}

.form-row label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-navy);
  margin-bottom: 6px;
}

.form-row input:not([type="radio"]):not([type="checkbox"]),
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: #fff;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.form-row textarea { resize: vertical; min-height: 80px; }

/* --- Website field with a fixed "http://" prefix --- */

.input-prefix-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
}

.input-prefix-group .input-prefix {
  display: flex;
  align-items: center;
  padding-left: 12px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-family: var(--font-body);
  white-space: nowrap;
}

/* Matches the specificity of the general .form-row input rule above (and
   comes after it in the file) so these overrides actually win. */
.input-prefix-group input:not([type="radio"]):not([type="checkbox"]) {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 0;
  padding: 10px 12px 10px 2px;
}

.input-prefix-group input:focus {
  outline: none;
}

.form-disclaimer {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  background: var(--color-cream);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 20px 0 0;
  line-height: 1.5;
}

.form-actions { margin-top: 24px; }

/* --- Logo upload (Platinum / Gold only) --- */

#logo-upload-group[hidden] { display: none; }

.field-hint {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin: 6px 0 0;
  line-height: 1.5;
}

#field-logo {
  width: 100%;
  padding: 8px 0;
  border: none;
  font-size: 0.88rem;
}

.logo-preview {
  display: block;
  max-width: 160px;
  max-height: 80px;
  width: auto;
  height: auto;
  margin-top: 10px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.logo-preview[hidden] { display: none; }

/* --- Radio / checkbox options (display preference, link toggle) --- */

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.92rem;
  color: var(--color-text);
  cursor: pointer;
}

.radio-option input,
.checkbox-option input {
  width: auto;
  margin: 0;
  accent-color: var(--color-accent);
}

.checkbox-option {
  margin-top: 10px;
}

#link-display-group[hidden] { display: none; }

.form-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
}

.form-status.visible { display: block; }

.form-status.success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.form-status.error {
  background: #FBEAEA;
  color: #A3312A;
}

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */

.site-footer {
  background: var(--color-navy);
  color: #E8EEF5;
  padding: 40px 0;
  margin-top: 24px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin: 0 0 10px;
  color: #fff;
}

.site-footer p, .site-footer a {
  color: #C7D3E0;
  font-size: 0.9rem;
  text-decoration: none;
  margin: 0 0 6px;
}

.site-footer a:hover { color: #fff; }

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* Same icon layout, but for use on a light/white background (e.g. the
   contact page cards) instead of the dark footer. */
.social-links-light a {
  border-color: var(--color-border);
  color: var(--color-navy);
}

.social-links-light a:hover {
  border-color: var(--color-navy);
  color: var(--color-navy);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.82rem;
  color: #9FB0C4;
}

/* ---------------------------------------------------------------------
   Thank-you toast (shown after a successful sponsor form submission)
   --------------------------------------------------------------------- */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 340px;
  background: #fff;
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated);
  padding: 18px 40px 18px 20px;
  z-index: 300;
  animation: toast-in 0.25s ease;
}

.toast[hidden] { display: none; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.toast-body {
  color: var(--color-text-muted);
  margin: 0;
  font-size: 0.88rem;
}

.toast-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 4px;
}

.toast-close:hover { color: var(--color-navy); }

@media (max-width: 640px) {
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}

/* ---------------------------------------------------------------------
   Mobile
   --------------------------------------------------------------------- */

@media (max-width: 640px) {
  .site-header .container { flex-wrap: wrap; }
  .site-nav ul { gap: 18px; }
  .hero { padding: 24px 0 20px; }
  .progress-card { padding: 16px 18px; }
  .modal-box { padding: 24px; }

  .section-photo,
  .section-photo.float-left,
  .section-photo.float-right {
    float: none;
    width: 100%;
    max-width: none;
    margin: 4px 0 16px;
  }
}
