/* Shared visual identity for The Norse */
:root {
  --bg: #070b0f;
  --card: #111820;
  --text: #f2eee4;
  --muted: #a9afb3;
  --accent: #d0aa68;
  --accent-bright: #ebc980;
  --accent-dark: #76582d;
  --ice: #91aeb8;
  --glass: rgba(255, 255, 255, .045);
  --bd: rgba(208, 170, 104, .16);
  --norse-shadow: 0 22px 60px rgba(0, 0, 0, .42);
}

html {
  color-scheme: dark;
  background: #05080b;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background:
    radial-gradient(circle at 9% 8%, rgba(68, 101, 112, .15), transparent 27rem),
    radial-gradient(circle at 90% 35%, rgba(208, 170, 104, .08), transparent 32rem),
    linear-gradient(180deg, #071017 0%, #090e13 45%, #060a0e 100%) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(30deg, transparent 49%, rgba(208, 170, 104, .11) 50%, transparent 51%),
    linear-gradient(150deg, transparent 49%, rgba(145, 174, 184, .07) 50%, transparent 51%);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at center, #000, transparent 78%);
}

::selection { color: #090b0d; background: var(--accent-bright); }

* { scrollbar-width: thin; scrollbar-color: var(--accent-dark) #090d11; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: #090d11; }
*::-webkit-scrollbar-thumb { background: linear-gradient(var(--accent-dark), var(--accent)); border: 2px solid #090d11; border-radius: 20px; }

h1, h2, h3, .title, .page-title, .brand h1 {
  text-wrap: balance;
}

a, button { -webkit-tap-highlight-color: transparent; }

/* Consistent Norse lettering for navigation and interactive controls */
.nav-link,
button,
.btn,
.btn-primary,
.btn-hero,
.filter-btn,
.lang-btn,
.lang-pill,
.crumb {
  font-family: 'MedievalSharp', cursive !important;
  letter-spacing: .035em;
}

/* Header and navigation */
.site-header {
  height: 72px;
  background: linear-gradient(90deg, rgba(5, 9, 12, .94), rgba(12, 18, 23, .88), rgba(5, 9, 12, .94)) !important;
  border-bottom: 1px solid rgba(208, 170, 104, .22) !important;
  box-shadow: 0 10px 35px rgba(0, 0, 0, .3), inset 0 -1px rgba(255, 255, 255, .025);
  backdrop-filter: blur(16px) saturate(120%) !important;
}

.site-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  opacity: .65;
  background: linear-gradient(90deg, transparent 4%, var(--accent-dark), var(--accent), var(--accent-dark), transparent 96%);
}

.brand {
  min-height: 100%;
  align-items: center !important;
}

.brand img {
  display: block;
  width: 58px !important;
  height: 58px !important;
  padding: 0 !important;
  object-fit: contain;
  object-position: center;
  background: transparent !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
}

.brand h1 {
  color: var(--accent-bright) !important;
  font-size: 1.28rem !important;
  letter-spacing: .07em !important;
  text-shadow: 0 0 22px rgba(208, 170, 104, .25);
}

.nav-link {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 10px !important;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease !important;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: 3px;
  left: 50%;
  height: 1px;
  background: var(--accent);
  transition: right .22s ease, left .22s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--text) !important;
  background: linear-gradient(180deg, rgba(208, 170, 104, .11), rgba(208, 170, 104, .035)) !important;
  border-color: rgba(208, 170, 104, .18);
}

.nav-link:hover { transform: translateY(-1px); }
.nav-link:hover::after, .nav-link.active::after { right: 18%; left: 18%; }

.lang-pill, .language-switcher .lang-pill {
  color: var(--accent-bright) !important;
  background: linear-gradient(145deg, rgba(208, 170, 104, .12), rgba(6, 10, 14, .76)) !important;
  border-color: rgba(208, 170, 104, .34) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .04);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.lang-pill:hover, .language-switcher .lang-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(235, 201, 128, .65) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .38), 0 0 20px rgba(208, 170, 104, .08);
}

