:root {
  --font-main: "Adobe Garamond Pro", serif;
  --font-display: Lydian, "Libris ADF Std", serif;
  --bg-color: #fffffb;
  --text-color: #000;
  --spacing-unit: 1rem;
  --header-height: 100px; /* Approximate */
  --frame-width: 11px;
  --frost-bg: rgba(255, 255, 251, 0.4);
}

@media (max-width: 800px) {
  :root {
    --frame-width: 1rem;
  }
}

/* FONT FACE */
@font-face {
  font-family: "Libris ADF Std";
  src: url(../fonts/librisadfstd-regular-webfont.eot);
  src: url(../fonts/librisadfstd-regular-webfont.eot?#iefix)
      format("embedded-opentype"),
    url(../fonts/librisadfstd-regular-webfont.woff2) format("woff2"),
    url(../fonts/librisadfstd-regular-webfont.woff) format("woff"),
    url(../fonts/librisadfstd-regular-webfont.ttf) format("truetype");
  font-weight: 400;
  font-style: normal;
}

/* RESET & BASE */
html {
  box-sizing: border-box;
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  line-height: 1.4;
}

a {
  text-decoration: none;
  color: var(--text-color);
  transition: border-color 0.2s, color 0.2s;
  border-bottom: 1px solid transparent;
}

a:hover,
a:active,
a.active {
  border-color: var(--text-color);
}

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

/* TYPOGRAPHY */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 400;
  margin: 0 0 1rem 0;
}

h1 {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
}

h3,
h4,
.nav-link {
  font-family: var(--font-main);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.933rem;
}

p {
  margin-bottom: 1rem;
  font-feature-settings: "kern" 1, "onum" 1, "liga" 1;
}

/* LAYOUT UTILS */
.flex {
  display: flex;
  flex-wrap: wrap;
}

.container {
  padding: 0 5%;
  max-width: 1400px;
  margin: 0 auto;
}

/* HEADER & NAV */
.head-wrap {
  position: fixed;
  width: 100%;
  z-index: 1000;
  top: 0;
  left: 0;
  background: transparent;
}

header {
  padding-bottom: 3rem;
}

.head-wrap::before {
  content: "";
  position: absolute;
  top: var(--frame-width);
  left: var(--frame-width);
  right: var(--frame-width);
  bottom: -20px;
  background: var(--frost-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
  z-index: -1;
}

@media (max-width: 800px) {
  /* Removed redundant rule as var(--frame-width) handles it */
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2.7rem 5% 0.5rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: bold;
}

nav ul {
  font-family: var(--font-main);
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
  font-size: 1.2rem;
}

nav li {
  margin: 0;
}

/* MOBILE MENU TOGGLE */
.nav-toggle {
  display: none;
  cursor: pointer;
  position: fixed;
  right: 5%;
  top: 3rem;
  z-index: 2000;
  width: 30px;
  height: 20px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #000;
  position: absolute;
  transition: all 0.3s ease;
}

.nav-toggle span:nth-child(1) {
  top: 0;
}
.nav-toggle span:nth-child(2) {
  top: 9px;
}
.nav-toggle span:nth-child(3) {
  top: 18px;
}

/* Mobile Menu Active State */
.nav-toggle.is-active span:nth-child(1) {
  transform: rotate(45deg);
  top: 9px;
}
.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 9px;
}

/* HOME PAGE BACKGROUND */
.home-bg {
  /* Background Fade Settings */
  --bg-img-1: url("../photos/hovden_index_bg.JPG");
  --bg-img-2: url("../photos/hovden_fasade.JPEG");
  --fade-cycle-duration: 16s;

  background-image: var(--bg-img-1);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

.home-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--bg-img-1);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  pointer-events: none;
  /*   animation: bgFade var(--fade-cycle-duration) infinite; */
}

/* @keyframes bgFade {
  0%,
  45% {
    opacity: 0;
  }
  50%,
  95% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
} */

.home-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: 100%;
  text-align: center;
}

