/* ============================================================
   POLAR TAKST & EIENDOM AS — style.css
   Design inspired by twsp.no — Nordic, clean, image-driven
   ============================================================ */

/* ── CUSTOM PROPERTIES ── */
:root {
  --accent:      #4E7A9C;
  --accent-dark: #3A6280;
  --dark:        #2A2E38;
  --medium:      #5A6070;
  --cool-bg:     #323640;
  --cool-bg2:    rgba(42, 46, 56, 0.96);
  --light:       #F4F6F8;
  --white:       #FFFFFF;
  --text:        #1A1A1A;
  --text-muted:  #5A6475;
  --border:      #DDE2EA;

  --font-hero:    'Anton', sans-serif;
  --font-heading: 'Playfair Display', serif;
  --font-body:    'Inter', sans-serif;

  --nav-h:    72px;
  --max-w:    1200px;
  --section-pad: clamp(80px, 10vw, 130px);
  --card-gap: 1.5rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.3s ease;
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}

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

a { text-decoration: none; color: inherit; }

ul { list-style: none; }

/* ── UTILITY ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

.section-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.section-eyebrow.light { color: rgba(255,255,255,0.65); }

.section-heading {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--dark);
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
}
.section-heading.light { color: var(--white); }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 0.9rem 2.25rem;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); }

.btn-accent {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 0.9rem 2.25rem;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background var(--transition), transform var(--transition);
  margin-top: 2rem;
}
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-2px); }

.btn-ghost {
  display: inline-block;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  padding: 0.65rem 1.5rem;
  border-radius: 3px;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  transition: background var(--transition), color var(--transition);
  margin-top: 1.25rem;
}
.btn-ghost:hover { background: var(--accent); color: var(--white); }

/* ── SCROLL ANIMATIONS ── */
.fade-in, .fade-up {
  opacity: 0;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.fade-in { transform: none; }
.fade-up { transform: translateY(32px); }
.fade-in.visible, .fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
nav#main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

nav#main-nav.scrolled {
  background: var(--dark);
  box-shadow: 0 2px 20px rgba(0,0,0,0.18);
}

.nav-logo {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.35;
  transition: opacity var(--transition);
  position: relative;
  z-index: 1200;
  flex-shrink: 0;
}
.nav-logo:hover { opacity: 0.8; }

/* Desktop nav links — push to right with auto margin */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  margin-left: auto;
  list-style: none;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transition: color var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }

.nav-links .nav-cta {
  background: var(--accent);
  color: var(--white);
  padding: 0.55rem 1.4rem;
  border-radius: 3px;
  transition: background var(--transition);
}
.nav-links .nav-cta:hover { background: var(--accent-dark); }

/* Hamburger — hidden on desktop, visible on mobile */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  position: relative;
  z-index: 1200;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
  border-radius: 2px;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  height: 100vh;
  min-height: 600px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-bg.active { opacity: 1; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(30, 25, 20, 0.55) 0%,
    rgba(30, 25, 20, 0.45) 60%,
    rgba(30, 25, 20, 0.65) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 0 1.5rem;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  margin-bottom: 1.25rem;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

/* ============================================================
   TRUST STRIP
   ============================================================ */
.trust-strip {
  background: var(--dark);
  padding: 2.5rem 0;
}

.trust-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2.5rem;
  color: var(--white);
}

.trust-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.18);
}

.trust-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.trust-label {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}
.trust-label small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
}

/* ============================================================
   SERVICES (Vi tilbyr)
   ============================================================ */
.services-section {
  padding: var(--section-pad) 0 0;
  scroll-margin-top: var(--nav-h);
}

.services-section .container {
  text-align: center;
  margin-bottom: 3.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--dark);
}

.service-card-img {
  height: 280px;
  background-size: cover;
  background-position: center;
  position: relative;
  transition: transform 0.6s var(--ease-out);
  transform-origin: center;
}
.service-card:hover .service-card-img { transform: scale(1.04); }

.service-card-body {
  padding: 2.5rem 2.25rem 2.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--light);
}

.service-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--accent);
  opacity: 0.35;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.service-card-body h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.service-card-body p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.service-list {
  list-style: none;
  margin-bottom: auto;
}
.service-list li {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--medium);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.03em;
}
.service-list li::before {
  content: '—';
  margin-right: 0.6rem;
  color: var(--accent);
}

/* ============================================================
   FULL-WIDTH IMAGE BREAK
   ============================================================ */
.img-break {
  height: clamp(280px, 35vw, 480px);
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
}

/* ============================================================
   ABOUT (Om oss)
   ============================================================ */
.about-section {
  background: var(--cool-bg2);
  padding: var(--section-pad) 0;
  scroll-margin-top: var(--nav-h);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 5rem;
  align-items: center;
}

.about-text .section-eyebrow { color: rgba(255,255,255,0.6); }

.about-rule {
  width: 50px;
  height: 2px;
  background: rgba(255,255,255,0.35);
  margin-bottom: 2rem;
  margin-top: -1.5rem;
}

.about-body {
  font-size: 1.05rem;
  font-weight: 300;
  color: rgba(255,255,255,0.88);
  line-height: 1.8;
  margin-bottom: 1.25rem;
  max-width: 540px;
}

.about-img-wrap {
  position: relative;
}

