/**
 * Lovetsky.art — Programme
 * Editorial film catalog (concept v2)
 */

:root {
  --bg: #0c0b0a;
  --bg-elevated: #141210;
  --text: #eae6df;
  --muted: #8f877c;
  --accent: #d4835a;
  --accent-soft: rgba(212, 131, 90, 0.15);
  --line: rgba(234, 230, 223, 0.1);
  --max: 68rem;
  --nav-h: 3.5rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bar-h: calc(var(--nav-h) + var(--safe-top));
  --page-x: clamp(1.25rem, 4.5vw, 2.5rem);
  --section-y: clamp(2rem, 6vh, 3.5rem);
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  scroll-snap-type: y proximity;
  scroll-padding-top: var(--bar-h);
}

html.nav-scrolling {
  scroll-snap-type: none;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

picture {
  display: block;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Prevent intrinsic dimensions from widening layout (scoped — global breaks WP admin bar) */
.site-content img[width],
.site-content img[height] {
  width: 100% !important;
  height: auto !important;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #e8a07a;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--page-x);
  top: calc(var(--safe-top) + 0.5rem);
  z-index: 200;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.h-scroll-hint {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-sm);
}

.post-card__title a {
  color: inherit;
}

.post-card__title a:hover {
  color: var(--accent);
}

.post-card__media {
  display: block;
  color: inherit;
}

.error-page__lead,
.notes-page__feed {
  color: var(--muted);
  margin: var(--space-sm) 0 var(--space-lg);
}

.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;
}

.error-page__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.note-detail__media {
  margin: var(--space-lg) 0;
  max-width: 40rem;
}

.note-detail__body {
  color: var(--muted);
  line-height: 1.7;
  max-width: 40rem;
}

.prose {
  color: var(--text);
}

.prose > *:first-child {
  margin-top: 0;
}

.prose > *:last-child {
  margin-bottom: 0;
}

.prose h2,
.prose h3 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.25;
  margin: var(--space-lg) 0 var(--space-sm);
}

.prose h2 {
  font-size: clamp(1.35rem, 3vw, 1.65rem);
}

.prose h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
}

.prose p {
  margin: 0 0 var(--space-md);
  color: var(--muted);
}

