/* Hurðalist – stál, hurðahvítt, eitt varúðarband */
:root {
  --stal: #2b333b;        /* dökkt stál – texti, haus */
  --stal-ljost: #58636d;  /* lýsing, aukatexti */
  --galv: #c9ced1;        /* galvaniserað – línur */
  --hurd: #f1f2f0;        /* hurðahvítt – bakgrunnur */
  --hvitt: #ffffff;
  --varud: #f3c23b;       /* varúðargult – aðeins neyðarbandið */
  --svart: #141719;
  --mal: 1120px;
  --bil: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--stal);
  background: var(--hurd);
  padding-bottom: 64px; /* pláss fyrir neyðarbandið */
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 {
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-weight: 600;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.005em;
}
h2 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 0.6em; }
h3 { font-size: 26px; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--varud); outline-offset: 2px; }

/* Haus */
.top {
  display: flex; align-items: center; gap: var(--bil);
  padding: 10px var(--bil);
  max-width: var(--mal); margin: 0 auto;
}
.logo img { width: 110px; height: auto; }
.nav { display: flex; gap: 24px; margin-left: auto; font-weight: 500; }
.nav a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--stal); }
.top-tel {
  font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 24px;
  text-decoration: none; padding: 6px 14px; border: 2px solid var(--stal); border-radius: 3px;
}
@media (max-width: 640px) {
  .nav { display: none; }
  .top-tel { margin-left: auto; }
}

/* Hero – hurðin sjálf */
.hero {
  position: relative; max-width: var(--mal); margin: 0 auto; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
  background: var(--stal); color: var(--hvitt);
}
.hero-media { position: relative; min-height: 420px; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero-text { padding: clamp(28px, 5vw, 64px) var(--bil); display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.hero h1 { font-size: clamp(40px, 4.4vw, 56px); }
.hero p { margin: 0; font-size: 19px; color: #d7dbde; max-width: 46ch; }
.btn {
  align-self: flex-start; text-decoration: none;
  font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 22px;
  background: var(--hvitt); color: var(--stal); padding: 12px 22px; border-radius: 3px;
}
.btn:hover { background: var(--galv); }
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { min-height: 0; height: 42vh; }
}

/* Kaflar */
section { padding: clamp(40px, 7vw, 88px) var(--bil); max-width: var(--mal); margin: 0 auto; }

/* Hurðarsamskeyti sem skil milli kafla */
.services, .case, .gallery, .contact { border-top: 1px solid var(--galv); }

/* Þjónusta */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.service img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: var(--galv); }
.service h3 { margin: 16px 0 8px; }
.service li { padding: 6px 0; border-top: 1px solid var(--galv); }
.service li:first-child { border-top: 0; }
@media (max-width: 800px) { .service-grid { grid-template-columns: 1fr; gap: 36px; } }

/* Dæmi – lofthæð */
.case { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; align-items: start; }
.case-text p { max-width: 42ch; margin: 0 0 1em; }
.case-fig { margin: 0; }
.case-fig img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; background: var(--galv); }
.case-fig figcaption { font-size: 15px; color: var(--stal-ljost); padding-top: 8px; border-top: 1px solid var(--galv); margin-top: 8px; }
@media (max-width: 800px) {
  .case { grid-template-columns: 1fr 1fr; }
  .case-text { grid-column: 1 / -1; }
}

/* Myndasafn */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.grid a { display: block; background: var(--galv); }
.grid img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
@media (max-width: 800px) { .grid { grid-template-columns: repeat(2, 1fr); } }

/* Samband */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 720px; }
.contact-item {
  text-decoration: none; display: flex; flex-direction: column; gap: 4px;
  padding: 18px 20px; background: var(--hvitt); border-left: 4px solid var(--stal);
}
.contact-item .label { font-size: 15px; color: var(--stal-ljost); }
.contact-item .value { font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 28px; word-break: break-all; }
.contact-item:hover { border-left-color: var(--varud); }
.contact-note { max-width: 56ch; color: var(--stal-ljost); margin: 20px 0 0; }
@media (max-width: 600px) { .contact-grid { grid-template-columns: 1fr; } }

/* Fótur */
.foot {
  max-width: var(--mal); margin: 0 auto; padding: 24px var(--bil) 40px;
  display: flex; justify-content: space-between; font-size: 15px; color: var(--stal-ljost);
  border-top: 1px solid var(--galv);
}

/* Neyðarbandið – fast neðst */
.emergency {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; align-items: stretch; text-decoration: none;
  background: var(--svart); color: var(--hvitt); min-height: 56px;
}
.stripe {
  flex: 0 0 48px;
  background: repeating-linear-gradient(135deg, var(--varud) 0 14px, var(--svart) 14px 28px);
}
.em-text {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.3em; flex-wrap: wrap;
  padding: 10px 16px; text-align: center; font-size: 17px;
}
.em-text b { font-family: "Barlow Condensed", sans-serif; font-size: 26px; color: var(--varud); font-weight: 700; }
.emergency:hover .em-text { background: #1f2427; }
@media (max-width: 480px) { .em-text strong { display: none; } .stripe { flex-basis: 28px; } }

/* Stækkun mynda */
.lb { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.lb::backdrop { background: rgba(20, 23, 25, 0.92); }
.lb img { max-width: 96vw; max-height: 92vh; width: auto; height: auto; }
.lb-close {
  position: fixed; top: 12px; right: 16px; font-size: 40px; line-height: 1;
  background: none; border: 0; color: var(--hvitt); cursor: pointer;
}