.home-content h1 {
  font-size: 15vw;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  -webkit-text-stroke: 0;
  font-weight: 400; /* Prevent faux bold */
}

.home-content h1::after,
.home-content h1::before {
  content: none;
  display: none;
}

/* GRID SYSTEM (KUNSTNERE) */
.grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -1%;
}

/* TIMELINE (UTSTILLINGER) */
.timeline {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding-left: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: #333;
}

.timeline-entry {
  position: relative;
  padding-left: 30px;
  margin-bottom: 3rem;
}

.timeline-marker {
  position: absolute;
  left: -5px;
  top: 8px;
  width: 11px;
  height: 11px;
  background: #fff;
  border: 1px solid #000;
  border-radius: 50%;
}

.timeline-content h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.timeline-content p {
  margin: 0.2rem 0;
}

.col-1-4 {
  width: 25%;
  padding: 1%;
}

.col-1-2 {
  width: 50%;
  padding: 1%;
}

.col-1-1 {
  width: 100%;
  padding: 1%;
}

.artist-card {
  margin-bottom: 2rem;
}

.artist-card img {
  width: 100%;
  filter: grayscale(100%);
  transition: filter 0.3s;
}

.artist-card:hover img {
  filter: grayscale(0%);
}

.artist-card figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* CONTACT PAGE */
.contact-layout {
  display: flex;
  flex-wrap: wrap;
  margin-top: 150px; /* Space for fixed header */
}

.contact-info {
  width: 50%;
  padding: 2rem;
  background: var(--bg-color);
  z-index: 10;
}

.map-container {
  width: 50%;
  height: 70vh;
  background: #eee;
}

#map {
  width: 100%;
  height: 100%;
  filter: grayscale(100%);
}

/* RESPONSIVE */
@media (max-width: 800px) {
  .nav-toggle {
    display: block;
  }

  nav ul {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }

  nav.is-active ul {
    opacity: 1;
    visibility: visible;
  }

  nav li a {
    font-size: 2rem;
  }

  .col-1-4,
  .col-1-2 {
    width: 100%;
  }

  .contact-layout {
    flex-direction: column-reverse;
  }

  .contact-info,
  .map-container {
    width: 100%;
  }

  .map-container {
    height: 50vh;
  }

  h1 {
    font-size: 3rem;
  }

  .home-content h1 {
    font-size: 20vw;
  }
}

/* UTILS */
.bw {
  filter: grayscale(100%);
}
.mt-large {
  margin-top: 10rem;
}
.text-center {
  text-align: center;
}

/* ARTIST GRID (KUNSTNERE) */
.artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.artist-card-simple {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid #ddd;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.artist-card-simple:hover {
  border-color: #000;
  background: #fff;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.artist-card-simple h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
}

.artist-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.artist-links a {
  display: inline-block;
  color: #555;
  font-size: 0.95rem;
  padding: 0.2rem 0;
}

.artist-links a:hover {
  color: #000;
  padding-left: 5px;
}

/* INNRAMMING */
.framing-section {
  margin-bottom: 4rem;
}

.framing-content h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.framing-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 1.5rem;
}

/* GALLERY (OM OSS) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.gallery-item {
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

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

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
}

/* FRAME */
.ramme {
  position: fixed;
  display: block;
  pointer-events: none;
  z-index: 9999;
  top: var(--frame-width);
  bottom: var(--frame-width);
  left: var(--frame-width);
  right: var(--frame-width);
  border: 1px solid #000;
}

/* FROSTED BORDER */
.frost-border-top,
.frost-border-bottom,
.frost-border-left,
.frost-border-right {
  position: fixed;
  background: var(--frost-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9998;
}

.frost-border-top {
  top: 0;
  left: 0;
  right: 0;
  height: var(--frame-width);
}

.frost-border-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--frame-width);
}

.frost-border-left {
  top: var(--frame-width);
  bottom: var(--frame-width);
  left: 0;
  width: var(--frame-width);
}

.frost-border-right {
  top: var(--frame-width);
  bottom: var(--frame-width);
  right: 0;
  width: var(--frame-width);
}