.prose ul,
.prose ol {
  margin: 0 0 var(--space-md);
  padding-left: 1.35rem;
  color: var(--muted);
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose blockquote {
  margin: var(--space-md) 0;
  padding-left: var(--space-md);
  border-left: 3px solid var(--line);
  color: var(--muted);
  font-style: italic;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.prose a:hover {
  color: var(--text);
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: var(--space-md) 0;
  border-radius: 2px;
  border: 1px solid var(--line);
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.1em 0.35em;
}

.prose pre {
  margin: var(--space-md) 0;
  padding: var(--space-md);
  overflow-x: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.prose pre code {
  padding: 0;
  border: none;
  background: none;
}

.prose hr {
  margin: var(--space-lg) 0;
  border: none;
  border-top: 1px solid var(--line);
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.album-film-link {
  margin: 0 0 var(--space-md);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .film-card:hover .film-card__poster img,
  .still-card:hover .still-card__img img {
    transform: none;
  }
}

/* —— WordPress admin bar —— */
:root {
  --wp-admin-bar-h: 0px;
}

html.admin-bar {
  --wp-admin-bar-h: 32px;
  scroll-padding-top: calc(var(--bar-h) + var(--wp-admin-bar-h));
}

@media screen and (max-width: 782px) {
  html.admin-bar {
    --wp-admin-bar-h: 46px;
  }
}

html.admin-bar .site-bar-shell {
  top: var(--wp-admin-bar-h);
}

@media (max-width: 960px) {
  html.admin-bar .site-bar__nav {
    top: calc(var(--wp-admin-bar-h) + var(--bar-h));
  }
}

#wpadminbar img {
  width: auto !important;
  height: auto !important;
  max-width: none;
  display: inline;
}

/* —— Site bar —— */
.site-bar-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  min-height: var(--bar-h);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "logo toggle";
  align-items: center;
  column-gap: var(--space-md);
  padding: var(--safe-top) calc(var(--page-x) + var(--safe-right)) 0
    calc(var(--page-x) + var(--safe-left));
  background: rgba(12, 11, 10, 0.92);
  border-bottom: 1px solid var(--line);
}

.site-bar-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
}

.site-bar__logo {
  grid-area: logo;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  min-width: 0;
}

.site-bar__logo:hover {
  color: var(--accent);
}

.site-bar__nav {
  display: none;
  align-items: center;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li {
  flex-shrink: 0;
}

.site-nav li[hidden] {
  display: none !important;
}

.site-nav a {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.35rem 0;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
}

.icon {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
  flex-shrink: 0;
}

.nav-toggle {
  grid-area: toggle;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
  margin: 0;
  min-width: 2.75rem;
  min-height: 2.75rem;
  justify-self: end;
  position: relative;
  z-index: 1002;
}

.nav-toggle:focus-visible {
  border-color: var(--accent);
}

.nav-toggle__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-toggle__icon--close {
  display: none;
}

.nav-toggle.is-open .nav-toggle__icon--open {
  display: none;
}

.nav-toggle.is-open .nav-toggle__icon--close {
  display: flex;
}

body.nav-open {
  overflow: hidden;
  overscroll-behavior: none;
}

html.nav-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.nav-open .site-bar-shell {
  z-index: 1000;
}

@media (max-width: 960px) {
  .site-bar__logo {
    font-size: 1rem;
  }

  .site-bar__nav {
    position: fixed;
    top: var(--bar-h);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    background: var(--bg);
    overflow: hidden;
    pointer-events: none;
  }

  .site-bar__nav.is-open {
    display: flex;
    pointer-events: auto;
  }

  .site-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: var(--space-md) calc(var(--page-x) + var(--safe-right))
      calc(var(--space-xl) + var(--safe-bottom)) calc(var(--page-x) + var(--safe-left));
    background: var(--bg);
    border-top: 1px solid var(--line);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .site-nav li {
    border-bottom: 1px solid var(--line);
  }

  .site-nav a {
    font-size: 1rem;
    padding: var(--space-md) 0;
    min-height: 2.75rem;
    line-height: 1.4;
  }
}

@media (min-width: 961px) {
  .site-bar-shell {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "logo nav";
  }

  .nav-toggle {
    display: none;
  }

  .site-bar__nav {
    grid-area: nav;
    display: flex;
    position: static;
    justify-self: end;
    pointer-events: auto;
  }
}

/* —— Layout —— */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: calc(var(--page-x) + var(--safe-left)) calc(var(--page-x) + var(--safe-right));
  min-width: 0;
}

/* —— Full viewport sections —— */
.full-viewport {
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--bar-h);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  scroll-margin-top: var(--bar-h);
  border-bottom: 1px solid var(--line);
}

.full-viewport__inner {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding-block: var(--section-y);
}

#films .full-viewport__inner,
#notes .full-viewport__inner,
#stills .full-viewport__inner,
#about .full-viewport__inner {
  flex: 0 1 auto;
  min-height: auto;
  justify-content: flex-start;
}

.full-viewport--compact {
  min-height: auto;
  padding-top: 0;
  padding-bottom: 0;
  scroll-snap-align: end;
}

.full-viewport--compact .full-viewport__inner {
  justify-content: center;
  padding-block: var(--space-lg);
}

.section {
  padding: 0;
}

.section__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-sm);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--space-lg);
}

.section-head {
  margin-bottom: var(--space-lg);
}

.section-head .section__title {
  margin-bottom: 0;
}

.section-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
}

