/*
Theme Name: Layla Film Site
Description: Layla Film's independent cinema catalogue and production site.
Version: 1.1.4
Requires PHP: 7.4
Text Domain: layla-film-site
*/
@import url("fonts.css");

:root {
  color-scheme: light;
  --paper: #dce5d7;
  --ink: #181916;
  --muted: #55574e;
  --night: #1b1c18;
  --rule: #b5c1af;
  --accent: #994b3d;
  --accent-on-dark: #edaa98;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 var(--sans); }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: .97; }
h2 { font-size: clamp(3rem, 5.5vw, 5.6rem); letter-spacing: -.025em; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.wrap { width: min(100% - 112px, 1312px); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: 1rem; transform: translateY(-200%); z-index: 2; background: var(--paper); padding: .5rem 1rem; }
.skip:focus { transform: none; }

.site-header { background: var(--paper); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 79px; gap: 1.25rem; }
.brand { display: block; width: 91px; flex: none; }
.brand img { width: 100%; height: auto; }
nav { display: flex; gap: clamp(1rem, 3.3vw, 3.6rem); align-items: center; }
nav a { font-size: .83rem; font-weight: 600; }
nav a:hover, .footer-links a:hover, .email:hover { text-decoration: underline; text-underline-offset: .3em; }
nav span, .button span, .text-link span, .footer-links span { margin-left: .35em; }

.hero { position: relative; isolation: isolate; color: #f9f6ee; background: #252622; }
.hero-image, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { object-fit: cover; object-position: 50% 53%; filter: grayscale(100%); transition: filter .45s ease; }
.hero:focus-within .hero-image { filter: none; }
@media (hover: hover) {
  .hero:hover .hero-image { filter: none; }
}
.hero-shade {
  background: linear-gradient(90deg, rgba(13,14,12,.82) 0%, rgba(13,14,12,.58) 30%, transparent 69%),
              linear-gradient(0deg, rgba(13,14,12,.76), transparent 44%);
}
.hero-inner { position: relative; min-height: clamp(560px, 70svh, 780px); display: flex; align-items: end; padding-block: 70px; }
.hero-copy { max-width: 520px; }
.eyebrow { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.hero-label { color: var(--accent-on-dark); display: flex; align-items: center; gap: .7rem; margin-bottom: 1.15rem; }
.hero-label::before { content: ""; display: block; width: 1.8rem; height: 1px; background: currentColor; }
h1 { font-size: clamp(6rem, 12vw, 12rem); letter-spacing: -.04em; margin-left: -.03em; line-height: .82; }
.synopsis { max-width: 385px; font-size: .98rem; line-height: 1.64; margin-top: 1.55rem; }
.button { display: inline-flex; align-items: center; gap: 1.1rem; background: var(--accent); color: #fff7ee; font-size: .8rem; font-weight: 700; padding: .85rem 1.02rem; margin-top: 1.5rem; transition: background .18s ease; }
.button:hover { background: #7f3d31; }
.button:focus-visible { outline-color: white; }
.hero-format { position: absolute; right: 0; bottom: 72px; font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.hero-format span { display: inline-block; width: 4px; height: 4px; background: var(--accent-on-dark); border-radius: 50%; vertical-align: middle; margin-inline: .4em; }

.films { padding-block: 72px 90px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.text-link { display: inline-block; font-size: .78rem; font-weight: 700; padding-bottom: .18em; border-bottom: 1px solid currentColor; }
.text-link:hover { opacity: .72; }
.film-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(1rem, 2.5vw, 2.6rem); }
.film { display: block; }
.film-image { position: relative; aspect-ratio: 450 / 643; overflow: hidden; }
.film-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .18s ease; }
.film:hover .film-image img { opacity: .88; }
.film-meta { display: flex; justify-content: space-between; align-items: center; margin-top: .85rem; color: var(--muted); }
.film h3 { font-size: clamp(2rem, 3.2vw, 3.5rem); margin-top: .12em; }
.film-director { margin-top: .35rem; font-size: .86rem; }
.film-description { margin-top: .6rem; color: var(--muted); font-size: .86rem; max-width: 34ch; }

.projects { background: var(--accent); color: #fff7ee; padding-block: 84px; }
.about-inner { display: grid; grid-template-columns: 1fr 1.35fr; gap: 2rem; }
.about .text-link { margin-top: 1.25rem; }
.project-card { display: block; }
.project-video-link { margin-top: .85rem; }
.project-image { aspect-ratio: 16 / 9; overflow: hidden; background: #30312b; }
.project-image img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); transition: filter .3s ease, transform .3s ease; }
.project-card:focus-visible .project-image img { filter: none; }
@media (hover: hover) {
  .project-card:hover .project-image img { filter: none; transform: scale(1.035); }
}
.project-title { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; margin-top: .95rem; }
.project-title h3 { font-size: clamp(1.85rem, 3.2vw, 3.4rem); }
.project-title .arrow { align-self: center; }
.project-card:hover h3 { text-decoration: underline; text-underline-offset: .16em; }
.project-card p { max-width: 39ch; margin-top: .6rem; color: inherit; font-size: .86rem; }
.about { padding-block: 85px; }
.about p { font-size: clamp(1.08rem, 1.8vw, 1.55rem); max-width: 45ch; line-height: 1.48; }
.about p + p { margin-top: .85em; }
.about-contact { margin-top: 1.25rem; }
.about-contact .footer-links { margin-top: .8rem; }

footer { border-top: 1px solid var(--rule); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1.55rem; padding-block: 35px 24px; }
footer h2 { font: 700 .7rem/1.4 var(--sans); letter-spacing: .13em; text-transform: uppercase; margin-bottom: .35rem; }
.email { font-family: var(--serif); font-size: clamp(1.85rem, 4vw, 3.3rem); line-height: 1; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.45rem; font-size: .8rem; font-weight: 600; }
.footer-inner > p { grid-column: 1/-1; border-top: 1px solid var(--rule); padding-top: .8rem; color: var(--muted); font-size: .71rem; }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 64px); }
  .hero-inner { min-height: 540px; }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 38px); }
  .header-inner { min-height: 63px; gap: .6rem; }
  .brand { width: 60px; }
  nav { gap: clamp(.45rem, 2.4vw, 1rem); }
  nav a { font-size: .71rem; }
  nav span { display: none; }
  .hero-inner { min-height: clamp(520px, 77svh, 680px); display: flex; flex-direction: column; justify-content: end; align-items: start; padding-block: 38px 26px; }
  .hero-image { object-position: 53% center; }
  .hero-shade { background: linear-gradient(0deg, rgba(13,14,12,.95), rgba(13,14,12,.65) 37%, rgba(13,14,12,.09) 78%); }
  h1 { font-size: clamp(5rem, 17vw, 8rem); }
  .synopsis { font-size: .87rem; margin-top: 1.1rem; }
  .hero-format { position: static; margin-top: 1rem; font-size: .57rem; }
  .films, .projects, .about { padding-block: 49px; }
  .section-heading { align-items: start; flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; }
  .film-grid, .about-inner, .footer-inner { grid-template-columns: 1fr; }
  .film-grid { gap: 1.9rem; }
  .films .film-grid article { width: min(100%, 410px); margin-inline: auto; }
  .footer-inner { gap: 1.25rem; }
}
@media (max-width: 360px) {
  .site-header .brand { width: 52px; }
  .site-header nav { gap: .42rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

.arrow {
  display: inline-block;
  position: relative;
  width: .7em;
  height: .7em;
  flex: none;
  vertical-align: .03em;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
}
.arrow::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 132%;
  height: 1px;
  background: currentColor;
  transform: rotate(-45deg);
  transform-origin: right center;
}

.film-detail { padding-block: clamp(2rem, 6vw, 5rem); border-top: 1px solid var(--rule); }
.project-detail {
  --muted: #ffecdf;
  --rule: rgba(255, 247, 238, .4);
  background: var(--accent);
  color: #fff7ee;
}
.detail-back { margin-bottom: 2rem; }
.film-detail h1 { font-size: clamp(3.5rem, 8.5vw, 8.5rem); margin: .17em 0 .27em; line-height: .95; }
.detail-image { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; background: var(--night); }
.detail-image-full { height: auto; aspect-ratio: auto; }
.detail-copy { max-width: 680px; margin: clamp(2rem, 5vw, 4rem) auto 0; }
.detail-copy h2 { font-size: clamp(2.5rem, 5vw, 4.25rem); margin-bottom: .45em; }
.detail-copy p { font-size: clamp(1rem, 2vw, 1.18rem); margin-top: 1em; }
.detail-copy .detail-credit { color: var(--muted); font-size: .9rem; }
.detail-screenings { border-top: 1px solid var(--rule); margin-top: 2rem; padding-top: 2rem; }
.detail-screenings ul { list-style: none; padding: 0; margin: 0; }
.detail-screenings li + li { margin-top: 1rem; }
.detail-screenings a { font-weight: 600; text-decoration: underline; text-underline-offset: .22em; }
.detail-screenings li span { display: block; color: var(--muted); font-size: .9rem; margin-top: .15rem; }

.crew-page { padding-block: clamp(2.5rem, 6vw, 5rem); border-top: 1px solid var(--rule); }
.crew-page .wrap { max-width: 960px; }
.crew-page h1 { font-size: clamp(4rem, 9vw, 8rem); line-height: .92; margin-bottom: .35em; }
.crew-member { display: grid; grid-template-columns: minmax(0, 175px) minmax(0, 1fr); align-items: start; gap: clamp(1.15rem, 4vw, 3.5rem); border-top: 1px solid var(--rule); padding-block: 1.65rem; scroll-margin-top: 1rem; }
.crew-member img { width: 100%; height: auto; }
.crew-member h2 { font-size: clamp(2.35rem, 4.2vw, 4rem); }
.crew-role { color: var(--muted); margin-top: .65rem; }
.crew-bio { max-width: 64ch; margin-top: 1rem; }
@media (max-width: 560px) {
  .crew-member { grid-template-columns: 1fr; }
  .crew-member img { max-width: 190px; }
}

.archive-page h1 { margin-bottom: .38em; }
.archive-feature { display: grid; grid-template-columns: minmax(160px, 290px) minmax(0, 1fr); align-items: center; gap: clamp(1.25rem, 4vw, 4rem); padding-bottom: clamp(2rem, 5vw, 4.5rem); border-bottom: 1px solid var(--rule); }
.archive-feature img { width: 100%; height: auto; }
.archive-feature h2 { margin-block: .1em .2em; }
.archive-feature p:not(.eyebrow) { max-width: 34ch; color: var(--muted); }
.archive-feature .text-link, .catalogue-lead .text-link { margin-top: 1.2rem; }
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.8rem, 5vw, 4.4rem) clamp(1rem, 3vw, 2.6rem); margin-top: clamp(2rem, 5vw, 4rem); }
.archive-card { display: block; }
.archive-poster { aspect-ratio: 450 / 666; }
.archive-poster img { width: 100%; height: auto; transition: opacity .18s ease; }
.archive-card:hover img { opacity: .86; }
.archive-card .eyebrow { color: var(--muted); margin-block: .85rem .25rem; }
.archive-title { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.archive-title h2 { font-size: clamp(1.85rem, 3.6vw, 3.65rem); }
.archive-card:hover h2, .archive-feature:hover .text-link { text-decoration: underline; text-underline-offset: .18em; }

.catalogue-lead { display: grid; grid-template-columns: minmax(160px, 265px) minmax(0, 1fr); align-items: center; gap: clamp(1.5rem, 5.5vw, 5rem); }
.catalogue-lead img { width: 100%; height: auto; }
.catalogue-lead h1 { font-size: clamp(3.4rem, 7vw, 7.6rem); margin-bottom: .15em; }
.catalogue-subtitle { color: var(--muted); }
.catalogue-synopsis { font-size: clamp(1rem, 1.7vw, 1.35rem); max-width: 49ch; margin-top: .85em; }
.catalogue-body { width: min(100%, 900px); margin-inline: auto; }
.catalogue-section { border-top: 1px solid var(--rule); padding-top: 1.5rem; margin-top: clamp(2rem, 5vw, 4rem); }
.catalogue-section h2 { font-size: clamp(2.45rem, 4.5vw, 4rem); margin-bottom: .45em; }
.catalogue-player { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: var(--night); }
.catalogue-credits { margin: 0; }
.catalogue-credits > div { display: grid; grid-template-columns: minmax(7rem, .8fr) 1.65fr; gap: .75rem; padding-block: .5rem; border-bottom: 1px solid var(--rule); }
.catalogue-credits dt { color: var(--muted); font-size: .88rem; }
.catalogue-credits dd { margin: 0; }
.catalogue-screenings { padding-left: 1.2rem; }
.catalogue-screenings li + li { margin-top: .4rem; }

@media (max-width: 650px) {
  .archive-feature, .catalogue-lead { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-card .eyebrow { font-size: .6rem; letter-spacing: .07em; }
  .archive-title h2 { font-size: clamp(1.5rem, 5.5vw, 2.4rem); }
  .archive-feature img, .catalogue-lead img { width: min(62%, 235px); }
}

.language-switch {
  display: flex;
  align-items: center;
  gap: .3rem;
  border-inline-start: 1px solid var(--rule);
  padding-inline-start: .7rem;
  white-space: nowrap;
}
.language-switch a { padding: .15rem .12rem; }
.site-header nav .language-divider { display: inline; margin: 0; color: var(--muted); font-size: .75rem; }
.language-switch a[aria-current="true"] { color: var(--accent); }
@media (max-width: 650px) {
  .site-header nav { flex-wrap: wrap; justify-content: flex-end; row-gap: .15rem; padding-block: .4rem; }
  .site-header .language-switch { gap: .15rem; padding-inline-start: .35rem; }
}
