/*!
 * Theme Name: Stonebound SH7b
 * Author: Stonebound Media
 * Description: Minimal dark portfolio theme for film and photography.
 * Version: 5.6
 * Text Domain: stonebound
 */

@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wdth,wght@75..125,200..900&family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap');

/* ===== VARIABLES ===== */
:root {
  --bg:           #0a0a0a;
  --bg-alt:       #111;
  --text:         #dedad4;
  --dim:          #525252;
  --border:       #1e1e1e;
  --white:        #ffffff;
  --font-display: 'Inconsolata', monospace;
  --font-body:    'DM Mono', monospace;
  --nav-h:        76px;
  --max-w:        1380px;
  --pad:          clamp(20px, 4vw, 64px);
  --trans:        0.22s ease;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 14px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
h1,h2,h3,h4,h5 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; letter-spacing: -.01em; }

/* ===== LAYOUT ===== */
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad); }
main { flex: 1; }

/* ===== NAVIGATION ===== */
.site-nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  background: rgba(10,10,10,0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-nav .container { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.site-name {
  display: flex; flex-direction: column; align-items: flex-start;
  color: var(--text); transition: color var(--trans); gap: 5px;
}
.site-name-main {
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase; line-height: 1;
}
.site-name-sub {
  font-family: var(--font-body); font-size: 10px; font-weight: 300;
  letter-spacing: .06em; text-transform: none; color: var(--dim);
  transition: color var(--trans); line-height: 1;
}
.site-name:hover .site-name-sub { color: var(--text); }
.site-name:hover { color: var(--white); }
.site-name:hover .site-name-main { color: var(--white); }
.nav-links { display: flex; gap: clamp(20px,3vw,48px); list-style: none; }
.nav-links a { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); transition: color var(--trans); }
.nav-links a:hover, .nav-links a.current { color: var(--text); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; margin-right: -8px; }
.nav-toggle span { display: block; width: 22px; height: 1px; background: var(--text); transition: transform .3s, opacity .3s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-mobile { display: none; position: fixed; inset: 0; background: var(--bg); z-index: 99; flex-direction: column; align-items: center; justify-content: center; gap: 36px; }
.nav-mobile.open { display: flex; }
.nav-mobile a { font-family: var(--font-display); font-size: clamp(28px,8vw,48px); font-weight: 300; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); transition: color var(--trans); }
.nav-mobile a:hover { color: var(--text); }

/* ===== PAGE HEADER (Work page) ===== */
.page-header { padding: clamp(56px,9vw,110px) 0 clamp(32px,5vw,58px); border-bottom: 1px solid var(--border); }
.page-header-label { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); margin-bottom: 18px; }
.page-header h1 { font-size: clamp(36px,6.5vw,80px); font-weight: 300; letter-spacing: -.025em; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: clamp(24px,4vw,44px); padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.section-title { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.section-count { font-size: 10px; color: var(--dim); }

/* ===== WORK PAGE — FILM ROWS ===== */
.films-section { padding-bottom: clamp(48px,7vw,84px); }
.film-row { display: grid; grid-template-columns: 340px 1fr; gap: clamp(40px,6vw,80px); padding: clamp(52px,7vw,80px) 0; border-bottom: 1px solid var(--border); align-items: start; }
.film-row:first-child { border-top: 1px solid var(--border); margin-top: clamp(40px,6vw,64px); }
.fr-type { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 16px; }
.fr-title { font-family: var(--font-display); font-size: clamp(22px,2.8vw,34px); font-weight: 400; letter-spacing: -.025em; line-height: 1.1; margin-bottom: 10px; font-feature-settings: "kern" 1; text-rendering: optimizeLegibility; }
.fr-collab { font-size: 11px; color: var(--dim); letter-spacing: .05em; margin-bottom: 24px; }
.fr-body p { font-size: 13px; line-height: 1.8; color: rgba(222,218,212,.68); margin-bottom: .85em; }
.fr-location { font-size: 12px; font-style: italic; color: var(--dim); margin: 18px 0 32px; line-height: 1.65; }
.fr-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.fr-btn { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-body); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); border: 1px solid var(--border); padding: 10px 18px; transition: color var(--trans), border-color var(--trans); }
.fr-btn:hover { color: var(--text); border-color: var(--dim); }
.fr-btn-arrow { transition: transform var(--trans); }
.fr-btn:hover .fr-btn-arrow { transform: translateX(3px); }