.section-head__more {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-head__more:hover {
  color: var(--accent);
}

/* —— Notes cards —— */
.notes-list {
  align-items: stretch;
}

.notes-empty,
.notes-page__empty {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.post-card {
  display: flex;
  flex-direction: column;
  width: min(16rem, 72vw);
  min-height: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  overflow: hidden;
}

.post-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
}

.post-card__media picture,
.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-md);
  min-width: 0;
}

.post-card__date {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.post-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 var(--space-sm);
  line-height: 1.3;
  color: var(--text);
}

.post-card__excerpt {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.post-card__link {
  margin: var(--space-md) 0 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-card__link a {
  color: var(--accent);
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));
  gap: var(--space-lg);
  min-width: 0;
}

.notes-grid .post-card {
  width: auto;
}

.notes-page {
  padding-top: var(--bar-h);
  padding-bottom: calc(var(--space-xl) + var(--safe-bottom));
  min-height: 100vh;
}

.notes-page__head {
  padding-top: var(--section-y);
  margin-bottom: var(--space-lg);
}

.notes-page__lead {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin: var(--space-md) 0 0;
  max-width: 32rem;
}

.page-notes .site-footer {
  padding: var(--space-lg) 0 calc(var(--space-lg) + var(--safe-bottom));
}

/* —— Search —— */
.search-page {
  padding-top: var(--bar-h);
  padding-bottom: calc(var(--space-xl) + var(--safe-bottom));
  min-height: 100vh;
}

.search-page__head {
  padding-top: var(--section-y);
  margin-bottom: var(--space-xl);
}

.search-page__head .section__title {
  margin-bottom: 0;
}

.search-page__lead {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin: var(--space-md) 0 0;
  max-width: 36rem;
}

.page-search .site-footer {
  padding: var(--space-lg) 0 calc(var(--space-lg) + var(--safe-bottom));
}

.search-panel {
  max-width: 42rem;
}

.search-field {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--bg-elevated);
  transition: border-color 0.2s ease;
}

.search-field:focus-within {
  border-color: rgba(212, 131, 90, 0.55);
}

.search-field__icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.search-field__icon .icon {
  width: 1rem;
  height: 1rem;
}

.search-field__input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.search-field__input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.search-field__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.search-filters {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line);
}

.search-filters__label {
  margin: 0 0 var(--space-sm);
}

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.search-tag {
  margin: 0;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.search-tag:hover {
  border-color: rgba(212, 131, 90, 0.45);
  color: var(--text);
}

.search-tag.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.search-status {
  min-height: 1.25rem;
  margin: var(--space-lg) 0 var(--space-md);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.search-result {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.search-result__link {
  display: block;
  padding: var(--space-md) 0;
  color: inherit;
  text-decoration: none;
}

.search-result__link:hover .search-result__title {
  color: var(--accent);
}

.search-result__type {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.search-result__title {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  transition: color 0.2s ease;
}

.search-result__excerpt {
  margin: 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.search-result__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.search-result__tag {
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.search-empty {
  margin: var(--space-lg) 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

@media (min-width: 961px) {
  .search-panel {
    max-width: min(42rem, 100%);
  }
}

/* —— Intro —— */
.intro__name {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 10vw, 5rem);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 var(--space-md);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.intro__role {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--space-lg);
}

.intro__text {
  max-width: 36rem;
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 var(--space-xl);
  line-height: 1.7;
}

.intro__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  align-items: center;
}

.intro__links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.intro .social-icons {
  margin-top: var(--space-xl);
}

.social-icons {
  display: flex;
  gap: var(--space-sm);
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
}

.social-icons .icon {
  width: 1rem;
  height: 1rem;
}

.social-icons a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* —— Horizontal scroll lists —— */
.h-scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: var(--space-lg);
  margin: 0;
  margin-inline: calc(-1 * (var(--page-x) + var(--safe-left))) calc(-1 * (var(--page-x) + var(--safe-right)));
  padding: var(--space-xs) calc(var(--page-x) + var(--safe-right)) var(--space-md)
    calc(var(--page-x) + var(--safe-left));
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
}

.h-scroll::-webkit-scrollbar {
  height: 6px;
}

.h-scroll::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 3px;
}

.h-scroll > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-width: 0;
}

/* —— Film cards —— */
.film-list {
  padding: 0;
}

.film-card {
  width: min(13.5rem, 40vw);
  display: flex;
  flex-direction: column;
}

.film-card__poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}

.film-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.film-card__poster picture {
  width: 100%;
  height: 100%;
}

.film-card:hover .film-card__poster img {
  transform: scale(1.04);
}

.film-card__body {
  padding-top: var(--space-md);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.film-card__year {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-xs);
}

.film-card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 var(--space-sm);
  line-height: 1.25;
}

