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

:root {
  --cream: #f7f4ef;
  --white: #ffffff;
  --ink: #1a1a1a;
  --mid: #4a4a4a;
  --light: #888;
  --accent: #b8935a;
  --accent-dark: #9a7a48;
  --rule: #ddd8d0;
  --nav-h: 62px;
  --section-gap: 4rem;
  --max: 880px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.78;
  min-height: 100vh;
}

/* ── NAV ─────────────────────────────────────── */
nav {
  background: #fff;
  border-bottom: 1px solid var(--rule);
  height: var(--nav-h);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.wordmark {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark span { color: var(--accent); }

nav ul { list-style: none; display: flex; gap: 2rem; }

nav ul a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  text-decoration: none;
  transition: color 0.2s;
}

nav ul a:hover { color: var(--accent); }

nav ul a.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* ── HERO ─────────────────────────────────────── */
.hero {
  background: var(--ink);
  color: #fff;
  padding: 5.5rem 2rem 4.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 0%, rgba(184,147,90,0.12) 0%, transparent 65%);
  pointer-events: none;
}

.hero .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
  font-weight: 600;
}

.hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}

.hero .subtitle {
  font-size: 1rem;
  color: #aaa;
  max-width: 52ch;
  margin: 0 auto;
  font-weight: 300;
  line-height: 1.7;
}

.hero .cta-row {
  margin-top: 2.2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  border-radius: 2px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-dark); }

.btn-outline {
  background: transparent;
  color: #ccc;
  border: 1px solid #555;
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── LAYOUT ───────────────────────────────────── */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
}

section.block {
  padding: var(--section-gap) 0;
  border-bottom: 1px solid var(--rule);
}

section.block:last-child { border-bottom: none; }

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1.6rem;
  display: block;
}

h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1.2rem;
  color: var(--ink);
}

h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

p { margin-bottom: 1.25rem; color: var(--mid); }
p:last-child { margin-bottom: 0; }
strong { color: var(--ink); font-weight: 600; }
em { font-style: italic; }

a { color: var(--accent); }

/* ── STAT STRIP ───────────────────────────────── */
.stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.stat-item .number {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.stat-item .label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light);
  margin-top: 0.3rem;
}

/* ── TIMELINE ─────────────────────────────────── */
.timeline { position: relative; padding-left: 2rem; }

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0.5rem; bottom: 0;
  width: 1px;
  background: var(--rule);
}

.timeline-item { position: relative; margin-bottom: 2.4rem; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 0.55rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  outline: 3px solid var(--cream);
  box-shadow: 0 0 0 1px var(--accent);
}

.timeline-year {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

/* ── CREDITS GRID ─────────────────────────────── */
.credits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.credit-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule);
}

.credit-title {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
  display: block;
}

.credit-meta {
  font-size: 0.8rem;
  color: var(--light);
  display: block;
  margin-top: 0.1rem;
}

/* ── TV CREDITS TABLE ─────────────────────────── */
.tv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.tv-table thead th {
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--light);
  font-weight: 600;
  padding: 0 1rem 0.8rem 0;
  border-bottom: 1px solid var(--rule);
}

.tv-table tbody td {
  padding: 0.6rem 1rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--mid);
  vertical-align: top;
}

.tv-table tbody td:first-child { color: var(--ink); font-weight: 600; }
.tv-table tbody tr:last-child td { border-bottom: none; }
.tv-table tbody tr:hover td { background: rgba(184,147,90,0.04); }

/* ── FEATURE CARDS (homepage) ─────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.card {
  background: #fff;
  border: 1px solid var(--rule);
  padding: 1.8rem;
  transition: box-shadow 0.2s;
}

.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.06); }

.card-icon {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  border: 1px solid var(--accent);
  display: inline-block;
  padding: 0.25rem 0.5rem;
  margin-bottom: 1.1rem;
}

.card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.card p { font-size: 0.88rem; margin-bottom: 0; }

/* ── FEATURED PRODUCTIONS (homepage) ─────────── */
.prod-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.prod-item {
  background: var(--cream);
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.prod-name { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.prod-tag {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light);
  white-space: nowrap;
}

/* ── GALLERY GRID ─────────────────────────────── */
.gallery-note {
  background: #fff;
  border: 1px solid var(--rule);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--light);
  font-size: 0.9rem;
}

