/* ========================================
   RESET / BASE
======================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body.contact-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: #f4f1eb;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ========================================
   CONTACT PAGE NAVBAR
   Matcher Odberg-siden
======================================== */

.contact-page .navbar {
  position: absolute;
  top: 34px;
  left: 0;
  width: 100%;
  z-index: 30;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 0;
  background: transparent;
}

.contact-page .nav-links {
  list-style: none;
  display: flex;
  gap: 90px;
  margin: 0;
  padding: 0;
}

.contact-page .nav-links a {
  position: relative;
  text-decoration: none;
  color: white;
  font-size: 18px;
  letter-spacing: 1.5px;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.contact-page .nav-links a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 1px;
  left: 0;
  bottom: -4px;
  background: white;
  transition: width 0.3s ease;
}

.contact-page .nav-links a:hover::after,
.contact-page .nav-links a.active::after {
  width: 100%;
}

.contact-page .menu-toggle {
  display: none;
  position: absolute;
  top: 0;
  right: 24px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  z-index: 45;
  transition: all 0.3s ease;
  outline: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.contact-page .menu-toggle:hover {
  background: rgba(255, 255, 255, 1);
}

.contact-page .menu-toggle:focus,
.contact-page .menu-toggle:active,
.contact-page .menu-toggle:focus-visible {
  outline: none;
  border: none;
  box-shadow: none;
}

.contact-page .menu-toggle span {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  background: black;
  border-radius: 999px;
  transform: translateX(-50%);
  transition: all 0.3s ease;
}

.contact-page .menu-toggle span:nth-child(1) {
  top: 14px;
}

.contact-page .menu-toggle span:nth-child(2) {
  top: 21px;
}

.contact-page .menu-toggle span:nth-child(3) {
  top: 28px;
}

.contact-page .menu-toggle.active span:nth-child(1) {
  top: 21px;
  transform: translateX(-50%) rotate(45deg);
}

.contact-page .menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.contact-page .menu-toggle.active span:nth-child(3) {
  top: 21px;
  transform: translateX(-50%) rotate(-45deg);
}

.contact-page .menu-overlay {
  display: none;
}

/* ========================================
   HERO
======================================== */

.contact-hero {
  position: relative;
  min-height: 100svh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 140px 24px 72px;
  isolation: isolate;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.16),
      rgba(0, 0, 0, 0.36) 42%,
      rgba(0, 0, 0, 0.6)
    ),
    url("./bilder/kontaktbildet.webp") center/cover no-repeat;
  background-color: #d9d2c8;
}

/* ========================================
   PANEL
======================================== */

.contact-panel {
  position: relative;
  z-index: 2;
  width: min(100%, 560px);
  background: rgba(248, 248, 248, 0.96);
  color: #111;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.26);

  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-panel.show {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   IMAGE
======================================== */

.contact-panel-image {
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: #ddd6cc;
}

.contact-panel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ========================================
   CONTENT
======================================== */

.contact-panel-content {
  padding: 46px 40px 44px;
}

.contact-label {
  margin: 0 0 16px 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.56);
  font-weight: 700;
}

.contact-panel h1 {
  margin: 0 0 10px 0;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 0.9;
  font-weight: 700;
}

.contact-panel .contact-text {
  margin: 0;
  max-width: 47ch;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(17, 17, 17, 0.72);
}

/* ========================================
   BUTTON
======================================== */

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin-top: 34px;
  padding: 14px 18px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    transform 0.22s ease,
    opacity 0.22s ease,
    box-shadow 0.22s ease;
}

