/* ============================================================
   SELMA VON POLHEIM GRAVESEN — Cinematography
   Design system inspired by big.dk:
   white canvas, 14px grotesque type, black pictogram tiles,
   gray uppercase meta, slide-in nav, funnel filter, black
   intro/transition overlay.
   ============================================================ */

:root {
  --black: #000;
  --white: #fff;
  --gray: #999;
  --gray-light: #e5e5e5;
  --fs: 14px;
  --lh: 1.28;
  --pad: 30px;
  --ease: cubic-bezier(0.77, 0, 0.175, 1);
}

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

html { font-size: var(--fs); }

body {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: var(--fs);
  line-height: var(--lh);
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
strong, b { font-weight: 600; }

::selection { background: var(--black); color: var(--white); }

/* ---------- intro / page-transition overlay ---------- */

.shutter {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(0);
  transition: transform 0.9s var(--ease);
  pointer-events: none;
}
.shutter svg { width: 180px; height: auto; opacity: 0; transition: opacity 0.45s ease; }
body.intro .shutter svg { opacity: 1; }
body.ready .shutter { transform: translateY(-100%); }
body.ready .shutter svg { opacity: 0; }
body.leaving .shutter { transform: translateY(0); transition-duration: 0.55s; }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  pointer-events: none;
}

.brand {
  position: fixed;
  top: 20px; left: var(--pad);
  z-index: 45;
  width: 90px; height: 24px;
  cursor: pointer;
  pointer-events: auto;
}
.brand .burger,
.brand .brand-logo {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  transition: opacity 0.35s ease;
}
.brand .burger span { display: block; height: 3px; width: 34px; background: var(--black); }
.brand .brand-logo { justify-content: center; }
.brand .brand-logo svg { width: 88px; height: auto; }
.brand .brand-logo { opacity: 0; }
.brand:hover .burger, body.nav-open .brand .burger { opacity: 0; }
.brand:hover .brand-logo, body.nav-open .brand .brand-logo { opacity: 1; }

/* dark header variant while shutter is closed */
body.intro .brand .burger span { background: var(--white); }

/* ---------- slide-in navigation ---------- */

.nav {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 42;
  min-width: 280px;
  background: var(--white);
  padding: 90px 60px 40px var(--pad);
  display: flex; flex-direction: column; gap: 4px;
  transform: translateX(-100%);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s ease;
  pointer-events: none;
}
body.nav-open .nav { transform: translateX(0); opacity: 1; pointer-events: auto; }
.nav a {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.5;
  transition: opacity 0.25s ease;
  padding: 2px 0;
}
.nav a:hover, .nav a.active { opacity: 1; }
.nav .nav-foot { margin-top: auto; font-size: 11px; color: var(--gray); text-transform: none; }
.nav-scrim {
  position: fixed; inset: 0; z-index: 41;
  background: transparent;
  display: none;
}
body.nav-open .nav-scrim, body.filter-open .nav-scrim { display: block; }

/* ---------- filter (funnel) ---------- */

.filter-toggle {
  position: fixed;
  top: 20px; right: var(--pad);
  z-index: 45;
  width: 34px; height: 24px;
  cursor: pointer;
  pointer-events: auto;
  display: flex; flex-direction: column; align-items: flex-end;
  justify-content: center; gap: 3px;
}
.filter-toggle i { display: block; height: 3px; background: var(--black); }
.filter-toggle i:nth-child(1) { width: 24px; margin-right: 0; }
.filter-toggle i:nth-child(2) { width: 16px; margin-right: 4px; }
.filter-toggle i:nth-child(3) { width: 10px; margin-right: 7px; }
.filter-toggle i:nth-child(4) { width: 6px;  margin-right: 9px; }
body.intro .filter-toggle i { background: var(--white); }

.filter-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 43;
  min-width: 260px;
  background: var(--white);
  padding: 70px var(--pad) 40px 50px;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s ease;
  pointer-events: none;
  overflow-y: auto;
  text-align: right;
}
body.filter-open .filter-panel { transform: translateX(0); opacity: 1; pointer-events: auto; }