/* Image — always a clickable link with "See project" hover */
/* aspect-ratio on the CONTAINER, not the img — WordPress width/height attrs on <img> can
   override aspect-ratio on the img element itself, so we enforce it on the link wrapper */
.fr-right { overflow: hidden; width: 100%; }
/* Thumbnail: no forced ratio — just show the uploaded image at natural dimensions */
.fr-img-link {
  display: block;
  position: relative;
  overflow: hidden;
  width: 100%;
}
.fr-img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  filter: brightness(.88);
  transition: transform .8s ease, opacity .5s;
}
.fr-img-link:hover .fr-img { transform: scale(1.02); opacity: .7; }
.fr-see-project { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--trans); pointer-events: none; }
.fr-img-link:hover .fr-see-project { opacity: 1; }
.fr-see-project-label { font-family: var(--font-display); font-size: 13px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--white); border-bottom: 1px solid rgba(255,255,255,.45); padding-bottom: 4px; }

/* ===== SHORT FILMS — EXPANDABLE CARDS ===== */
.shorts-section { padding: clamp(48px,7vw,84px) 0; border-top: 1px solid var(--border); }
.short-card { border-bottom: 1px solid var(--border); }
.short-card:first-child { border-top: 1px solid var(--border); }
.short-card.playing { background: rgba(255,255,255,.013); }
.sc-row { display: grid; grid-template-columns: 350px 1fr auto; align-items: stretch; cursor: pointer; transition: background var(--trans); }
.sc-row:hover { background: rgba(255,255,255,.016); }
.short-card.playing .sc-row { display: none; }
.sc-thumb-wrap { position: relative; aspect-ratio: 16/9; overflow: hidden; align-self: center; }
.sc-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.82); transition: transform .65s, opacity .35s; }
.sc-row:hover .sc-thumb-wrap img { transform: scale(1.05); opacity: .68; }
.sc-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bg-alt); }
.sc-thumb-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--trans); }
.sc-row:hover .sc-thumb-overlay { opacity: 1; }
.sc-play-ring { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.38); display: flex; align-items: center; justify-content: center; }
.sc-play-ring svg { width: 10px; height: 10px; fill: #fff; margin-left: 2px; }
.sc-info { padding: 20px 28px; display: flex; flex-direction: column; justify-content: center; }
.sc-title { font-family: var(--font-display); font-size: clamp(14px,1.6vw,18px); font-weight: 400; margin-bottom: 6px; transition: color var(--trans); }
.sc-row:hover .sc-title { color: var(--white); }
.sc-desc { font-size: 12px; color: var(--dim); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-meta { padding: 20px 20px 20px 0; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 5px; }
.sc-year, .sc-dur { font-size: 11px; color: var(--dim); letter-spacing: .08em; white-space: nowrap; }
.sc-play-hint { font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: var(--dim); opacity: 0; transition: opacity var(--trans); margin-top: 4px; }
.sc-row:hover .sc-play-hint { opacity: 1; }
.sc-player { display: none; padding: 28px 0 32px; }
.short-card.playing .sc-player { display: block; }
.sc-embed-area { position: relative; aspect-ratio: 16/9; background: #080808; }
.sc-embed-area iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.sc-embed-area video { position: absolute; inset: 0; width: 100%; height: 100%; }
.sc-player-bar { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 0; border-top: 1px solid var(--border); margin-top: 18px; }
.sc-player-left { display: flex; align-items: baseline; gap: 16px; }
.sc-player-title { font-family: var(--font-display); font-size: 17px; font-weight: 400; }
.sc-player-meta { font-size: 11px; color: var(--dim); }
.sc-close-btn { font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: var(--dim); transition: color var(--trans); padding: 4px 0; }
.sc-close-btn:hover { color: var(--text); }
/* Short film expanded — body text + role info */
.sc-player-info {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}
.sc-player-body { font-size: 13px; line-height: 1.75; color: rgba(222,218,212,.7); }
.sc-player-body p { margin-bottom: .8em; }
.sc-player-body p:last-child { margin-bottom: 0; }
.sc-player-role { text-align: right; flex-shrink: 0; }
.sc-player-role-label {
  display: block; font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--dim); margin-bottom: 6px;
}
.sc-player-role-value { font-family: var(--font-display); font-size: 15px; }
/* On mobile, stack info vertically */
@media (max-width: 640px) {
  .sc-player-info { grid-template-columns: 1fr; }
  .sc-player-role { text-align: left; }
}


/* ===== ABOUT PAGE — FULL BLEED IMAGE + TEXT ===== */
.about-hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding-bottom: clamp(52px,7vw,90px);
  overflow: hidden;
}
.about-hero-bg { position: absolute; inset: 0; z-index: 0; background: #111; }
.about-hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: center center; /* desktop default */
}
/* Left + bottom vignette */
.about-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(to right,  rgba(10,10,10,.94) 0%, rgba(10,10,10,.65) 38%, rgba(10,10,10,.08) 65%, transparent 100%),
    linear-gradient(to top,    rgba(10,10,10,.90) 0%, rgba(10,10,10,.35) 35%, transparent 65%),
    linear-gradient(to bottom, rgba(10,10,10,.4)  0%, transparent 20%);
}
.about-hero-content { position: relative; z-index: 1; width: 100%; }
.about-text-col { max-width: 560px; }
.about-hero-title { font-family: var(--font-display); font-size: clamp(40px,7vw,92px); font-weight: 300; line-height: 1.0; letter-spacing: -.03em; color: var(--white); margin-bottom: 10px; }
.about-hero-subtitle { font-size: clamp(10px,1.1vw,12px); letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.42); margin-bottom: 28px; }
.about-hero-body { font-size: clamp(12px,1.1vw,14px); line-height: 1.85; color: rgba(255,255,255,.58); }
.about-hero-body p { margin-bottom: 1em; }
.about-hero-body p:last-child { margin-bottom: 0; }
/* Strip Gutenberg block margins */
.about-hero-body .wp-block-paragraph { margin: 0 0 1em; }

