/* ---------- Typsnitt (självhostade, inga externa anrop) ---------- */
@font-face {
  font-family: "Big Shoulders Display";
  src: url("/fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Big Shoulders Display";
  src: url("/fonts/big-shoulders-display-latin-300-normal.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Big Shoulders Text";
  src: url("/fonts/big-shoulders-text-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Big Shoulders Text";
  src: url("/fonts/big-shoulders-text-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* ---------- Färger: regnvåt gata i natriumljus ---------- */
:root {
  --asfalt: #131c26;   /* bakgrund */
  --regn:   #22303d;   /* ytor och linjer */
  --dimma:  #93a3b3;   /* sekundär text */
  --ljus:   #e6ecf1;   /* primär text */
  --natrium:#f2a33a;   /* gatlyktans sken, enda accentfärgen */

  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --text: "Big Shoulders Text", "Arial Narrow", system-ui, sans-serif;

  --sida: min(72rem, 100% - 3rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgb(242 163 58 / 0.10), transparent 60%),
    var(--asfalt);
  color: var(--ljus);
  font-family: var(--text);
  font-size: 1.25rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--natrium);
  outline-offset: 4px;
  border-radius: 2px;
}

.wrap { width: var(--sida); margin-inline: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Startsida: skylten och dess spegling ---------- */
.hero {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 4rem;
}

.sign {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(6rem, 38vw, 17rem);
  line-height: 0.78;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.sign .word {
  display: block;
  color: var(--ljus);
  text-shadow: 0 0 0.35em rgb(242 163 58 / 0.18);
}

/* Spegelbilden i den våta asfalten */
.sign .reflection {
  display: block;
  transform: scaleY(-1);
  margin-top: 0.04em;
  margin-bottom: -0.2em; /* låt taglinen ligga över den bortblekta delen */
  color: var(--natrium);
  opacity: 0.55;
  filter: url("#ripple") blur(2px);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 72%);
          mask-image: linear-gradient(to top, #000 0%, transparent 72%);
  user-select: none;
  pointer-events: none;
}

.svg-defs { position: absolute; width: 0; height: 0; }

.tagline {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  line-height: 1.35;
  color: var(--dimma);
  position: relative; /* hamnar ovanpå spegelbilden */
}

/* ---------- Länkarna ---------- */
.destinations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 2.5rem 4rem;
  margin: 5rem 0 0;
  padding: 0;
  list-style: none;
}

.destination a {
  display: block;
  text-decoration: none;
  padding-top: 1.25rem;
  border-top: 3px solid var(--regn);
  transition: border-color 0.2s ease;
}

.destination .name {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  line-height: 1;
}

.destination .about {
  display: block;
  margin-top: 0.6rem;
  color: var(--dimma);
}

.destination .host {
  display: block;
  margin-top: 0.4rem;
  font-size: 1rem;
  color: var(--dimma);
  opacity: 0.75;
}

.destination a:hover,
.destination a:focus-visible { border-color: var(--natrium); }
.destination a:hover .name,
.destination a:focus-visible .name { color: var(--natrium); }

.site-footer {
  margin-top: 7rem;
  padding: 2rem 0 3rem;
  font-size: 1rem;
  color: var(--dimma);
}

/* ---------- Galleriet ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2rem 0;
}

.home-link {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.75rem;
  text-transform: uppercase;
  text-decoration: none;
}
.home-link:hover { color: var(--natrium); }

.gallery-head h1 {
  margin: 3rem 0 1.25rem;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3.5rem, 12vw, 8rem);
  line-height: 0.9;
}

.gallery-head p {
  margin: 0 0 3rem;
  max-width: 40ch;
  color: var(--dimma);
}

.gallery {
  columns: 3 18rem;
  column-gap: 1rem;
}

.gallery figure {
  margin: 0 0 1rem;
  break-inside: avoid;
}

.gallery button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--regn);
  cursor: zoom-in;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery button:hover img { filter: brightness(1.08); }

.empty {
  padding: 3rem 0;
  max-width: 44ch;
  color: var(--dimma);
}
.empty code {
  color: var(--ljus);
  font-size: 0.95em;
}

/* Helskärmsvisning */
.viewer {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(10 15 21 / 0.98);
  color: var(--ljus);
}
.viewer[open] {
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.viewer::backdrop { background: transparent; }

.viewer-bar {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem;
}

.viewer-bar button {
  font: inherit;
  font-size: 1rem;
  color: var(--ljus);
  background: var(--regn);
  border: 0;
  padding: 0.5rem 1rem;
  cursor: pointer;
}
.viewer-bar button:hover { background: var(--natrium); color: var(--asfalt); }

.viewer img {
  place-self: center;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 9rem);
  object-fit: contain;
}

.viewer figcaption {
  padding: 1rem;
  text-align: center;
  color: var(--dimma);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
