/* ==========================================================================
   Christine Marie's STAR Riders — modern site stylesheet
   Pure CSS, no external fonts or frameworks. Offline-friendly.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --violet: #5b3e96;
  --violet-deep: #3d2a66;
  --violet-soft: #efeaf8;
  --green: #7cb342;
  --green-deep: #4c7a1f;
  --green-soft: #f2f7ea;
  --ink: #241e33;
  --muted: #6b6478;
  --bg: #fbfaf7;
  --card: #ffffff;
  --line: #e7e3ef;
  --shadow-sm: 0 1px 3px rgba(36, 30, 51, 0.08), 0 4px 14px rgba(36, 30, 51, 0.06);
  --shadow-md: 0 2px 6px rgba(36, 30, 51, 0.1), 0 12px 32px rgba(36, 30, 51, 0.1);
  --radius: 14px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --wrap: 1080px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { display: block; }

img, svg { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--violet-deep);
  margin: 0 0 0.6em;
  font-weight: 700;
  overflow-wrap: break-word;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; font-family: var(--font-body); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--violet);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--violet-deep); }

ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.45em; }

blockquote {
  margin: 1.4em 0;
  padding: 1em 1.4em;
  border-left: 4px solid var(--green);
  background: var(--green-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}
blockquote p { margin-bottom: 0.4em; }
blockquote cite { font-style: normal; font-weight: 600; color: var(--green-deep); font-size: 0.95em; }

hr.divider {
  border: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--violet), var(--green));
  width: 90px;
  margin: 2.2em 0;
}

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--violet-deep);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.page-content { padding: 40px 0 64px; flex: 1 0 auto; }
.page-content > .container > *:first-child { margin-top: 0; }

.section { padding: 56px 0; }
.section-alt { background: var(--violet-soft); }
.section-green { background: var(--green-soft); }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}
.section-head p { color: var(--muted); font-size: 1.05em; }
.section-head h2 { margin-bottom: 0.35em; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-deep);
  background: var(--green-soft);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.section-alt .eyebrow { background: #fff; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.topbar {
  background: var(--violet-deep);
  color: #fff;
  font-size: 0.82rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 36px;
  flex-wrap: wrap;
}
.topbar a { color: #e8e2f5; }
.topbar a:hover { color: #fff; }
.topbar .tb-note::before { content: "★ "; color: var(--green); }

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.brand img { width: 54px; height: 54px; border-radius: 12px; }
.brand-text { line-height: 1.15; }
.brand-text .brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  color: var(--violet-deep);
}
.brand-text .brand-tag {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-deep);
  font-weight: 700;
}

/* ---------- Navigation ---------- */
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
}
.site-nav a {
  display: block;
  padding: 9px 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
}
.site-nav a:hover {
  background: var(--violet-soft);
  color: var(--violet);
}
.site-nav a[aria-current="page"] {
  color: var(--violet);
  background: var(--violet-soft);
}
.site-nav .nav-cta a {
  background: var(--green);
  color: #fff;
  margin-left: 6px;
  padding: 9px 18px;
}
.site-nav .nav-cta a:hover { background: var(--green-deep); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--violet-deep);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
    padding: 10px 24px 20px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .site-nav a { padding: 12px 14px; font-size: 1rem; }
  .site-nav .nav-cta a { margin: 6px 0 0; text-align: center; }
}

/* ---------- Hero (homepage) ---------- */
.hero {
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(124, 179, 66, 0.22), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(91, 62, 150, 0.16), transparent 55%),
    var(--violet-soft);
  padding: 72px 0 84px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { font-size: 3rem; margin-bottom: 0.4em; }
.hero .hero-lead {
  font-size: 1.18rem;
  color: var(--muted);
  max-width: 34em;
}
.hero .hero-lead strong { color: var(--ink); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 18px; }
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
}
.hero-badges li {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--violet-deep);
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0;
}

.hero-photo {
  position: relative;
  margin: 0;
}
.hero-photo img {
  display: block;
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  transform: rotate(1.6deg);
  border: 8px solid #fff;
}
.hero-photo figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(61, 42, 102, 0.82);
  color: #fff;
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 8px;
  max-width: 85%;
}

