/* Lyst galleri: hvidt papir, dyb racing-grøn som eneste accent.
   Archivo i bred, kraftig snit (motorsport) til overskrifter, Hanken Grotesk
   til tekst, IBM Plex Mono til små etiketter som på et galleriskilt. */
:root {
  --bg: #ffffff;
  --paper: #f3f6f3;
  --ink: #14211a;
  --green: #0f3b29;
  --green-hover: #185a3e;
  --mint: #d9e7dd;
  --muted: #64746b;
  --line: #e2e8e3;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --gap: clamp(14px, 2vw, 28px);
  --radius: 6px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.wrap { padding-inline: var(--gutter); max-width: 1600px; margin-inline: auto; }
.mono { font-family: var(--mono); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.eyebrow.light { color: var(--mint); }

h1, h2 {
  margin: 0;
  font-family: var(--display);
  font-stretch: 118%;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
  color: var(--green);
}

/* ---------- Knapper ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 600 15px/1 var(--body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-hover); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-white { background: #fff; color: var(--green); }
.btn-white:hover { background: var(--mint); }
.btn-lg { padding: 18px 30px; font-size: 17px; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.btn svg .fill { fill: currentColor; stroke: none; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: calc(64px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  background: rgb(255 255 255 / .92);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.02em;
  color: var(--green);
  text-decoration: none;
  white-space: nowrap;
}
.logo span { color: var(--muted); font-weight: 400; }
.logo.small { font-size: 15px; }

.mainnav { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 34px); }
.mainnav .btn { padding: 10px 18px; font-size: 14px; }

.navlink {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.navlink:hover, .navlink[aria-current="page"] { color: var(--green); }
.navlink[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--green);
}

@media (max-width: 520px) {
  #nav-cars { display: none; }
  .logo { font-size: 16px; }
  .mainnav .btn { padding: 9px 14px; font-size: 13px; }
}

/* ---------- Hero: forsidebilledet i fuld bredde med teksten ovenpå ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(460px, 62vh, 640px);
  background: var(--green);
  color: #fff;
  overflow: hidden;
}
.hero.has-photo { min-height: clamp(520px, calc(100vh - 64px), 980px); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; animation: settle 1.6s cubic-bezier(.2,.7,.2,1) both; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(6 22 14 / .82) 0%, rgb(6 22 14 / .35) 45%, rgb(6 22 14 / .05) 75%);
}
@keyframes settle { from { transform: scale(1.04); } }

.hero-content {
  position: relative;
  width: 100%;
  display: grid;
  gap: clamp(14px, 2vw, 22px);
  justify-items: start;
  padding-block: 64px clamp(40px, 6vw, 88px);
}
.hero h1 { color: #fff; font-size: clamp(36px, 7.4vw, 120px); max-width: 13ch; overflow-wrap: normal; }
.hero-sub { margin: 0; max-width: 46ch; font-size: clamp(17px, 1.5vw, 21px); color: rgb(255 255 255 / .86); }
.hero-sub:empty { display: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
.btn-outline-white { border-color: rgb(255 255 255 / .7); color: #fff; }
.btn-outline-white:hover { background: #fff; color: var(--green); border-color: #fff; }

/* Portrætbillede på bred skærm: billedet står i sin egen form til højre */
@media (min-width: 900px) {
  .hero.is-portrait .hero-media {
    left: auto;
    width: min(44%, 620px);
    top: clamp(24px, 3vw, 40px);
    bottom: clamp(24px, 3vw, 40px);
    right: var(--gutter);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .hero.is-portrait .hero-media::after { display: none; }
  .hero.is-portrait .hero-content { padding-right: calc(min(44%, 620px) + var(--gutter) * 2); padding-block: 96px; }
  .hero.is-portrait h1 { font-size: clamp(36px, 4.8vw, 84px); }
  .hero.is-portrait .hero-credit { right: auto; left: var(--gutter); }
}

.hero-credit {
  position: absolute;
  text-decoration: none;
  right: var(--gutter);
  bottom: clamp(18px, 2.4vw, 28px);
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgb(255 255 255 / .75);
  transition: color .2s;
}
.hero-credit:hover { color: #fff; }
@media (max-width: 720px) { .hero-credit { display: none; } }

.tile .cap {
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-size: 14px;
  color: var(--ink);
}
.tile .cap .b {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

/* ---------- Portfolio ---------- */
.portfolio { padding-block: clamp(40px, 6vw, 80px) clamp(64px, 8vw, 120px); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 32px;
  margin-bottom: clamp(18px, 2.4vw, 28px);
}
.section-head > div { display: grid; gap: 12px; min-width: 0; }
.section-head h2 { font-size: clamp(32px, 5.6vw, 84px); }
.meta { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.brands {
  position: sticky;
  top: calc(64px + env(safe-area-inset-top, 0px));
  z-index: 10;
  margin: 0 calc(var(--gutter) * -1) clamp(18px, 2.4vw, 28px);
  padding: 12px var(--gutter);
  background: var(--bg);
  overflow-x: auto;
  scrollbar-width: none;
}
.brands::-webkit-scrollbar { display: none; }
.brands ul { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; width: max-content; }

.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 17px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font: 600 13px/1 var(--body);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .2s, background .2s, color .2s;
}
.chip:hover { border-color: var(--green); }
.chip .n { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip[aria-current="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.chip[aria-current="true"] .n { color: var(--mint); }

.grid { columns: 3 320px; column-gap: var(--gap); }

.tile {
  display: grid;
  gap: 10px;
  width: 100%;
  margin: 0 0 calc(var(--gap) + 6px);
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  break-inside: avoid;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
}
.tile .frame { display: block; border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.tile img {
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity .6s ease, transform 1s cubic-bezier(.2,.7,.2,1);
}
.tile img.loaded { opacity: 1; }
.tile:hover img { transform: scale(1.03); }
.tile .cap { min-width: 0; }
.tile .cap .c { min-width: 0; overflow-wrap: anywhere; }

/* Album sat til Landskab eller Portræt: ens felter i et pænt gitter */
.grid.uniform {
  columns: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: calc(var(--gap) + 6px) var(--gap);
}
.grid.uniform .tile { margin: 0; align-content: start; }
.grid.uniform .frame { aspect-ratio: 3 / 2; }
.grid.uniform.portrait .frame { aspect-ratio: 4 / 5; }
.grid.uniform.portrait { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.grid.uniform .frame img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 720px) {
  .grid { columns: 2; column-gap: 10px; }
  .grid.uniform { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
  .tile { margin-bottom: 18px; gap: 7px; }
  .tile .cap { flex-direction: column; gap: 2px; font-size: 13px; }
}

.empty { max-width: 60ch; padding-block: 8px 24px; color: var(--muted); }
.empty p { margin: 0; }
.empty-title { margin-bottom: 6px !important; font-weight: 600; color: var(--ink); }

/* ---------- Album-kort ---------- */
/* Forsidebilledet vises i sit eget format (portræt eller landskab) */
.albums-grid { columns: 3 320px; column-gap: var(--gap); }
.album-card {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(28px, 3vw, 44px);
  break-inside: avoid;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.album-card .frame {
  position: relative;
  display: block;
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}
.album-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .6s ease, transform 1.1s cubic-bezier(.2,.7,.2,1);
}
.album-card img.loaded { opacity: 1; }
.album-card:hover img { transform: scale(1.04); }
.count-pill {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgb(255 255 255 / .92);
  color: var(--green);
  font: 500 12px/1 var(--mono);
  letter-spacing: .04em;
}
.album-meta { display: grid; gap: 4px; min-width: 0; }
.album-meta .b { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.album-meta .t {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.15;
  color: var(--ink);
  overflow-wrap: anywhere;
  transition: color .2s;
}
.album-card:hover .t { color: var(--green); }

/* ---------- Album-side ---------- */
.album-page { padding-block: clamp(28px, 4vw, 48px) clamp(64px, 8vw, 120px); }
.album-page h1 { font-size: clamp(34px, 6vw, 92px); }
.back-link {
  display: inline-flex;
  gap: 8px;
  margin-bottom: clamp(24px, 3.4vw, 44px);
  font-weight: 600;
  font-size: 15px;
  color: var(--green);
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.album-nav { margin-top: clamp(40px, 6vw, 80px); padding-top: 28px; border-top: 1px solid var(--line); }
.next-album { display: inline-grid; gap: 8px; text-decoration: none; }
.next-album .t {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(24px, 3.4vw, 44px);
  text-transform: uppercase;
  color: var(--green);
}
.next-album:hover .t { color: var(--green-hover); }

/* ---------- Om mig – teaser på forsiden ---------- */
.teaser {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: center;
  padding-block: clamp(56px, 8vw, 120px);
  border-top: 1px solid var(--line);
}
.teaser-photo { margin: 0; aspect-ratio: 4 / 5; max-width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.teaser-photo img { width: 100%; height: 100%; object-fit: cover; }
.teaser-text { display: grid; gap: 18px; justify-items: start; min-width: 0; }
.teaser-text h2 { font-size: clamp(32px, 4.6vw, 68px); }
.teaser-copy { margin: 0; max-width: 56ch; font-size: clamp(17px, 1.4vw, 20px); color: var(--muted); }
.teaser.no-photo { grid-template-columns: minmax(0, 1fr); }

.arrow-link {
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
  border-bottom: 1.5px solid var(--mint);
  padding-bottom: 3px;
  transition: border-color .2s;
}
.arrow-link:hover { border-color: var(--green); }

/* ---------- Om mig – side ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: start;
  padding-block: clamp(40px, 7vw, 104px);
}
.portrait { margin: 0; aspect-ratio: 4 / 5; max-width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--paper); position: sticky; top: 96px; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-text { display: grid; gap: 22px; min-width: 0; }
.about-text h1 { font-size: clamp(40px, 6.4vw, 104px); }
.headline { margin: 0; font-size: clamp(19px, 1.7vw, 24px); font-weight: 500; color: var(--ink); max-width: 40ch; }
.headline:empty { display: none; }
.prose { max-width: 62ch; color: #33443a; font-size: 18px; line-height: 1.7; }
.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }
.about-links { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 8px; }
.about.no-photo { grid-template-columns: minmax(0, 1fr); max-width: 900px; }

@media (max-width: 800px) {
  .teaser, .about { grid-template-columns: minmax(0, 1fr); }
  .teaser-photo, .portrait { max-width: 440px; position: static; }
}

/* ---------- Bestilling ---------- */
.cta { background: var(--green); color: #fff; }
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px 64px;
  padding-block: clamp(64px, 9vw, 136px);
}
.cta-text { display: grid; gap: 20px; max-width: 760px; min-width: 0; }
.cta h2 { color: #fff; font-size: clamp(36px, 6vw, 92px); }
.cta-text p:last-child { margin: 0; max-width: 52ch; font-size: clamp(17px, 1.4vw, 20px); color: var(--mint); }
.cta-actions { display: grid; gap: 14px; justify-items: start; }
.mail { font-family: var(--mono); font-size: 14px; color: var(--mint); user-select: all; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px));
}
.foot-links { display: flex; flex-wrap: wrap; gap: 24px; font-size: 14px; color: var(--muted); }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--green); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  grid-template-rows: auto minmax(0, 1fr);
  background: rgb(255 255 255 / .985);
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
  animation: fade .25s ease;
}
@keyframes fade { from { opacity: 0; } }

.lb-top {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 12px 0 var(--gutter);
}
.lb-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .08em; }

.lb-stage {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding-block: 8px 28px;
}
.lb-stage img { max-height: calc(100% - 40px); max-width: 100%; object-fit: contain; border-radius: 3px; user-select: none; -webkit-user-drag: none; }
.lb-stage figcaption { display: flex; gap: 14px; align-items: baseline; font-size: 15px; }
.lb-stage figcaption .mono { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--green); }

.lb-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background .2s;
}
.lb-btn:hover { background: var(--paper); }
.lb-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lb-nav { grid-row: 2; align-self: center; justify-self: center; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }

@media (max-width: 720px) {
  .lightbox { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .lb-nav { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