.film-card__title a {
  color: var(--text);
}

.film-card__title a:hover {
  color: var(--accent);
}

.film-card__meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 var(--space-md);
  line-height: 1.45;
  flex: 1;
}

.film-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
}

.film-card__actions a {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* —— Stills row —— */
.stills-list {
  align-items: stretch;
}

.still-card {
  display: flex;
  flex-direction: column;
  width: min(18rem, 72vw);
  color: inherit;
  overflow: hidden;
}

.still-card__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.still-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.still-card:hover .still-card__img img {
  transform: scale(1.03);
}

.still-card:hover .still-card__title {
  color: var(--accent);
}

.still-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: var(--space-md) 0 var(--space-xs);
  line-height: 1.3;
  color: var(--text);
}

.still-card__desc {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

/* —— About —— */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, min(16rem, 40vw)) minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: start;
  min-width: 0;
}

@media (max-width: 720px) {
  :root {
    --nav-h: 3.25rem;
    --page-x: 1rem;
    --section-y: clamp(1.25rem, 4vh, 2rem);
    --space-lg: 1.5rem;
    --space-xl: 2rem;
  }

  html {
    scroll-snap-type: none;
  }

  .full-viewport {
    min-height: auto;
    scroll-snap-align: none;
    padding-bottom: var(--space-md);
  }

  #intro.full-viewport,
  #contact.full-viewport {
    min-height: 100svh;
    min-height: 100dvh;
  }

  #intro .full-viewport__inner {
    justify-content: center;
    flex: 1;
    min-height: 0;
    padding-top: var(--section-y);
    padding-bottom: calc(var(--section-y) + var(--safe-bottom));
  }

  #films .full-viewport__inner,
  #notes .full-viewport__inner,
  #stills .full-viewport__inner,
  #about .full-viewport__inner,
  #contact .full-viewport__inner {
    padding-top: calc(var(--section-y) + var(--space-sm));
    padding-bottom: calc(var(--section-y) + var(--safe-bottom));
  }

  .section-head {
    margin-bottom: var(--space-md);
  }

  .section__title {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    margin-bottom: var(--space-sm);
  }

  .intro__name {
    font-size: clamp(2.1rem, 11vw, 3.25rem);
    margin-bottom: var(--space-sm);
  }

  .intro__role {
    font-size: 0.75rem;
    margin-bottom: var(--space-md);
  }

  .intro__text {
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: var(--space-lg);
  }

  .intro__links {
    gap: var(--space-sm) var(--space-md);
  }

  .intro__links a {
    font-size: 0.75rem;
  }

  .intro .social-icons {
    margin-top: var(--space-lg);
  }

  .social-icons a {
    width: 2.5rem;
    height: 2.5rem;
  }

  .h-scroll {
    gap: var(--space-md);
    margin-inline: calc(-1 * (var(--page-x) + var(--safe-left)))
      calc(-1 * (var(--page-x) + var(--safe-right)));
    scroll-padding-inline: calc(var(--page-x) + var(--safe-left));
    scrollbar-width: none;
    max-width: 100vw;
  }

  .h-scroll::-webkit-scrollbar {
    display: none;
  }

  .film-card {
    width: min(10.75rem, 72vw);
  }

  .film-card__body {
    padding-top: var(--space-sm);
  }

  .film-card__title {
    font-size: 1.05rem;
  }

  .film-card__meta {
    font-size: 0.72rem;
    margin-bottom: var(--space-sm);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .film-card__actions a {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
  }

  .post-card {
    width: min(14.5rem, 78vw);
  }

  .post-card__title {
    font-size: 1rem;
  }

  .post-card__excerpt {
    font-size: 0.78rem;
    -webkit-line-clamp: 3;
  }

  .notes-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .still-card {
    width: min(12.5rem, 76vw);
  }

  .still-card__desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .still-card__title {
    font-size: 1rem;
    margin-top: var(--space-sm);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .about-grid__photo {
    max-width: 14rem;
    margin-inline: auto;
  }

  .about-grid__statement {
    font-size: 1rem;
    line-height: 1.65;
  }

  .about-edu {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
  }

  details {
    padding: var(--space-sm) var(--space-md);
  }

  details summary {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
  }

  .contact-block__email {
    font-size: clamp(1.2rem, 6.5vw, 1.65rem);
    overflow-wrap: anywhere;
  }

  .contact-block__note {
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
  }

  .site-footer {
    font-size: 0.7rem;
    line-height: 1.5;
    padding-bottom: var(--safe-bottom);
  }
}

.about-grid__photo {
  aspect-ratio: 4 / 5;
  width: 100%;
  overflow: hidden;
}

.about-grid__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-grid__statement {
  font-size: 1.15rem;
  line-height: 1.75;
  margin: 0 0 var(--space-lg);
}

.about-facts {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-lg);
  font-size: 0.95rem;
}

