/* ============================================================
   Locals 10538 — Factual Record Website
   Main Stylesheet
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg:        #F9F7F4;
  --color-surface:   #FFFFFF;
  --color-border:    #E2DDD8;
  --color-text:      #1A1A1A;
  --color-muted:     #6B6560;
  --color-accent:    #2B5C8A;
  --color-accent-lt: #EBF2FA;
  --color-warn:      #C0392B;
  --color-gold:      #B8872A;
  --color-green:     #2E7D50;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --max-w: 1100px;
  --nav-h: 70px;
  --banner-h: 52px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  padding-top: calc(var(--nav-h) + var(--banner-h));
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* --- Stay Informed Banner (always visible) --- */
#stay-informed-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--color-accent);
  color: #fff;
  height: var(--banner-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 24px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

#stay-informed-banner p {
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

#stay-informed-banner form {
  display: flex;
  gap: 8px;
  align-items: center;
}

#stay-informed-banner input[type="email"] {
  padding: 7px 14px;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  width: 220px;
  background: rgba(255,255,255,0.92);
  color: #111;
}

#stay-informed-banner button {
  padding: 7px 18px;
  background: var(--color-gold);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

#stay-informed-banner button:hover { background: #9a6e1f; }

#banner-success {
  display: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: #d4f5d4;
}

/* --- Top Navigation --- */
#main-nav {
  position: fixed;
  top: var(--banner-h);
  left: 0;
  right: 0;
  z-index: 190;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 32px;
  box-shadow: var(--shadow-sm);
}

#main-nav .nav-brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  text-decoration: none;
}

#main-nav .nav-brand span {
  color: var(--color-accent);
}

#main-nav nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

#main-nav nav a {
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: background 0.15s, color 0.15s;
}

#main-nav nav a:hover,
#main-nav nav a.active {
  background: var(--color-accent-lt);
  color: var(--color-accent);
  text-decoration: none;
}

/* Mobile nav toggle */
#nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--color-text);
}

/* --- Page Layout --- */
.page-wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.page-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--color-border);
}

.page-header .eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
}

.page-header .subtitle {
  margin-top: 12px;
  font-size: 1.05rem;
  color: var(--color-muted);
  max-width: 720px;
}

/* --- Cards & Surfaces --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.card + .card { margin-top: 20px; }

/* --- Disclaimer Banner --- */
.disclaimer {
  background: #FFF8E6;
  border: 1px solid #F0D080;
  border-left: 4px solid var(--color-gold);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.85rem;
  color: #5A4A1A;
  margin-bottom: 32px;
  line-height: 1.55;
}

.disclaimer strong { color: #7A5A00; }

/* --- Source Label --- */
.source-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
}

.source-label.uploaded { background: #E8F4FF; color: #1B5490; }
.source-label.public   { background: #E8F7EE; color: #1B5E35; }
.source-label.verify   { background: #FFF3CD; color: #7A5A00; }

/* ============================================================
   HOMEPAGE
   ============================================================ */

#hero {
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  padding: 60px 48px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-md);
  max-width: 860px;
}

#hero .eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  margin-bottom: 16px;
}

#hero h1 {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
  color: var(--color-text);
}

#hero h1 em {
  font-style: normal;
  color: var(--color-accent);
}

#hero .intro-text {
  font-size: 1.1rem;
  line-height: 1.75;
  color: #333;
  max-width: 700px;
  margin-bottom: 28px;
}

#hero .mission-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

#hero .mission-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.97rem;
  color: #333;
}

#hero .mission-list li .icon {
  color: var(--color-accent);
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.home-nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.home-nav-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}

.home-nav-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  text-decoration: none;
}

.home-nav-card .card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.home-nav-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.home-nav-card p {
  font-size: 0.88rem;
  color: var(--color-muted);
  line-height: 1.55;
}

/* ============================================================
   EVENTS PAGE
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-card .stat-number {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-accent);
  display: block;
}

.stat-card .stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-muted);
  margin-top: 6px;
  display: block;
}

.stat-card.total .stat-number { color: var(--color-text); font-size: 3.6rem; }
.stat-card.total { border-color: var(--color-accent); border-width: 2px; }

/* Calendar */
#calendar-section {
  margin-top: 48px;
}

#calendar-section h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.calendar-controls button {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s;
}

.calendar-controls button:hover { background: var(--color-accent-lt); }

.calendar-controls #cal-month-label {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  min-width: 200px;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.cal-day-header {
  background: var(--color-accent);
  color: #fff;
  text-align: center;
  padding: 10px 4px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cal-day {
  background: var(--color-surface);
  min-height: 90px;
  padding: 8px;
  font-size: 0.82rem;
  cursor: default;
  transition: background 0.15s;
}

