/*
Theme Name: TN Turner
Theme URI: https://tnturner.co.uk
Author: Tom Turner
Description: Custom portfolio theme for Tom Turner, Lighting Designer
Version: 6.0
License: GNU General Public License v2 or later
Text Domain: tnturner
*/

:root {
  --white: #fafaf8;
  --off-white: #f2f1ee;
  --black: #111110;
  --mid: #6b6b67;
  --light-border: #e2e1dc;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--black);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250,250,248,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--light-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 62px;
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--black);
  text-decoration: none;
}

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

.nav-links a {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Hamburger button */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--black);
  transition: all 0.25s;
  transform-origin: center;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile dropdown */
.nav-mobile {
  display: none;
  position: fixed;
  top: 62px;
  left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--light-border);
  z-index: 99;
  padding: 16px 0;
}

.nav-mobile.open { display: block; }

.nav-mobile a {
  display: block;
  padding: 14px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  border-bottom: 1px solid var(--light-border);
  transition: color 0.2s, background 0.2s;
}

.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--black); background: var(--off-white); }

/* ── MAIN CONTENT ── */
.site-main { padding-top: 62px; min-height: 100vh; }

/* ── HOME HEADER ── */
.home-header {
  padding: 70px 40px 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid var(--light-border);
}

.home-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(42px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.home-subtitle {
  font-size: 13px;
  color: var(--mid);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
  line-height: 1.8;
}

/* ── FILTERS ── */
.filters {
  display: flex;
  gap: 4px;
  padding: 24px 40px;
  border-bottom: 1px solid var(--light-border);
  flex-wrap: wrap;
}

.filter-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 7px 16px;
  border: 1px solid var(--light-border);
  background: transparent;
  color: var(--mid);
  cursor: pointer;
  transition: all 0.18s;
  border-radius: 2px;
}

.filter-btn:hover { border-color: var(--black); color: var(--black); }
.filter-btn.active { background: var(--black); color: var(--white); border-color: var(--black); }

/* ── PORTFOLIO GRID (3-col homepage → 4-col) ── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--light-border);
}

/* ── ALL WORK GRID (4-col) ── */
.portfolio-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--light-border);
}

.grid-item {
  background: var(--white);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  text-decoration: none;
  display: block;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.35s ease, transform 0.35s ease;
  filter: brightness(1) contrast(1);
}

/* Subtle brightness/contrast shift on hover — no zoom */
.grid-item:hover img {
  filter: brightness(0.82) contrast(1.08);
  transform: none;
}

.grid-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,17,16,0.72) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.grid-item:hover .grid-item-overlay { opacity: 1; }

.grid-item-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.grid-item-meta {
  font-size: 10px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

.grid-item-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: rgba(250,250,248,0.92);
  color: var(--black);
  border-radius: 2px;
}

.grid-item.hidden { display: none; }

.grid-item-placeholder {
  width: 100%;
  height: 100%;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light-border);
  font-family: 'Syne', sans-serif;
  font-size: 48px;
  font-weight: 800;
}

/* ── VIEW ALL ── */
.view-all-wrap {
  padding: 48px 40px;
  text-align: center;
  border-top: 1px solid var(--light-border);
}

.view-all-btn {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 36px;
  border: 1px solid var(--black);
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border-radius: 2px;
}

.view-all-btn:hover { background: transparent; color: var(--black); }

/* ── NOW SHOWING ── */
.upcoming-strip {
  border-top: 1px solid var(--light-border);
  padding: 64px 40px 72px;
}

.upcoming-strip h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 36px;
}

.upcoming-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 64px;
}

.upcoming-item {
  padding: 24px 0;
  border-top: 1px solid var(--light-border);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 24px;
}

.upcoming-show {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.upcoming-show a { color: var(--black); text-decoration: none; }
.upcoming-show a:hover { text-decoration: underline; }
.upcoming-role { font-size: 12px; color: var(--mid); font-style: italic; }
.upcoming-venue { font-size: 12px; color: var(--mid); text-align: right; line-height: 1.6; }

/* ── SHOW PAGE ── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  margin: 32px 40px;
  transition: color 0.2s;
}

.back-btn:hover { color: var(--black); }
.back-btn::before { content: '←'; font-size: 16px; }

.show-hero-wrap {
  position: relative;
  width: 100%;
  height: 70vh;
  overflow: hidden;
}

.show-hero {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.show-hero-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 24px;
  background: linear-gradient(to top, rgba(17,17,16,0.7), transparent);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.3s;
}

.show-hero-wrap:hover .show-hero-caption { opacity: 1; }

.show-website-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  margin-top: 12px;
  border-bottom: 1px solid var(--light-border);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.show-website-link:hover { color: var(--black); border-color: var(--black); }
.show-website-link::after { content: '↗'; font-size: 14px; }

.show-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 40px;
}

.show-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
  margin-bottom: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--light-border);
}

.show-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.show-category-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--light-border);
  color: var(--mid);
  margin-top: 16px;
  border-radius: 2px;
}

.show-team { text-align: right; }

.show-team h3 {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 12px;
}

.team-row { font-size: 13px; line-height: 2; }

.team-row .role {
  color: var(--mid);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 8px;
}

.team-row a { color: var(--black); text-decoration: none; border-bottom: 1px solid var(--light-border); }
.team-row a:hover { border-color: var(--black); }

.show-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-bottom: 64px;
}

.show-section h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 20px;
}

.show-section p { font-size: 14px; line-height: 1.8; margin-bottom: 14px; }

.review-block {
  padding: 24px;
  border-left: 2px solid var(--black);
  background: var(--off-white);
  margin-bottom: 16px;
}

.review-quote { font-size: 14px; line-height: 1.7; font-style: italic; margin-bottom: 10px; }
.review-source { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mid); }

.show-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 64px;
  border-top: 1px solid var(--light-border);
  padding-top: 48px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.3s;
}

.gallery-item:hover img { filter: brightness(0.85); }

.gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  background: linear-gradient(to top, rgba(17,17,16,0.75), transparent);
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  letter-spacing: 0.03em;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-caption { opacity: 1; }

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17,17,16,0.95);
  z-index: 200;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-direction: column;
  gap: 16px;
}

.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; object-fit: contain; }

.lightbox-caption {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  text-align: center;
  letter-spacing: 0.04em;
  max-width: 600px;
}

.lightbox-close {
  position: absolute;
  top: 24px; right: 32px;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  font-weight: 300;
  line-height: 1;
}

/* ── ABOUT ── */
.about-page { max-width: 900px; margin: 0 auto; padding: 80px 40px; }

.about-page h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 56px;
}

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.about-bio p { font-size: 15px; line-height: 1.75; margin-bottom: 18px; }