.about-facts li {
  margin-bottom: var(--space-sm);
  color: var(--muted);
}

.about-facts li:last-child {
  margin-bottom: 0;
}

.about-facts strong {
  color: var(--text);
  font-weight: 500;
}

.about-edu {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line);
}

.about-edu h3 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--space-md);
}

.edu-item {
  margin-bottom: var(--space-md);
}

.edu-item:last-child {
  margin-bottom: 0;
}

.edu-item h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.25rem;
}

.edu-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.edu-item time {
  font-size: 0.8rem;
  color: var(--muted);
}

details {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--accent-soft);
  border: 1px solid var(--line);
}

details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.about-facts--nested {
  margin-top: var(--space-md);
  margin-bottom: 0;
}

/* —— Contact —— */
.contact-block {
  text-align: center;
  max-width: 28rem;
  margin: 0 auto;
  padding: var(--space-md) 0;
}

.contact-block__email {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin: 0 0 var(--space-lg);
  line-height: 1.3;
}

.contact-block__note {
  color: var(--muted);
  margin: 0 0 var(--space-xl);
  line-height: 1.6;
}

.contact-block .social-icons {
  justify-content: center;
}

.contact-block__email a {
  color: var(--text);
}

.contact-block__email a:hover {
  color: var(--accent);
}

/* —— Footer —— */
.site-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: none;
}

/* —— Detail pages (films / photos) —— */
.page-detail {
  min-height: 100vh;
  padding-top: var(--bar-h);
  padding-bottom: var(--space-xl);
  overflow-x: clip;
}

.page-detail > .wrap {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.page-detail .wrap {
  min-width: 0;
  max-width: 100%;
}

main {
  min-width: 0;
  max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-snap-type: none;
  }

  .full-viewport {
    scroll-snap-align: none;
  }
}

.page-detail .section__label {
  margin-bottom: var(--space-lg);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--space-xl);
  padding: 0;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-detail > .wrap {
    padding-top: var(--section-y);
    padding-bottom: calc(var(--section-y) + var(--safe-bottom));
  }

  .detail-layout {
    gap: var(--space-lg);
  }

  .detail-layout h1 {
    font-size: clamp(1.65rem, 7vw, 2.1rem);
  }

  .press-panel {
    padding: var(--space-md);
  }

  .btn-watch,
  .btn-watch--off {
    min-height: 2.75rem;
    width: 100%;
    justify-content: center;
  }

  .portfolio-details-slider .swiper-pagination {
    position: relative;
    margin-top: var(--space-sm);
  }

  .page-detail {
    padding-bottom: calc(var(--space-xl) + var(--safe-bottom));
  }
}

