/*
  Jens-Julius Dall — Film Portfolio
  Version 1

  Redigér helst kun farver/afstande her, hvis du vil ændre designet.
  Filmene redigeres i data/films.js.
*/

:root {
  --bg: #0b0b0b;
  --bg-soft: #111111;
  --bg-elevated: #161616;
  --text: #f4f1ea;
  --muted: #a7a096;
  --muted-strong: #c7c0b7;
  --line: rgba(244, 241, 234, 0.12);
  --line-strong: rgba(244, 241, 234, 0.24);
  --accent: #e8d9bc;
  --accent-soft: rgba(232, 217, 188, 0.12);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --container: 1180px;
  --header-height: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(232, 217, 188, 0.08), transparent 34rem),
    linear-gradient(180deg, #080808 0%, var(--bg) 42%, #090909 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

img,
iframe {
  max-width: 100%;
}

img {
  display: block;
}

button,
a {
  color: inherit;
}

button {
  font: inherit;
}

code {
  padding: 0.15em 0.35em;
  border: 1px solid var(--line);
  border-radius: 0.35em;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

::selection {
  color: #0b0b0b;
  background: var(--accent);
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  transform: translateY(-150%);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  color: #0b0b0b;
  background: var(--accent);
  text-decoration: none;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 32px;
  border-bottom: 1px solid transparent;
  color: var(--text);
  transition: background 250ms ease, border-color 250ms ease, backdrop-filter 250ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  border-color: var(--line);
  background: rgba(8, 8, 8, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}

.brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
}

.brand__text {
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.site-nav a {
  position: relative;
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.45rem;
  width: 100%;
  height: 1px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--accent);
  transition: transform 220ms var(--ease);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
  border: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.nav-toggle__line {
  display: block;
  width: 28px;
  height: 1px;
  margin: 7px 0;
  background: currentColor;
  transition: transform 220ms var(--ease), opacity 180ms ease;
}

.nav-toggle__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: calc(var(--header-height) + 5rem) 0 7rem;
}

.hero__background {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__grain {
  position: absolute;
  inset: -50%;
  opacity: 0.16;
  background-image:
    linear-gradient(115deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(245deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px, 76px 76px;
  animation: drift 22s linear infinite;
}

.hero__glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
}

.hero__glow--one {
  right: 6vw;
  top: 16vh;
  width: 34vw;
  height: 34vw;
  background: radial-gradient(circle, rgba(232, 217, 188, 0.12), transparent 68%);
}

.hero__glow--two {
  left: -14vw;
  bottom: 10vh;
  width: 46vw;
  height: 46vw;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.055), transparent 68%);
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(48px, 48px, 0) rotate(1deg); }
}

.hero__content {
  position: relative;
  max-width: 930px;
}

.eyebrow {
  margin: 0 0 1.2rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-weight: 450;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.hero h1 {
  max-width: 920px;
  font-size: clamp(3rem, 8vw, 8rem);
}

.hero__subtitle {
  margin: 1.4rem 0 0;
  color: var(--muted-strong);
  font-size: clamp(1.25rem, 2.4vw, 2.1rem);
  letter-spacing: -0.03em;
}

.hero__intro {
  max-width: 650px;
  margin: 1.6rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.72rem 1.2rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 180ms var(--ease), border-color 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button--primary {
  color: #111;
  border-color: var(--accent);
  background: var(--accent);
}

.button--ghost:hover,
.button--ghost:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.scroll-cue {
  position: absolute;
  right: 32px;
  bottom: 32px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.scroll-cue__line {
  display: block;
  width: 1px;
  height: 72px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.section {
  padding: clamp(5rem, 9vw, 9rem) 0;
}

.section--featured,
.section--about {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.section-heading {
  max-width: 730px;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.section-heading h2 {
  font-size: clamp(3rem, 8vw, 7.5rem);
}

.section-heading p:not(.eyebrow) {
  max-width: 620px;
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.filters {
  position: sticky;
  top: var(--header-height);
  z-index: 10;
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  margin: 0 0 2rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 11, 11, 0.96), rgba(11, 11, 11, 0.86));
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.68rem 1rem;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms var(--ease);
}

.filter:hover,
.filter:focus-visible {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  color: var(--text);
}

.filter.is-active {
  border-color: var(--accent);
  color: #111;
  background: var(--accent);
}

.film-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.1rem, 2.2vw, 1.6rem);
}

.film-card {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018));
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset;
  transition: transform 260ms var(--ease), border-color 260ms ease, background 260ms ease;
}

.film-card:hover,
.film-card:focus-within {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.022));
}

.film-card.is-hidden {
  display: none;
}

.film-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 0;
  color: var(--text);
  background: #171717;
  cursor: pointer;
}

.film-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.005);
  opacity: 0.78;
  filter: saturate(0.92) contrast(1.04);
  transition: transform 620ms var(--ease), opacity 260ms ease, filter 260ms ease;
}