.about-img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ============================================================
   WHY US (Hvorfor oss)
   ============================================================ */
.why-section {
  padding: var(--section-pad) 0;
  scroll-margin-top: var(--nav-h);
  background: var(--white);
}

.why-section .container {
  text-align: center;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--card-gap);
  margin-top: 0;
}

.why-card {
  background: var(--light);
  padding: 2.5rem 2rem 2.25rem;
  text-align: left;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.why-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.09);
}

.why-icon {
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.why-card h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.why-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================================
   TESTIMONIAL
   ============================================================ */
.testimonial-section {
  background-color: var(--dark);
  background-size: cover;
  background-position: center;
  padding: clamp(70px, 9vw, 120px) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.testimonial-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(28, 32, 42, 0.75);
  z-index: 0;
}
.testimonial-inner { position: relative; z-index: 1; }

.testimonial-inner {
  position: relative;
  max-width: 700px;
}

.quote-mark {
  font-family: Georgia, serif;
  font-size: 10rem;
  color: rgba(255,255,255,0.06);
  line-height: 0.8;
  position: absolute;
  top: -2rem;
  left: -2rem;
  user-select: none;
  pointer-events: none;
}

.quote-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-style: italic;
  color: rgba(255,255,255,0.9);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.quote-attr {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-section {
  scroll-margin-top: var(--nav-h);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}

.contact-info {
  background: var(--light);
  padding: clamp(3rem, 7vw, 6rem) clamp(2rem, 5vw, 4rem);
}

.contact-intro {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: -1.5rem;
  margin-bottom: 2.5rem;
  max-width: 400px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.contact-details li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.contact-icon {
  color: var(--accent);
  flex-shrink: 0;
  width: 20px;
}

.contact-link {
  font-size: 0.95rem;
  color: var(--text);
  transition: color var(--transition);
}
a.contact-link:hover { color: var(--accent); }

.map-placeholder {
  background: var(--border);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}
.map-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Contact Form ── */
.contact-form-wrap {
  background: var(--white);
  padding: clamp(3rem, 7vw, 6rem) clamp(2rem, 5vw, 4rem);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--medium);
  margin-bottom: 0.5rem;
}
.form-group label span { color: var(--accent); }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-group select { cursor: pointer; }

.form-error {
  display: block;
  font-size: 0.8rem;
  color: #C0392B;
  margin-top: 0.4rem;
  min-height: 1.1rem;
}

.btn-submit {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn-submit:hover { background: var(--accent-dark); transform: translateY(-2px); }
.btn-submit:active { transform: translateY(0); }

.form-success {
  margin-top: 1.25rem;
  background: #EAF7ED;
  color: #2D7D47;
  padding: 1rem 1.25rem;
  border-radius: 3px;
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 3px solid #2D7D47;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.75);
  padding: clamp(3rem, 6vw, 5rem) 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 3rem;
  align-items: start;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  display: block;
  margin-bottom: 0.6rem;
}

.footer-tagline {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.06em;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.footer-nav a {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--white); }

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.footer-contact a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer-contact a:hover { color: var(--accent); }

.footer-bottom {
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.05em;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--dark);
  border: none;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.back-to-top:not([hidden]) { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); }

/* ============================================================
   STICKY MOBILE BAR
   ============================================================ */
.mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 800;
  grid-template-columns: 1fr 1fr;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.15);
}

.mobile-bar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.mobile-bar-call {
  background: var(--dark);
  color: var(--white);
}
.mobile-bar-enquiry {
  background: var(--accent);
  color: var(--white);
}

/* ============================================================
   FOCUS STATES (Accessibility)
   ============================================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ============================================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-img-wrap { order: -1; }
  .about-img { height: 380px; }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: 1 / -1; }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 768px)
   ============================================================ */
@media (max-width: 900px) {
  /* Show hamburger, hide inline nav */
  .hamburger { display: flex; }

  .nav-links {
    /* Full-screen overlay — hidden by default */
    position: fixed;
    inset: 0;
    background: var(--dark);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 1100;
    margin-left: 0;
    list-style: none;
    /* Transition instead of display toggle — avoids layout bugs */
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }
  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .nav-links a {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--white);
    letter-spacing: 0.12em;
  }
  .nav-links .nav-cta {
    padding: 0.9rem 2.5rem;
    font-size: 0.9rem;
  }

  /* Hero */
  .hero-content h1 { font-size: clamp(2rem, 9vw, 3rem); }
  .hero-sub { font-size: 0.95rem; }

  /* Trust strip */
  .trust-list {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }
  .trust-divider {
    width: 100%;
    height: 1px;
  }
  .trust-item { justify-content: center; padding: 1.25rem 1.5rem; }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }
  .service-card-img { height: 220px; }

  /* Image break */
  .img-break { background-attachment: scroll; }

  /* Why grid */
  .why-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

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

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Back to top — move up to avoid mobile bar overlap */
  .back-to-top { bottom: 5rem; left: 1.25rem; }

  /* Mobile bar */
  .mobile-bar { display: grid; }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  .trust-item { padding: 1rem 1rem; }
  .service-card-body { padding: 1.75rem 1.5rem 2rem; }
  .contact-info,
  .contact-form-wrap { padding: 2.5rem 1.5rem; }
  .footer-inner { padding-bottom: 2rem; }
  .why-card { padding: 2rem 1.5rem; }
}
