/* ============================================================
   HOROLIO — Luxury Watch Newsletter
   Dark theme · Gold accents · Refined typography
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #1a1a1a;
  --gold: #c9a96e;
  --gold-bright: #d4af37;
  --gold-dim: rgba(201, 169, 110, 0.6);
  --text-white: #f0ece4;
  --text-muted: #8a8578;
  --text-dim: #5a564d;
  --border-subtle: rgba(201, 169, 110, 0.15);
  --border-hover: rgba(201, 169, 110, 0.45);
  --font-serif: 'Cormorant Garamond', 'Georgia', serif;
  --font-sans: 'DM Sans', 'Helvetica Neue', sans-serif;
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-white);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Grain Overlay --- */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* --- Fade-in Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 56vh;
  min-height: 380px;
  max-height: 600px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.45;
  filter: saturate(0.55) brightness(0.8);
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.05) 0%,
    rgba(10, 10, 10, 0.15) 45%,
    rgba(10, 10, 10, 0.7) 78%,
    rgba(10, 10, 10, 1) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px 48px;
}

.hero-content--bottom {
  align-self: flex-end;
}

.hero-wordmark {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: 0.35em;
  color: var(--text-white);
  margin-bottom: 16px;
  line-height: 1;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  color: var(--gold);
  letter-spacing: 0.06em;
  opacity: 0.9;
}

/* ============================================================
   STICKY NAV
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.site-nav-inner {
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 18px 32px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s var(--ease-smooth);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease-smooth);
}

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

.nav-link:hover::after {
  width: 60%;
}

.nav-link--active {
  color: var(--gold);
}

.nav-link--active::after {
  width: 60%;
}

/* ============================================================
   PAGE SECTIONS (hash routing)
   ============================================================ */
.page-section {
  display: none;
}

.page-section--active {
  display: block;
}

/* ============================================================
   NEWS SECTION
   ============================================================ */
.news-section {
  padding: 10px 0 100px;
  background: var(--bg-primary);
}

.section-header {
  text-align: center;
  margin-bottom: 36px;
  opacity: 1 !important;
  transform: none !important;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--text-white);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.section-subtitle {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.section-date {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section-divider {
  width: 60px;
  height: 1px;
  background: var(--gold-dim);
  margin: 24px auto 0;
}

/* --- Articles Grid --- */
.articles-date {
  text-align: center;
  margin-bottom: 28px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  transition: opacity 0.25s var(--ease-smooth);
}

/* --- Article Card --- */
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.4s var(--ease-smooth),
              border-color 0.4s var(--ease-smooth),
              box-shadow 0.4s var(--ease-smooth);
  cursor: pointer;
}

.article-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(201, 169, 110, 0.08),
              0 4px 16px rgba(0, 0, 0, 0.4);
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
  background: #151515;
}

.card-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-smooth), filter 0.6s var(--ease-smooth);
  filter: saturate(0.85) brightness(0.9);
}

.article-card:hover .card-image-wrapper img {
  transform: scale(1.04);
  filter: saturate(1) brightness(1);
}

.card-body {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-publication {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.card-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.35;
  color: var(--text-white);
  margin-bottom: 12px;
  transition: color 0.3s var(--ease-smooth);
}

.article-card:hover .card-title {
  color: var(--gold);
}

.card-summary {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* --- Articles Disclaimer --- */
.articles-disclaimer {
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  margin-top: 48px;
  line-height: 1.7;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   QUOTE BREAK
   ============================================================ */
.quote-break {
  padding: 64px 0;
  background: var(--bg-primary);
  border-top: 1px solid rgba(201, 169, 110, 0.08);
  border-bottom: 1px solid rgba(201, 169, 110, 0.08);
}

.quote-break-inner {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.quote-rule {
  width: 40px;
  height: 1px;
  background: var(--gold-dim);
  margin: 0 auto;
}

.quote-break-text {
  padding: 32px 0;
}

.quote-break-text p {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--text-white);
  line-height: 1.6;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.quote-break-text cite {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================
   YOUTUBE SECTION
   ============================================================ */
.youtube-section {
  padding: 80px 0 100px;
  background: var(--bg-secondary);
}

.youtube-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.yt-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.4s var(--ease-smooth),
              border-color 0.4s var(--ease-smooth),
              box-shadow 0.4s var(--ease-smooth);
  cursor: pointer;
}

.yt-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(201, 169, 110, 0.08),
              0 4px 16px rgba(0, 0, 0, 0.4);
}

.yt-thumb-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: #151515;
}

.yt-thumb-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-smooth), filter 0.6s var(--ease-smooth);
  filter: saturate(0.85) brightness(0.9);
}

