/* =========================================================
   INNER PAGES — Sidebar Layout (Writing · Direction · Print)
   Inspired by Footloose Films minimal dark editorial style
   ========================================================= */

/* ----- VIDEO TITLE ----------------------------------------- */
.video-title {
  font-size: 18px !important;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.85) !important;
}

/* ----- FLUID CANVAS ---------------------------------------- */

#fluidCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  touch-action: none;
  opacity: 0.4;
}

/* ----- RESET TOP-LEVEL HEADER (not used on inner pages) -- */
.site-header { display: none !important; }

/* ----- BASE -------------------------------------------- */

body.inner {
  background: #0a2a3a url('../image/bg-subpage.png') center center / cover no-repeat fixed;
  color: #e8f4ff;
  min-height: 100vh;
  font-family: var(--font-body);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ----- SIDEBAR ----------------------------------------- */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  padding: 52px 40px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
  background: rgba(5, 25, 40, 0.82);
  backdrop-filter: blur(14px);
}

.sidebar .brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #e8f4ff;
  margin-bottom: 60px;
  text-decoration: none;
}

.sidebar .brand-mark .dot {
  width: 7px;
  height: 7px;
  background: #e8f4ff;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.sidebar .brand-mark:hover { opacity: 0.7; }

/* Side navigation */
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-nav a {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  padding: 6px 0;
  letter-spacing: 0.02em;
  transition: color .25s ease;
}

.side-nav a:hover {
  color: #e8f4ff;
  opacity: 1;
}

.side-nav a.active {
  color: #e8f4ff;
  font-weight: 500;
}

/* Expandable sub-nav group */
.side-nav-group > a,
.side-nav-label {
  display: block;
}

.side-nav-label {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.02em;
  padding: 6px 0;
  cursor: default;
}

a.side-nav-label {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 300;
  cursor: pointer;
  transition: color .25s ease;
  text-decoration: none;
}

a.side-nav-label:hover {
  color: #e8f4ff;
}

.side-subnav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 14px;
  margin-top: 6px;
  margin-bottom: 8px;
  border-left: 1px solid rgba(255,255,255,0.08);
}

.side-nav-group.open .side-subnav {
  display: flex;
}

.subnav-item {
  font-size: 12px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.4);
  padding: 5px 0;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color .2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.subnav-item::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  transition: background .2s ease;
}

.subnav-item:hover {
  color: #e8f4ff;
  opacity: 1;
}

.subnav-item:hover::before {
  background: rgba(255, 255, 255, 0.6);
}

.subnav-item.active {
  color: #e8f4ff;
  font-weight: 500;
}

.subnav-item.active::before {
  background: #e8f4ff;
}

/* Back to home at bottom */
.sidebar-footer {
  margin-top: auto;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.25);
}

.sidebar-footer a {
  color: rgba(255, 255, 255, 0.35);
  transition: color .25s ease;
}

.sidebar-footer a:hover {
  color: #e8f4ff;
  opacity: 1;
}

/* ----- PAGE WRAP --------------------------------------- */

.page-wrap {
  margin-left: 260px;
  padding: 60px 80px 100px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  touch-action: pan-y;
}

@media (max-width: 900px) {
  body.inner { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 32px 24px;
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }
  .sidebar .brand-mark { margin-bottom: 0; }
  .side-nav { flex-direction: row; gap: 20px; }
  .sidebar-footer { display: none; }
  .page-wrap { margin-left: 0; padding: 40px 24px 80px; }
}

/* ----- PAGE INTRO -------------------------------------- */

.page-intro {
  padding: 0 0 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 48px;
}

.page-intro .eyebrow {
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  display: block;
  margin-bottom: 24px;
}

.page-intro .page-title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(42px, 6vw, 80px);
  letter-spacing: -0.03em;
  line-height: 1.0;
  color: #e8f4ff;
  margin: 0 0 20px;
}

.page-intro .page-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.55);
  max-width: 620px;
  line-height: 1.7;
}

/* ----- FILTER BAR -------------------------------------- */

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 0 40px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 48px;
}

.filter-chip {
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 7px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  cursor: pointer;
  transition: color .25s ease, border-color .25s ease, background .25s ease;
  font-family: var(--font-body);
}

.filter-chip:hover {
  color: #e8f4ff;
  border-color: rgba(255, 255, 255, 0.45);
}

.filter-chip.active {
  color: #0a4a6a;
  background: #e8f4ff;
  border-color: #e8f4ff;
}

/* ----- WORK GRID --------------------------------------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.work-grid.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.work-grid.dense {
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

@media (max-width: 1100px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid.dense { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .work-grid,
  .work-grid.dense { grid-template-columns: 1fr; }
}

/* ----- TILE -------------------------------------------- */

.tile {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
}

.tile:hover {
  transform: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.tile.hide { display: none; }

.tile .thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.work-grid.dense .tile .thumb { aspect-ratio: 3 / 2; }

.tile .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Doc tile (Writing) */
.tile.pdf .thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}

.doc {
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 20px 18px;
  width: 75%;
  font-family: var(--font-body);
}

