/* Poetry Beyond Worlds — local English preview.
   Hungarian (HU) styles are not included yet. */

:root {
  --night: #070b16;
  --black: #000000;
  --starlight: #f4efe6;
  --mist: #c9c2b4;
  --gold: #c6a15b;
  --sand: #d9c4a0;
  --line: rgba(198, 161, 91, 0.38);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --space: clamp(1.25rem, 3vw, 2.75rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--starlight);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.7;
  color-scheme: dark;
}

img,
video {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

a:hover {
  color: var(--sand);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0;
  z-index: 5;
  transform: translateY(-120%);
  background: var(--night);
  color: var(--starlight);
  padding: 0.6rem 1rem;
}

.skip:focus {
  transform: none;
}

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

/* —— Homepage hero —— */

.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  background: var(--night);
  overflow: hidden;
}

/* Whole framed artwork. Contain keeps the sphinx, the woman, and the
   burned-in title inside the viewport. Near-black bars blend with the sky
   when a screen is wider or taller than the asset. */
.hero-picture {
  position: absolute;
  inset: 0;
  display: block;
  background: var(--night);
}

.hero-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: var(--night);
  animation: kenburns 24s ease-in-out infinite alternate;
}

@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}

.nav {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem var(--space);
  pointer-events: none;
}

.nav a,
.nav-group a {
  pointer-events: auto;
}

.nav a {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--starlight);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--gold);
}

.nav-group {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
}

.enter {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  opacity: 0;
  animation: enter-fade 1.1s ease 1.2s forwards;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.35rem;
  border: 1px solid var(--gold);
  background: rgba(7, 11, 22, 0.42);
  color: var(--starlight);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.enter:hover {
  background: rgba(7, 11, 22, 0.72);
  color: var(--sand);
}

@keyframes enter-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* —— Films —— */

.films {
  padding: clamp(4.5rem, 10vw, 8rem) var(--space) clamp(4rem, 8vw, 7rem);
  max-width: 1240px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.films h2,
.page h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
}

.films h2 {
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
}

.rule {
  width: 4.5rem;
  height: 1px;
  margin: 1.5rem 0 2.75rem;
  background: var(--gold);
  border: 0;
}

.film-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.75rem);
}

.film-card {
  min-width: 0;
}

.film-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.film-still {
  overflow: hidden;
  background: var(--black);
  aspect-ratio: 16 / 9;
}

.film-still img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.9s ease;
}

.film-card a:hover .film-still img,
.film-card a:focus-visible .film-still img {
  transform: scale(1.04);
}

.film-card h3 {
  margin: 1.15rem 0 0.85rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.watch {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--line);
  color: var(--sand);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.film-card a:hover .watch {
  border-color: var(--gold);
  color: var(--starlight);
}

/* —— Inner pages —— */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem var(--space);
  border-bottom: 1px solid rgba(198, 161, 91, 0.18);
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--sand);
}

.site-header .nav {
  position: static;
  padding: 0;
  width: auto;
  pointer-events: auto;
}

.site-header .nav a {
  text-shadow: none;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--space) 4rem;
  min-height: calc(100vh - 9rem);
  min-height: calc(100dvh - 9rem);
}

.page .byline {
  margin: 0.85rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.45rem;
  color: var(--sand);
}

.player {
  margin: 2.25rem 0 1.35rem;
  background: var(--black);
}

.player video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--black);
}

.note {
  max-width: 38rem;
  margin: 0;
  color: var(--mist);
  font-size: 1rem;
}

.film-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem 2.5rem;
  margin-top: 2.75rem;
}

.film-links a {
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

.film-links a:hover {
  color: var(--starlight);
}

.quiet {
  max-width: 36rem;
  margin-top: 1.5rem;
  color: var(--mist);
  font-size: 1.15rem;
}

.site-footer {
  padding: 1.5rem var(--space) 2rem;
  border-top: 1px solid rgba(198, 161, 91, 0.18);
  color: var(--mist);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 800px) {
  .film-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .enter {
    letter-spacing: 0.12em;
    font-size: 0.66rem;
    padding: 0.65rem 0.9rem;
    max-width: calc(100% - 2rem);
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .nav {
    padding-inline: 0.85rem;
  }

  .nav a {
    letter-spacing: 0.1em;
    font-size: 0.64rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-picture img,
  .enter {
    animation: none;
  }

  .enter {
    opacity: 1;
  }

  .film-still img {
    transition: none;
  }
}

.watch-dialog {
  width: min(960px, calc(100vw - 2rem));
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--black);
  color: var(--starlight);
}
.watch-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}
.watch-dialog video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}
.watch-close {
  margin: 0 0 0.5rem auto;
  display: block;
  border: 0;
  background: transparent;
  color: var(--sand);
  font: inherit;
  cursor: pointer;
}
