@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600&display=swap');

:root {
  --paper: #f5f1e9;
  --paper-deep: #e9e0d2;
  --ink: #29251f;
  --muted: #766b5e;
  --line: #d8cdbd;
  --accent: #795b3d;
  --content-width: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", sans-serif;
  line-height: 1.65;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: white; padding: .7rem 1rem; z-index: 10;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.site-header {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
  text-align: center;
}
.brand {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; max-width: min(100%, 440px);
}
.brand-logo {
  display: block; width: 100%; max-height: 190px; object-fit: contain;
}
.tagline {
  margin: .55rem 0 1.5rem; color: var(--muted);
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
}
.main-nav {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: .4rem 2.25rem; padding: 1rem 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.main-nav a {
  padding: .35rem 0; text-decoration: none; color: var(--muted);
  font-size: .95rem; border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--ink); border-color: var(--accent);
}
main { max-width: var(--content-width); margin: 0 auto; padding: 0 1.5rem; min-height: 55vh; }
.page { display: none; padding: 3rem 0 4rem; }
.page.active { display: block; }
.page-intro { max-width: 700px; margin: 0 auto 2.5rem; text-align: center; }
.eyebrow {
  color: var(--accent); text-transform: uppercase; letter-spacing: .15em;
  font-size: .75rem; font-weight: 700; margin: 0 0 .5rem;
}
h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; line-height: 1.2; }
h1 { font-size: clamp(2.3rem, 5vw, 3.5rem); margin: 0 0 .8rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); margin: 0 0 .8rem; }
.page-intro > p:last-child { color: var(--muted); margin: 0 auto; max-width: 580px; }

.project-list { display: grid; gap: 3.5rem; }
.project { border-bottom: 1px solid var(--line); padding-bottom: 3rem; }
.project:last-child { border-bottom: 0; padding-bottom: 0; }
.project-image {
  width: 100%; max-height: 690px; object-fit: cover;
  background: var(--paper-deep); border-radius: 3px;
}
.project-image.placeholder { min-height: 260px; object-fit: contain; padding: 2rem; }
.project-copy { max-width: 760px; margin: 1.25rem auto 0; }
.project-date { color: var(--accent); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .4rem; }
.project-copy h2 { margin-bottom: .6rem; }
.project-copy p { margin: .6rem 0 0; }
.project-extra { color: var(--muted); }

.story, .about-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem; align-items: start;
}
.story img, .about-layout img {
  width: 100%; max-height: 560px; object-fit: cover;
  background: var(--paper-deep); border-radius: 3px;
}
.story-copy p, .about-layout p { color: #51483e; }
.link-list { list-style: none; padding: 0; margin: 0 auto; max-width: 760px; }
.link-list li { padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.link-list a { font-family: "Playfair Display", Georgia, serif; font-size: 1.35rem; color: var(--accent); }
.link-list span { display: block; color: var(--muted); margin-top: .25rem; }
.edit-note { max-width: 760px; margin: 1.5rem auto 0; color: var(--muted); font-size: .9rem; }

.site-footer {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  max-width: var(--content-width); margin: 0 auto; padding: 1.5rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem;
}

@media (max-width: 680px) {
  .site-header { padding: 1.5rem 1rem 0; }
  .brand { max-width: min(100%, 360px); }
  .brand-logo { max-height: 150px; }
  .main-nav { gap: .3rem 1.2rem; }
  main { padding: 0 1rem; }
  .page { padding: 2.25rem 0 3rem; }
  .page-intro { margin-bottom: 2rem; }
  .project-list { gap: 2.5rem; }
  .project { padding-bottom: 2.5rem; }
  .story, .about-layout { grid-template-columns: 1fr; gap: 1.25rem; }
  .site-footer { padding: 1.25rem 1rem; }
}


/* Projektgalleri og stor billedvisning */
.project-gallery { width: 100%; }
.hero-image-button {
  display: block; width: 100%; padding: 0; border: 0; background: transparent;
  cursor: zoom-in; text-align: left;
}
.hero-image-button:focus-visible, .thumbnail-button:focus-visible,
.lightbox button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.project-thumbnails {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: .65rem; margin-top: .75rem;
}
.thumbnail-button {
  padding: 0; border: 1px solid var(--line); background: var(--paper-deep);
  border-radius: 3px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3;
}
.thumbnail-button img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.thumbnail-button:hover img { transform: scale(1.04); }
.lightbox {
  position: fixed; border: 0; padding: 3.5rem 4.5rem 2rem; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; background: rgba(20, 19, 17, .96); color: #fff; overflow: hidden;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(20, 19, 17, .94); }
.lightbox-figure { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; }
.lightbox-figure img { max-width: 100%; max-height: calc(100vh - 7rem); object-fit: contain; }
.lightbox-figure figcaption { color: #e8dfd1; font-size: .85rem; text-align: center; }
.lightbox button { color: white; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.25); cursor: pointer; }
.lightbox-close { position: absolute; top: 1rem; right: 1.25rem; font-size: 2rem; line-height: 1; width: 2.75rem; height: 2.75rem; border-radius: 50%; }
.lightbox-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 2.75rem; height: 3.5rem; border-radius: 3px; font-size: 2.25rem; line-height: 1; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox button:disabled { opacity: .35; cursor: default; }
@media (max-width: 680px) {
  .project-thumbnails { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
  .lightbox { padding: 3.5rem 2.75rem 2rem; }
  .lightbox-prev { left: .35rem; }
  .lightbox-next { right: .35rem; }
  .lightbox-arrow { width: 2.2rem; height: 3rem; }
}