.lang-menu {
  background: rgba(7, 12, 16, .96) !important;
  border-color: rgba(208, 170, 104, .28) !important;
  box-shadow: var(--norse-shadow) !important;
}

.lang-menu [role="option"]:hover { color: var(--accent-bright) !important; background: rgba(208, 170, 104, .1) !important; }

/* Homepage hero */
#home::before {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(4, 8, 11, .18), rgba(3, 6, 9, .88) 78%),
    linear-gradient(180deg, rgba(3, 6, 9, .16), rgba(3, 7, 10, .88)) !important;
}

#home::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: 84px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, #080d11);
}

#home .hero-content::before {
  content: "ᚦ  ·  ᚱ  ·  ᛟ";
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: clamp(.9rem, 2vw, 1.15rem);
  letter-spacing: .42em;
  text-shadow: 0 0 18px rgba(208, 170, 104, .42);
}

#home #home-title,
#home #home-title .gold-glow {
  color: var(--accent-bright) !important;
  font-size: clamp(2.7rem, 7vw, 5.6rem) !important;
  letter-spacing: .025em;
  line-height: 1;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, .55),
    0 0 8px rgba(235, 201, 128, .62),
    0 0 24px rgba(208, 170, 104, .4),
    0 0 52px rgba(208, 170, 104, .2) !important;
}

#home #home-title .gold-glow { font: inherit; }

#home #home-title::after {
  content: "";
  display: block;
  width: min(260px, 46vw);
  height: 2px;
  margin: 24px auto 20px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 14px rgba(208, 170, 104, .35);
}

#home #hero-sub {
  max-width: 760px;
  color: #c7c9c6 !important;
  font-size: clamp(1rem, 2vw, 1.2rem) !important;
  line-height: 1.7;
  text-shadow: 0 2px 12px #000;
}

/* Homepage content panels */
.about-grid {
  position: relative;
  margin-top: 58px !important;
  margin-bottom: 58px !important;
  padding: clamp(24px, 4vw, 46px) !important;
  border: 1px solid rgba(208, 170, 104, .17);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
  box-shadow: var(--norse-shadow), inset 0 1px rgba(255, 255, 255, .035);
}

.about-grid::before, #map-section::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 8%;
  width: 34%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

#about h2, #map-section > h2 {
  color: var(--accent-bright) !important;
  font-family: 'MedievalSharp', cursive;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: .025em;
  text-shadow: 0 0 25px rgba(208, 170, 104, .13);
}

.about-text-col p { font-size: 1.01rem; line-height: 1.82 !important; }

.slideshow {
  border-color: rgba(208, 170, 104, .24) !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 65px rgba(0, 0, 0, .5), 0 0 0 5px rgba(208, 170, 104, .025) !important;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.slideshow:hover {
  transform: translateY(-4px);
  border-color: rgba(208, 170, 104, .5) !important;
  box-shadow: 0 30px 75px rgba(0, 0, 0, .55), 0 0 30px rgba(208, 170, 104, .08) !important;
}

#map-section {
  position: relative;
  margin-top: 42px !important;
  margin-bottom: 72px !important;
  padding: clamp(24px, 4vw, 42px) !important;
  border: 1px solid rgba(208, 170, 104, .15) !important;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)) !important;
  box-shadow: var(--norse-shadow);
}

#map {
  border-color: rgba(208, 170, 104, .28) !important;
  border-radius: 18px !important;
  box-shadow: 0 22px 55px rgba(0, 0, 0, .5), inset 0 0 35px rgba(0, 0, 0, .28);
}