.yt-card:hover .yt-thumb-wrapper img {
  transform: scale(1.04);
  filter: saturate(1) brightness(1);
}

.yt-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(10, 10, 10, 0.7);
  border: 2px solid rgba(201, 169, 110, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth);
  z-index: 1;
}

.yt-card:hover .yt-play-icon {
  background: rgba(201, 169, 110, 0.2);
  border-color: var(--gold);
}

.yt-play-icon::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-left: 16px solid var(--gold);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
}

.yt-body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.yt-channel {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.yt-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--text-white);
  transition: color 0.3s var(--ease-smooth);
}

.yt-card:hover .yt-title {
  color: var(--gold);
}

/* --- Refresh Button --- */
.yt-refresh-wrapper {
  text-align: center;
  margin-top: 40px;
}

.yt-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.3s var(--ease-smooth),
              background 0.3s var(--ease-smooth),
              color 0.3s var(--ease-smooth);
}

.yt-refresh-btn:hover {
  border-color: var(--gold);
  background: rgba(201, 169, 110, 0.08);
}

.yt-refresh-btn .refresh-icon {
  transition: transform 0.4s var(--ease-smooth);
}

.yt-refresh-btn:hover .refresh-icon {
  transform: rotate(180deg);
}

.yt-refresh-btn.loading .refresh-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* YouTube skeleton */
.yt-skeleton {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
}

/* ============================================================
   INLINE SUBSCRIBE (below date)
   ============================================================ */
.subscribe-inline {
  margin-top: 6px;
  margin-bottom: 4px;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

.beehiiv-embed-wrapper {
  max-width: 440px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 4px;
  min-height: 50px;
  opacity: 1 !important;
  visibility: visible !important;
}

.beehiiv-subscribe-frame {
  width: 100%;
  height: 52px;
  border: none;
  background: transparent;
  max-width: 100%;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

/* Fallback label hidden on desktop, shown on mobile */
.fallback-subscribe-label {
  display: none;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-top: 16px;
  margin-bottom: 8px;
  text-align: center;
}

/* Fallback form hidden on desktop, shown on mobile */
.subscribe-form-fallback {
  display: none;
  margin-bottom: 8px;
}

.subscribe-form {
  margin-bottom: 16px;
}

.form-row {
  display: flex;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.3s var(--ease-smooth);
}

.form-row:focus-within {
  border-color: var(--gold);
}

.subscribe-input {
  flex: 1;
  padding: 16px 20px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-white);
  background: var(--bg-card);
  border: none;
  outline: none;
}

.subscribe-input::placeholder {
  color: var(--text-dim);
}

.subscribe-btn {
  padding: 16px 32px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg-primary);
  background: var(--gold);
  border: none;
  cursor: pointer;
  transition: background 0.3s var(--ease-smooth), color 0.3s var(--ease-smooth);
  white-space: nowrap;
}

.subscribe-btn:hover {
  background: var(--gold-bright);
}

/* --- Desktop/Mobile subscribe toggle --- */
/* Removed — using single beehiiv iframe for all screen sizes */