/* ===== SINGLE PROJECT PAGE ===== */

/* 1. Main video — always full width, 16:9 */
.project-main-video {
  background: #060606;
  /* Video is now inside .container with padding:0 — same structure as additional videos */
}
/* .video-embed-wrap kept for backwards compat but main video now uses .extra-embed-wrap */
.video-embed-wrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #080808;
  overflow: hidden;
}
.video-embed-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  display: block;
}
.video-native-wrap { width: 100%; display: block; background: #080808; }
.video-native-wrap video { width: 100%; display: block; }

/* 2. Title + info */
.project-info { padding: clamp(48px,7vw,84px) 0; }
.project-info-grid { display: grid; grid-template-columns: 1fr 280px; gap: clamp(48px,6vw,96px); align-items: start; }
.project-type { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; }
.project-title { font-size: clamp(30px,4.5vw,56px); font-weight: 300; letter-spacing: -.03em; margin-bottom: 8px; font-feature-settings: "kern" 1; text-rendering: optimizeLegibility; }
.project-collab { font-size: 11px; color: var(--dim); margin-bottom: 32px; }
.project-body { font-size: 14px; line-height: 1.85; color: rgba(222,218,212,.72); }
.project-body p { margin-bottom: 1.2em; }
.project-location { font-size: 13px; font-style: italic; color: var(--dim); margin-top: 20px; line-height: 1.7; }
.project-back { display: inline-flex; align-items: center; gap: 10px; margin-top: clamp(40px,6vw,72px); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); transition: color var(--trans); }
.project-back:hover { color: var(--text); }
.project-back svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; flex-shrink: 0; }