.lang-btn, .filter-btn {
  border: 1px solid rgba(208, 170, 104, .16) !important;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.lang-btn:hover, .filter-btn:hover { color: var(--text); border-color: rgba(208, 170, 104, .42) !important; transform: translateY(-1px); }
.lang-btn[aria-pressed="true"], .filter-btn.active { background: linear-gradient(135deg, var(--accent-bright), #ae8446) !important; box-shadow: 0 8px 24px rgba(208, 170, 104, .16); }

/* Gallery */
body > main {
  position: relative;
}

.page-head {
  position: relative;
  margin-bottom: 28px !important;
  padding: 24px 0 22px;
  border-bottom: 1px solid rgba(208, 170, 104, .14);
}

.page-head::before { content: "ᚷ  ᚨ  ᛚ"; display: block; margin-bottom: 8px; color: var(--accent-dark); font-size: .78rem; letter-spacing: .55em; }

.page-title {
  color: var(--accent-bright) !important;
  font-size: clamp(2.45rem, 6vw, 4.2rem) !important;
  letter-spacing: .035em;
  text-shadow: 0 0 28px rgba(208, 170, 104, .16);
}

.page-sub { max-width: 680px; font-size: 1.02rem; line-height: 1.65; }
.filters { gap: 10px !important; margin-bottom: 28px !important; }
.filter-btn { padding: 9px 15px !important; border-radius: 999px !important; background: rgba(255, 255, 255, .035) !important; }

.grid { gap: 24px !important; }
.grid .card {
  position: relative;
  padding: 10px !important;
  overflow: hidden;
  border: 1px solid rgba(208, 170, 104, .13) !important;
  border-radius: 18px !important;
  background: linear-gradient(155deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .012)) !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .38) !important;
  transition: opacity .35s ease, transform .28s ease, border-color .28s ease, box-shadow .28s ease !important;
}

.grid .card::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 1px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transition: opacity .25s ease;
}

.grid .card:hover {
  transform: translateY(-7px) !important;
  border-color: rgba(208, 170, 104, .42) !important;
  box-shadow: 0 26px 58px rgba(0, 0, 0, .52), 0 0 26px rgba(208, 170, 104, .055) !important;
}

.grid .card:hover::after { opacity: 1; }
.grid .thumb { overflow: hidden; border-radius: 13px !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 12px 25px rgba(0, 0, 0, .25) !important; transition: transform .45s ease, filter .45s ease !important; }
.grid .card:hover .thumb { transform: scale(1.025); filter: saturate(1.06) contrast(1.035); }
.grid .meta { padding: 5px 4px 3px; }
.grid .title { color: var(--accent-bright) !important; font-size: 1.08rem !important; line-height: 1.25; }

/* Artwork detail pages, old and new */
.wrap {
  padding-top: clamp(28px, 5vw, 58px) !important;
  padding-bottom: 60px !important;
}

.top { margin-bottom: 18px; }
.crumb {
  color: #c9c4b9 !important;
  border-color: rgba(208, 170, 104, .2) !important;
  border-radius: 999px !important;
  background: rgba(7, 12, 16, .68) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}

.crumb:hover { color: var(--accent-bright) !important; border-color: rgba(208, 170, 104, .5) !important; transform: translateX(-2px); }
.page { gap: clamp(20px, 3vw, 34px) !important; }

.page .media {
  position: relative;
  overflow: visible !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.page .media::after {
  display: none !important;
}

.page .hero {
  max-width: 100% !important;
  overflow: hidden;
  border: 1px solid rgba(208, 170, 104, .28);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .38);
  transform: none !important;
  transition: border-color .25s ease, box-shadow .25s ease, filter .25s ease;
}

.page .media:hover .hero {
  transform: none !important;
  filter: saturate(1.02) contrast(1.01);
  border-color: rgba(208, 170, 104, .42);
  box-shadow: 0 20px 52px rgba(0, 0, 0, .42);
}

/* Match the established detail pages: a transparent centering wrapper and an
   intrinsically sized image. The wrapper itself never paints a rectangle. */