.detail-layout h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 0.25rem;
}

.detail-layout .lead {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
}

.press-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
}

.press-panel h2 {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-md);
  font-family: var(--font-body);
}

.press-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.press-panel li {
  margin-bottom: var(--space-sm);
  color: var(--muted);
  line-height: 1.5;
}

.press-panel li:last-child {
  margin-bottom: 0;
}

.press-panel strong {
  color: var(--text);
  font-weight: 500;
}

.press-panel i {
  color: var(--accent);
  margin-right: 0.35rem;
}

.detail-copy h2 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: var(--space-lg) 0 var(--space-sm);
}

.detail-copy h2:first-of-type {
  margin-top: 0;
}

.detail-copy p {
  margin: 0 0 var(--space-md);
  color: var(--muted);
  line-height: 1.65;
}

.btn-watch .icon {
  width: 1.05rem;
  height: 1.05rem;
}

.btn-watch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--bg) !important;
  border-radius: 2px;
}

.btn-watch:hover {
  background: #e8a07a;
  color: var(--bg) !important;
}

.btn-watch--off {
  background: transparent;
  color: var(--muted) !important;
  border: 1px solid var(--line);
  pointer-events: none;
}

.stills-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
}

.portfolio-details-slider {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  background: var(--bg-elevated);
}

.portfolio-details-slider--film {
  width: 75%;
  max-width: 75%;
  margin-inline: auto;
  align-self: center;
  cursor: grab;
}

.portfolio-details-slider--film:active {
  cursor: grabbing;
}

.portfolio-details-slider.swiper {
  margin: 0;
}

.portfolio-details-slider .swiper-wrapper {
  max-width: 100%;
}

.portfolio-details-slider .swiper-slide {
  width: 100% !important;
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
}

.portfolio-details-slider .swiper-slide img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  vertical-align: top;
  user-select: none;
  -webkit-user-drag: none;
}

.swiper-pagination-bullet {
  background: var(--muted);
  opacity: 0.5;
}

.swiper-pagination-bullet-active {
  background: var(--accent);
  opacity: 1;
}

/* —— Site visibility / maintenance —— */
html.site-is-gated .site-content {
  display: none;
}

.maintenance-gate {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: calc(var(--bar-h) + var(--space-xl)) var(--page-x) var(--space-xl);
}

html.site-is-gated .maintenance-gate,
body.maintenance-active .maintenance-gate {
  display: flex;
}

.maintenance-gate__inner {
  max-width: 32rem;
  text-align: center;
}

.maintenance-gate__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  margin: 0 0 var(--space-md);
}

.maintenance-gate__text {
  color: var(--muted);
  margin: 0 0 var(--space-lg);
  line-height: 1.7;
}

.maintenance-gate__admin {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

.editor-preview-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  padding: 0.65rem var(--page-x) calc(0.65rem + var(--safe-bottom));
  background: rgba(212, 131, 90, 0.92);
  color: var(--bg);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
}

.editor-preview-banner a {
  color: var(--bg);
  text-decoration: underline;
  margin-left: 0.35rem;
}

body.editor-preview-active {
  padding-bottom: calc(2.5rem + var(--safe-bottom));
}

.section-preview-hidden {
  position: relative;
  outline: 1px dashed rgba(212, 131, 90, 0.55);
  outline-offset: -1px;
}

.section-preview-hidden::after {
  content: "Hidden from public";
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 5;
  padding: 0.25rem 0.5rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(212, 131, 90, 0.9);
  color: var(--bg);
  pointer-events: none;
}

.section-is-hidden {
  display: none !important;
}