.subscribe-note {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* ============================================================
   PUBLICATIONS STRIP
   ============================================================ */
.publications-strip {
  padding: 48px 0;
  border-top: 1px solid rgba(201, 169, 110, 0.08);
  background: var(--bg-primary);
}

.publications-label {
  text-align: center;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 20px;
}

.publications-scroll {
  overflow: hidden;
  position: relative;
}

.publications-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 6px;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.pub-dot {
  color: rgba(201, 169, 110, 0.3);
  font-size: 1rem;
  line-height: 1;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding: 48px 0 40px;
  border-top: 1px solid rgba(201, 169, 110, 0.06);
  background: var(--bg-primary);
  text-align: center;
}

.footer-wordmark {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 1.3rem;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.footer-tagline {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.footer-links a {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--gold-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.3s var(--ease-smooth);
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-dot {
  color: rgba(201, 169, 110, 0.3);
  font-size: 0.8rem;
}

.footer-legal {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: rgba(90, 86, 77, 0.6);
  letter-spacing: 0.02em;
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .youtube-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .youtube-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .archive-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .filter-bar {
    overflow-x: visible;
  }

  .filter-group-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .filter-group-pills::-webkit-scrollbar {
    display: none;
  }

  .archive-tab {
    padding: 9px 18px;
    font-size: 0.66rem;
  }

  .archive-section {
    padding: 60px 0 70px;
  }

  .hero {
    height: 50vh;
    min-height: 320px;
  }

  .hero-wordmark {
    letter-spacing: 0.25em;
  }

  .news-section {
    padding: 60px 0 70px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .card-body {
    padding: 20px 20px 24px;
  }

  .card-title {
    font-size: 1.1rem;
  }

  .form-row {
    flex-direction: column;
    border-radius: 4px;
  }

  .subscribe-input {
    border-bottom: 1px solid var(--border-subtle);
    text-align: center;
  }

  .subscribe-btn {
    padding: 16px 20px;
  }

  .beehiiv-embed-wrapper {
    display: block !important;
    max-width: 100%;
  }

  .beehiiv-subscribe-frame {
    height: 52px;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .youtube-section {
    padding: 60px 0 70px;
  }
}

@media (max-width: 480px) {
  .hero-wordmark {
    font-size: 2.4rem;
    letter-spacing: 0.2em;
  }

  .hero-tagline {
    font-size: 0.9rem;
  }

  .container {
    padding: 0 16px;
  }

  .card-body {
    padding: 16px 16px 20px;
  }

  .card-title {
    font-size: 1rem;
  }

  .card-summary {
    font-size: 0.82rem;
  }

  .publications-track {
    font-size: 0.65rem;
    gap: 6px 4px;
  }

  .yt-body {
    padding: 16px 16px 20px;
  }

  .yt-title {
    font-size: 0.95rem;
  }
}

/* ============================================================
   LOADING SKELETONS
   ============================================================ */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.article-skeleton,
.yt-skeleton {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
}

.skeleton-image {
  width: 100%;
  padding-top: 56.25%;
  background: linear-gradient(90deg, #1a1a1a 25%, #242424 50%, #1a1a1a 75%);
  background-size: 800px 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

.skeleton-body {
  padding: 24px;
}

.skeleton-line {
  height: 14px;
  border-radius: 3px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #1a1a1a 25%, #242424 50%, #1a1a1a 75%);
  background-size: 800px 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

.skeleton-line.short { width: 30%; }
.skeleton-line.long { width: 90%; height: 18px; }
.skeleton-line.medium { width: 70%; }

/* ============================================================
   TAG FILTER BAR
   ============================================================ */
.filter-bar-wrapper {
  margin-bottom: 40px;
  text-align: center;
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.3s var(--ease-smooth),
              border-color 0.3s var(--ease-smooth),
              background 0.3s var(--ease-smooth);
  margin-bottom: 0;
}

.filter-toggle:hover {
  color: var(--gold);
  border-color: var(--border-hover);
  background: rgba(201, 169, 110, 0.05);
}

.filter-toggle.open {
  color: var(--gold);
  border-color: var(--gold);
  margin-bottom: 16px;
}

.filter-toggle-arrow {
  font-size: 0.6rem;
  display: inline-block;
  transition: transform 0.3s var(--ease-smooth);
}

.filter-toggle.open .filter-toggle-arrow {
  transform: rotate(180deg);
}

.filter-bar-hidden {
  display: none !important;
}

.filter-bar-visible {
  display: block !important;
}

.filter-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 16px 8px 8px;
  max-width: 800px;
  margin: 0 auto;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.3s var(--ease-smooth),
              border-color 0.3s var(--ease-smooth),
              background 0.3s var(--ease-smooth);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.filter-pill:hover {
  color: var(--gold);
  border-color: var(--border-hover);
}

.filter-pill.active {
  color: var(--bg-primary);
  background: var(--gold);
  border-color: var(--gold);
}

.filter-pill.active:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--bg-primary);
}

.filter-pill .pill-count {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.58rem;
  opacity: 0.6;
}

/* --- Grouped filter sections --- */
.filter-group {
  width: 100%;
  text-align: left;
  margin-bottom: 12px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group-label {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 8px;
  padding: 0 4px;
  display: block;
}

.filter-group-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 4px;
}

/* ============================================================
   ARCHIVE SECTION
   ============================================================ */
.archive-section {
  padding: 80px 0 100px;
  background: var(--bg-primary);
  border-top: 1px solid rgba(201, 169, 110, 0.08);
}

.archive-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 48px;
}

.archive-tab {
  padding: 10px 28px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: color 0.3s var(--ease-smooth),
              border-color 0.3s var(--ease-smooth),
              background 0.3s var(--ease-smooth);
}

.archive-tab:first-child {
  border-radius: 4px 0 0 4px;
}

.archive-tab:last-child {
  border-radius: 0 4px 4px 0;
}

.archive-tab:not(:first-child) {
  border-left: none;
}

.archive-tab:hover {
  color: var(--gold);
  border-color: var(--border-hover);
}

.archive-tab:hover + .archive-tab {
  border-left-color: var(--border-hover);
}

.archive-tab.active {
  color: var(--bg-primary);
  background: var(--gold);
  border-color: var(--gold);
}

.archive-tab.active + .archive-tab {
  border-left-color: var(--gold);
}

/* Archive Grid */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  transition: opacity 0.25s var(--ease-smooth);
}

/* Archive Card */
.archive-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.4s var(--ease-smooth),
              border-color 0.4s var(--ease-smooth),
              box-shadow 0.4s var(--ease-smooth);
  cursor: pointer;
}

.archive-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: 0 10px 32px rgba(201, 169, 110, 0.07),
              0 3px 12px rgba(0, 0, 0, 0.35);
}

.archive-card .card-image-wrapper {
  padding-top: 56.25%;
}

.archive-card .card-body {
  padding: 20px 20px 22px;
}

.archive-card .card-publication {
  font-size: 0.62rem;
  margin-bottom: 8px;
}

.archive-card .card-title {
  font-size: 1.02rem;
  margin-bottom: 10px;
}

.archive-card .card-summary {
  font-size: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.archive-card:hover .card-title {
  color: var(--gold);
}

.archive-card:hover .card-image-wrapper img {
  transform: scale(1.04);
  filter: saturate(1) brightness(1);
}

/* Date badge on archive cards */
.archive-date-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(201, 169, 110, 0.08);
  border: 1px solid rgba(201, 169, 110, 0.12);
  border-radius: 3px;
  padding: 3px 8px;
  margin-bottom: 10px;
}

/* Tag pills on archive cards */
.archive-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
  padding-top: 12px;
}

.archive-tag-pill {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid rgba(201, 169, 110, 0.12);
  border-radius: 100px;
  padding: 2px 8px;
}

/* Archive note */
.archive-note {
  text-align: center;
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-top: 40px;
}

/* --- Selection Color --- */
::selection {
  background: rgba(201, 169, 110, 0.3);
  color: var(--text-white);
}

/* --- Scrollbar (Webkit) --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 110, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 169, 110, 0.35);
}