body[data-artwork-id] .page > .media.protect {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

body[data-artwork-id] .page > .media.protect::before,
body[data-artwork-id] .page > .media.protect::after,
body[data-artwork-id] .page > .media.protect .img-shield {
  display: none !important;
  content: none !important;
}

body[data-artwork-id] .page > .media.protect > .hero {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: min(72vh, 720px) !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: transparent !important;
}

@media (max-width: 940px) {
  body[data-artwork-id] .page > .media.protect > .hero {
    max-height: 64vh !important;
  }
}

.page .info {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3.5vw, 36px) !important;
  border-color: rgba(208, 170, 104, .17) !important;
  border-radius: 20px !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .012)) !important;
  box-shadow: 0 24px 65px rgba(0, 0, 0, .36), inset 0 1px rgba(255, 255, 255, .035);
}

.page .info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  width: 45%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.page .title {
  margin-top: 0 !important;
  margin-bottom: 14px !important;
  color: var(--accent-bright) !important;
  font-size: clamp(2rem, 4.4vw, 3.25rem) !important;
  line-height: 1.08;
  text-shadow: 0 0 25px rgba(208, 170, 104, .15);
}

.page .desc { color: #b7bbbc !important; line-height: 1.82 !important; }
.page .desc::first-letter { color: var(--accent-bright); font-family: 'MedievalSharp', cursive; font-size: 1.28em; }
.page .chips { margin: 14px 0 18px !important; }
.page .chip { color: #e5d7b8 !important; border-color: rgba(208, 170, 104, .22) !important; background: rgba(208, 170, 104, .07) !important; letter-spacing: .025em; }
.page .facts { padding-top: 10px; border-top: 1px solid rgba(208, 170, 104, .1); line-height: 1.74 !important; }
.page .facts li { margin: .45rem 0 !important; padding-left: .18rem; }
.page .facts li::marker { color: var(--accent); }

.btn, .btn-primary, .btn-hero {
  position: relative;
  overflow: hidden;
  border-radius: 11px !important;
  transition: transform .2s ease, filter .2s ease, border-color .2s ease, box-shadow .2s ease !important;
}

.btn:hover, .btn-primary:hover, .btn-hero:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .3), 0 0 22px rgba(208, 170, 104, .09);
}

.page .btn:not(.secondary) { background: linear-gradient(135deg, var(--accent-bright), #b78b49) !important; }
.page .btn.secondary { color: var(--accent-bright) !important; border-color: rgba(208, 170, 104, .52) !important; background: rgba(208, 170, 104, .035) !important; }
.page .btn.secondary:hover { background: rgba(208, 170, 104, .1) !important; }

#scroll-top {
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 12px !important;
  background: linear-gradient(145deg, var(--accent-bright), #a87c3e) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .42), 0 0 22px rgba(208, 170, 104, .12) !important;
}

footer {
  position: relative;
  border-top: 1px solid rgba(208, 170, 104, .12);
  background: rgba(4, 7, 10, .46);
}

footer::before {
  content: "ᛏ  ·  ᚺ  ·  ᛖ   ᚾ  ·  ᛟ  ·  ᚱ  ·  ᛋ  ·  ᛖ";
  display: block;
  margin-bottom: 9px;
  color: rgba(208, 170, 104, .48);
  font-size: .68rem;
  letter-spacing: .18em;
}

@media (max-width: 940px) {
  .page .info { padding: 24px !important; }
  .page .media { max-width: 760px; margin-inline: auto; }
}

@media (max-width: 560px) {
  .site-header { height: 56px; padding-inline: 12px !important; }
  .brand img { width: 42px !important; height: 42px !important; }
  .brand h1 { font-size: 1rem !important; }
  .menu-open nav.primary { background: rgba(5, 9, 12, .97) !important; border-bottom-color: rgba(208, 170, 104, .24) !important; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
  #home .hero-content::before { letter-spacing: .25em; }
  .about-grid { margin-inline: 12px !important; border-radius: 18px; }
  #map-section { margin-inline: 14px !important; border-radius: 18px; }
  .wrap { padding: 22px 14px 44px !important; }
  .page .info { padding: 21px 17px !important; border-radius: 17px !important; }
  .page .hero { border-radius: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
