/* ============================================================
   ATLAS PAGE — component re-skins
   Brings the pre-existing page components (medals, representative
   cards, the events timeline) into the library's ink-and-gold
   language. Loaded LAST, after style.css / events-page-styles.css
   and after atlas-page.css.
   ============================================================ */

/* ============================================================
   VITALITY — emblems, medals, prose stack
   ============================================================ */

.atlas-page .hero-emblems {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  margin: 0 0 30px;
}

.atlas-page .hero-emblem {
  height: 66px;
  width: auto;
  opacity: 0.88;
  filter: saturate(0.85);
  transition: opacity 0.4s ease, transform 0.6s ease;
}

.atlas-page .hero-emblem:hover {
  opacity: 1;
  transform: translateY(-3px);
}

.atlas-page .medal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 20px;
  max-width: none;
  margin: 0;
  justify-content: initial;
}

.atlas-page .medal-card {
  flex: initial;
  gap: 22px;
  padding: 24px 26px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--medal-accent, var(--atlas-red));
  border-radius: 3px;
  background: linear-gradient(165deg, rgba(27, 7, 7, 0.86) 0%, rgba(16, 3, 3, 0.86) 70%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  animation: atlasRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: border-color 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease;
}

.atlas-page .medal-card::before {
  background: radial-gradient(ellipse 70% 100% at 0% 50%, var(--medal-glow, rgba(153, 4, 3, 0.18)) 0%, transparent 70%);
}

.atlas-page .medal-card:hover {
  transform: translateY(-6px);
  border-top-color: rgba(212, 175, 55, 0.4);
  border-right-color: rgba(212, 175, 55, 0.4);
  border-bottom-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.6);
}

