/* =================================================================
   Pranav Abraham Varikad — Cinematographer · Portfolio
   styles.css  ·  single stylesheet for the whole site
   Light theme · fixed left sidebar
   ================================================================= */

/* ---------- Design tokens ---------- */
:root {
  --bg:        #ffffff;
  --bg-soft:   #f5f5f5;
  --line:      #e6e6e6;
  --text:      #222222;
  --text-dim:  #5f5f5f;
  --text-mute: #9a9a9a;
  --accent:    #111111;   /* active / hover ink */
  --brand:     #a55e12;   /* original site orange — mobile menu panel */
  --sidebar-w: 300px;
  --page-pad:  50px;      /* outer gutter, from the original #canvas padding */
  --maxw:      1180px;
  --gap:       26px;
  --radius:    4px;
  --font: "Raleway", "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .4em; font-weight: 600; line-height: 1.25; }
p { margin: 0 0 1em; }

/* =================================================================
   Layout — fixed left sidebar + content column
   ================================================================= */
.layout { min-height: 100vh; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg);
  padding: var(--page-pad) 40px;
  display: flex; flex-direction: column; gap: 40px;
  overflow-y: auto;
  z-index: 100;
}
/* Text wordmark — the source folder ships no logo file */
.sidebar .brand { display: block; }
.brand-name {
  display: block; font-size: 21px; font-weight: 600; line-height: 1.15;
  letter-spacing: .04em; text-transform: uppercase; color: var(--text);
}
.brand-role {
  display: block; margin-top: 6px; font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--text-mute);
}

.side-nav { display: flex; flex-direction: column; gap: 30px; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav li { margin: 0 0 14px; }
.side-nav a {
  font-size: 18px; font-weight: 500; color: var(--text-dim);
  letter-spacing: .01em; transition: color .18s;
}
.side-nav a:hover { color: var(--accent); }
.side-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

.content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.content > main { flex: 1 0 auto; }

/* mobile top bar (hidden on desktop) */
.topbar { display: none; }

/* menu button — hidden on desktop, revealed in the mobile media query below */
.nav-toggle { display: none; }

/* ---------- Generic wrap for inner pages ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }

/* ---------- Hero (home) ---------- */
/* Outer gutter mirrors the original site's #canvas padding of 50px */
.hero { padding: var(--page-pad) var(--page-pad) 0 0; }
.hero .video-frame { margin: 0; }

/* ---------- Section heading ---------- */
.section { padding: 56px 0; }
.section:first-child { padding-top: 48px; }
.section-head { margin-bottom: 34px; }
.section-head h2 {
  font-size: clamp(22px, 3vw, 30px); letter-spacing: .01em; font-weight: 600;
}
.section-head .kicker {
  display: block; color: var(--text-mute); font-size: 12px; letter-spacing: .26em;
  text-transform: uppercase; margin-bottom: 8px;
}
.section-head p { color: var(--text-dim); max-width: 640px; margin: 6px 0 0; }

/* ---------- Responsive 16:9 video frame ---------- */
.video-frame {
  position: relative; width: 100%; padding-top: 56.25%;
  background: #000; overflow: hidden;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Gallery grid ----------
   Every thumbnail is locked to 27:20 (540x400), matching pranavabraham.com,
   so all cards in a row are the same height. Source art that isn't 27:20 is
   centre-cropped to fit — see README for the export spec. */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}
.card { display: flex; flex-direction: column; }
.card-thumb {
  position: relative; display: block; aspect-ratio: 27 / 20;
  background: var(--bg-soft);
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius);
}
.card-thumb img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transition: transform .4s ease;
}
.card:hover .card-thumb img { transform: scale(1.04); }
.card-thumb .play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.10); opacity: 0; transition: opacity .25s;
}
.card:hover .card-thumb .play { opacity: 1; }
.card-thumb .play svg { width: 54px; height: 54px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
.card-body { padding: 14px 2px 4px; }
.card-title { font-size: 15px; font-weight: 600; letter-spacing: .02em; margin: 0; }
.card-meta { font-size: 13px; color: var(--text-dim); line-height: 1.5; margin-top: 6px; }
.card-meta strong { color: var(--text); font-weight: 600; }
.card-meta p { margin: 0 0 4px; }
.card-year { color: var(--text-mute); font-weight: 400; }

/* ---------- Detail page ---------- */
.detail { padding: 48px 0; }
.detail .back { display: inline-block; margin-bottom: 22px; font-size: 13px; letter-spacing: .04em; color: var(--text-dim); }
.detail .back:hover { color: var(--accent); }
.detail-title { font-size: clamp(24px, 3.5vw, 36px); letter-spacing: .01em; }
.detail-year { color: var(--text-mute); font-weight: 400; }
.detail-credits { color: var(--text-dim); margin: 4px 0 22px; }
.detail-credits strong { color: var(--text); }
.detail-credits p { margin: 0 0 6px; }
.detail-synopsis { font-size: 18px; color: var(--text); max-width: 62ch; margin-bottom: 28px; }
.detail .video-frame { border-radius: var(--radius); margin-bottom: 24px; max-width: 940px; }
.detail-poster { max-width: 420px; border: 1px solid var(--line); border-radius: var(--radius); }
.detail-poster--aside { max-width: 260px; margin-top: 8px; }
.detail-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.detail-note { max-width: 62ch; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.detail-note h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .18em; color: var(--text-mute); }
.detail-note p { color: var(--text-dim); }

/* ---------- Gallery: justified rows ----------
   Each tile carries its own aspect ratio in --r. flex-basis scales with the
   ratio and flex-grow lets a row expand to the full width, so every tile in a
   row lands on the same height regardless of orientation. The ::after with a
   huge flex-grow soaks up the last row so a lone photo doesn't stretch across. */
.shots {
  display: flex; flex-wrap: wrap;
  gap: 10px;
  --row-h: 260px;
}
.shots::after { content: ''; flex-grow: 9999999; }
.shot {
  position: relative; display: block; overflow: hidden;
  padding: 0; border: 0; margin: 0; cursor: zoom-in;
  background: var(--bg-soft); border-radius: var(--radius);
  height: var(--row-h);
  flex-grow: calc(var(--r) * 100);
  flex-basis: calc(var(--r) * var(--row-h));
}
.shot img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .45s ease, opacity .25s;
}
.shot:hover img { transform: scale(1.04); }
.shot:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* ---------- Lightbox ---------- */
.lightbox {
  border: 0; padding: 0; max-width: 100vw; max-height: 100vh;
  width: 100%; height: 100%; background: rgba(12,12,12,.96); color: #fff;
}
.lightbox::backdrop { background: rgba(12,12,12,.9); }
.lb-stage {
  margin: 0; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 64px;
}
.lb-stage img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto; object-fit: contain;
}
.lightbox button {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font-family: inherit; line-height: 1; opacity: .72; transition: opacity .18s;
}
.lightbox button:hover, .lightbox button:focus-visible { opacity: 1; }
.lb-close { top: 14px; right: 18px; font-size: 40px; padding: 4px 10px; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 56px; padding: 8px 16px; }
.lb-prev { left: 6px; }
.lb-next { right: 6px; }
.lb-count {
  position: absolute; bottom: 16px; left: 0; right: 0; text-align: center;
  margin: 0; font-size: 12px; letter-spacing: .18em; color: rgba(255,255,255,.6);
}
/* the dialog owns the viewport while open */
body.lb-open { overflow: hidden; }