.filter-group { margin-bottom: 14px; }
.filter-group > .fg-head {
  display: inline-flex; align-items: baseline; gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
}
.filter-group > .fg-head::before { content: "+"; font-weight: 500; }
.filter-group.open > .fg-head::before { content: "\2013"; }
.filter-group .fg-terms { display: none; padding: 6px 0 4px; }
.filter-group.open .fg-terms { display: block; }
.fg-terms button {
  display: block;
  width: 100%;
  text-align: right;
  background: none; border: 0;
  font: inherit;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 2px 0;
}
.fg-terms button:hover { color: var(--black); }
.fg-terms button.active { color: var(--black); font-weight: 600; }
.filter-clear {
  margin-top: 20px;
  background: none; border: 0; font: inherit;
  color: var(--gray); text-transform: uppercase; letter-spacing: 0.04em;
  cursor: pointer;
  display: none;
}
body.has-filter .filter-clear { display: inline-block; }
.filter-clear:hover { color: var(--black); }

/* ---------- project feed (index) ---------- */

.feed {
  max-width: 1260px;
  margin: 0 auto;
  padding: 56px var(--pad) 80px;
}

.row {
  display: grid;
  grid-template-columns: minmax(180px, 300px) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  margin-bottom: 64px;
}
.row.hidden { display: none; }

.row-info { text-align: right; }
.picto {
  display: inline-block;
  width: 72px; height: 72px;
  background: var(--black);
  margin-bottom: 44px;
}
.picto svg { width: 100%; height: 100%; display: block; }
.row-title {
  font-size: 21px;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 8px;
}
.row-meta {
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.row-media {
  position: relative;
  overflow: hidden;
  background: #f4f4f4;
}
.row-media img { width: 100%; }
.row-media .alt {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.row:hover .row-media .alt { opacity: 1; }

/* ---------- project detail ---------- */

.project {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 300px;
  gap: 48px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 90px var(--pad) 60px;
  align-items: start;
}

.p-side { position: sticky; top: 90px; text-align: right; }
.p-side .picto { margin-bottom: 30px; }
.p-title { font-size: 21px; font-weight: 400; line-height: 1.15; margin-bottom: 6px; }
.p-sub { color: var(--gray); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 28px; }
.facts { display: flex; flex-direction: column; gap: 12px; }
.fact .f-label {
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}
.fact .f-value { white-space: pre-line; }

.p-media { display: flex; flex-direction: column; gap: 10px; }
.p-media img { width: 100%; }

.p-text { position: sticky; top: 90px; }
.p-text p { margin-bottom: 14px; }
.p-text .awards { color: var(--gray); margin: 22px 0; }
.p-text .awards p { margin-bottom: 4px; }
.p-text .press h2 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.p-text .press a {
  display: block;
  color: var(--gray);
  padding: 1px 0;
}
.p-text .press a:hover { color: var(--black); }

.p-nav {
  max-width: 1500px;
  margin: 0 auto;
  padding: 30px var(--pad) 70px;
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.p-nav a { color: var(--gray); transition: color 0.2s ease; }
.p-nav a:hover { color: var(--black); }

/* ---------- static pages (about / contact / impressum) ---------- */

.page {
  display: grid;
  grid-template-columns: minmax(180px, 300px) minmax(0, 640px);
  gap: 56px;
  max-width: 1260px;
  margin: 0 auto;
  padding: 110px var(--pad) 80px;
}
.page-head { text-align: right; }
.page-head .picto { margin-bottom: 30px; }
.page-head h1 { font-size: 21px; font-weight: 400; line-height: 1.15; }
.page-head .sub { color: var(--gray); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 6px; }
.page-body p { margin-bottom: 14px; }
.page-body h2 {
  font-size: var(--fs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 30px 0 10px;
}
.page-body .muted { color: var(--gray); }
.page-body a { border-bottom: 1px solid var(--gray-light); }
.page-body a:hover { border-color: var(--black); }
.contact-mail { font-size: 26px; line-height: 1.2; margin-bottom: 30px; display: inline-block; border: 0 !important; }
.contact-mail:hover { color: var(--gray); }

/* ---------- footer ---------- */

.site-footer {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 var(--pad) 40px;
  color: var(--gray);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  gap: 24px;
}
.site-footer a:hover { color: var(--black); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  :root { --pad: 20px; }
  .row {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 56px;
  }
  .row-info { text-align: left; display: grid; grid-template-columns: 48px 1fr; gap: 4px 14px; align-items: end; }
  .row-info .row-meta { grid-column: 2; }
  .picto { width: 48px; height: 48px; margin-bottom: 0; }
  .row-title { font-size: 17px; }
  .project { grid-template-columns: 1fr; gap: 30px; padding-top: 80px; }
  .p-side { position: static; text-align: left; }
  .p-text { position: static; }
  .page { grid-template-columns: 1fr; gap: 30px; padding-top: 90px; }
  .page-head { text-align: left; }
  .p-side .picto, .page-head .picto { margin-bottom: 16px; }
}
