/* St. Louis Shape Note Singers — Clean Vintage Theme */

@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400&family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400&family=IM+Fell+English:ital@0;1&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Color Palette ── */
:root {
  --page-cream: #ece4d4;
  --page-light: #f2ebe0;
  --page-aged: #d9ccb0;
  --page-stain: #c4b08a;
  --ink-black: #1a1a1a;
  --ink-brown: #3d2b1f;
  --ink-sepia: #5c4033;
  --ink-faded: #4a3d30;
  --bg-dark: #1c1410;
  --bg-warm: #2a1e16;
  --rule-color: #b8a080;
  --link-color: #6b3a2a;
  --link-hover: #3d1a0a;
  --sidebar-bg: #e2d8c6;
}

html {
  font-size: 16px;
}

body {
  font-family: 'IM Fell English', 'Crimson Text', Georgia, 'Times New Roman', serif;
  line-height: 1.65;
  color: var(--ink-brown);
  min-height: 100vh;
  background: linear-gradient(160deg, var(--bg-dark) 0%, var(--bg-warm) 40%, var(--bg-dark) 100%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1.5rem 1rem;
}

/* ── Page Container ── */
.page {
  max-width: 960px;
  width: 100%;
  background: var(--page-cream);
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.3),
    0 12px 40px rgba(0,0,0,0.5),
    inset 0 0 60px rgba(139,90,43,0.08);
}

/* Subtle aged-paper edge darkening */
.page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(120,80,40,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 0%, rgba(120,80,40,0.10) 0%, transparent 40%),
    radial-gradient(ellipse at 0% 100%, rgba(120,80,40,0.14) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(120,80,40,0.16) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

/* Fine paper grain texture */
.page::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* ── Two-Column Layout ── */
.page-layout {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100%;
}

/* ── Sidebar Navigation ── */
.sidebar {
  width: 185px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--rule-color);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ink-faded);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule-color);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
}

.sidebar nav a {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(184,160,128,0.4);
  text-decoration: none;
  color: var(--link-color);
  transition: color 0.15s;
}

.sidebar nav a:last-child {
  border-bottom: none;
}

.sidebar nav a:hover {
  color: var(--link-hover);
}

/* ── Main Content ── */
.page-content {
  flex: 1;
  padding: 2rem 2rem 1.5rem;
  min-width: 0;
}

/* ── Text Header ── */
.site-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.site-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--ink-brown);
  line-height: 1.15;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.site-subtitle {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-faded);
  letter-spacing: 0.5px;
}

/* ── Ornamental Dividers ── */
.divider {
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.25rem 0;
  height: auto;
  gap: 0.75rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  max-width: 120px;
  background: linear-gradient(90deg, transparent, var(--rule-color), transparent);
}

.divider-symbol {
  color: var(--ink-sepia);
  font-size: 0.9rem;
  line-height: 1;
  opacity: 0.7;
}

/* Simple thin rule (no symbol) */
.rule {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule-color), transparent);
  margin: 1rem 0;
}

/* ── Convention Section ── */
.convention {
  text-align: center;
  margin: 1.25rem 0;
}

.convention-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ink-black);
  line-height: 1.15;
  margin-bottom: 0.15rem;
}

.convention-title sup {
  font-size: 0.5em;
}

.convention-subtitle {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}

.convention-details {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0.5rem 0;
}

.convention-venue {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.6rem 0 0.2rem;
}

.convention-address {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.gps-link {
  display: inline-block;
  border: 1px solid var(--rule-color);
  padding: 0.15rem 0.6rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  margin: 0.4rem 0;
  background: rgba(255,255,255,0.15);
}

.gps-link a {
  text-decoration: none;
  color: var(--ink-brown);
}

.gps-link a:hover {
  color: var(--link-hover);
}

.convention-flyer {
  max-width: 85%;
  height: auto;
  border: 1px solid var(--rule-color);
  margin: 0.75rem auto;
  display: block;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.12);
}

.convention-books {
  font-weight: 600;
  font-size: 1rem;
  margin: 0.5rem 0 0.15rem;
}

.convention-note {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-faded);
}

.convention-info {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0.5rem 0;
}

.convention-contact {
  font-size: 0.95rem;
  margin-top: 0.6rem;
}

.convention-links {
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.convention-links a {
  display: inline-block;
  margin: 0.15rem 0.3rem;
}

/* ── Welcome Section ── */
.welcome {
  margin: 1.5rem 0 1rem;
}

.welcome-text {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.75;
  text-align: center;
  margin-bottom: 1rem;
}

.meeting-info {
  font-size: 1rem;
  margin: 0.75rem 0;
  line-height: 1.65;
}

/* ── About Section ── */
.about {
  margin: 1rem 0;
  font-size: 1rem;
  line-height: 1.7;
}

.about p {
  margin: 0.6rem 0;
  text-align: justify;
}

/* ── Links ── */
a {
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-color: var(--page-stain);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--link-hover);
  text-decoration-color: var(--link-hover);
}

/* ── Shape Note Legend ── */
.shape-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1rem 0 0.5rem;
  padding: 0.5rem 0;
}

.shape-item {
  text-align: center;
}

.shape-item svg {
  display: block;
  margin: 0 auto 0.2rem;
  opacity: 0.65;
}

.shape-label {
  font-size: 0.85rem;
  color: var(--ink-faded);
  font-style: italic;
}

/* ── Footer ── */
.page-footer {
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-faded);
  margin-top: 0.75rem;
  padding-top: 0.5rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  body {
    padding: 0.5rem;
  }

  .page-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--rule-color);
    padding: 1rem;
  }

  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
  }

  .sidebar nav a {
    border-bottom: none;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .sidebar nav a:not(:last-child)::after {
    content: '\00b7';
    margin-left: 0.6rem;
    color: var(--rule-color);
  }

  .page-content {
    padding: 1.25rem 1rem;
  }

  .site-title {
    font-size: 1.4rem;
  }

  .convention-title {
    font-size: 1.35rem;
  }

  .convention-flyer {
    max-width: 95%;
  }

  .shape-legend {
    gap: 1rem;
  }
}

@media (max-width: 400px) {
  html {
    font-size: 14px;
  }

  .page-content {
    padding: 1rem 0.75rem;
  }

  .sidebar nav a {
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
  }
}