.doc-title {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.7);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.doc-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-lines span {
  display: block;
  height: 1px;
  background: rgba(255,255,255,0.12);
  width: 100%;
}

.doc-lines span:nth-child(2) { width: 80%; }
.doc-lines span:nth-child(3) { width: 65%; }
.doc-lines span:nth-child(4) { width: 90%; }
.doc-lines span:nth-child(5) { width: 55%; }
.doc-lines span:nth-child(6) { width: 75%; }
.doc-lines span:nth-child(7) { width: 40%; }
.doc-lines span:nth-child(8) { width: 85%; }


/* Badge */
.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e8f4ff;
  background: rgba(5, 25, 40, 0.75);
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 1;
}

/* Meta */
.tile .meta {
  display: block !important;
  padding: 12px 0 0;
  background: transparent !important;
  border: none !important;
  border-top: none !important;
  text-align: center;
}

.tile .meta .title {
  font-size: 18px !important;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85) !important;
  text-align: center;
  display: block;
  width: 100%;
  transition: color .25s ease;
}


.tile .meta .cat {
  display: none !important;
}

.tile .meta .title {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  transition: color .25s ease;
}


.tile .meta .cat {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
}

/* ----- LIGHTBOX ---------------------------------------- */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.lightbox:target { display: flex; }

.lb-inner {
  position: relative;
  max-width: min(1100px, 92vw);
  width: 100%;
}

.lb-inner video,
.lb-inner img {
  width: 100%;
  display: block;
  max-height: 80vh;
  object-fit: contain;
}

.lb-close {
  position: absolute;
  top: -36px;
  right: 0;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  transition: color .2s ease;
}

.lb-close:hover { color: #fff; opacity: 1; }

.lb-caption {
  margin-top: 16px;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
}

/* ----- FILM ENTRY (Direction pages) -------------------- */

.film-list {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.film-entry {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 80px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.film-entry:last-child {
  border-bottom: none;
}

.film-info {
  padding-top: 8px;
}

.film-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(22px, 2.5vw, 32px);
  letter-spacing: -0.01em;
  color: #e8f4ff;
  margin: 0 0 16px;
  line-height: 1.2;
}

.film-meta {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 20px;
}

.film-desc {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.5);
  max-width: 600px;
}

.film-video {
  position: relative;
  width: 100%;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.film-video video {
  width: 100%;
  display: block;
  max-height: 70vh;
  object-fit: contain;
  background: #000;
}

@media (max-width: 900px) {
  .film-desc { max-width: 100%; }
}

/* ----- FOOTER ------------------------------------------ */

.inner-footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 200, 200, 0.35);
}

/* Push subtitle down near the bottom border line */
.page-intro {
  display: flex;
  flex-direction: column;
}

.page-intro .page-subtitle {
  margin-top: auto;
}

/* =========================================================
   MOBILE RESPONSIVE — inner pages
   ========================================================= */

/* Hamburger button — hidden on desktop */
.mobile-nav-toggle {
  display: none;
}

@media (max-width: 768px) {

  /* --- Sidebar becomes a top bar --- */
  .sidebar {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: auto;
    width: 100%;
    height: 60px;
    padding: 0 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    z-index: 200;
    overflow: visible;
  }

  .sidebar .brand-mark {
    margin-bottom: 0;
    font-size: 10px;
  }

  /* Hide nav & footer by default on mobile */
  .sidebar .side-nav,
  .sidebar .sidebar-footer {
    display: none;
  }

  /* Nav slides down when open */
  .sidebar.nav-open .side-nav {
    display: flex;
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: rgba(5, 20, 35, 0.97);
    backdrop-filter: blur(18px);
    padding: 24px 24px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }

  /* Hamburger button — visible on mobile */
  .mobile-nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    background: none;
    border: none;
    flex-shrink: 0;
  }

  .mobile-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* Animate hamburger to X when open */
  .sidebar.nav-open .mobile-nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .sidebar.nav-open .mobile-nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  .sidebar.nav-open .mobile-nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* --- Page content — full width --- */
  .page-wrap {
    margin-left: 0 !important;
    padding-top: 80px;
    padding-left: 16px;
    padding-right: 16px;
  }

  /* --- Page intro --- */
  .page-intro {
    padding: 24px 0 32px;
  }

  /* --- Video grids --- */
  .video-grid--wide {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .video-grid--shorts {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  /* --- Image/tile grids --- */
  .work-grid,
  .work-grid.dense {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 20px 0 40px !important;
  }

  /* --- Image modal --- */
  .img-modal-inner {
    max-height: 95vh;
  }

  /* --- Video modal --- */
  .vid-modal-inner.wide {
    max-width: 100%;
  }
  .vid-modal-inner.tall {
    max-width: 85vw;
  }

  /* --- Inner footer --- */
  .inner-footer {
    padding: 24px 0;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .video-grid--shorts {
    grid-template-columns: 1fr !important;
  }

  .work-grid,
  .work-grid.dense {
    grid-template-columns: 1fr !important;
  }

  .page-intro .page-subtitle {
    font-size: 15px;
  }
}