/* Jost (SIL Open Font License, finns på Google Fonts) – gratis geometrisk sans i Futuras anda.
   Ligger på sajten själv (inte hos Google Fonts) så att inga besökardata skickas till Google. */
@font-face {
  font-family: "Jost";
  src: url("/fonts/jost-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Pirata One (SIL OFL) för namnet/logotypen, också lokalt */
@font-face {
  font-family: "Pirata One";
  src: url("/fonts/pirata-one-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Jost", sans-serif;
  --pad: 20px;
  --fg: #fff;
  --bg: #000;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 20px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}

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

img { display: block; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Ljust tema (About-sidan) */
body.light { --fg: #000; --bg: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 99;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.site-header > * { pointer-events: auto; }

/* Namnet skrivs exakt som i CMS:et (stora/små bokstäver styrs där) */
.title {
  padding: var(--pad);
  font-family: "Pirata One", var(--font);
  font-size: 40px;
  line-height: 36px;
  font-weight: 400;
}

.menu {
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.menu-toggle {
  width: 30px;
  height: 30px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--fg);
  padding: 0;
}

.menu-toggle svg { width: 100%; height: 100%; display: block; }
.menu-toggle line { stroke: currentColor; stroke-width: 2; transition: transform .3s ease; transform-origin: center; }
.menu.open .menu-toggle .vert { transform: scaleY(0); }

.nav { display: none; list-style: none; margin-top: 10px; }
.menu.open .nav { display: block; }
.nav a {
  font-size: 36px;
  line-height: 43.2px;
  text-transform: lowercase;
}
.nav a:hover { opacity: .6; }

/* ---------- Startsida: bildspel ---------- */
.slideshow {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.track {
  display: flex;
  height: 100%;
  transition: transform .3s ease;
}

.slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex: 1 1 0;
  min-width: 0;
}

.nav-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20%;
  z-index: 2;
  background: none;
  border: 0;
}
/* Egna pilpekare. Hotspot i pilens mitt; w-/e-resize som reserv. */
.nav-zone.prev { left: 0;  cursor: url("/cursors/arrow-left.svg") 20 20, w-resize; }
.nav-zone.next { right: 0; cursor: url("/cursors/arrow-right.svg") 20 20, e-resize; }

/* Klick i mitten går framåt, så den får också högerpilen */
.track { cursor: url("/cursors/arrow-right.svg") 20 20, e-resize; }

/* ---------- Projektgalleri ---------- */
/* Bilderna visas hela (beskärs inte) med luft runt, mot svart bakgrund */
.gallery .slide { padding: 90px 60px 110px; }
.gallery .slide img { object-fit: contain; }
.gallery .slide video {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: contain;
  display: block;
}

.gallery-info,
.gallery-counter,
.gallery-close {
  position: absolute;
  bottom: var(--pad);
  z-index: 3;
  font-size: 20px;
  line-height: 24px;
}

.gallery-info { left: var(--pad); max-width: 40%; }
.gallery-info h2 { font-size: inherit; font-weight: 400; text-transform: lowercase; }
.gallery-info p { opacity: .7; }
.gallery-info a { text-decoration: underline; text-underline-offset: 2px; }

.gallery-counter { right: var(--pad); }

.gallery-close {
  left: 50%;
  transform: translateX(-50%);
  display: block;
  width: 26px;
  height: 26px;
  color: var(--fg);
}
.gallery-close svg { display: block; width: 100%; height: 100%; }
.gallery-close path { fill: currentColor; }
.gallery-close:hover { opacity: .6; }

/* ---------- About ---------- */
.about {
  display: flex;
  min-height: 100vh;
}

.profile {
  position: sticky;
  top: 0;
  width: 50%;
  height: 100vh;
  flex: none;
}

.profile img { width: 100%; height: 100%; object-fit: cover; }

.profile .credit {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 17px;
  color: #fff;
  font-size: 14px;
  line-height: 18px;
}

.text {
  width: 50%;
  padding: 66px 30px 40px;
}

.text p + p { margin-top: 20px; }
.text .group { margin-top: 20px; }
.text a { text-decoration: underline; text-underline-offset: 2px; }
.text a:hover { opacity: .6; }

/* ---------- Work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.work-item {
  position: relative;
  display: block;
  height: 80vh;
  overflow: hidden;
}

.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .6s ease-in-out;
}

.work-item:hover img { opacity: .75; }

.work-item h2 {
  position: absolute;
  left: var(--pad);
  bottom: var(--pad);
  font-size: 20px;
  font-weight: 400;
  text-transform: lowercase;
  opacity: 0;
  transition: opacity .3s ease;
}
.work-item:hover h2 { opacity: 1; }

/* Pekskärmar (iPad m.fl.) kan inte hovra, så där syns titlarna alltid */
@media (hover: none) {
  .work-item h2 { opacity: 1; }
}

/* ---------- Textsida (Integritet) ---------- */
.page-text {
  max-width: 720px;
  padding: 110px var(--pad) 60px;
}
.page-text h2 { font-size: 20px; font-weight: 400; text-transform: uppercase; letter-spacing: .04em; margin: 32px 0 8px; }
.page-text p + p, .page-text ul { margin-top: 12px; }
.page-text ul { padding-left: 20px; }
.page-text a { text-decoration: underline; text-underline-offset: 2px; }
.text-button {
  margin-top: 24px;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* ---------- Cookie-banner ---------- */
.consent {
  position: fixed;
  left: var(--pad);
  right: var(--pad);
  bottom: var(--pad);
  z-index: 100;
  max-width: 460px;
  margin-left: auto;
  padding: 16px 18px;
  background: #fff;
  color: #000;
  font-size: 16px;
  line-height: 21px;
}
.consent[hidden] { display: none; }
.consent a { text-decoration: underline; text-underline-offset: 2px; }
.consent-buttons { display: flex; gap: 8px; margin-top: 12px; }
.consent-buttons button {
  flex: 1;
  padding: 8px 12px;
  background: #fff;
  color: #000;
  border: 1px solid #000;
  font: inherit;
  text-transform: lowercase;
  cursor: pointer;
}
.consent-buttons button:hover { background: #000; color: #fff; }

/* Bilder tonas in när de laddats */
img.fade { opacity: 0; transition: opacity .6s ease-in-out; }
img.fade.loaded { opacity: 1; }

/* ---------- Mobil ---------- */
@media (max-width: 767px) {
  .title, .nav a { font-size: 28px; line-height: 32px; }
  .site-header { --pad: 16px; }

  .about { flex-direction: column; }
  .profile { position: relative; width: 100%; height: 75vh; }
  .text { width: 100%; padding: 30px 16px 40px; }

  .gallery .slide { padding: 70px 0 120px; }
  .gallery-info { max-width: calc(100% - 2 * var(--pad)); bottom: 52px; font-size: 16px; line-height: 20px; }
  .gallery-close, .gallery-counter { font-size: 16px; }

  .work-grid { grid-template-columns: 1fr; }
  .work-item { height: 75vh; }
  .work-item h2 { opacity: 1; }
}

/* Romerska siffror i titlar (Byredo II) behåller versaler trots lowercase */
.numeral { text-transform: none; }