.about-roles h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 16px;
  margin-top: 36px;
}

.about-roles h3:first-child { margin-top: 0; }
.about-roles p { font-size: 14px; line-height: 1.7; }

/* ── CONTACT ── */
.contact-page { max-width: 600px; margin: 0 auto; padding: 80px 40px; }

.contact-page h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 56px;
}

.contact-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--light-border);
  font-size: 14px;
}

.contact-line:last-child { border-bottom: 1px solid var(--light-border); }
.contact-label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mid); }
.contact-value a { color: var(--black); text-decoration: none; font-weight: 500; }
.contact-value a:hover { text-decoration: underline; }

/* ── WORK PAGE ── */
.all-work-header { padding: 100px 40px 48px; border-bottom: 1px solid var(--light-border); }

.all-work-header h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.04em;
  line-height: 0.95;
}

/* ── CREDITS PAGE ── */
.credits-page { max-width: 1000px; margin: 0 auto; padding: 100px 40px 80px; }

.credits-page h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 72px;
}

.credits-section { margin-bottom: 4px; }

.credits-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 2px solid var(--black);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--black);
  text-align: left;
  transition: color 0.2s;
}

.credits-section-toggle:hover { color: var(--mid); }

.credits-toggle-icon {
  font-size: 28px;
  font-weight: 300;
  transition: transform 0.25s;
  color: var(--mid);
  line-height: 1;
  width: 32px;
  text-align: center;
}

.credits-section.open .credits-toggle-icon { transform: rotate(45deg); }

.credits-section-body { display: none; padding-bottom: 24px; }
.credits-section.open .credits-section-body { display: block; }

.credits-table { width: 100%; border-collapse: collapse; }
.credits-table tr { border-bottom: 1px solid var(--light-border); }
.credits-table tr:hover { background: var(--off-white); }

.credits-table td {
  padding: 9px 12px 9px 0;
  font-size: 13px;
  vertical-align: middle;
}

.credits-table td:last-child { padding-right: 0; }
.credits-title { font-family: 'Syne', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: -0.01em; min-width: 180px; }
.credits-title a { color: var(--black); text-decoration: none; }
.credits-title a:hover { text-decoration: underline; }
.credits-venue { color: var(--mid); min-width: 140px; font-size: 13px; }
.credits-person { color: var(--black); min-width: 140px; font-size: 13px; }
.credits-person-label { font-size: 10px; color: var(--mid); text-transform: uppercase; letter-spacing: 0.06em; display: block; }
.credits-date { color: var(--mid); text-align: right; white-space: nowrap; font-size: 13px; }

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--light-border);
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--mid);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.grid-item { animation: fadeUp 0.5s both; }
.grid-item:nth-child(1) { animation-delay: 0.05s; }
.grid-item:nth-child(2) { animation-delay: 0.10s; }
.grid-item:nth-child(3) { animation-delay: 0.15s; }
.grid-item:nth-child(4) { animation-delay: 0.20s; }
.grid-item:nth-child(5) { animation-delay: 0.25s; }
.grid-item:nth-child(6) { animation-delay: 0.30s; }
.grid-item:nth-child(7) { animation-delay: 0.35s; }
.grid-item:nth-child(8) { animation-delay: 0.40s; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .portfolio-grid,
  .portfolio-grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .portfolio-grid,
  .portfolio-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .home-header { flex-direction: column; gap: 16px; align-items: flex-start; }
  .home-subtitle { text-align: left; }
  .upcoming-list { grid-template-columns: 1fr; gap: 0; }
  .show-header { grid-template-columns: 1fr; }
  .show-team { text-align: left; }
  .show-body { grid-template-columns: 1fr; gap: 40px; }
  .show-gallery { grid-template-columns: repeat(2, 1fr); }
  nav.site-nav { padding: 0 20px; }
  .credits-table td { padding: 8px 8px 8px 0; }
}

@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .portfolio-grid,
  .portfolio-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .home-title { white-space: normal; }
}

@media (max-width: 480px) {
  .portfolio-grid,
  .portfolio-grid-4 { grid-template-columns: 1fr; }
  .show-gallery { grid-template-columns: 1fr; }
  .credits-table .credits-venue { display: none; }
}