.contact-button:hover {
  transform: translateY(-1px);
  opacity: 0.98;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.contact-button:active {
  transform: translateY(0);
}

/* ========================================
   TABLET
======================================== */

@media (max-width: 900px) {
  .contact-panel {
    width: min(100%, 500px);
  }

  .contact-panel-image {
    height: 280px;
  }
}

/* ========================================
   MOBILE NAVBAR
   Samme oppførsel som Odberg-siden
======================================== */

@media (max-width: 768px) {
  .contact-page .navbar {
    top: 68px;
    left: 0;
    width: 100%;
    padding: 0;
    justify-content: flex-end;
    align-items: center;
    z-index: 80;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .contact-page .navbar.show {
    opacity: 1;
    transform: none;
  }

  .contact-page .nav-logo {
    position: absolute;
    left: 20px;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 90;
  }

  .contact-page .nav-logo img {
    width: 88px;
    height: auto;
    display: block;
  }

  .contact-page .menu-toggle {
    display: block;
    position: absolute;
    right: 20px;
    top: 50% !important;
    transform: translateY(calc(-50% - 2px)) !important;
    width: 30px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    z-index: 90;
    appearance: none;
    -webkit-appearance: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .contact-page .navbar.show .menu-toggle {
    opacity: 1 !important;
    transform: translateY(calc(-50% - 2px)) !important;
  }

  .contact-page .menu-toggle:hover,
  .contact-page .menu-toggle:focus,
  .contact-page .menu-toggle:focus-visible,
  .contact-page .menu-toggle:active {
    background: transparent;
    border: none;
    box-shadow: none;
    outline: none;
  }

  .contact-page .menu-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 999px;
    transform: none;
    transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
  }

  .contact-page .menu-toggle span:nth-child(1) {
    top: 0;
  }

  .contact-page .menu-toggle span:nth-child(2) {
    top: 11px;
  }

  .contact-page .menu-toggle span:nth-child(3) {
    top: 22px;
  }

  .contact-page .menu-toggle.active span:nth-child(1) {
    top: 11px;
    transform: rotate(45deg);
  }

  .contact-page .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .contact-page .menu-toggle.active span:nth-child(3) {
    top: 11px;
    transform: rotate(-45deg);
  }

  .contact-page .menu-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.16);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 60;
  }

  .contact-page .menu-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .contact-page .nav-links {
    position: absolute;
    top: 44px;
    right: 20px;
    width: 220px;
    margin: 0;
    padding: 10px 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    outline: none;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    border-radius: 18px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition:
      opacity 0.25s ease,
      transform 0.25s ease,
      visibility 0.25s ease;
    z-index: 85;
  }

  .contact-page .nav-links.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .contact-page .nav-links li {
    width: 100%;
  }

  .contact-page .nav-links a {
    display: block;
    width: 100%;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-decoration: none;
    text-shadow: none;
    color: black;
    background: transparent;
  }

  .contact-page .nav-links a::after {
    display: none;
  }

  .contact-page .nav-links a:hover {
    background: rgba(0, 0, 0, 0.05);
  }

  .contact-page .nav-links li:first-child a {
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
  }

  .contact-page .nav-links li:last-child a {
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
  }

  .contact-hero {
    min-height: auto;
    padding: 142px 14px 40px;
  }

  .contact-panel {
    width: min(100%, 390px);
  }

  .contact-panel-image {
    height: 220px;
  }

  .contact-panel-content {
    padding: 30px 24px 28px;
  }

  .contact-panel h1 {
    font-size: clamp(2.1rem, 10vw, 3rem);
    line-height: 0.93;
    margin: 0 0 10px 0;
  }

  .contact-panel .contact-text {
    font-size: 0.96rem;
    line-height: 1.6;
    max-width: 30ch;
  }

  .contact-button {
    min-height: 48px;
    margin-top: 28px;
    font-size: 0.9rem;
  }
}

/* ========================================
   SMALL MOBILE
======================================== */

@media (max-width: 480px) {
  .contact-page .navbar {
    top: 64px;
  }

  .contact-page .nav-logo {
    left: 16px;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  .contact-page .nav-logo img {
    width: 78px;
  }

  .contact-page .menu-toggle {
    right: 16px;
    top: 50% !important;
    transform: translateY(calc(-50% - 2px)) !important;
    width: 28px;
    height: 22px;
  }

  .contact-page .navbar.show .menu-toggle {
    opacity: 1 !important;
    transform: translateY(calc(-50% - 2px)) !important;
  }

  .contact-page .menu-toggle span:nth-child(2) {
    top: 10px;
  }

  .contact-page .menu-toggle span:nth-child(3) {
    top: 20px;
  }

  .contact-page .menu-toggle.active span:nth-child(1),
  .contact-page .menu-toggle.active span:nth-child(3) {
    top: 10px;
  }

  .contact-page .nav-links {
    top: 40px;
    right: 16px;
    width: 200px;
  }

  .contact-page .nav-links a {
    font-size: 13px;
    padding: 13px 16px;
  }

  .contact-hero {
    padding: 132px 10px 36px;
  }

  .contact-panel {
    width: min(100%, 340px);
  }

  .contact-panel-image {
    height: 180px;
  }

  .contact-panel-content {
    padding: 24px 18px 22px;
  }

  .contact-label {
    margin-bottom: 12px;
    font-size: 10px;
  }

  .contact-panel h1 {
    font-size: clamp(1.9rem, 10vw, 2.5rem);
    margin: 0 0 8px 0;
  }

  .contact-panel .contact-text {
    font-size: 0.92rem;
    line-height: 1.58;
    max-width: none;
  }

  .contact-button {
    min-height: 46px;
    font-size: 0.86rem;
    padding: 12px 14px;
    margin-top: 24px;
  }
}

/* ========================================
   VERY SMALL
======================================== */

@media (max-width: 360px) {
  .contact-panel {
    width: min(100%, 310px);
  }

  .contact-panel-image {
    height: 160px;
  }

  .contact-panel h1 {
    font-size: 1.7rem;
  }
}

/* ========================================
   REDUCED MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {
  .contact-panel {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ========================================
   STOPPER NAVBAR-ANIMASJON PÅ MOBIL
   Samme idé som Odberg
======================================== */

@media (max-width: 768px) {
  .contact-page .navbar,
  .contact-page .navbar.show,
  .contact-page .menu-toggle,
  .contact-page .navbar.show .menu-toggle,
  .contact-page .menu-toggle span {
    transition: none !important;
    animation: none !important;
  }

  .contact-page .menu-toggle {
    top: 50% !important;
    transform: translateY(calc(-50% - 3px)) !important;
    opacity: 1 !important;
  }

  .contact-page .navbar.show .menu-toggle {
    transform: translateY(calc(-50% - 3px)) !important;
    opacity: 1 !important;
  }
}

@media (max-width: 480px) {
  .contact-page .menu-toggle {
    top: 50% !important;
    transform: translateY(calc(-50% - 3px)) !important;
    opacity: 1 !important;
  }

  .contact-page .navbar.show .menu-toggle {
    transform: translateY(calc(-50% - 3px)) !important;
    opacity: 1 !important;
  }
}