.film-card:hover .film-card__media img,
.film-card:focus-within .film-card__media img {
  transform: scale(1.045);
  opacity: 0.94;
  filter: saturate(1) contrast(1.08);
}

.film-card__media::after,
.featured-film__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.54) 100%),
    radial-gradient(circle at 50% 50%, transparent 0%, rgba(0,0,0,0.2) 100%);
  pointer-events: none;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.52);
  backdrop-filter: blur(10px);
  transition: transform 220ms var(--ease), background 220ms ease, border-color 220ms ease;
}

.play-button::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid var(--text);
}

.film-card__media:hover .play-button,
.film-card__media:focus-visible .play-button,
.featured-film__media:hover .play-button,
.featured-film__media:focus-visible .play-button {
  transform: translate(-50%, -50%) scale(1.06);
  border-color: var(--accent);
  background: rgba(10, 10, 10, 0.68);
}

.film-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(1.1rem, 2.1vw, 1.55rem);
}

.film-card__topline,
.featured-film__topline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.9rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.24rem 0.55rem;
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.year {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.film-card h3,
.featured-film h3 {
  margin: 0;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-weight: 450;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.film-card h3 {
  font-size: clamp(1.85rem, 3.2vw, 3rem);
}

.film-card__description {
  margin: 1rem 0 0;
  color: var(--muted);
}

.credits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: auto 0 0;
  padding-top: 1.4rem;
}

.credit {
  min-width: 0;
}

.credit dt {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.credit dd {
  margin: 0.25rem 0 0;
  color: var(--muted-strong);
  font-size: 0.9rem;
}

.featured-film {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.featured-film__media {
  position: relative;
  display: block;
  width: 100%;
  min-height: 430px;
  overflow: hidden;
  border: 0;
  color: var(--text);
  background: #171717;
  cursor: pointer;
}

.featured-film__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
  transition: transform 700ms var(--ease), opacity 260ms ease;
}

.featured-film:hover .featured-film__media img,
.featured-film:focus-within .featured-film__media img {
  transform: scale(1.035);
  opacity: 0.95;
}

.featured-film__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.4rem, 3vw, 2.4rem);
}

.featured-film h3 {
  font-size: clamp(2.3rem, 5vw, 5.2rem);
}

.featured-film__description {
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.featured-film .credits {
  margin-top: 1.7rem;
}

.empty-state {
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: start;
}

.about-copy,
.contact-card {
  color: var(--muted-strong);
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  letter-spacing: -0.02em;
}

.about-copy p,
.contact-card p {
  margin: 0;
}

.about-copy p + p,
.contact-card p + p {
  margin-top: 1.2rem;
}

.contact-card {
  padding: clamp(1.35rem, 3vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.032);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.contact-links a {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 180ms var(--ease), background 180ms ease, border-color 180ms ease;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.footer-left {
  justify-self: start;
}

.footer-center {
  justify-self: center;
  opacity: 1;
  font-size: 0.8rem;
  text-align: center;
}

.footer-right {
  justify-self: end;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--muted-strong);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 26px;
}

.video-modal.is-open {
  display: flex;
}

.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(18px);
}

.video-modal__panel {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
}

.video-modal__close {
  display: block;
  margin-left: auto;
  margin-bottom: 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.58rem 0.9rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.video-modal__close:hover,
.video-modal__close:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.video-modal__frame {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #000;
  box-shadow: var(--shadow);
}

.video-modal__frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video-modal__meta {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.video-modal__meta strong {
  color: var(--text);
  font-weight: 700;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  :root {
    --header-height: 68px;
  }

  .site-header {
    padding: 0 20px;
  }

  .brand__text {
    display: none;
  }

  .nav-toggle {
    position: relative;
    z-index: 102;
    display: block;
  }

  .nav-toggle.is-open .nav-toggle__line:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .nav-toggle.is-open .nav-toggle__line:nth-child(2) {
    transform: translateY(-4px) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 101;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    transform: translateX(100%);
    background: rgba(8, 8, 8, 0.96);
    backdrop-filter: blur(18px);
    transition: transform 280ms var(--ease);
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav a {
    font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
    font-size: clamp(2.4rem, 12vw, 5rem);
    font-weight: 450;
    letter-spacing: -0.045em;
    text-transform: none;
  }

  .hero {
    align-items: end;
    padding-bottom: 6rem;
  }

  .hero h1 {
    font-size: clamp(4.1rem, 18vw, 8rem);
  }

  .scroll-cue {
    right: 20px;
    bottom: 20px;
  }

  .featured-film,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .featured-film__media {
    min-height: auto;
    aspect-ratio: 16 / 9;
  }

  .film-card {
    grid-column: span 12;
  }

  .credits {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .section {
    padding: 4rem 0;
  }

  .filters {
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .film-card,
  .featured-film,
  .contact-card {
    border-radius: 20px;
  }

  .play-button {
    width: 60px;
    height: 60px;
  }

  .site-footer__inner {
    flex-direction: column;
  }

  .video-modal {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
