/* ═══════════════════════════════════════════
   HECTOR'S FILM ROOM — Shared Styles
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600&family=Outfit:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

:root {
  --black:   #0D0B09;
  --dark:    #141210;
  --surface: #1C1916;
  --card:    #221F1B;
  --border:  #2E2A25;
  --gold:    #C9A84C;
  --gold-lt: #E2C47A;
  --red:     #A63A2E;
  --text:    #F0EAE0;
  --muted:   #7A7168;
  --sub:     #4A4540;
}

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

body {
  background: var(--black);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 52px;
  background: rgba(13,11,9,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  gap: 2px;
}

.nav-logo-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1;
}

.nav-logo-sub {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

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

.nav-links a {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.2s;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--gold); }
.nav-links a.active::after { width: 100%; }

/* Work dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-dropdown-toggle::after {
  content: '▾';
  font-size: 8px;
  transition: transform 0.2s;
}

.nav-dropdown:hover .nav-dropdown-toggle { color: var(--text); }
.nav-dropdown:hover .nav-dropdown-toggle::after { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 260px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.2s;
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.15s;
}

.nav-dropdown-item:last-child { border-bottom: none; }
.nav-dropdown-item:hover { background: var(--card); }

.nav-dropdown-item-main {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.15s;
}

.nav-dropdown-item:hover .nav-dropdown-item-main { color: var(--gold); }

.nav-dropdown-item-sub {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sub);
}

/* ── SHARED SECTION STYLES ── */
.section-wrap {
  padding: 100px 52px;
  border-top: 1px solid var(--border);
}

.section-wrap.alt { background: var(--dark); }

.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 64px;
}

.section-num {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--gold);
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── PROJECT GRID ── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1px;
  background: var(--border);
}

.project-card {
  background: var(--card);
  padding: 40px 36px;
  position: relative;
  overflow: hidden;
  transition: background 0.25s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 0;
  background: var(--gold);
  transition: height 0.3s ease;
}

.project-card:hover { background: var(--surface); }
.project-card:hover::before { height: 100%; }

.project-card.large {
  grid-column: span 2;
  padding: 56px 48px;
}

.card-num {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--sub);
  margin-bottom: 36px;
}

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 16px;
  transition: color 0.2s;
}

.project-card.large .card-title { font-size: 38px; }
.project-card:hover .card-title { color: var(--gold-lt); }

.card-bar {
  width: 24px; height: 1px;
  background: var(--gold);
  margin-bottom: 16px;
  transition: width 0.3s;
}

.project-card:hover .card-bar { width: 48px; }

.card-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  flex: 1;
  margin-bottom: 28px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.card-role {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sub);
}

.card-link {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  transition: opacity 0.2s;
}

.project-card:hover .card-link { opacity: 1; }

/* ── CARD THUMBNAIL ── */
.card-thumb {
  margin: -40px -36px 28px;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  background-color: var(--surface);
  position: relative;
  overflow: hidden;
}
.project-card.large .card-thumb {
  margin: -56px -48px 36px;
}
.card-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,11,9,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s;
}
.project-card:hover .card-thumb-overlay { background: rgba(13,11,9,0.5); }
.card-thumb-play {
  width: 56px; height: 56px;
  border: 1.5px solid rgba(201,168,76,0.75);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, border-color 0.2s;
}
.project-card:hover .card-thumb-play { transform: scale(1.1); border-color: var(--gold); }
.card-thumb-play::after {
  content: '';
  width: 0; height: 0;
  border-style: solid;
  border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent var(--gold);
  margin-left: 5px;
}

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  padding-top: 68px;
  padding-bottom: 80px;
  padding-left: 52px;
  padding-right: 52px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 80% 50%, rgba(201,168,76,0.05) 0%, transparent 70%);
}

.page-hero-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 40px;
  transition: color 0.2s;
  position: relative;
  z-index: 1;
}

.page-hero-back:hover { color: var(--gold); }

.page-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.page-hero-eyebrow-line {
  width: 32px; height: 1px;
  background: var(--gold);
}

