/* Rare Disease Fair — shared styles. Brand tokens match rarediseasealliance.org */
:root {
  --purple: #5e3984;
  --purple-dark: #4a2a6e;
  --purple-light: #9e91b3;
  --purple-tint: #efe9f6;
  --cream: #f5f1e9;
  --cream-line: #e8e2d6;
  --tile: #eae4d8;
  --tile-text: #a39a89;
  --white: #ffffff;
  --text-dark: #2a1a3e;
  --text-body: #4a3a5e;
  --text-light: #6e5e82;
  --green: #7ca88a;
  --green-dark: #407450;
  --green-tint: #e3ede6;
  --teal: #4f8f8a;
  --teal-tint: #e7f0ef;
  --gold: #fadc8f;
  --gold-dark: #8a6a25;
  --gold-tint: #fdf6e3;
  --coral: #c97a63;
  --coral-dark: #a85a40;
  --coral-tint: #faf0ec;
  --font-head: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --content-max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--text-dark); font-family: var(--font-body); font-size: 16px; line-height: 1.6; }
a { color: var(--purple); }
a:hover { color: var(--purple-dark); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-head); color: var(--text-dark); line-height: 1.12; margin: 0; }
.wrap { max-width: var(--content-max); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.eyebrow { font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: 0.16em; color: var(--coral-dark); text-transform: uppercase; }

/* Buttons */
.btn { display: inline-block; font-family: var(--font-body); font-weight: 700; font-size: 16px; text-decoration: none; border-radius: 999px; padding: 13px 26px; cursor: pointer; border: none; }
.btn-primary { background: var(--purple); color: var(--white); }
.btn-primary:hover { background: var(--purple-dark); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--text-dark); }
.btn-gold:hover { background: #f3cf6f; color: var(--text-dark); }
.btn-coral { background: var(--coral-dark); color: var(--white); }
.btn-coral:hover { background: #8f4a33; color: var(--white); }
.btn-outline { border: 2px solid var(--purple); color: var(--purple); padding: 11px 24px; background: transparent; }
.btn-outline-light { border: 2px solid rgba(255,255,255,0.5); color: var(--white); padding: 11px 24px; background: transparent; }
.btn-outline-light:hover { border-color: var(--white); color: var(--white); }
.btn-sm { font-size: 15px; padding: 11px 22px; }

/* Header */
.site-header { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 16px 32px; border-bottom: 1px solid var(--cream-line); background: var(--cream); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-img { height: 58px; width: auto; display: block; }
.state-band h1 { font-family: 'Montserrat', var(--font-head), sans-serif; }
.state-lockup { font-family: 'Montserrat', var(--font-head), sans-serif; font-weight: 800; font-size: 14px; letter-spacing: 0.05em; margin-top: 2px; }
.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--text-dark); text-decoration: none; }
.site-nav a:hover { color: var(--purple); }
.site-nav a.btn { color: var(--white); }

/* Hero */
.hero { padding: 48px 32px 8px; }
.hero-grid { max-width: var(--content-max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: center; }
.hero h1 { font-weight: 800; font-size: clamp(36px, 4.5vw, 56px); line-height: 1.05; }
.hero h1 .accent { color: var(--purple); }
.hero-copy { display: flex; flex-direction: column; gap: 16px; }
.hero-copy p { margin: 0; font-size: 18px; color: var(--text-body); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; }

/* US tile map */
.map-label { font-size: 13px; font-weight: 700; color: var(--text-light); letter-spacing: 0.08em; }
.usmap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; max-width: 470px; }
.usmap .st, .usmap a.st { aspect-ratio: 1; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: var(--tile); color: var(--tile-text); font-size: 9px; font-weight: 700; text-decoration: none; }
.usmap a.st.on { background: var(--purple); color: var(--white); font-size: 11px; font-weight: 800; }
.usmap a.st.on:hover { background: var(--purple-dark); }
.map-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 12px; font-weight: 700; color: var(--text-light); margin-top: 10px; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* Timeline */
.timeline-section { padding: 28px 0 40px; position: relative; }
.timeline-head { max-width: var(--content-max); margin: 0 auto; padding: 0 32px; display: flex; align-items: center; gap: 12px; }
.timeline-head .past-count { font-size: 13px; font-weight: 700; color: var(--purple-light); }
.timeline-head .rule { flex-grow: 1; height: 1px; background: var(--cream-line); }
.timeline-head .next-label { font-size: 13px; font-weight: 700; color: var(--purple); }
.timeline-outer { position: relative; margin-top: 14px; }
.timeline-outer::before, .timeline-outer::after { content: ""; position: absolute; top: 0; bottom: 0; width: 64px; pointer-events: none; z-index: 2; }
.timeline-outer::before { left: 0; background: linear-gradient(to right, var(--cream), rgba(245,241,233,0)); }
.timeline-outer::after { right: 0; background: linear-gradient(to left, var(--cream), rgba(245,241,233,0)); }
.timeline { overflow-x: auto; scroll-snap-type: x proximity; display: flex; align-items: stretch; gap: 14px; padding: 8px 32px 12px; scrollbar-width: none; }
.timeline::-webkit-scrollbar { display: none; }
.tl-card { flex-shrink: 0; scroll-snap-align: start; border-radius: 14px; background: var(--white); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.tl-past { width: 195px; }
.tl-past .tl-when { font-size: 12px; font-weight: 700; color: var(--text-light); }
.tl-past .tl-title { font-family: var(--font-head); font-weight: 800; font-size: 16px; }
.tl-past .tl-note { font-size: 12px; color: var(--green-dark); font-weight: 700; margin-top: auto; }
.tl-past .tl-note.muted { color: var(--text-light); font-weight: 400; }
.tl-now { flex-shrink: 0; width: 46px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0; }
.tl-now .pill { background: var(--coral-dark); color: var(--white); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; padding: 4px 8px; border-radius: 999px; }
.tl-now .line { width: 3px; flex-grow: 1; border-radius: 3px; background: var(--coral-dark); }
a.tl-card { text-decoration: none; }
.tl-next { width: 280px; border-radius: 16px; padding: 22px; gap: 8px; position: relative; }
.tl-next.tl-featured { border: 2px solid var(--purple); }
.tl-next.gold { border: 2px solid var(--gold); }
.tl-next .tl-date { font-family: var(--font-head); font-weight: 800; font-size: 24px; color: var(--purple); }
.tl-next .tl-state { font-family: var(--font-head); font-weight: 800; font-size: 19px; color: var(--text-dark); }
.tl-next .tl-state small { font-weight: 400; font-size: 14px; color: var(--text-light); }
.tl-next .tl-venue { font-size: 13px; color: var(--text-light); }
.tl-next .tl-link { font-weight: 700; font-size: 15px; color: var(--purple); margin-top: auto; }
.tl-badge { position: absolute; top: -12px; right: 16px; background: var(--gold); color: var(--text-dark); font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 999px; }
.tl-vision { flex-shrink: 0; width: 300px; background: var(--purple); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 12px; scroll-snap-align: start; }
.tl-vision .v-title { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--white); line-height: 1.2; }
.tl-vision .v-sub { font-size: 14px; color: #e8e2f0; }
.tl-vision .v-bar-labels { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: #d8cde8; margin-bottom: 6px; }
.tl-vision .v-bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.2); }
.tl-vision .v-bar i { display: block; height: 10px; width: 12%; border-radius: 999px; background: var(--gold); }

/* Chips */
.chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.chip-fair { background: var(--purple); color: var(--white); }
.chip-forum { background: var(--teal); color: var(--white); }
.chip-research { background: var(--green-dark); color: var(--white); }
.chip-picnic { background: var(--cream); color: var(--text-body); }
.chip-open { background: var(--green-tint); color: var(--green-dark); }
.chip-soon { background: var(--cream); color: var(--text-light); }
.chip-wrapped { background: var(--green-tint); color: var(--green-dark); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* Scrubber */
.scrubber { max-width: var(--content-max); margin: 10px auto 0; padding: 0 32px; display: flex; align-items: center; gap: 16px; }
.scrub-arrow { width: 40px; height: 40px; border-radius: 999px; border: 1px solid #d8d0c2; background: var(--white); color: var(--text-dark); font-size: 17px; font-weight: 700; cursor: pointer; flex-shrink: 0; }
.scrub-arrow:hover { border-color: var(--purple); color: var(--purple); }
.scrub-mid { flex-grow: 1; display: flex; flex-direction: column; gap: 8px; }
.scrub-track { position: relative; height: 8px; border-radius: 999px; background: var(--cream-line); }
.scrub-thumb { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--purple); width: 16%; left: 0; }
.scrub-eras { display: flex; justify-content: space-between; }
.scrub-eras button { border: none; background: transparent; padding: 0; font-family: var(--font-body); font-size: 12px; font-weight: 700; color: var(--text-light); cursor: pointer; }
.scrub-eras button:hover, .scrub-eras button.current { color: var(--purple); }

/* Sponsors */
.sponsors { background: var(--white); padding: 56px 0 64px; }
.sponsors-head { max-width: var(--content-max); margin: 0 auto; padding: 0 32px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; }
.sponsors-head h2 { font-weight: 800; font-size: 28px; }
.sponsors-head .sub { font-size: 15px; color: var(--text-light); }
.sponsors-head .btn { margin-left: auto; }
.marquee { overflow: hidden; margin-top: 32px; }
.marquee-track { display: flex; width: max-content; gap: 14px; animation: rdf-marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .tile { background: var(--cream); border-radius: 12px; padding: 14px 26px; font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--text-light); white-space: nowrap; }
.marquee .tile-img { background: var(--white); border: 1px solid var(--cream-line); display: flex; align-items: center; padding: 12px 22px; }
.marquee .tile-img img { height: 52px; width: auto; max-width: 180px; object-fit: contain; display: block; }
@keyframes rdf-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.sponsor-wall { max-width: var(--content-max); margin: 32px auto 0; padding: 0 32px; }
.sponsor-wall img { border-radius: 16px; display: block; background: var(--white); border: 1px solid var(--cream-line); }
.sponsor-wall .caption { font-size: 13px; color: var(--text-light); margin-top: 8px; }

/* Generic sections */
.section { padding: 64px 32px; }
.section.white { background: var(--white); }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-weight: 800; font-size: 32px; margin-top: 8px; }
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { background: var(--white); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.card.bordered { background: transparent; border: 1px solid var(--cream-line); }
.card h3 { font-weight: 800; font-size: 20px; }
.card p { margin: 0; font-size: 15px; color: var(--text-body); }
.card .meta { font-size: 13px; color: var(--text-light); }
.card-topbar { height: 8px; border-radius: 999px 999px 0 0; margin: -26px -26px 10px; }

/* CTA band + footer */
.cta-band { background: var(--purple); padding: 72px 32px; text-align: center; }
.cta-band h2 { color: var(--white); font-weight: 800; font-size: 34px; }
.cta-band p { color: #e8e2f0; font-size: 18px; max-width: 620px; margin: 16px auto 24px; }
.cta-band .hero-ctas { justify-content: center; }
.site-footer { background: var(--text-dark); padding: 36px 32px; }
.footer-row { max-width: var(--content-max); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.footer-row img { height: 36px; width: auto; }
.footer-row .org { font-size: 13px; color: #b5a8c9; max-width: 460px; }
.footer-links { margin-left: auto; display: flex; gap: 20px; font-size: 14px; }
.footer-links a { color: #d8cde8; text-decoration: none; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { max-width: var(--content-max); margin: 20px auto 0; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 14px; font-size: 12px; color: var(--purple-light); }

/* State pages */
.state-hero { padding: 56px 32px 40px; }
.state-hero .inner { max-width: var(--content-max); margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.state-hero h1 { font-weight: 800; font-size: clamp(34px, 4vw, 48px); }
.state-hero h1 small { font-weight: 400; font-size: 18px; color: var(--text-light); }
.state-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.event-list { display: flex; flex-direction: column; gap: 12px; }
.event-row { display: flex; align-items: center; gap: 18px; background: var(--white); border-radius: 14px; padding: 16px 22px; flex-wrap: wrap; }
.event-row.past { opacity: 0.75; }
.event-row .when { font-family: var(--font-head); font-weight: 800; font-size: 16px; color: var(--purple); min-width: 120px; }
.event-row .what { flex-grow: 1; min-width: 180px; }
.event-row .what .t { font-weight: 700; }
.event-row .what .v { font-size: 13px; color: var(--text-light); }
.event-row a { font-weight: 700; font-size: 14px; }
.info-card { background: var(--white); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.info-card h3 { font-size: 18px; font-weight: 800; }
.info-card .row { font-size: 15px; color: var(--text-body); }
.info-card .row b { color: var(--text-dark); }

/* Timeline card actions: whole card links to the state page; Register is its own button */
.tl-next { position: relative; }
.tl-actions { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tl-actions .tl-stretch { font-weight: 700; font-size: 15px; color: var(--purple); text-decoration: none; }
.tl-actions .tl-stretch::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.tl-next:hover { box-shadow: 0 2px 14px rgba(42, 26, 62, 0.1); }
.tl-register { position: relative; z-index: 2; padding: 9px 18px; font-size: 14px; }

/* Archive download chips */
.doc-chip { display: inline-block; background: var(--cream); color: var(--purple); font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; text-decoration: none; }
.doc-chip:hover { background: var(--cream-line); }

/* Contact form */
.form-card { background: var(--white); border-radius: 20px; padding: 36px; max-width: 640px; display: flex; flex-direction: column; gap: 18px; }
.form-field label { display: block; font-size: 13px; font-weight: 700; color: var(--text-light); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.form-field input, .form-field textarea { width: 100%; box-sizing: border-box; font-family: var(--font-body); font-size: 16px; color: var(--text-dark); background: var(--cream); border: 1px solid var(--cream-line); border-radius: 10px; padding: 12px 14px; }
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--purple); border-color: var(--purple); background: var(--white); }
.form-field textarea { min-height: 140px; resize: vertical; }

/* Expandable sample sessions (about page) */
.card details { margin-top: 6px; border-top: 1px solid var(--cream-line); padding-top: 12px; }
.card details summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--purple); list-style: none; display: flex; align-items: center; gap: 8px; }
.card details summary::before { content: "▸"; transition: transform 0.15s; }
.card details[open] summary::before { transform: rotate(90deg); }
.card details summary:hover { color: var(--purple-dark); }
.session-list { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.session-list li { font-size: 14px; line-height: 1.45; color: var(--text-body); padding-left: 14px; position: relative; }
.session-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 999px; background: var(--cream-line); }
.session-note { font-size: 12px; color: var(--text-light); margin-top: 10px; }

/* Speakers page */
.speakers-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.speaker { background: var(--white); border-radius: 12px; padding: 16px 18px; }
.speaker .sp-name { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--text-dark); }
.speaker .sp-title { font-size: 12.5px; line-height: 1.4; color: var(--text-light); margin-top: 3px; }
@media (max-width: 1100px) { .speakers-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .speakers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .speakers-grid { grid-template-columns: minmax(0, 1fr); } }

/* State page — featured-event template */
.state-band { max-width: var(--content-max); margin: 0 auto; padding: 36px 32px 0; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.state-band .back { font-size: 14px; font-weight: 700; text-decoration: none; }
.state-band h1 { font-weight: 800; font-size: 34px; line-height: 1; margin: 0; }
.state-band .est { font-size: 13px; color: var(--text-light); margin-top: 4px; }
.featured-wrap { max-width: var(--content-max); margin: 0 auto; padding: 28px 32px 56px; }
.featured { background: var(--white); border: 2px solid var(--purple); border-radius: 24px; padding: 44px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 48px; }
.featured .f-left { display: flex; flex-direction: column; gap: 16px; }
.featured .f-date { font-family: var(--font-head); font-weight: 800; font-size: 52px; line-height: 1; color: var(--purple); }
.featured .f-title { font-family: var(--font-head); font-weight: 800; font-size: 24px; }
.featured .f-title small { font-weight: 400; font-size: 15px; color: var(--text-light); }
.featured .f-left p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-body); }
.featured .f-rail { display: flex; flex-direction: column; gap: 16px; border-left: 1px solid var(--cream-line); padding-left: 40px; }
.featured .f-rail .label { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--text-light); }
.featured .f-rail .val { font-size: 15px; margin-top: 4px; line-height: 1.5; }
.featured .f-rail .links { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; font-size: 14px; font-weight: 700; }
@media (max-width: 900px) {
  .featured { grid-template-columns: minmax(0, 1fr); padding: 28px; gap: 28px; }
  .featured .f-rail { border-left: none; padding-left: 0; border-top: 1px solid var(--cream-line); padding-top: 20px; }
}

/* About timeline */
.history { display: flex; flex-direction: column; gap: 0; max-width: 720px; }
.history-item { display: flex; gap: 20px; }
.history-rail { display: flex; flex-direction: column; align-items: center; }
.history-dot { width: 16px; height: 16px; border-radius: 999px; background: var(--purple); flex-shrink: 0; margin-top: 4px; }
.history-line { width: 3px; flex-grow: 1; background: var(--cream-line); }
.history-body { padding-bottom: 32px; }
.history-body .year { font-family: var(--font-head); font-weight: 800; font-size: 14px; color: var(--coral-dark); letter-spacing: 0.08em; }
.history-body h3 { font-size: 20px; font-weight: 800; margin: 4px 0 6px; }
.history-body p { margin: 0; font-size: 15px; color: var(--text-body); }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .state-facts { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cards-3 { grid-template-columns: minmax(0, 1fr); }
  .usmap { max-width: 100%; }
  .site-header { padding: 14px 16px; }
  .hero, .section, .state-hero { padding-left: 16px; padding-right: 16px; }
  .timeline-head, .scrubber, .sponsors-head, .sponsor-wall { padding-left: 16px; padding-right: 16px; }
  .timeline { padding-left: 16px; padding-right: 16px; }
  .scrub-eras button { font-size: 10px; }
  .footer-links { margin-left: 0; }
}
