/* ============================================
   Галерея Российского Асфальта — 7tn.ru
   Dark museum aesthetic with gold accents
   ============================================ */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1e1e1e;
  --bg-card: #111111;
  --text-primary: #e8e4df;
  --text-secondary: #8a8580;
  --text-dim: #5a5550;
  --accent: #c9a96e;
  --accent-dim: #7a6a42;
  --accent-bright: #e0c088;
  --border: #2a2a2a;
  --border-light: #333;
  --overlay: rgba(0, 0, 0, 0.92);
  --font-heading: 'Georgia', 'Times New Roman', 'Palatino Linotype', serif;
  --font-body: 'Segoe UI', 'Roboto', system-ui, -apple-system, sans-serif;
  --max-width: 1400px;
  --nav-height: 64px;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--accent-bright);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.3;
}

/* ---- NAVIGATION ---- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.nav-logo svg {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav-burger span {
  width: 24px;
  height: 1.5px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}

/* ---- HERO ---- */

.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 50%, #151510 100%);
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(201, 169, 110, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(201, 169, 110, 0.04) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 24px;
}

.hero-label {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 6px 20px;
  margin-bottom: 40px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
  background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-style: italic;
  max-width: 600px;
  margin: 0 auto 48px;
}

.hero-cta {
  display: inline-block;
  padding: 14px 40px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: all 0.3s;
}

.hero-cta:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-dim);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ---- SECTIONS ---- */

.section {
  padding: 100px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-sm {
  padding: 60px 24px;
}

.section-full {
  padding: 100px 24px;
  max-width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-header .divider {
  width: 60px;
  height: 1px;
  background: var(--accent);
  margin: 20px auto;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: 0.95rem;
}

/* ---- FEATURED GRID (index page) ---- */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.featured-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.3s;
}

.featured-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.featured-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.6s;
}

.featured-card:hover img {
  transform: scale(1.03);
}

.featured-card-info {
  padding: 16px 20px;
}

.featured-card-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.featured-card-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---- GALLERY MASONRY ---- */

.gallery-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
  padding: 0 24px;
}

.filter-btn {
  padding: 8px 24px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.filter-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text-primary);
}

.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(201, 169, 110, 0.08);
}

.masonry {
  column-count: 4;
  column-gap: 16px;
  padding: 0 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.3s;
}

.masonry-item:hover {
  border-color: var(--accent-dim);
}

.masonry-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s;
}

.masonry-item:hover img {
  transform: scale(1.02);
}

.masonry-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 16px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  opacity: 0;
  transition: opacity 0.3s;
}

.masonry-item:hover .masonry-overlay {
  opacity: 1;
}

.masonry-overlay-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.masonry-overlay-meta {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ---- LIGHTBOX ---- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--overlay);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 10;
}

.lightbox-close:hover {
  color: var(--text-primary);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 80px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 10;
}

.lightbox-nav:hover {
  color: var(--accent);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-content {
  max-width: 90vw;
  max-height: 80vh;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  margin: 0 auto;
}

.lightbox-info {
  margin-top: 20px;
  text-align: center;
}

.lightbox-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.lightbox-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.lightbox-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 8px;
}

/* ---- ANNOUNCEMENT BAR ---- */

.announcement {
  background: linear-gradient(90deg, var(--bg-secondary), var(--bg-tertiary), var(--bg-secondary));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 40px 24px;
}

.announcement-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 12px;
}

