/* ============================================================
   HNG BYG — Tømrer- og byggefirma
   Design system: charcoal "roof" bands + greige "mortar" bands,
   gold gable signature, industrial grotesque + mono spec labels.
   ============================================================ */

:root {
  --ink:      #191817;   /* warm near-black — roof / logo black */
  --ink-2:    #242220;   /* lifted charcoal for cards on dark   */
  --gold:     #be9367;   /* brand tan/gold                      */
  --gold-lt:  #d3ae86;   /* gold on dark backgrounds            */
  --gold-dp:  #9a6f42;   /* gold with contrast on light         */
  --paper:    #ece7df;   /* warm greige — mortar/plaster        */
  --paper-2:  #f6f3ed;   /* lighter card surface                */
  --stone:    #746d63;   /* muted label grey-brown              */
  --line:     rgba(25, 24, 23, 0.14);
  --line-lt:  rgba(255, 255, 255, 0.16);

  --font-display: "Archivo", system-ui, sans-serif;
  --font-body:    "Figtree", system-ui, sans-serif;
  --font-mono:    "Space Mono", ui-monospace, monospace;

  --wrap: 1180px;
  --pad:  clamp(1.25rem, 5vw, 4rem);
  --radius: 4px;
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 450;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

/* ---------- shared type devices ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dp);
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1.25rem;
}
.eyebrow::before {                    /* technical "dimension line" tick */
  content: "";
  width: 42px;
  height: 0;
  border-top: 1.5px solid currentColor;
  box-shadow: 0 -3px 0 -1.5px currentColor;   /* small end tick above line */
}
.eyebrow--light { color: var(--gold-lt); }

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
  padding-block: 0.55rem;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-header.scrolled {
  background: rgba(25, 24, 23, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line-lt);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  color: #fff;
  line-height: 1;
}
.brand__hng { color: var(--gold); }
.brand__byg { color: #fff; }
.brand__mark { width: 26px; height: auto; color: var(--gold); margin-inline: 0.1rem 0.15rem; }
.brand__logo { display: block; height: 2.1rem; width: auto; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav > a {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease;
}
.nav > a:hover { color: var(--gold-lt); }
.nav__cta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink) !important;
  background: var(--gold);
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius);
  transition: background 0.2s ease, transform 0.2s ease;
}
.nav__cta:hover { background: var(--gold-lt); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px 4px;
  cursor: pointer;
}
.nav-toggle span { width: 26px; height: 2px; background: #fff; transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem var(--pad) 1.25rem;
  background: rgba(25, 24, 23, 0.97);
  backdrop-filter: blur(10px);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a { padding: 0.75rem 0; font-weight: 600; color: #fff; border-bottom: 1px solid var(--line-lt); }
.mobile-nav .nav__cta { border-bottom: 0; text-align: center; margin-top: 0.75rem; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 60%;
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(20,19,18,0.92) 0%, rgba(20,19,18,0.45) 45%, rgba(20,19,18,0.35) 100%),
    linear-gradient(to right, rgba(20,19,18,0.55), rgba(20,19,18,0) 60%);
}
.hero__content { position: relative; z-index: 2; padding-bottom: clamp(3.5rem, 9vh, 7rem); padding-top: 7rem; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.9rem, 9vw, 6.5rem);
  line-height: 0.94;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: #fff;
  max-width: 15ch;
  text-shadow: 0 2px 30px rgba(0,0,0,0.35);
}
.hero__lead {
  margin-top: 1.5rem;
  max-width: 52ch;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: rgba(255,255,255,0.9);
}
.hero__actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1rem 1.6rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--gold-lt); transform: translateY(-2px); }
.btn--ghost { border-color: rgba(255,255,255,0.45); color: #fff; }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-lt); transform: translateY(-2px); }

.hero__scroll {
  position: absolute; z-index: 2; right: var(--pad); bottom: clamp(3.5rem, 9vh, 7rem);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.hero__scroll svg { width: 20px; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ============================================================
   CAPABILITY STRIP
   ============================================================ */
.strip { background: var(--gold); color: var(--ink); }
.strip__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: clamp(0.75rem, 3vw, 2.25rem);
  padding-block: 1.1rem;
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 1.4vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.strip__dot { width: 6px; height: 6px; background: var(--ink); border-radius: 50%; }

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.section { padding-block: clamp(4.5rem, 10vw, 8rem); }
.section--dark { background: var(--ink); color: var(--paper); }
.section-head { max-width: 40ch; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.section-head--light .section-title { color: #fff; }

/* ---------- Ydelser ---------- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}
.service {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(25,24,23,0.5); }
.service__media { aspect-ratio: 16 / 10; overflow: hidden; }
.service__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(.2,.8,.2,1); }
.service:hover .service__media img { transform: scale(1.05); }
.service__body { padding: 1.6rem 1.6rem 1.9rem; border-top: 3px solid var(--gold); }
.service__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  margin-bottom: 0.6rem;
}
.service__body p { color: var(--stone); font-size: 0.98rem; }

/* ---------- Projekter / gallery carousel ---------- */
.carousel { --cols: 3; position: relative; }
.carousel__viewport { overflow: hidden; border-radius: var(--radius); }
.carousel__track {
  display: flex;
  will-change: transform;
  transition: transform 0.55s cubic-bezier(.2,.8,.2,1);
}
.carousel__slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: 1rem;
  align-content: start;
}
.carousel__controls {
  display: flex; align-items: center; justify-content: center;
  gap: 1.25rem; margin-top: 1.75rem;
}
.carousel__btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.06); color: #fff;
  border: 1px solid var(--line-lt); cursor: pointer;
  font-size: 1.6rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.carousel__btn:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.carousel__btn:disabled { opacity: 0.3; cursor: default; }
.carousel__btn:disabled:hover { background: rgba(255,255,255,0.06); color: #fff; border-color: var(--line-lt); }
.carousel__dots { display: flex; gap: 0.55rem; }
.carousel__dot {
  width: 9px; height: 9px; padding: 0; border-radius: 50%;
  background: var(--line-lt); border: 0; cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel__dot:hover { background: var(--gold-lt); }
.carousel__dot--active { background: var(--gold); transform: scale(1.25); }

.shot {
  display: block; width: 100%; height: 100%; padding: 0; margin: 0; border: 0;
  background: var(--ink-2); cursor: pointer; overflow: hidden; border-radius: var(--radius);
  position: relative;
  line-height: 0;
}
.shot img {
  width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1), opacity 0.3s ease; opacity: 0.94;
}
.shot::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 0 var(--gold);
  transition: box-shadow 0.25s ease;
  pointer-events: none;
}
.shot:hover img, .shot:focus-visible img { transform: scale(1.05); opacity: 1; }
.shot:hover::after, .shot:focus-visible::after { box-shadow: inset 0 0 0 3px var(--gold); }

/* ---------- Om os ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.about__media { position: relative; border-radius: var(--radius); overflow: hidden; }
.about__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about__badge {
  position: absolute; left: 1.25rem; bottom: 1.25rem; right: 1.25rem;
  display: flex; align-items: center; gap: 0.85rem;
  background: rgba(25,24,23,0.9);
  backdrop-filter: blur(6px);
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
}
.about__badge svg { width: 30px; flex: none; color: var(--gold); }
.about__badge span {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: 0.95rem; line-height: 1.15; letter-spacing: 0.01em;
}
.about__text .section-title { margin-bottom: 1.5rem; }
.about__text p + p { margin-top: 1rem; }
.about__text p { color: #3a3733; }
.about__points { margin-top: 1.75rem; display: grid; gap: 0.6rem; }
.about__points li {
  position: relative; padding-left: 1.9rem;
  font-weight: 500;
}
.about__points li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 12px; height: 8px;
  border-left: 2px solid var(--gold-dp);
  border-top: 2px solid var(--gold-dp);
  transform: skewX(-12deg) translateY(-1px);
  clip-path: polygon(0 100%, 50% 0, 100% 100%, 50% 55%);  /* tiny gable tick */
}

/* ---------- Kontakt ---------- */
.contact__inner { text-align: center; max-width: 760px; margin-inline: auto; }
.contact__inner .eyebrow { justify-content: center; }
.contact__inner .eyebrow::before { display: none; }
.contact__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.3rem, 6vw, 4rem);
  line-height: 0.98;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: -0.01em;
}
.contact__lead { margin: 1.25rem auto 0; max-width: 46ch; color: rgba(255,255,255,0.72); }
.contact__phones {
  margin-top: 3rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem;
}
.phone {
  flex: 1 1 260px; max-width: 340px;
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 1.75rem 1.5rem;
  background: var(--ink-2);
  border: 1px solid var(--line-lt);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.phone:hover { transform: translateY(-3px); border-color: var(--gold); background: #2b2825; }
.phone__label {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-lt);
}
.phone__num {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.3rem);
  color: #fff; letter-spacing: 0.01em;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: #121110; color: rgba(255,255,255,0.72); padding-block: 2.75rem; }
.footer__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem 2rem;
}
.brand--footer { font-size: 1.3rem; }
.brand--footer .brand__logo { height: 1.85rem; }
.footer__meta { font-size: 0.9rem; line-height: 1.7; }
.footer__meta a:hover { color: var(--gold-lt); }
.footer__muted { color: rgba(255,255,255,0.4); font-size: 0.82rem; }
.footer__copy {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.4);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  background: rgba(15,14,13,0.94);
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox.open { display: flex; }
.lightbox__img {
  max-width: 100%; max-height: 88vh; width: auto; height: auto;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);
}
.lightbox__close, .lightbox__nav {
  position: absolute; background: rgba(255,255,255,0.08); color: #fff;
  border: 1px solid var(--line-lt); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.lightbox__close:hover, .lightbox__nav:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.lightbox__close { top: 1.25rem; right: 1.25rem; width: 46px; height: 46px; border-radius: var(--radius); font-size: 1.8rem; line-height: 1; }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border-radius: 50%; font-size: 2rem; line-height: 1; }
.lightbox__nav--prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox__nav--next { right: clamp(0.5rem, 2vw, 1.5rem); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .about__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 520px; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .services__grid { grid-template-columns: 1fr; }
  .hero__scroll { display: none; }
  .lightbox__nav { width: 44px; height: 44px; font-size: 1.6rem; }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
