@import url("../assets/fonts/fonts.css");

:root {
  --bg-color: #050505;
  --text-color: #f5f5f5;
  --muted-text: #b3b3b3;
  --border-color: #ffffff;
  --font-title: "Forum", serif;
  --font-body:
    "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --header-height: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
}

body {
  min-height: 100vh;
}

.preloader {
  position: fixed;
  inset: 0;
  background: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: opacity 0.4s ease;
}

.preloader-hidden {
  opacity: 0;
  pointer-events: none;
}

.preloader-inner {
  width: min(420px, 80vw);
}

.preloader-title {
  font-family: var(--font-title);
  font-size: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
  font-weight: 400;
}

.preloader-bar {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.preloader-bar-fill {
  width: 0%;
  height: 100%;
  background: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.8);
  transition: width 0.15s ease-out;
}

.preloader-perc {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted-text);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(5, 5, 5, 0.64);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(5px) saturate(1.08);
  z-index: 10;
}

.logo {
  font-family: var(--font-title);
  font-size: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.1;
  font-weight: 400;
}

.main-nav {
  display: flex;
  gap: 16px;
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text-color);
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.nav-link:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background-color: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  border-color: var(--border-color);
}

main {
  padding: calc(var(--header-height) + 40px) 40px 40px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-color);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.btn-outline:hover {
  background-color: #ffffff;
  color: #000000;
}

.btn-inline {
  margin-top: 16px;
}

.content-section {
  margin-top: 120px;
  max-width: 760px;
  position: relative;
  z-index: 6;
}

.section-title {
  font-family: var(--font-title);
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 24px;
  font-weight: 400;
}

.section-text {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted-text);
  margin: 0;
}

.info-title {
  font-family: var(--font-title);
  font-size: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 12px;
  font-weight: 400;
}

.info-text {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-text);
  margin: 0 0 20px;
}

.cursor-light {
  position: fixed;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.cursor-light::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    0 0 18px rgba(255, 255, 255, 1),
    0 0 40px rgba(160, 200, 255, 0.9),
    0 0 80px rgba(160, 200, 255, 0.6),
    0 0 140px rgba(255, 190, 140, 0.45);
  filter: blur(2px);
  mix-blend-mode: screen;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px 40px 24px;
  margin-top: 80px;
  position: relative;
  z-index: 5;
  background: rgba(5, 5, 5, 0.82);
  backdrop-filter: blur(10px);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--muted-text);
}

@media (max-width: 1200px) {
  .logo {
    display: none;
  }

  .site-header {
    justify-content: center;
  }

  .main-nav {
    margin: 0 auto;
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 1024px) {
  main {
    padding: calc(var(--header-height) + 32px) 24px 32px;
  }

  .site-header {
    padding: 0 24px;
  }
}

@media (max-width: 768px) {
  .main-nav {
    gap: 10px;
  }

  .nav-link {
    font-size: 14px;
    padding: 6px 10px;
  }

  .section-title {
    font-size: 28px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .main-nav {
    width: 100%;
    justify-content: center;
  }
}

/* Catalogue and navigation additions follow the existing museum styling. */
.logo { color: inherit; text-decoration: none; }
.section-link { color: inherit; text-decoration: none; }
.section-link:hover { border-color: rgba(255,255,255,.6); }
.artwork-details { margin: 16px 0 20px; font-size: 14px; line-height: 1.6; }
.artwork-details > div { display: grid; grid-template-columns: 85px minmax(0,1fr); gap: 12px; margin-bottom: 8px; }
.artwork-details dt { color: var(--muted-text); }
.artwork-details dd { margin: 0; }
.info-sub { color: var(--muted-text); font-size: 14px; line-height: 1.5; margin: 14px 0 0; }
.sculpture-info .info-content { max-height: 65dvh; overflow-y: auto; }
.sculpture-info .info-title { line-height: 1.25 !important; }
@media (max-width: 640px) {
  :root { --header-height: 96px; }
  .main-nav { gap: 6px; align-content: center; }
  .nav-link { font-size: 13px; padding: 6px 9px; }
  .page-sculpture #btn-back { top: calc(var(--header-height) + 12px); }
  .page-exhibition #btn-exit-exhibition,
  .page-exhibition #btn-switch-hall { top: calc(var(--header-height) + 12px); }
}

.back-to-top {
  position: fixed;
  right: 28px;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 17px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.84);
  color: var(--text-color);
  font: 500 14px/1 var(--font-body);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s, background-color 0.2s, color 0.2s;
  backdrop-filter: blur(8px);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #fff;
  color: #000;
}

.back-to-top svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-to-top:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

@media (max-width: 640px) {
  .back-to-top {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    min-height: 42px;
    padding: 0 14px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
}

html { scrollbar-gutter: stable; }
.site-header .main-nav { flex-shrink: 0; }
.site-header .nav-link { white-space: nowrap; }
