@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-bg: #050506;
  --color-surface: #0e0f11;
  --color-surface-raised: #15171a;
  --color-text: #f3f1ed;
  --color-muted: #aaa7a3;
  --color-accent: #b83a3a;
  --color-accent-hover: #d24a4a;
  --color-border: rgba(255, 255, 255, 0.12);
  --container: 1180px;
  --reading: 76ch;
  --header-height: 92px;
  --radius-sm: 8px;
  --radius: 14px;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 180ms ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font-family: var(--font-sans); font-size: 1rem; line-height: 1.7; -webkit-font-smoothing: antialiased; }
body:has(.nav-toggle:checked) { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: var(--color-text); text-decoration-color: rgba(210, 74, 74, 0.7); text-underline-offset: 0.2em; }
a:hover { color: #fff; text-decoration-color: var(--color-accent-hover); }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid var(--color-accent-hover); outline-offset: 4px; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.16; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.4rem, 6vw, 5.4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
.container { width: min(100% - 3rem, var(--container)); margin-inline: auto; }
.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section--surface { background: var(--color-surface); }
.section-heading { max-width: 760px; margin-bottom: 2.75rem; }
.section-heading--center { margin-inline: auto; text-align: center; }
.section-heading p { margin-bottom: 0; color: var(--color-muted); font-size: clamp(1rem, 1.5vw, 1.15rem); }
.eyebrow { margin-bottom: 0.65rem; color: #df6969; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }

.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-height); border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(5, 5, 6, 0.94); box-shadow: 0 8px 24px rgba(0,0,0,.16); backdrop-filter: blur(14px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 2rem; }
.site-logo { flex: 0 0 auto; }
.site-logo img { width: 104px; height: auto; }
.nav-toggle { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.nav-toggle-label { display: none; width: 44px; height: 44px; padding: 11px 9px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); cursor: pointer; }
.nav-toggle-label span { display: block; height: 2px; margin: 5px 0; border-radius: 2px; background: var(--color-text); transition: transform var(--transition), opacity var(--transition); }
.nav-list, .footer-links, .individuals-list { margin: 0; padding: 0; list-style: none; }
.nav-list { display: flex; align-items: center; gap: 0.15rem; }
.nav-list a { display: block; padding: 0.65rem 0.72rem; border-radius: 7px; color: #d9d6d2; font-size: 0.77rem; font-weight: 600; letter-spacing: 0.055em; text-decoration: none; text-transform: uppercase; transition: color var(--transition), background var(--transition); }
.nav-list a:hover, .nav-list a[aria-current='page'] { background: rgba(184, 58, 58, 0.14); color: #fff; }
.nav-list a[aria-current='page'] { box-shadow: inset 0 -2px var(--color-accent); }

.hero { position: relative; min-height: calc(100vh - var(--header-height)); min-height: calc(100svh - var(--header-height)); display: grid; place-items: center; overflow: hidden; isolation: isolate; background: #08090b url('/images/hero/startrails.webp') center / cover no-repeat; }
.hero-gallery, .hero-slide, .hero-overlay { position: absolute; inset: 0; }
.hero-gallery { z-index: -3; }
.hero-slide { opacity: 0; background-position: center; background-size: cover; transition: opacity 1s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-overlay { z-index: -2; background: linear-gradient(180deg, rgba(3,3,4,.34), rgba(3,3,4,.58) 56%, #050506 100%), linear-gradient(90deg, rgba(5,5,6,.28), transparent 60%); }
.hero-content { max-width: 930px; padding-block: 5rem; text-align: center; }
.hero-title { margin-bottom: 0.7rem; color: #fff; font-weight: 500; text-shadow: 0 5px 34px rgba(0,0,0,.65); }
.hero-subtitle { max-width: 660px; margin: 0 auto 2rem; color: rgba(255,255,255,.86); font-size: clamp(1.1rem, 2.5vw, 1.45rem); line-height: 1.5; }
.status-pill { display: inline-flex; align-items: center; min-height: 48px; padding: .75rem 1.45rem; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; background: rgba(5,5,6,.62); color: #fff; font-size: .86rem; font-weight: 600; letter-spacing: .08em; backdrop-filter: blur(10px); }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature-card { display: flex; min-height: 340px; flex-direction: column; padding: clamp(1.6rem, 3vw, 2.25rem); border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface-raised); transition: border-color var(--transition), transform var(--transition), background var(--transition); }
.feature-card:hover { transform: translateY(-3px); border-color: rgba(210,74,74,.55); background: #181a1e; }
.feature-number { margin-bottom: 2.5rem; color: #d76262; font-size: .76rem; font-weight: 700; letter-spacing: .14em; }
.feature-card h2 { margin-bottom: 1rem; font-size: clamp(1.35rem, 2.4vw, 1.85rem); }
.feature-card p { color: var(--color-muted); }
.text-link { display: inline-flex; align-items: center; gap: .55rem; width: fit-content; margin-top: auto; color: #f3dada; font-size: .88rem; font-weight: 700; text-decoration: none; }
.text-link::after { width: 18px; height: 1px; background: var(--color-accent-hover); content: ''; transition: width var(--transition); }
.text-link:hover::after { width: 30px; }
.history-strip { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(240px,.6fr); align-items: end; gap: 3rem; margin-top: 1.5rem; padding: clamp(1.75rem,4vw,3rem); border-left: 3px solid var(--color-accent); background: #0a0b0d; }
.history-strip p:last-child, .history-strip h2 { margin-bottom: 0; }
.history-strip p { color: var(--color-muted); }

.page-hero { position: relative; min-height: 300px; display: grid; place-items: center; overflow: hidden; isolation: isolate; background: url('/images/hero/startrails.webp') center 35% / cover no-repeat; }
.page-hero::before { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(5,5,6,.56), rgba(5,5,6,.88)); content: ''; }
.page-hero-content { padding-block: 4rem; text-align: center; }
.page-hero h1 { margin-bottom: .65rem; font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 500; }
.page-hero p { margin-bottom: 0; color: #cbc7c2; font-size: clamp(1rem,2vw,1.2rem); }
.facts { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; max-width: 980px; margin: 0 auto clamp(4rem,7vw,6rem); overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-border); }
.fact { padding: 1.4rem; background: var(--color-surface); }
.fact-label { display: block; margin-bottom: .35rem; color: #d96868; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.fact-value { font-size: .95rem; font-weight: 600; line-height: 1.45; }
.prose { max-width: var(--reading); margin-inline: auto; }
.prose-section { padding-block: clamp(2.5rem,5vw,4rem); border-top: 1px solid var(--color-border); }
.prose-section:first-child { padding-top: 0; border-top: 0; }
.prose h2 { margin-bottom: 1.25rem; }
.prose h3 { margin: 2rem 0 .8rem; }
.prose p, .prose li { color: #c4c0bc; }
.prose p:last-child { margin-bottom: 0; }
.prose ul { margin: 1.25rem 0 0; padding-left: 1.25rem; }
.prose li + li { margin-top: .45rem; }

.groups-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.group-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface-raised); transition: transform var(--transition), border-color var(--transition); }
.group-card:hover, .group-card:focus-within { transform: translateY(-3px); border-color: rgba(210,74,74,.58); }
.group-card-photo { width: 100%; height: clamp(190px, 18vw, 230px); object-fit: cover; }
.group-card-body { padding: 1.5rem; }
.group-card h2 { margin-bottom: .65rem; font-size: 1.25rem; }
.group-card p { margin-bottom: 0; color: var(--color-muted); font-size: .94rem; line-height: 1.65; }

.team-section + .team-section { margin-top: clamp(5rem,9vw,8rem); }
.team-section-title { margin-bottom: 1rem; }
.people-list { border-top: 1px solid var(--color-border); }
.person { display: grid; grid-template-columns: minmax(220px,300px) minmax(0,1fr); gap: clamp(1.5rem,5vw,4rem); padding-block: clamp(2rem,4vw,3.5rem); border-bottom: 1px solid var(--color-border); }
.person-photo, .person-placeholder { width: 100%; height: 225px; border-radius: var(--radius-sm); background: var(--color-surface-raised); }
.person-photo { object-fit: cover; object-position: top center; }
.person-placeholder { position: relative; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--color-border); color: #e6deda; font-size: 1.65rem; font-weight: 600; letter-spacing: .12em; }
.person-placeholder::before, .person-placeholder::after { position: absolute; width: 72%; height: 72%; border: 1px solid rgba(210,74,74,.55); border-radius: 50%; content: ''; transform: rotate(32deg); }
.person-placeholder::after { transform: rotate(-38deg); }
.person-placeholder span { z-index: 1; padding: .45rem; background: var(--color-surface-raised); }
.person-name { margin-bottom: .45rem; font-size: clamp(1.35rem,2.5vw,1.8rem); line-height: 1.25; }
.person-role { margin-bottom: 1.5rem; color: #dc6a6a; font-size: .76rem; font-weight: 700; letter-spacing: .11em; line-height: 1.35; text-transform: uppercase; }
.person-bio p { margin-bottom: 1rem; color: #c4c0bc; }
.person-bio p:last-child { margin-bottom: 0; }
.person-links { display: flex; flex-wrap: wrap; gap: .7rem 1.1rem; margin-top: 1.2rem; }
.person-links a { color: #e2a2a2; font-size: .88rem; }

.supporters-section + .supporters-section { margin-top: clamp(4rem,7vw,6rem); }
.supporters-section-title { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--color-border); }
.supporters-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.15rem; }
.supporter-card { padding: 1.25rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface-raised); }
.supporter-logo-wrap { display: flex; align-items: center; justify-content: center; height: clamp(120px, 14vw, 170px); min-height: 0; margin-bottom: 1.2rem; padding: .85rem; overflow: hidden; border-radius: var(--radius-sm); background: #fff; }
.supporter-logo { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.supporter-card h3 { margin-bottom: .55rem; font-size: 1.05rem; }
.supporter-card p { margin-bottom: 0; color: var(--color-muted); font-size: .9rem; }
.individuals-list { display: flex; flex-wrap: wrap; gap: .65rem; }
.individuals-list li { padding: .5rem .9rem; border: 1px solid var(--color-border); border-radius: 999px; color: #cbc7c2; font-size: .88rem; }

.contact-layout { display: grid; grid-template-columns: minmax(280px,.75fr) minmax(0,1.25fr); gap: 1.25rem; }
.contact-card, .map-card, .empty-state { border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface-raised); }
.contact-card { padding: clamp(1.5rem,4vw,2.5rem); }
.contact-card h2 { margin-bottom: 1.75rem; font-size: 1.6rem; }
.contact-list { margin: 0; }
.contact-item { display: grid; grid-template-columns: 105px 1fr; gap: 1rem; padding-block: 1rem; border-top: 1px solid var(--color-border); }
.contact-item dt { color: #dc6a6a; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.contact-item dd { margin: 0; color: #d0ccc7; }
.map-card { overflow: hidden; }
.map-frame { display: block; width: 100%; min-height: 460px; border: 0; }
.map-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-top: 1px solid var(--color-border); }
.map-footer p { margin-bottom: 0; color: var(--color-muted); font-size: .86rem; }
.map-footer a { flex: 0 0 auto; color: #e2a2a2; font-size: .86rem; font-weight: 600; }
.empty-state { max-width: 760px; margin-inline: auto; padding: clamp(2.5rem,7vw,5rem); text-align: center; }
.empty-state h2 { margin-bottom: .8rem; }
.empty-state p { margin-bottom: 0; color: var(--color-muted); }

.blog-cms-shell {
  --color-surface: var(--color-surface-raised);
  --color-border: rgba(255,255,255,.12);
  --color-text-soft: var(--color-muted);
  --color-text-muted: #928e89;
  --color-accent: var(--color-accent-hover);
  --color-tag-bg: rgba(184,58,58,.12);
  --color-tag-border: rgba(210,74,74,.35);
  --color-code-bg: #090a0c;
  --shadow-card: 0 12px 32px rgba(0,0,0,.2);
}
.blog-cms-intro { max-width: 700px; margin: 0 auto 2.5rem; text-align: center; }
.blog-cms-intro h2 { margin-bottom: .8rem; }
.blog-cms-intro p:last-child { margin-bottom: 0; color: var(--color-muted); }
.blog-cms-shell #list-view, .blog-cms-shell #article-view { max-width: 900px; margin-inline: auto; }
.blog-cms-shell .loading, .blog-cms-shell .empty, .blog-cms-shell .error { margin: 0; padding: 2rem; border: 1px solid var(--color-border); border-radius: var(--radius); color: var(--color-muted); text-align: center; }
.blog-cms-shell .card { margin-bottom: 1.25rem; }
.blog-cms-shell .card-image { height: 220px; }
.blog-cms-shell .card h2 { letter-spacing: -.02em; }
.blog-cms-shell .article > header h1 { font-size: clamp(2rem,4vw,3.4rem); }
.blog-cms-shell .article > header .description { color: var(--color-muted); font-style: normal; }
.blog-cms-shell .content { color: #c4c0bc; }
.blog-cms-shell .back-link { color: #e2a2a2; }

.site-footer { padding-block: 4rem 2rem; border-top: 1px solid var(--color-border); background: #08090a; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(2rem,6vw,5rem); }
.footer-brand img { width: 150px; height: auto; margin-bottom: 1rem; }
.footer-brand p, .footer-contact p { color: var(--color-muted); font-size: .88rem; }
.footer-title { margin-bottom: 1rem; color: #e4e0dc; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.footer-links { display: grid; gap: .45rem; }
.footer-links a, .footer-contact a { color: #c8c4bf; font-size: .88rem; }
.footer-bottom { display: flex; justify-content: center; gap: 1rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); color: #817d79; font-size: .78rem; text-align: center; }

@media (max-width: 1050px) {
  .nav-toggle-label { display: block; }
  .nav-toggle:focus-visible + .nav-toggle-label { outline: 3px solid var(--color-accent-hover); outline-offset: 4px; }
  .main-nav { position: fixed; top: var(--header-height); right: 0; bottom: 0; visibility: hidden; width: min(88vw,390px); padding: 1.5rem; border-left: 1px solid var(--color-border); background: #090a0c; pointer-events: none; transform: translateX(100%); transition: transform 240ms ease, visibility 240ms ease; }
  .nav-list { display: grid; align-items: stretch; }
  .nav-list a { padding: 1rem; border-bottom: 1px solid var(--color-border); border-radius: 0; font-size: .95rem; text-transform: none; }
  .nav-toggle:checked ~ .main-nav { visibility: visible; pointer-events: auto; transform: translateX(0); }
  .nav-toggle:checked + .nav-toggle-label span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked + .nav-toggle-label span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked + .nav-toggle-label span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 900px) {
  .features-grid, .groups-grid, .supporters-grid { grid-template-columns: repeat(2,1fr); }
  .feature-card { min-height: 310px; }
  .facts { grid-template-columns: repeat(2,1fr); }
  .contact-layout { grid-template-columns: 1fr; }
  .map-frame { min-height: 380px; }
}

@media (max-width: 700px) {
  :root { --header-height: 78px; }
  .container { width: min(100% - 2rem,var(--container)); }
  .site-logo img { width: 92px; }
  .hero-content { padding-block: 3rem; }
  .features-grid, .groups-grid, .supporters-grid, .footer-grid, .history-strip { grid-template-columns: 1fr; }
  .feature-card { min-height: 0; }
  .feature-number { margin-bottom: 1.5rem; }
  .feature-card .text-link { margin-top: 1.7rem; }
  .history-strip { gap: 1.4rem; }
  .page-hero { min-height: 240px; }
  .person { grid-template-columns: 1fr; gap: 1.5rem; }
  .person-photo, .person-placeholder { max-width: 420px; height: 270px; }
  .footer-bottom { align-items: center; flex-direction: column; }
  .map-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .facts, .groups-grid, .supporters-grid { grid-template-columns: 1fr; }
  .contact-item { grid-template-columns: 1fr; gap: .35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .feature-card:hover, .group-card:hover, .group-card:focus-within { transform: none; }
}