.page-hero-eyebrow-text {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.page-hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.page-hero-title em {
  font-style: italic;
  color: var(--gold);
}

.page-hero-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-style: italic;
  letter-spacing: 0.03em;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.page-hero-bg-text {
  position: absolute;
  right: -10px;
  bottom: -20px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(120px, 18vw, 240px);
  font-weight: 700;
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1px var(--border);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  letter-spacing: -0.04em;
}

/* ── FOOTER ── */
footer {
  background: var(--black);
  border-top: 1px solid var(--border);
  padding: 28px 52px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sub);
}

.footer-center {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--gold);
}

.footer-right {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--sub);
}

/* ── BUTTONS ── */
.btn-primary {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--gold);
  text-decoration: none;
  padding: 16px 36px;
  display: inline-block;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover { background: var(--gold-lt); }

.btn-ghost {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  text-decoration: none;
  padding: 16px 36px;
  display: inline-block;
  transition: all 0.2s;
}

.btn-ghost:hover { border-color: var(--muted); color: var(--text); }

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── HAMBURGER BUTTON ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  z-index: 101;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text);
  transition: all 0.3s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── RESPONSIVE 960px ── */
@media (max-width: 960px) {
  nav { padding: 0 24px; }
  .nav-links { gap: 20px; }
  .section-wrap { padding: 64px 24px; }
  .page-hero { padding: 68px 24px 56px; }
  .page-hero-bg-text { display: none; }
  .project-card.large { grid-column: span 1; }
  footer { flex-direction: column; gap: 12px; text-align: center; padding: 24px; }
}

/* ── MOBILE 768px ── */
@media (max-width: 768px) {

  /* NAV */
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 68px; left: 0; right: 0; bottom: 0;
    height: calc(100dvh - 68px);
    background: rgba(13,11,9,0.98);
    flex-direction: column;
    padding: 32px 24px 48px;
    gap: 0;
    z-index: 99;
    border-top: 1px solid var(--border);
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    list-style: none;
  }
  .nav-links.open { display: flex; }

  .nav-links > li {
    border-bottom: 1px solid var(--border);
  }
  .nav-links a {
    font-size: 12px;
    padding: 18px 0;
    display: block;
    letter-spacing: 0.15em;
  }
  .nav-links a::after { display: none; }

  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle {
    font-size: 12px;
    padding: 18px 0 10px;
    width: 100%;
    justify-content: space-between;
    letter-spacing: 0.15em;
    cursor: default;
  }
  .nav-dropdown-toggle::after { display: none; }
  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    pointer-events: all;
    transform: none;
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 2px solid var(--gold);
    padding-left: 0;
    min-width: auto;
    transition: none;
    display: block;
    margin: 0 0 0;
  }
  .nav-dropdown-menu::before { display: none; }
  .nav-dropdown:hover .nav-dropdown-menu { display: block; }
  .nav-dropdown-item { padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .nav-dropdown-item:last-child { border-bottom: none; }
  .nav-dropdown-item-main { font-size: 15px; color: var(--text); }
  .nav-dropdown-item-sub { font-size: 9px; color: var(--gold); opacity: 0.7; letter-spacing: 0.1em; }

  /* HERO */
  .hero-credits { display: none; }
  .hero-scroll { display: none; }

  /* SECTION LABELS */
  .section-label { flex-wrap: wrap; gap: 12px; }
  .section-rule { display: none; }
  .section-title { font-size: clamp(32px, 8vw, 52px); }

  /* PAGE HERO */
  .page-hero-title { font-size: clamp(40px, 11vw, 64px); }
  .page-hero-subtitle { font-size: 15px; }

  /* PROJECT CARDS */
  .project-grid {
    grid-template-columns: 1fr;
  }
  .project-card, .project-card.large {
    grid-column: span 1;
    padding: 28px 24px;
  }
  .card-thumb { margin: -28px -24px 20px; }
  .project-card.large .card-thumb { margin: -28px -24px 20px; }
  .card-title { font-size: 22px; }
  .project-card.large .card-title { font-size: 26px; }

  /* WORK INTRO STATS */
  .work-intro-stats {
    grid-template-columns: 1fr 1fr;
  }

  /* SOCIAL GRID */
  .social-grid { grid-template-columns: 1fr; }

  /* FOOTER */
  footer { padding: 24px; }
}