/* Per-tier accents, kept from the original ordering */
.atlas-page .medal-card:nth-child(1) { --medal-accent: #b9936c; --medal-glow: rgba(185, 147, 108, 0.16); }
.atlas-page .medal-card:nth-child(2) { --medal-accent: #8c8c8c; --medal-glow: rgba(140, 140, 140, 0.16); }
.atlas-page .medal-card:nth-child(3) { --medal-accent: #cd7f32; --medal-glow: rgba(205, 127, 50, 0.16); }
.atlas-page .medal-card:nth-child(4) { --medal-accent: #c0c0c0; --medal-glow: rgba(192, 192, 192, 0.16); }
.atlas-page .medal-card:nth-child(5) { --medal-accent: #d4af37; --medal-glow: rgba(212, 175, 55, 0.2); }
.atlas-page .medal-card:nth-child(6) { --medal-accent: #d4cfc9; --medal-glow: rgba(212, 207, 201, 0.16); }
.atlas-page .medal-card:nth-child(7) { --medal-accent: #82cedb; --medal-glow: rgba(130, 206, 219, 0.16); }

.atlas-page .medal-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: #fffaf8;
  margin: 0 0 5px;
  text-transform: none;
}

.atlas-page .medal-card p {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Long-form notes stack, one per row for a comfortable measure */
.atlas-page .prose-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ============================================================
   REPRESENTATIVES
   ============================================================ */

.atlas-page.representatives-page,
.atlas-page.cinematic-mode.representatives-page {
  background-color: var(--ink);
}

.atlas-page .representatives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 26px;
  max-width: none;
  margin: 0;
}

.atlas-page .rep-card,
.atlas-page.cinematic-mode .rep-card {
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: linear-gradient(165deg, rgba(27, 7, 7, 0.86) 0%, rgba(16, 3, 3, 0.86) 70%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  animation: atlasRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: border-color 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease;
}

.atlas-page .rep-card:hover,
.atlas-page.cinematic-mode .rep-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 175, 55, 0.4);
  background: linear-gradient(165deg, rgba(34, 9, 9, 0.9) 0%, rgba(19, 4, 4, 0.9) 70%);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 175, 55, 0.12);
}

.atlas-page .rep-photo-container,
.atlas-page.cinematic-mode .rep-photo-container {
  background: linear-gradient(135deg, #2a0505 0%, #0c0202 100%);
  border-bottom: 1px solid var(--line);
}

/* The decorative ring behind each portrait — dialled back to the library's restraint */
.atlas-page .rep-photo-container::before,
.atlas-page.cinematic-mode .rep-photo-container::before {
  background: linear-gradient(135deg, rgba(153, 4, 3, 0.55) 0%, rgba(26, 0, 0, 0.9) 100%);
}

.atlas-page .rep-name,
.atlas-page.cinematic-mode .rep-name {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 400;
  letter-spacing: 0.008em;
  color: #fffaf8;
}

.atlas-page .rep-position,
.atlas-page.cinematic-mode .rep-position {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.atlas-page .rep-education,
.atlas-page.cinematic-mode .rep-education,
.atlas-page .rep-work-position,
.atlas-page.cinematic-mode .rep-work-position {
  font-weight: 300;
  color: var(--text-dim);
}

.atlas-page .rep-bio,
.atlas-page.cinematic-mode .rep-bio {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.atlas-page .tag,
.atlas-page.cinematic-mode .tag {
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background-color: rgba(0, 0, 0, 0.32);
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.atlas-page .tag:hover,
.atlas-page.cinematic-mode .tag:hover {
  transform: none;
  border-color: rgba(212, 175, 55, 0.5);
  background-color: rgba(153, 4, 3, 0.28);
  color: var(--text);
}

.atlas-page .rep-appearances,
.atlas-page.cinematic-mode .rep-appearances {
  border-top: 1px solid var(--line-soft);
}

.atlas-page .appearance-title,
.atlas-page.cinematic-mode .appearance-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.atlas-page .appearance-link,
.atlas-page.cinematic-mode .appearance-link {
  color: var(--text-dim);
  font-weight: 300;
}

.atlas-page .appearance-link:hover,
.atlas-page.cinematic-mode .appearance-link:hover {
  color: var(--gold-soft);
}

.atlas-page .appearance-icon {
  color: var(--gold);
  opacity: 0.8;
}

.atlas-page .rep-contact,
.atlas-page.cinematic-mode .rep-contact {
  border-top: 1px solid var(--line-soft);
}

.atlas-page .contact-link,
.atlas-page.cinematic-mode .contact-link {
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background-color: rgba(0, 0, 0, 0.32);
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.atlas-page .contact-link:hover,
.atlas-page.cinematic-mode .contact-link:hover {
  border-color: rgba(212, 175, 55, 0.5);
  background-color: rgba(153, 4, 3, 0.35);
  color: var(--text);
  transform: translateY(-2px);
}

/* ============================================================
   EVENTS TIMELINE
   ============================================================ */

.atlas-page .events-timeline {
  padding: 0 0 20px;
  min-height: 0;
}

.atlas-page .event-card {
  margin-bottom: 72px;
  animation: atlasRise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.atlas-page .event-year {
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(27, 7, 7, 0.95) 0%, rgba(74, 0, 0, 0.8) 100%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--gold);
}

.atlas-page .event-content {
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: linear-gradient(165deg, rgba(27, 7, 7, 0.86) 0%, rgba(16, 3, 3, 0.86) 70%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  padding: 36px 34px 32px;
  transition: border-color 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease;
}

.atlas-page .event-content:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 175, 55, 0.12);
}

.atlas-page .event-title {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.005em;
  color: #fffaf8;
}

.atlas-page .event-theme {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 300;
  font-style: italic;
  color: var(--text-dim);
}

.atlas-page .event-meta {
  border-bottom: 1px solid var(--line-soft);
}

.atlas-page .meta-item {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.atlas-page .meta-item svg {
  color: var(--gold);
  opacity: 0.85;
}

.atlas-page .event-description {
  font-size: 14.5px;
  line-height: 1.75;
  font-weight: 300;
  color: var(--text-dim);
}

.atlas-page .event-highlights {
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--atlas-red-bright);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.26);
  padding: 22px 24px;
}

.atlas-page .event-highlights h3,
.atlas-page .event-sponsors h3,
.atlas-page .event-media h3 {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.atlas-page .event-highlights li {
  font-size: 14px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--text-dim);
}

.atlas-page .event-highlights li::before {
  color: var(--gold);
}

.atlas-page .event-highlights li strong {
  color: var(--text);
  font-weight: 600;
}

.atlas-page .event-sponsors {
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.26);
}

.atlas-page .event-sponsors p {
  font-size: 13.5px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--text-dim);
}

/* ---------- Media coverage: an index of sources, not a row of buttons ---------- */

.atlas-page .event-media {
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--gold);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.26);
  padding: 22px 24px 8px;
}

.atlas-page .media-links {
  gap: 0;
}

.atlas-page .media-link {
  gap: 13px;
  padding: 13px 4px;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: none;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.5;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.atlas-page .media-links .media-link:last-child {
  border-bottom: none;
}

.atlas-page .media-link svg {
  color: var(--gold);
  opacity: 0.75;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.atlas-page .media-link:hover {
  border-color: var(--line-soft);
  background: none;
  color: var(--gold-soft);
  transform: none;
  padding-left: 9px;
}

.atlas-page .media-link:hover svg {
  opacity: 1;
  transform: translate(1px, -1px);
}

/* ---------- Buttons ---------- */

.atlas-page .event-link,
.atlas-page .event-link-primary,
.atlas-page .cta-button {
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.32);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.atlas-page .event-link:hover,
.atlas-page .event-link-primary:hover,
.atlas-page .cta-button:hover {
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(153, 4, 3, 0.35);
  color: var(--text);
  transform: translateX(4px);
}

.atlas-page .event-link svg {
  color: var(--gold);
}

.atlas-page .event-impact {
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.26);
}

.atlas-page .impact-stat {
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: none;
}

/* Sans, not the serif: Cormorant's "1" is a bare stroke, so "11" reads as "II" */
.atlas-page .stat-number {
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--gold);
}

.atlas-page .stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.atlas-page .gallery-img {
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  filter: saturate(0.9) brightness(0.9);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease,
    border-color 0.4s ease, box-shadow 0.4s ease;
}

.atlas-page .gallery-img:hover {
  border-color: rgba(212, 175, 55, 0.45);
  filter: saturate(1) brightness(1);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.65);
}

.atlas-page .events-cta h2 {
  font-family: var(--serif);
  font-weight: 400;
  color: #fffaf8;
}

.atlas-page .events-cta > p {
  font-weight: 300;
  color: var(--text-dim);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .atlas-page .medal-grid,
  .atlas-page .representatives-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }

  .atlas-page .event-content { padding: 28px 24px 26px; }
}

@media (max-width: 560px) {
  .atlas-page .hero-emblems { gap: 22px; }
  .atlas-page .hero-emblem { height: 50px; }

  .atlas-page .medal-grid,
  .atlas-page .representatives-grid { grid-template-columns: 1fr; }

  .atlas-page .medal-card { padding: 20px 20px; gap: 16px; }
  .atlas-page .medal-card h3 { font-size: 20px; }

  .atlas-page .event-card { margin-bottom: 52px; }
}