@media (max-width: 880px) {
  .hero { padding: 48px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { font-size: 2.2rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--violet); color: #fff !important; }
.btn-primary:hover { background: var(--violet-deep); }
.btn-green { background: var(--green); color: #fff !important; }
.btn-green:hover { background: var(--green-deep); }
.btn-outline { border-color: var(--violet); color: var(--violet) !important; background: transparent; }
.btn-outline:hover { background: var(--violet); color: #fff !important; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

/* ---------- Cards & grids ---------- */
.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  margin: 0 0 24px;
}
.card h3 { margin-bottom: 0.4em; }
.card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.card-green .icon { background: var(--green-soft); color: var(--green-deep); }
.card .card-more {
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-block;
  margin-top: 4px;
}
.card .card-more::after { content: " →"; }

/* stats */
.stats-band {
  background: var(--violet-deep);
  color: #fff;
  padding: 36px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  text-align: center;
}
.stat .stat-num {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 700;
  color: #fff;
  display: block;
}
.stat .stat-num .accent { color: var(--green); }
.stat .stat-label { font-size: 0.85rem; color: #cfc8e6; letter-spacing: 0.04em; }
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Media (photos) ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}
figure.photo-card {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
figure.photo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
figure.photo-card a { display: block; }
figure.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
figure.photo-card figcaption {
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--muted);
}
figure.photo-card figcaption strong { color: var(--ink); }

figure.photo-portrait img { aspect-ratio: 3 / 4; }

figure.big-photo {
  margin: 28px 0;
  text-align: center;
}
figure.big-photo img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
figure.big-photo figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Stories ---------- */
.story-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.story-card blockquote { margin: 0 0 14px; flex-grow: 1; }
.story-card .story-meta { font-size: 0.82rem; color: var(--muted); }

.story-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 32px;
  margin: 0 0 26px;
  box-shadow: var(--shadow-sm);
}
.story-block h2 { font-size: 1.5rem; }
.story-block h2 + p.story-sub { color: var(--muted); font-size: 0.92rem; margin-top: -0.4em; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; }
details.faq {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
details.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: var(--violet-deep);
  padding: 16px 54px 16px 20px;
  position: relative;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--green-deep);
  font-weight: 700;
  line-height: 1;
}
details.faq[open] summary::after { content: "–"; }
details.faq .faq-body { padding: 0 20px 18px; }
details.faq .faq-body p:first-child { margin-top: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 24px 0; }
table.data {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
}
table.data th, table.data td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
table.data th {
  background: var(--violet-soft);
  color: var(--violet-deep);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
table.data tr:last-child td { border-bottom: none; }

/* ---------- Callout / notice ---------- */
.notice {
  background: var(--violet-soft);
  border: 1px solid #d9cdee;
  border-left: 5px solid var(--violet);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 22px 0;
  font-size: 0.95rem;
}
.notice-green {
  background: var(--green-soft);
  border-color: #d8e7c2;
  border-left-color: var(--green);
}
.notice strong { color: var(--violet-deep); }
.notice-green strong { color: var(--green-deep); }

/* ---------- Breadcrumbs ---------- */
.crumbs {
  padding: 18px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.crumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--violet); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--violet-deep), var(--violet));
  color: #fff;
  border-radius: 22px;
  padding: 46px 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}
.cta-band h2 { color: #fff; margin-bottom: 0.2em; font-size: 1.6rem; }
.cta-band p { color: #d9d2ec; margin: 0; max-width: 34em; }
.cta-band .btn-outline { border-color: #fff; color: #fff !important; }
.cta-band .btn-outline:hover { background: #fff; color: var(--violet-deep) !important; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--violet-deep);
  color: #cfc8e6;
  margin-top: auto;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding: 54px 0 40px;
}
.site-footer h3 {
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1em;
  font-family: var(--font-body);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.55em; }
.site-footer a { color: #cfc8e6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-about p { line-height: 1.65; }
.footer-about .brand { margin-bottom: 16px; }
.footer-about .brand-text .brand-name { color: #fff; }
.footer-about .brand-text .brand-tag { color: var(--green); }
.footer-contact address { font-style: normal; line-height: 1.8; }
.footer-contact .tel-link { font-weight: 700; color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 18px 0;
  font-size: 0.8rem;
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; padding: 44px 0 30px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Page lead ---------- */
.page-lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 46em;
}

/* ---------- Content helpers ---------- */
.doc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.doc-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  margin: 0;
}
.doc-list .doc-ico {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--violet-soft);
  color: var(--violet);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.72rem;
}
.doc-list .doc-ico.doc-pdf { background: #fdeaea; color: #b3261e; }
.doc-list .doc-ico.doc-rtf { background: #e8f0fd; color: #1a56b0; }
.doc-list p { margin: 2px 0 0; font-size: 0.86rem; color: var(--muted); }
.doc-list a { font-weight: 700; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: start;
}
@media (max-width: 780px) { .two-col { grid-template-columns: 1fr; } }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 12px;
}
.check-list li::before {
  content: "★";
  position: absolute;
  left: 4px;
  top: 0;
  color: var(--green);
  font-size: 1rem;
}

/* map */
.map-figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

/* ---------- 404 ---------- */
.notfound {
  text-align: center;
  padding: 70px 0 90px;
}
.notfound .nf-code {
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 700;
  color: var(--violet);
  line-height: 1;
  margin-bottom: 8px;
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .crumbs, .hero-ctas, .btn, .nav-toggle { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .card, .story-block { box-shadow: none; border: 1px solid #ccc; }
}