.cal-day.empty { background: #F4F2EF; }

.cal-day .day-num {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.cal-day.has-event { cursor: pointer; }
.cal-day.has-event:hover { background: var(--color-accent-lt); }

.cal-day.today .day-num {
  background: var(--color-accent);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-event-dot {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--color-accent);
  font-weight: 500;
  line-height: 1.3;
  margin-top: 2px;
}

.cal-event-dot::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* Event detail panel */
#event-detail-panel {
  display: none;
  margin-top: 24px;
  padding: 24px 28px;
  background: var(--color-accent-lt);
  border: 1px solid #C5DBF0;
  border-radius: var(--radius);
}

#event-detail-panel h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 12px;
}

#event-detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#event-detail-list li {
  background: #fff;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 0.9rem;
  border: 1px solid #D4E8F8;
}

.event-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 20px;
  margin-right: 6px;
}

.tag-birthday  { background: #FFF0F5; color: #B03070; }
.tag-charity   { background: #F0FFF5; color: #1A7040; }
.tag-wedding   { background: #FFF8E8; color: #906020; }
.tag-music     { background: #F0F0FF; color: #3030A0; }
.tag-corporate { background: #F5F5F5; color: #505050; }
.tag-community { background: #F0FAFF; color: #106090; }
.tag-private   { background: #FAF0FF; color: #700090; }

/* ============================================================
   TIMELINE PAGE
   ============================================================ */

.timeline-container {
  position: relative;
  padding-left: 40px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-entry {
  position: relative;
  margin-bottom: 36px;
}

.timeline-entry::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-accent);
}

.timeline-entry.milestone::before { background: var(--color-gold); box-shadow: 0 0 0 2px var(--color-gold); }
.timeline-entry.adverse::before   { background: var(--color-warn); box-shadow: 0 0 0 2px var(--color-warn); }
.timeline-entry.positive::before  { background: var(--color-green); box-shadow: 0 0 0 2px var(--color-green); }

.entry-date {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.entry-title {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.entry-body {
  font-size: 0.92rem;
  color: #333;
  line-height: 1.65;
}

.entry-body p + p { margin-top: 8px; }

.entry-meta {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* Timeline legend */
.timeline-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  padding: 16px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================================
   Q&A PAGE
   ============================================================ */

.qa-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.qa-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  font-family: var(--font-sans);
  transition: background 0.15s;
  line-height: 1.4;
}

.qa-question:hover { background: var(--color-accent-lt); }

.qa-question .q-icon {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: -1px;
}

.qa-question .qa-chevron {
  margin-left: auto;
  color: var(--color-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.qa-question[aria-expanded="true"] .qa-chevron { transform: rotate(180deg); }

.qa-answer {
  display: none;
  padding: 0 24px 20px 52px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #333;
  border-top: 1px solid var(--color-border);
}

.qa-answer.open { display: block; }

.qa-answer p + p { margin-top: 10px; }

.qa-answer .answer-note {
  margin-top: 12px;
  padding: 10px 14px;
  background: #FFF8E6;
  border-left: 3px solid var(--color-gold);
  border-radius: 4px;
  font-size: 0.85rem;
  color: #5A4A1A;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  background: #1A1A1A;
  color: #9A9590;
  text-align: center;
  padding: 32px 24px;
  font-size: 0.82rem;
  line-height: 1.7;
}

footer a { color: #B0A898; }
footer strong { color: #D0CBC3; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  :root { --nav-h: 60px; --banner-h: 80px; }

  #stay-informed-banner {
    flex-direction: column;
    gap: 8px;
    padding: 10px 16px;
    height: var(--banner-h);
  }

  #stay-informed-banner p { font-size: 0.8rem; }
  #stay-informed-banner input[type="email"] { width: 160px; font-size: 0.82rem; }
  #stay-informed-banner button { padding: 6px 12px; font-size: 0.8rem; }

  #main-nav { padding: 0 16px; }
  #main-nav nav { display: none; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--color-surface); border-bottom: 1px solid var(--color-border); padding: 12px; }
  #main-nav nav.open { display: flex; }
  #nav-toggle { display: block; }

  #hero { padding: 36px 24px; }
  #hero h1 { font-size: 1.9rem; }

  .page-header h1 { font-size: 1.6rem; }
  .page-wrapper { padding: 32px 16px 60px; }

  .calendar-grid { gap: 1px; }
  .cal-day { min-height: 60px; padding: 4px; }
  .cal-event-dot { font-size: 0; } /* Show dots only on mobile */

  .timeline-container { padding-left: 28px; }
}