/* Meta sidebar — only filled fields render (PHP handles hiding) */
.project-meta {}
.meta-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.meta-item:first-child { border-top: 1px solid var(--border); }
.meta-label { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.meta-value { font-family: var(--font-display); font-size: 15px; font-weight: 400; line-height: 1.4; }
.meta-value.small { font-family: var(--font-body); font-size: 13px; color: rgba(222,218,212,.75); }

/* 3. Stills gallery */
.project-stills { padding: clamp(48px,6vw,72px) 0; border-top: 1px solid var(--border); }
.project-section-label { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: clamp(20px,3vw,36px); }
.stills-masonry { columns: 3; column-gap: 5px; }
.stills-item { break-inside: avoid; margin-bottom: 5px; overflow: hidden; cursor: pointer; }
.stills-item img { width: 100%; height: auto; display: block; filter: brightness(.88); transition: transform .55s, opacity .3s; }
.stills-item:hover img { transform: scale(1.02); opacity: .78; }

/* 4. Additional videos */
.project-extra-videos { padding: clamp(48px,6vw,72px) 0; border-top: 1px solid var(--border); }
.extra-section-title { font-family: var(--font-display); font-size: clamp(18px,2.5vw,26px); font-weight: 300; letter-spacing: -.01em; margin-bottom: 16px; }
.extra-video-item { padding: 20px 0 clamp(28px,4vw,44px); border-bottom: 1px solid var(--border); }
.extra-video-item:first-child { padding-top: 0; border-top: none; }
.extra-video-title { font-family: var(--font-display); font-size: clamp(16px,2vw,22px); font-weight: 400; margin-top: 18px; margin-bottom: 8px; }
.extra-embed-wrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #080808;
  overflow: hidden;
}
.extra-embed-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  display: block;
}
.extra-native-wrap { background: #080808; }
.extra-native-wrap video { width: 100%; display: block; }
.extra-video-desc { font-size: 13px; color: rgba(222,218,212,.62); line-height: 1.8; margin-top: 20px; }

/* Lightbox (stills + photos) */
.photo-lightbox { display: none; position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.97); align-items: center; justify-content: center; }
.photo-lightbox.open { display: flex; }
.photo-lightbox-img { max-width: 90vw; max-height: 90vh; object-fit: contain; user-select: none; }
.lightbox-btn { position: fixed; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); cursor: pointer; transition: color var(--trans); background: none; border: none; padding: 16px; }
.lightbox-btn:hover { color: var(--text); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ===== GENERIC PAGE (Contact) ===== */
.generic-page { padding: clamp(40px,6vw,80px) 0; }
.generic-page .container { max-width: 680px; }
.entry-content h2 { font-size: clamp(20px,3vw,28px); font-weight: 400; margin: 52px 0 20px; }
.entry-content h2:first-child { margin-top: 0; }
.entry-content p { margin-bottom: 1.5em; font-size: 14px; line-height: 1.85; color: rgba(222,218,212,.75); }
.entry-content a { border-bottom: 1px solid var(--border); transition: border-color var(--trans); }
.entry-content a:hover { border-color: var(--text); color: var(--white); }
/* CF7 form styling */
.wpcf7-form .wpcf7-text, .wpcf7-form .wpcf7-email, .wpcf7-form .wpcf7-textarea {
  display: block; width: 100%; background: transparent; border: none;
  border-bottom: 1px solid var(--border); padding: 10px 0;
  font-family: var(--font-body); font-size: 14px; color: var(--text);
  outline: none; transition: border-color var(--trans); -webkit-appearance: none; border-radius: 0;
}
.wpcf7-form .wpcf7-text:focus, .wpcf7-form .wpcf7-email:focus, .wpcf7-form .wpcf7-textarea:focus { border-color: var(--dim); }
.wpcf7-form .wpcf7-textarea { resize: vertical; min-height: 120px; }
.wpcf7-form label { display: block; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin: 24px 0 10px; }
.wpcf7-form input[type="submit"] { margin-top: 36px; font-family: var(--font-body); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--text); background: transparent; border: 1px solid var(--border); padding: 16px 40px; cursor: pointer; transition: border-color var(--trans), color var(--trans); }
.wpcf7-form input[type="submit"]:hover { border-color: var(--text); color: var(--white); }

/* ===== FOOTER ===== */
.site-footer { border-top: 1px solid var(--border); padding: clamp(24px,4vw,44px) 0; margin-top: auto; }
.footer-copy { font-size: 11px; color: var(--dim); letter-spacing: .06em; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1060px) { .film-row { grid-template-columns: 300px 1fr; } }
@media (max-width: 900px) {
  .film-row { grid-template-columns: 1fr; gap: 32px; }
  .fr-right { order: -1; }
  .project-info-grid { grid-template-columns: 1fr; }
  .project-meta { display: grid; grid-template-columns: repeat(2,1fr); gap: 0 32px; }
  .stills-masonry { columns: 2; }
}
@media (max-width: 780px) {
  .sc-row { grid-template-columns: 280px 1fr auto; }
  .stills-masonry { columns: 2; }
}
@media (max-width: 640px) {
  .nav-links { display: none; } .nav-toggle { display: flex; }
  .sc-row { grid-template-columns: 210px 1fr; } .sc-meta { display: none; } .sc-desc { display: none; }
  .project-meta { grid-template-columns: 1fr; }
  .stills-masonry { columns: 2; }
  .lightbox-prev { left: 4px; } .lightbox-next { right: 4px; }
  /* Mobile about: shift image focus */
  .about-hero-bg img { object-position: var(--about-mobile-pos, 70% center); }
  .about-text-col { max-width: 100%; }
}
@media (max-width: 420px) { .stills-masonry { columns: 1; } }
