/* ===== Mathis Emil – portfolio =====
   Farverne følger automatisk den besøgendes system (lys/mørk).
   Ret farverne her ét sted. */

@font-face { font-family: "Geist"; src: url("fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --panel: #efefed;
  --tile: #f3f3f1;
  --tile-hover: #ebebe8;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.08);
  --max: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --ink: #ededed;
    --muted: #9a9a9a;
    --line: #262626;
    --panel: #1e1e1e;
    --tile: #191919;
    --tile-hover: #212121;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

img { display: block; max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.muted { color: var(--muted); }
.mono { font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; }
.label { display: block; }

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 12px 24px; padding: 32px 0;
}
.brand { font-weight: 500; }
.site-header nav { display: flex; gap: 24px; color: var(--muted); }
.site-header nav a { padding: 10px 0; }

/* Intro */
.intro { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); }
.intro p {
  margin: 0; max-width: 30ch;
  font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; letter-spacing: -0.015em;
}
.intro p + p { margin-top: 16px; font-size: 16px; }

/* Filter */
.filters { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 28px; }
.filters a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.filters a[aria-current] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 44px 20px;
}
.card { display: flex; flex-direction: column; gap: 12px; }
.card[hidden] { display: none; }
@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 12px; }
  .card-text { font-size: 14px; }
}
.card:hover { text-decoration: none; }
.card:hover .title { text-decoration: underline; text-underline-offset: 3px; }
.card .cover { transition: background-color .25s ease; }
.card .cover img { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.card:hover .cover { background: var(--tile-hover); }
.card:hover .cover img { transform: scale(1.03); }
.card-text { display: flex; flex-direction: column; }
.title { font-weight: 500; }
.role { margin-top: 4px; }

.cover { width: 100%; aspect-ratio: 1 / 1; }
.cover-empty { display: flex; align-items: flex-end; padding: 14px; color: var(--muted); font-weight: 500; background: var(--tile); }
/* Rammen er kvadratisk, men billedet beholder sit eget format og står nederst til venstre:
   et kvadratisk cover fylder rammen, et filmbillede står som en bred stribe, en plakat som en høj. */
/* Hver udgivelse ligger på en lille tile. Billedet står centreret i sit eget format med lidt luft omkring. */
.cover-frame {
  display: flex; align-items: center; justify-content: center;
  padding: 4%; background: var(--tile); overflow: hidden; min-height: 0;
}
.cover-frame img { width: auto; height: auto; max-width: 100%; max-height: 100%; box-shadow: var(--shadow); }
.cover-full img { width: auto; height: auto; max-width: 100%; max-height: 85vh; }
/* Brede billeder (film) får hele bredden over teksten i stedet for en smal kolonne. */
.release-wide .release-cover { flex: 1 1 100%; max-width: 1100px; }
.release-wide .cover-full img { width: 100%; }

/* About */
.about {
  display: flex; flex-wrap: wrap; gap: 40px clamp(32px, 6vw, 96px);
  margin-top: clamp(96px, 12vw, 160px); padding-top: 40px; border-top: 1px solid var(--line);
}
.portrait { flex: 1 1 240px; max-width: 320px; aspect-ratio: 4 / 5; object-fit: cover; background: var(--panel); }
.about-text { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.about-text p { margin: 0; max-width: 56ch; }
.about-text .lead { font-size: 20px; line-height: 1.45; letter-spacing: -0.01em; max-width: 46ch; color: var(--ink); }
.about-text a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Contact */
.contact {
  margin-top: clamp(80px, 10vw, 128px); padding-top: 40px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 16px;
}
.email {
  align-self: flex-start;
  font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -0.02em; line-height: 1.2;
  text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}

/* Footer */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  margin-top: 96px; padding: 24px 0 40px;
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; color: var(--muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }

/* Release page */
.back { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; }
.release {
  display: flex; flex-wrap: wrap; gap: 40px clamp(32px, 6vw, 96px);
  padding: 24px 0 96px;
}
.release-cover { flex: 1 1 340px; max-width: 600px; }
.release-info { flex: 999 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.release-info h1 {
  margin: 4px 0 0; font-weight: 500;
  font-size: clamp(36px, 5vw, 64px); line-height: 1.02; letter-spacing: -0.035em;
}
.artist { margin: -8px 0 0; font-size: 20px; color: var(--muted); }
.role-line { margin: 0; }
.description { margin: 0; max-width: 52ch; font-size: 17px; line-height: 1.55; }
.player { display: block; width: 100%; max-width: 600px; border: 0; border-radius: 12px; }
.player-bandcamp, .player-soundcloud { border-radius: 0; }
.player-video { aspect-ratio: 16 / 9; height: auto; }
.listen-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.listen-links a { text-decoration: underline; text-underline-offset: 3px; min-height: 32px; display: inline-flex; align-items: center; }
.credits { margin: 8px 0 0; max-width: 600px; border-bottom: 1px solid var(--line); }
.credits div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.credits dt, .credits dd { margin: 0; }
.credits dd { text-align: right; }
.release-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  padding-top: 32px; border-top: 1px solid var(--line);
}
.release-foot a:first-child { font-size: 20px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card .cover, .card .cover img { transition: none; }
  .card:hover .cover img { transform: none; }
}

/* Forhåndsvisning fra admin */
.preview-banner { margin: 0 0 8px; padding: 12px 16px; border: 1px dashed var(--muted); border-radius: 8px; }
.preview-banner a { text-decoration: underline; }

/* Stor knap til udgivelsens egen side */
.site-button {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  max-width: 600px; min-height: 64px; padding: 0 24px;
  background: var(--ink); color: var(--bg);
  font-size: 19px; font-weight: 500; letter-spacing: -0.01em;
  transition: opacity .15s ease;
}
.site-button:hover { text-decoration: none; opacity: .85; }
.site-button span:last-child { font-size: 22px; }

/* ===== Bløde sideskift =====
   Moderne browsere (Chrome, Edge, Safari): siden glider over, og coveret flyver fra tilen
   op på sin plads på udgivelsessiden (View Transitions).
   Andre browsere (fx Firefox og Zen): en kort fade ud og ind. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root) { animation: 180ms ease both vt-fade-out; }
::view-transition-new(root) { animation: 320ms cubic-bezier(.2,.7,.2,1) both vt-fade-in; }
::view-transition-group(*) { animation-duration: 420ms; animation-timing-function: cubic-bezier(.2,.7,.2,1); }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; transform: translateY(8px); } }

.fade-nav body { animation: vt-fade-in 320ms cubic-bezier(.2,.7,.2,1) both; }
.fade-nav body.leaving { animation: vt-fade-out 150ms ease both; }

/* Studio (under About) */
.studio { margin-top: clamp(64px, 8vw, 104px); display: flex; flex-direction: column; gap: 32px; }
.studio-text { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.studio-text p { margin: 0; max-width: 56ch; }
.studio-text .lead { font-size: 20px; line-height: 1.45; letter-spacing: -0.01em; max-width: 46ch; color: var(--ink); }
.studio-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.studio-count-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.studio-count-1 img { grid-column: 1; }
.studio-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--panel); }
@media (max-width: 600px) {
  .studio-gallery, .studio-count-1 { grid-template-columns: 1fr; }
  .studio-count-1 img { grid-column: auto; }
}