.announcement h3 {
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.announcement p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ---- ABOUT PAGE ---- */

.about-intro {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

.curators {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.curator-card {
  padding: 32px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.curator-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.curator-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 16px;
}

.curator-bio {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

.partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  opacity: 0.4;
}

.partners span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

/* ---- EXHIBITIONS ---- */

.timeline {
  max-width: 800px;
  margin: 0 auto;
}

.timeline-item {
  padding: 32px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  margin-bottom: 20px;
  position: relative;
  transition: border-color 0.3s;
}

.timeline-item:hover {
  border-color: var(--accent-dim);
}

.timeline-item.upcoming {
  border-left: 2px solid var(--accent);
}

.timeline-item.past {
  opacity: 0.7;
}

.timeline-dates {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 8px;
}

.timeline-badge {
  display: inline-block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 3px 10px;
  border: 1px solid;
  margin-left: 12px;
}

.timeline-badge.upcoming {
  color: var(--accent);
  border-color: var(--accent-dim);
}

.timeline-badge.current {
  color: #6ecf8e;
  border-color: #3a7a4a;
}

.timeline-badge.past {
  color: var(--text-dim);
  border-color: var(--border);
}

.timeline-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ---- POEMS ---- */

.poems-collection {
  max-width: 700px;
  margin: 0 auto;
}

.poem {
  margin-bottom: 80px;
  text-align: center;
}

.poem-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  color: var(--accent);
}

.poem-body {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  line-height: 2;
  color: var(--text-secondary);
  white-space: pre-line;
}

.poem-attribution {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-style: italic;
}

.poem-divider {
  width: 40px;
  height: 1px;
  background: var(--accent-dim);
  margin: 0 auto;
}

/* ---- CONTACTS ---- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  padding: 32px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.contact-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 12px;
}

.contact-value {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.map-container {
  margin-top: 48px;
  border: 1px solid var(--border);
  overflow: hidden;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: 0;
  filter: grayscale(100%) invert(92%) contrast(83%);
}

/* ---- COUNTER STATS ---- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  text-align: center;
  padding: 60px 24px;
  max-width: 900px;
  margin: 0 auto;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

/* ---- FOOTER ---- */

.footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

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

.footer-links a {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ---- LOADING INDICATOR ---- */

.loader {
  text-align: center;
  padding: 40px;
  color: var(--text-dim);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.loader::after {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--accent-dim);
  margin: 16px auto 0;
  animation: loader-pulse 1.5s ease-in-out infinite;
}

@keyframes loader-pulse {
  0%, 100% { width: 30px; opacity: 0.3; }
  50% { width: 60px; opacity: 1; }
}

/* ---- PAGE HEADER (non-index pages) ---- */

.page-header {
  padding: 140px 24px 60px;
  text-align: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0 auto;
  font-style: italic;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 1400px) {
  .masonry { column-count: 3; }
}

@media (max-width: 1024px) {
  .masonry { column-count: 3; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-burger {
    display: flex;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .masonry { column-count: 2; }

  .section { padding: 60px 16px; }
  .page-header { padding: 120px 16px 40px; }

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

  .curators { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; }

  .gallery-filters { gap: 8px; }
  .filter-btn { padding: 6px 16px; font-size: 0.7rem; }
}

@media (max-width: 480px) {
  .masonry { column-count: 1; }

  .hero { min-height: 500px; }

  .featured-grid { grid-template-columns: 1fr; }
}

/* ---- QUOTE BLOCK ---- */

.quote-block {
  max-width: 700px;
  margin: 60px auto;
  padding: 40px;
  border-left: 2px solid var(--accent-dim);
  text-align: left;
}

.quote-text {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.quote-author {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---- UTILITY ---- */

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ============================================
   ANIMATIONS & EFFECTS
   ============================================ */

/* ---- GRAIN OVERLAY ---- */

.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ---- CUSTOM CURSOR ---- */

.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: difference;
}

.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s, opacity 0.3s;
  opacity: 0.5;
}

.cursor-dot.hover {
  width: 12px;
  height: 12px;
  background: var(--accent-bright);
}

.cursor-ring.hover {
  width: 50px;
  height: 50px;
  border-color: var(--accent-bright);
  opacity: 0.3;
}

/* ---- SCROLL REVEAL ANIMATIONS ---- */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.5s; }

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ---- ENTRANCE ANIMATIONS (hero elements) ---- */

.animate-in {
  opacity: 0;
  transform: translateY(30px);
  animation: animateIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

@keyframes animateIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- PARALLAX FLOAT ---- */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.float {
  animation: float 6s ease-in-out infinite;
}

/* ---- HERO PARTICLES ---- */

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-particles::before,
.hero-particles::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.3;
  animation: particle-drift 20s linear infinite;
}

.hero-particles::before {
  top: 20%;
  left: 30%;
  box-shadow:
    100px 50px 0 var(--accent),
    300px 150px 0 var(--accent),
    500px 80px 0 var(--accent),
    200px 300px 0 var(--accent),
    600px 200px 0 var(--accent),
    150px 400px 0 var(--accent),
    450px 350px 0 var(--accent),
    700px 100px 0 var(--accent);
}

.hero-particles::after {
  top: 60%;
  left: 60%;
  animation-delay: -10s;
  animation-duration: 25s;
  box-shadow:
    -100px -50px 0 var(--accent-dim),
    -300px -150px 0 var(--accent-dim),
    -200px 100px 0 var(--accent-dim),
    100px -200px 0 var(--accent-dim),
    -400px 50px 0 var(--accent-dim),
    50px 150px 0 var(--accent-dim);
}

@keyframes particle-drift {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(-50px, -80px) rotate(360deg); }
}

/* ---- MAGNETIC BUTTON EFFECT ---- */

.magnetic {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- GLITCH TEXT EFFECT (for headings) ---- */

.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch:hover::before {
  opacity: 0.8;
  color: var(--accent);
  animation: glitch-1 0.3s linear;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch:hover::after {
  opacity: 0.8;
  color: var(--accent-dim);
  animation: glitch-2 0.3s linear;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch-1 {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 3px); }
  40% { transform: translate(3px, -3px); }
  60% { transform: translate(-2px, 1px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

@keyframes glitch-2 {
  0% { transform: translate(0); }
  20% { transform: translate(3px, -3px); }
  40% { transform: translate(-3px, 3px); }
  60% { transform: translate(2px, -1px); }
  80% { transform: translate(-2px, 2px); }
  100% { transform: translate(0); }
}

/* ---- CATEGORY CARDS (index page) ---- */

.categories-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.category-card {
  padding: 40px 28px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  color: var(--text-primary);
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(201, 169, 110, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.4s;
}

.category-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-4px);
}

.category-card:hover::before {
  opacity: 1;
}

.category-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--accent-dim);
  opacity: 0.3;
  margin-bottom: 16px;
  transition: opacity 0.3s, color 0.3s;
}

.category-card:hover .category-number {
  opacity: 0.6;
  color: var(--accent);
}

.category-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 8px;
  transition: color 0.3s;
}

.category-card:hover h3 {
  color: var(--accent);
}

.category-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- LINE DRAWING ANIMATION (divider) ---- */

.divider {
  position: relative;
  overflow: hidden;
}

.reveal.visible .divider {
  animation: draw-line 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes draw-line {
  from { width: 0; }
  to { width: 60px; }
}

/* ---- SMOOTH IMAGE LOAD ---- */

.masonry-item img,
.featured-card img {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.masonry-item img.loaded,
.featured-card img.loaded {
  opacity: 1;
}

/* ---- NAV SCROLL EFFECT ---- */

.nav.scrolled {
  background: rgba(10, 10, 10, 0.98);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.5);
}

/* ---- COUNTER ANIMATION ---- */

.counter {
  display: inline-block;
  transition: transform 0.3s;
}

.counter.counting {
  transform: scale(1.05);
}

/* ---- HIDE CUSTOM CURSOR ON TOUCH DEVICES ---- */

@media (hover: none) and (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }
}

/* ---- SMOOTH PAGE TRANSITION ---- */

body {
  animation: pageIn 0.6s ease-out;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- LIGHTBOX ANIMATIONS ---- */

.lightbox {
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-content img {
  animation: lightbox-zoom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightbox-zoom {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ---- HOVER TILT EFFECT FOR CARDS ---- */

.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* ---- SCROLLBAR STYLING ---- */

::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dim);
}

/* ---- TEXT SELECTION ---- */

::selection {
  background: var(--accent);
  color: var(--bg-primary);
}