/* ── CONTACT ──────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-detail {
  margin-bottom: 1.5rem;
}

.contact-detail .label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.contact-detail .value {
  font-size: 1rem;
  color: var(--ink);
  font-weight: 400;
}

.contact-detail .value a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.2s;
}

.contact-detail .value a:hover { border-color: var(--accent); }

.social-links { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; }

.social-link {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  border: 1px solid var(--rule);
  padding: 0.4rem 0.9rem;
  transition: all 0.2s;
}

.social-link:hover { border-color: var(--accent); color: var(--accent); }

/* ── FOOTER ───────────────────────────────────── */
footer {
  background: var(--ink);
  color: #555;
  padding: 2.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

footer a { color: var(--accent); text-decoration: none; }
footer .footer-right { display: flex; gap: 1.5rem; }

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 700px) {
  nav ul { gap: 1rem; }
  nav ul a { font-size: 0.7rem; letter-spacing: 0.08em; }
  .card-grid { grid-template-columns: 1fr; }
  .credits-grid { grid-template-columns: 1fr; }
  .prod-list { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .tv-table .col-loc { display: none; }
  footer { flex-direction: column; text-align: center; }
  footer .footer-right { justify-content: center; }
}

/* ── SKIP LINK (accessibility) ───────────────── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  z-index: 999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── SOCIAL ICON BADGE ───────────────────────── */
.sicon {
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em;
  background: var(--ink);
  color: #fff !important;
  width: 2rem;
  height: 2rem;
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── HERO IMAGE HOVER ────────────────────────── */
.hero-split .hero-image:hover img { filter: grayscale(0%); }

/* ── FILM TABLE HIGHLIGHT ────────────────────── */
.film-table .highlight td { background: rgba(184,147,90,0.06); }

/* ═══════════════════════════════════════════════
   ENHANCEMENTS: dark mode · animations · map
   ═══════════════════════════════════════════════ */

/* ── DARK / LIGHT MODE TOGGLE ────────────────── */
.theme-toggle {
  background: none;
  border: 1px solid var(--rule);
  color: var(--light);
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* dark mode overrides */
[data-theme="dark"] {
  --cream: #111111;
  --white: #1c1c1c;
  --ink: #f0ede8;
  --mid: #aaa;
  --light: #666;
  --rule: #2a2a2a;
  --accent: #c9a46a;
  --accent-dark: #b8935a;
}
[data-theme="dark"] body   { background: #111; }
[data-theme="dark"] nav    { background: #161616; border-bottom-color: #2a2a2a; }
[data-theme="dark"] .card  { background: #1c1c1c; border-color: #2a2a2a; }
[data-theme="dark"] .event-tile { background: #1c1c1c; }
[data-theme="dark"] .event-tile:hover { background: #222; }
[data-theme="dark"] .wordmark { color: #f0ede8; }
[data-theme="dark"] footer { background: #0a0a0a; }
[data-theme="dark"] .timeline-item::before { outline-color: #111; }
[data-theme="dark"] .tv-table tbody td:first-child { color: #f0ede8; }
[data-theme="dark"] .film-table tbody td:first-child { color: #f0ede8; }
[data-theme="dark"] .gallery-cell { background: #1c1c1c; }
[data-theme="dark"] .gallery-cell .cell-label { background: #1c1c1c; }
[data-theme="dark"] .gravity-card { background: #0a0a0a; }
[data-theme="dark"] .contact-detail .val { color: #f0ede8; }
[data-theme="dark"] .contact-detail .val a { color: #f0ede8; border-bottom-color: #2a2a2a; }
[data-theme="dark"] h2, [data-theme="dark"] h3 { color: #f0ede8; }
[data-theme="dark"] strong { color: #f0ede8; }
[data-theme="dark"] .prod-name { color: #f0ede8; }

/* ── SCROLL ANIMATIONS ───────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* stagger children */
.reveal-group > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-group.visible > *:nth-child(1) { opacity:1; transform:none; transition-delay: 0s; }
.reveal-group.visible > *:nth-child(2) { opacity:1; transform:none; transition-delay: 0.1s; }
.reveal-group.visible > *:nth-child(3) { opacity:1; transform:none; transition-delay: 0.2s; }
.reveal-group.visible > *:nth-child(4) { opacity:1; transform:none; transition-delay: 0.3s; }
.reveal-group.visible > *:nth-child(5) { opacity:1; transform:none; transition-delay: 0.4s; }
.reveal-group.visible > *:nth-child(6) { opacity:1; transform:none; transition-delay: 0.5s; }

/* ── ANIMATED TIMELINE ───────────────────────── */
.timeline::before {
  height: 0;
  transition: height 1.2s ease;
  bottom: auto;
}
.timeline.timeline-drawn::before { height: calc(100% - 0.5rem); }

.timeline-item {
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}
.timeline-item::before {
  transform: scale(0);
  transition: transform 0.3s ease 0.3s;
}
.timeline-item.visible::before { transform: scale(1); }

/* ── WORLD MAP ───────────────────────────────── */
.map-section {
  background: var(--ink);
  padding: 4rem 0;
  overflow: hidden;
  position: relative;
}
[data-theme="dark"] .map-section { background: #0a0a0a; }

.map-section .section-label { color: var(--accent); }
.map-section h2 { color: #fff; margin-bottom: 0.5rem; }
.map-section p { color: #888; }
.map-section .container { position: relative; z-index: 1; }

#world-map {
  width: 100%;
  max-width: 860px;
  margin: 2rem auto 0;
  position: relative;
  display: block;
}

#world-map svg {
  width: 100%;
  height: auto;
  display: block;
}

#world-map svg path {
  fill: #2a2a2a;
  stroke: #1a1a1a;
  stroke-width: 0.5;
  transition: fill 0.3s;
}

.map-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(184,147,90,0.5);
  animation: pulse-dot 2.5s ease-out infinite;
  transition: transform 0.2s;
}
.map-dot:hover { transform: translate(-50%,-50%) scale(1.5); }

@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(184,147,90,0.5); }
  60%  { box-shadow: 0 0 0 8px rgba(184,147,90,0); }
  100% { box-shadow: 0 0 0 0 rgba(184,147,90,0); }
}

.map-tooltip {
  position: absolute;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 0.75rem;
  font-family: 'Barlow', sans-serif;
  padding: 0.4rem 0.75rem;
  border-radius: 2px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
  border-left: 2px solid var(--accent);
  transform: translate(-50%, -130%);
}
.map-tooltip.visible { opacity: 1; }

.map-legend {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.map-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #888;
  font-family: 'Barlow', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.map-dot-state {
  width: 4px;
  height: 4px;
  background: var(--accent);
  opacity: 0.65;
  animation: none !important;
  box-shadow: none;
}

.map-dot-state:hover {
  opacity: 1;
  transform: translate(-50%,-50%) scale(2) !important;
}

.map-legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ── STAT COUNTER ANIMATION ──────────────────── */
.stat-item .number[data-target] {
  transition: none;
}

/* ── MOBILE HAMBURGER ────────────────────────── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: all 0.3s;
}
[data-theme="dark"] .nav-toggle span { background: #f0ede8; }

@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  nav ul {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--rule);
    z-index: 99;
  }
  [data-theme="dark"] nav ul { background: #161616; }
  nav ul.open { display: flex; }
  nav ul li a {
    display: block;
    padding: 0.9rem 2rem;
    border-bottom: 1px solid var(--rule);
    font-size: 0.85rem;
  }
}

/* ═══════════════════════════════════════════════
   FILM CAROUSEL
   ═══════════════════════════════════════════════ */

.carousel-section {
  background: var(--ink);
  padding: 0;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid #111;
}

[data-theme="dark"] .carousel-section { background: #0a0a0a; }

.carousel-track-wrap {
  overflow: hidden;
  position: relative;
  padding: 2.5rem 0;
  /* fade edges */
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.carousel-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.5rem;
  width: max-content;
  min-width: 100%;
  animation: carousel-scroll 40s linear infinite;
  -webkit-animation: carousel-scroll 40s linear infinite;
  will-change: transform;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.carousel-track:hover { animation-play-state: paused; }

@keyframes carousel-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@-webkit-keyframes carousel-scroll {
  0%   { -webkit-transform: translateX(0); }
  100% { -webkit-transform: translateX(-50%); }
}

.carousel-card {
  position: relative;
  width: 130px;
  min-width: 130px;
  height: 195px;
  flex-shrink: 0;
  flex-grow: 0;
  overflow: hidden;
  border-radius: 3px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
  text-decoration: none;
}

.carousel-card:hover {
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
  z-index: 10;
}

.carousel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.85);
  transition: filter 0.3s ease;
}

.carousel-card:hover img { filter: brightness(1); }

.carousel-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 0.6rem 0.6rem;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.carousel-card:hover .carousel-card-overlay { opacity: 1; }

.carousel-card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: 0.02em;
  display: block;
}

.carousel-card-year {
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
  display: block;
}

.carousel-label {
  text-align: center;
  padding: 0 0 1.5rem;
}

.carousel-label span {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #555;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════
   BROADCASTER LOGO STRIP
   ═══════════════════════════════════════════════ */

.logo-strip {
  background: #fff;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 2rem 0;
  overflow: hidden;
}

[data-theme="dark"] .logo-strip {
  background: #1a1a1a;
  border-color: #2a2a2a;
}

.logo-strip-label {
  text-align: center;
  margin-bottom: 1.8rem;
}

.logo-strip-label span {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--light);
  font-weight: 600;
  font-family: 'Barlow', sans-serif;
}

.logo-track-wrap {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.logo-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3.5rem;
  width: max-content;
  min-width: 100%;
  animation: logo-scroll 35s linear infinite;
  -webkit-animation: logo-scroll 35s linear infinite;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.logo-track:hover { animation-play-state: paused; }

@keyframes logo-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@-webkit-keyframes logo-scroll {
  0%   { -webkit-transform: translateX(0); }
  100% { -webkit-transform: translateX(-50%); }
}

.logo-item {
  display: -webkit-flex;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  flex-grow: 0;
  opacity: 0.35;
  transition: opacity 0.3s;
  cursor: default;
  user-select: none;
}

.logo-item:hover { opacity: 0.7; }

.logo-item svg {
  height: 28px;
  width: auto;
  min-width: 40px;
  max-width: 160px;
  fill: var(--ink);
  overflow: visible;
}

[data-theme="dark"] .logo-item svg { fill: #f0ede8; }

.logo-item .logo-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  white-space: nowrap;
}

[data-theme="dark"] .logo-item .logo-text { color: #f0ede8; }

.logo-item .logo-text.italic { font-style: italic; }
.logo-item .logo-text.serif  {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════════
   HOMEPAGE TIMELINE
   ═══════════════════════════════════════════════ */

.home-timeline-section {
  background: var(--ink);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .home-timeline-section { background: #0a0a0a; }

.home-timeline-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(184,147,90,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.home-timeline-section .section-label { color: var(--accent); }
.home-timeline-section h2 { color: #fff; margin-bottom: 0.5rem; }
.home-timeline-section > .container > p { color: #888; margin-bottom: 3rem; }

.ht-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;
  gap: 0;
  position: relative; /* Required — contains the absolutely positioned line */
  isolation: isolate;
}

/* The line is absolutely positioned — never a grid item */
.ht-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #222;
  transform: translateX(-50%);
  z-index: 0;
}

.ht-line-fill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(to bottom, var(--accent), rgba(184,147,90,0.3));
  transition: height 1.4s ease;
}

.ht-line.drawn .ht-line-fill { height: 100%; }

.ht-item {
  padding: 0 2.5rem 3rem;
  position: relative;
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
  min-height: 80px;
}

.ht-item.left  {
  grid-column: 1;
  text-align: right;
  transform: translateX(-20px);
  padding-right: 3rem;
  position: relative;
  z-index: 1;
}
.ht-item.right {
  grid-column: 2;
  text-align: left;
  transform: translateX(20px);
  padding-left: 3rem;
  position: relative;
  z-index: 1;
}
.ht-item.visible { opacity: 1; transform: translateX(0); }

/* dot — vertically centred on the year label (0.68rem text × 1.4 line-height ≈ 0.95rem;
   half = ~0.475rem; minus half dot height 5px ≈ 0.16rem → use 0.2rem for clean optical centre) */
.ht-item::after {
  content: '';
  position: absolute;
  top: 0.2rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  outline: 3px solid var(--ink);
  box-shadow: 0 0 0 1px var(--accent);
  transform: scale(0);
  transition: transform 0.35s ease 0.3s;
  z-index: 3;
}

[data-theme="dark"] .ht-item::after { outline-color: #0a0a0a; }

.ht-item.visible::after { transform: scale(1); }
/* Dots sit right on the centre line */
.ht-item.left::after  { right: calc(3rem - 9px); }
.ht-item.right::after { left:  calc(3rem - 9px); }

.ht-year {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  font-family: 'Barlow', sans-serif;
  line-height: 1.4;
  /* pull year text away from the dot so it can never overlap,
     regardless of year string length */
  padding-right: calc(3rem - 9px + 0.75rem); /* left-side items */
  margin-bottom: 0.55rem;
  display: block;
}

/* right-side items: clearance on the left */
.ht-item.right .ht-year {
  padding-right: 0;
  padding-left: calc(3rem - 9px + 0.75rem);
}

.ht-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  display: block;
}

.ht-body {
  font-size: 0.88rem;
  color: #888;
  line-height: 1.65;
  font-family: 'Barlow', sans-serif;
}

.ht-tag {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(184,147,90,0.35);
  padding: 0.2rem 0.6rem;
  font-weight: 600;
  font-family: 'Barlow', sans-serif;
}

/* placeholder cells for alignment */
.ht-empty {
  padding: 0;
  min-height: 80px;
  position: relative;
  z-index: 1;
}

/* mobile */
@media (max-width: 640px) {
  .ht-grid {
    grid-template-columns: 1fr !important;
  }
  .ht-line {
    left: 1.5rem !important;
  }
  .ht-item.left,
  .ht-item.right {
    grid-column: 1 !important;
    text-align: left !important;
    padding: 0 1rem 2.5rem 3.5rem !important;
    transform: translateX(0) translateX(20px) !important;
  }
  .ht-item.left::after,
  .ht-item.right::after {
    left: 0.9rem !important;
    right: auto !important;
    top: 0.2rem !important;
  }
  .ht-item.left .ht-year,
  .ht-item.right .ht-year {
    padding-right: 0 !important;
    padding-left: 0 !important;
  }
  .ht-empty { display: none !important; }
}
