/* Cloud Clipper — base styles */

:root {
  --bg: #0a0a0a;
  --fg: #f5f5f5;
  --muted: #9a9a9a;
  --accent: #f5f5f5;
  --maxw: 1280px;
  --nav-h: 84px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

html, body {
  margin: 0;
  padding: 0;
  padding-top: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Helvetica Neue", Arial, "Inter", sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body { position: relative; }

a {
  color: inherit;
  text-decoration: none;
}

img { display: block; max-width: 100%; }

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

/* ---------- Nav ---------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0));
  pointer-events: none;
  /* Force its own compositing layer so iOS Safari doesn't let this
     fixed element lag/detach during momentum or rubber-band scrolling. */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.site-nav * { pointer-events: auto; }

.site-nav.is-solid {
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-logo img {
  height: 52px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s ease;
  position: relative;
}

.nav-links a:hover { opacity: 1; }

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--fg);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 1.6rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  line-height: 1;
}

@media (max-width: 900px) {
  :root { --nav-h: 72px; }

  .nav-logo img { height: 42px; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10,10,10,0.97);
    backdrop-filter: blur(8px);
    transform: translateY(-110%);
    transition: transform 0.3s ease;
    padding: 0.5rem 6vw 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-links.is-open { transform: translateY(0); }
  .nav-links a {
    display: block;
    padding: 1rem 0;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
}

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero video,
.hero .hero-poster {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.32);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
}

.hero-logo {
  max-width: 420px;
  width: 60vw;
  margin: 0 auto;
}

.hero-tagline {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  animation: pulse 2.4s ease-in-out infinite;
}

.scroll-cue .line {
  width: 1px;
  height: 28px;
  background: var(--muted);
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ---------- Page header (non-home) ---------- */

.page-header {
  padding: calc(var(--nav-h) + 5rem) 5vw 3rem;
  max-width: var(--maxw);
  margin: 0 auto;
}

.page-header h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}

.page-header p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 560px;
  line-height: 1.6;
}

main { min-height: 100vh; }

/* ---------- Directors ---------- */

.directors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 5vw 6rem;
}

.director-card .photo {
  width: 100%;
  aspect-ratio: 4/5;
  background: #1a1a1a;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.director-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.director-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.director-card .role {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.director-card p.bio {
  color: #c4c4c4;
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ---------- Work ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 5vw 6rem;
}

.work-item {
  position: relative;
  aspect-ratio: 16/9;
  background: #141414;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.06);
}

.work-item img,
.work-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.work-item:hover img,
.work-item:hover video {
  transform: scale(1.04);
}

.work-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.05) 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.2rem 1.3rem;
}

.work-item .overlay h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.work-item .overlay span {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.work-item .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.work-item:hover .play-icon { opacity: 1; }

.play-icon::after {
  content: "";
  border-left: 14px solid #fff;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 3px;
}

/* lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
}

.lightbox.is-open { display: flex; }

.lightbox video {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Contact ---------- */

.contact-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 5vw 6rem;
}

.contact-info {
  margin-bottom: 2.5rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.contact-info a { color: var(--fg); border-bottom: 1px solid rgba(255,255,255,0.25); }

form.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.field label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.field input,
.field textarea {
  width: 100%;
  background: #141414;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--fg);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border-radius: 3px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(255,255,255,0.45);
}

.field textarea { resize: vertical; min-height: 140px; }

.submit-btn {
  align-self: flex-start;
  background: var(--fg);
  color: #0a0a0a;
  border: none;
  padding: 0.9rem 2.2rem;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.submit-btn:hover { opacity: 0.85; }

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 2rem 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  max-width: var(--maxw);
  margin: 0 auto;
}

footer .socials {
  display: flex;
  gap: 1.2rem;
}

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

/* ============================================================
   Responsive — tablets
   ============================================================ */

@media (max-width: 1024px) {
  .directors-grid,
  .work-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* ============================================================
   Responsive — phones & small tablets
   ============================================================ */

@media (max-width: 680px) {

  /* Type scale */
  .page-header h1 { font-size: clamp(1.8rem, 8vw, 2.6rem); }
  .page-header p { font-size: 0.95rem; }

  .page-header {
    padding: calc(var(--nav-h) + 2.5rem) 6vw 2rem;
  }

  /* Hero */
  .hero-tagline { font-size: 0.75rem; letter-spacing: 0.18em; }
  .scroll-cue { bottom: 1.5rem; font-size: 0.62rem; }
  .scroll-cue .line { height: 20px; }

  /* Directors — single column */
  .directors-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 6vw 4rem;
  }

  .director-card .photo { aspect-ratio: 16/10; }

  /* Work — single column */
  .work-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 0 6vw 4rem;
  }

  .work-item { aspect-ratio: 4/3; }

  /* Always reveal play icon + overlay text on touch devices (no hover) */
  .work-item .play-icon { opacity: 1; width: 48px; height: 48px; }
  .work-item .overlay { background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.15) 60%); }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
    min-width: 44px;
    min-height: 44px;
    font-size: 2rem;
  }

  /* Contact */
  .contact-wrap { padding: 0 6vw 4rem; }
  .contact-info { font-size: 0.95rem; line-height: 1.6; }

  .field input,
  .field textarea {
    font-size: 1rem;
    padding: 0.95rem 1rem;
  }

  .submit-btn {
    width: 100%;
    align-self: stretch;
    padding: 1.05rem 2rem;
    font-size: 0.9rem;
  }

  /* Footer */
  footer {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 1.75rem 6vw;
  }

  /* Generous tap targets for all nav/footer links */
  footer a,
  .contact-info a {
    display: inline-block;
    padding: 0.2rem 0;
  }
}

@media (max-width: 400px) {
  .nav-logo img { height: 36px; }
  .hero-logo { width: 70vw; }
}
