/* =====================================================
   Film Editor Portfolio — style.css
   ===================================================== */

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

:root {
  --bg:       #f0eee9;
  --fg:       #171717;
  --muted:    #9e9e9e;
  --subtle:   #e4e1db;
  --gap:      5px;
  --pad:      56px;
  --ease:     0.35s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Quicksand', sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  opacity: 0;
  transition: opacity var(--ease);
}

body.loaded { opacity: 1; }

/* ── Navigation ─────────────────────────────────────── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease), background var(--ease);
}

.nav-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav.scrolled {
  border-bottom-color: var(--subtle);
  background: rgba(240, 238, 233, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-logo {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--fg);
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--ease);
}

.nav-links a:hover,
.nav-links a.active { color: var(--fg); }

/* ── Hero ───────────────────────────────────────────── */

.hero {
  padding: 120px var(--pad) 0;
}

.hero-rule {
  width: 100%;
  height: 1px;
  background: var(--subtle);
}

/* ── Films ──────────────────────────────────────────── */

.films {
  padding: 120px var(--pad) 100px;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

.film {
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.film.visible {
  opacity: 1;
  transform: none;
}

/* Image grid */
.film-images {
  display: grid;
  gap: var(--gap);
  position: relative;
  cursor: pointer;
}

/* Layout A — large left, smalls right */
.layout-a .film-images {
  grid-template-columns: 2fr 1fr;
}

.layout-a .img-wrap.large {
  grid-row: 1 / 3;
}

/* Layout B — smalls left, large right */
.layout-b .film-images {
  grid-template-columns: 1fr 2fr;
}

.layout-b .img-wrap.large {
  grid-column: 2;
  grid-row: 1 / 3;
}

.layout-b .img-wrap.small:nth-child(2) {
  grid-column: 1;
  grid-row: 1;
}

.layout-b .img-wrap.small:nth-child(3) {
  grid-column: 1;
  grid-row: 2;
}

/* Poster layout — 3fr:8fr makes a 2:3 poster and 16:9 still the same height */
.layout-a.has-poster .film-images { grid-template-columns: 3fr 8fr; }
.layout-b.has-poster .film-images { grid-template-columns: 8fr 3fr; }

.img-wrap.poster { aspect-ratio: 2 / 3; }

/* Image wrapper */
.img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--subtle);
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.45);
}

/* Large image defines the row heights via aspect-ratio */
.img-wrap.large {
  aspect-ratio: 16 / 9;
}

/* Images fill their wrappers */
.img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}


/* ── Film info button & panel ───────────────────────── */


.film-info {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.film.open .film-info { grid-template-rows: 1fr; }

.film-info-inner {
  overflow: hidden;
}

.film-info-content {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 14px 4px 4px;
}

.info-title {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

.info-meta {
  display: flex;
  gap: 14px;
  flex: 1;
}

.info-meta span {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.info-awards {
  font-style: italic;
}

.meta-labeled::before {
  display: none;
}

.info-link {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aeb4e8;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--ease);
}

.info-link:hover { color: #8890d4; }


/* ── About page ─────────────────────────────────────── */

.about-header {
  padding: 200px var(--pad) 64px;
  border-bottom: 1px solid var(--subtle);
}

.about-body {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 80px;
  padding: 120px var(--pad) 130px;
}

.about-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  background: var(--subtle);
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.45);
}

.about-text h2 {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

.about-text p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.85;
  color: var(--fg);
}

.about-text p + p { margin-top: 18px; }

.contact-form {
  margin-top: 52px;
  padding-top: 40px;
  border-top: 1px solid var(--subtle);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field input,
.form-field textarea {
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--fg);
  background: none;
  border: none;
  border-bottom: 1px solid var(--subtle);
  padding: 6px 0;
  outline: none;
  resize: none;
  transition: border-color var(--ease);
}

.form-field input:focus,
.form-field textarea:focus {
  border-bottom-color: var(--fg);
}

.form-submit {
  align-self: flex-start;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color var(--ease);
}

.form-submit:hover { color: var(--fg); }

.contact-list {
  list-style: none;
  margin-top: 52px;
  padding-top: 40px;
  border-top: 1px solid var(--subtle);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 3px;
}

.contact-list a,
.contact-list .value {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
}

.contact-list a {
  border-bottom: 1px solid var(--subtle);
  transition: border-color var(--ease);
}

.contact-list a:hover { border-bottom-color: var(--fg); }

/* ── Footer ─────────────────────────────────────────── */

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--pad);
  border-top: 1px solid var(--subtle);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--ease);
}

footer a:hover { color: var(--fg); }

/* ── Responsive ─────────────────────────────────────── */

@media (max-width: 860px) {
  :root { --pad: 24px; }

  .nav-inner { padding: 22px var(--pad); }

  .hero { padding: 90px var(--pad) 0; }
  .about-header { padding: 120px var(--pad) 48px; }

  .films { padding: 100px var(--pad) 80px; }



  .about-body {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 100px var(--pad) 80px;
  }

  .about-photo { aspect-ratio: 3 / 4; max-width: 220px; }

  .form-row { grid-template-columns: 1fr; }

  .film-info-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .info-meta {
    flex-direction: column;
    gap: 4px;
  }

  .meta-labeled {
    display: flex;
    gap: 6px;
  }

  .meta-labeled::before {
    display: block;
    content: attr(data-label);
    font-weight: 600;
    color: var(--fg);
    white-space: nowrap;
  }

  .meta-item:not(.meta-labeled) {
    font-weight: 600;
    color: var(--fg);
  }

  .info-title {
    font-weight: 600;
    color: var(--fg);
  }

  .info-link {
    align-self: flex-start;
  }

  footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding: 24px var(--pad);
  }
}