/* ---------- About ---------- */
.about { max-width: 680px; }
.about .lead { font-size: 18px; color: var(--text); }
.about p { color: var(--text-dim); margin-bottom: 22px; }
.about .contact-row:first-of-type { margin-top: 12px; }

/* ---------- Equipment / rig list ---------- */
.equip { max-width: 880px; display: grid; gap: 38px; }
.equip h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .18em; color: var(--text-mute); margin-bottom: 14px; }
.equip ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 28px; }
.equip li { position: relative; padding-left: 20px; color: var(--text-dim); font-size: 15px; }
.equip li::before { content: "▸"; position: absolute; left: 0; color: var(--text-mute); }

/* ---------- Contact ---------- */
.contact { max-width: 520px; }
.contact .lead { color: var(--text-dim); margin-bottom: 34px; }
.contact-row { padding: 20px 0; border-top: 1px solid var(--line); }
.contact-row:last-of-type { border-bottom: 1px solid var(--line); }
.contact-label { display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 5px; }
.contact-value { font-size: 20px; }
.contact-value a:hover { color: var(--accent); }
.btn {
  display: inline-block; margin-top: 32px; padding: 13px 32px; border: 1px solid var(--text);
  color: var(--text); text-transform: uppercase; letter-spacing: .12em; font-size: 13px; border-radius: 3px;
  transition: background .18s, color .18s;
}
.btn:hover { background: var(--text); color: #fff; }
.btn--sm { margin-top: 0; padding: 10px 22px; font-size: 12px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; margin-top: 20px; color: var(--text-mute); font-size: 13px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 18px; }

/* =================================================================
   Responsive — collapse sidebar into a top bar under 900px
   ================================================================= */
@media (max-width: 900px) {
  .sidebar {
    position: sticky; top: 0; left: 0; right: 0; bottom: auto; width: 100%;
    flex-direction: row; align-items: center; justify-content: space-between;
    gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line);
    overflow: visible;   /* let the dropdown escape the bar instead of being clipped */
  }
  .brand-name { font-size: 17px; }
  .brand-role { margin-top: 3px; font-size: 10px; }
  .nav-toggle {
    display: inline-block; background: none; border: 0; color: var(--brand);
    font-family: inherit;
    font-size: 15px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; padding: 8px 4px;
  }
  /* Orange full-width panel, centred links — matches the original site's #mobileNav */
  .side-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--brand); border-bottom: 0;
    flex-direction: column; gap: 0; padding: 0 20px;
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .side-nav.open {
    max-height: calc(100vh - 64px);
    padding: 2em 20px;
    overflow-y: auto;
  }
  .side-nav ul + ul { border-top: 0; padding-top: 0; margin-top: 0; }
  .side-nav li { margin: 0; text-align: center; }
  .side-nav a {
    display: block; padding: 0; text-align: center;
    font-size: 18px; line-height: 2.5em; font-weight: 500;
    color: rgba(255,255,255,.7);
  }
  .side-nav a:hover,
  .side-nav a[aria-current="page"] { color: #fff; font-weight: 500; }
  .content { margin-left: 0; }
  .wrap { padding: 0 20px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .hero { padding: 20px; }          /* original's mobile #pageWrapper gutter */
  .section { padding: 40px 0; }
  .shots { --row-h: 170px; gap: 6px; }
  .lb-stage { padding: 56px 12px; }
  .lb-nav { font-size: 40px; padding: 8px; }
}

/* Grid column counts */
@media (max-width: 700px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .grid { grid-template-columns: 1fr; } }

/* =================================================================
   "Coming Soon" panel — titles with no trailer and nowhere to watch yet.
   Sits where the video embed would, so the page keeps its rhythm. The
   project's own poster is reused as a blurred wash behind the type, and
   the poster itself still appears below at full quality.
   ================================================================= */
.soon {
  position: relative; overflow: hidden; isolation: isolate;
  width: 100%; max-width: 940px; aspect-ratio: 16 / 9;
  margin-bottom: 24px; border-radius: var(--radius);
  background: #0d0d0d;
  display: grid; place-items: center;
}

/* blurred poster wash */
.soon::before {
  content: ''; position: absolute; inset: -10%; z-index: 0;
  background-image: var(--poster);
  background-size: cover; background-position: center;
  filter: blur(30px) saturate(1.2) brightness(.5);
  transform: scale(1.08);
}

/* vignette + a slow sheen sweeping across */
.soon::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background-image:
    radial-gradient(125% 95% at 50% 35%, rgba(0,0,0,.12), rgba(0,0,0,.74)),
    linear-gradient(115deg, transparent 40%, rgba(255,255,255,.10) 50%, transparent 60%);
  background-repeat: no-repeat, no-repeat;
  background-size: 100% 100%, 250% 100%;
  background-position: 0 0, 125% 0;
  animation: soon-sheen 7s ease-in-out infinite;
}
@keyframes soon-sheen {
  0%, 100% { background-position: 0 0, 125% 0; }
  50%      { background-position: 0 0, -25% 0; }
}

.soon-inner { position: relative; z-index: 2; text-align: center; padding: 24px; color: #fff; }

.soon-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 17px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.09);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(255,255,255,.92);
}
.soon-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
  animation: soon-pulse 2.2s ease-out infinite;
}
@keyframes soon-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(165,94,18,.75); }
  70%  { box-shadow: 0 0 0 13px rgba(165,94,18,0); }
  100% { box-shadow: 0 0 0 0 rgba(165,94,18,0); }
}

.soon-head {
  margin: 20px 0 8px;
  font-size: clamp(30px, 6.5vw, 58px); font-weight: 600;
  letter-spacing: -.02em; line-height: 1;
  text-shadow: 0 2px 24px rgba(0,0,0,.45);
}
.soon-sub {
  margin: 0; font-size: 14px; letter-spacing: .04em;
  color: rgba(255,255,255,.68);
}

@media (prefers-reduced-motion: reduce) {
  .soon::after, .soon-dot { animation: none; }
}

/* Poster under a Coming Soon panel: no video competing for attention,
   so it keeps the full detail size rather than shrinking to an aside. */
.detail-poster--soon { margin-top: 30px; }
