/* ============================================================
   NICK McCABE — SCREENWRITER WEBSITE
   Design System: Cinematic Dark / Gold / Serif + Sans
   ============================================================ */

/* ─── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep:        #0a0c10;
  --bg-card:        #13161d;
  --bg-alt:         #0e1118;
  --bg-service:     #111420;
  --gold:           #c9a84c;
  --gold-light:     #e2c47a;
  --gold-dim:       #7a6030;
  --text-primary:   #f0ece4;
  --text-secondary: #9a9390;
  --text-muted:     #5c5856;
  --border:         rgba(201,168,76,0.15);
  --border-subtle:  rgba(255,255,255,0.06);

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  --section-pad: clamp(80px, 10vw, 140px);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── UTILITY ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
}

.section { padding: var(--section-pad) 0; }

.section-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.section-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.section-headline em {
  font-style: italic;
  color: var(--gold-light);
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.section-header .section-sub { margin: 0 auto; }

/* ─── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg-deep);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-primary:hover::after { transform: translateX(100%); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,168,76,0.35); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.25);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.btn-card {
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  transition: var(--transition);
  margin-top: auto;
}

.btn-card:hover {
  background: var(--gold);
  color: var(--bg-deep);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.btn-card--ghost {
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.btn-card--ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
  background: transparent;
}

.btn-service {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  transition: var(--transition);
  padding: 4px 0;
  border-bottom: 1px solid var(--gold-dim);
  margin-top: auto;
}

.btn-service:hover { color: var(--gold-light); border-bottom-color: var(--gold-light); transform: translateX(4px); }

.btn-full { width: 100%; justify-content: center; }

/* ─── NAVIGATION ───────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background var(--transition), backdrop-filter var(--transition), box-shadow var(--transition);
}

#site-header.scrolled {
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border-subtle);
}

.nav-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px clamp(20px, 5vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.nav-logo:hover { color: var(--gold); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
  align-items: center;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  transition: color var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { width: 100%; }

.nav-link.cta-nav {
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-weight: 500;
}

.nav-link.cta-nav::after { display: none; }
.nav-link.cta-nav:hover { background: var(--gold); color: var(--bg-deep); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ─── HERO ─────────────────────────────────────────────────── */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 70%, rgba(201,168,76,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 120% 80% at 20% 0%, rgba(46,58,74,0.5) 0%, transparent 50%),
    linear-gradient(175deg, #0d1018 0%, #0a0c10 55%, #0c0e14 100%);
}

.hero-grain {
  position: absolute;
  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='0.04'/%3E%3C/svg%3E");
  background-size: 256px;
  opacity: 0.5;
  pointer-events: none;
}

/* Cinematic film strip lines */
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(90deg, transparent 0%, transparent calc(50% - 1px), rgba(201,168,76,0.04) calc(50% - 1px), rgba(201,168,76,0.04) calc(50% + 1px), transparent calc(50% + 1px));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 120px clamp(20px, 5vw, 60px) 80px;
  max-width: 820px;
}

.hero-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
  position: relative;
  padding: 0 20px;
}

.hero-label::before,
.hero-label::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30px;
  height: 1px;
  background: var(--gold-dim);
}

.hero-label::before { right: 100%; }
.hero-label::after { left: 100%; }

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 5.8rem);
  font-weight: 300;
  line-height: 1.08;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.hero-headline em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold-light);
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 48px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.hero-scroll-hint span {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold-dim), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

/* ─── ABOUT ────────────────────────────────────────────────── */
.about-section {
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}

.about-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(48px, 6vw, 90px);
  align-items: center;
}

.about-image-wrap { position: relative; }

.about-image-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: visible;
}

.about-image-frame::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--gold-dim), transparent 50%, var(--gold-dim));
  z-index: 0;
}

.about-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
  aspect-ratio: 3/4;
  filter: grayscale(20%) contrast(1.05);
}

.about-image-frame.no-photo {
  aspect-ratio: 3/4;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.about-image-accent {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-right: 2px solid var(--gold-dim);
  border-bottom: 2px solid var(--gold-dim);
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 0;
}

.about-body {
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-size: 1.02rem;
  line-height: 1.75;
}

.about-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.genre-tag {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
}

/* ─── PORTFOLIO / WORK ─────────────────────────────────────── */
.work-section {
  background: var(--bg-deep);
  position: relative;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover { transform: translateY(-6px); border-color: var(--border); box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.project-card:hover::before { opacity: 1; }

.project-card--upcoming { opacity: 0.7; }
.project-card--upcoming:hover { opacity: 1; }

.project-card-inner {
  padding: clamp(28px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 14px;
}

.project-status {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 40px;
  width: fit-content;
}

.status-seeking { background: rgba(201,168,76,0.15); color: var(--gold); border: 1px solid rgba(201,168,76,0.3); }
.status-development { background: rgba(46,90,160,0.15); color: #6b9de8; border: 1px solid rgba(46,90,160,0.3); }
.status-upcoming { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border-subtle); }

.project-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.project-format, .project-genre {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.project-format::after { content: '·'; margin-left: 12px; }

.project-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
}

.project-logline {
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.7;
  flex: 1;
}

.project-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-pill {
  font-size: 0.7rem;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 40px;
  padding: 3px 10px;
  letter-spacing: 0.04em;
}

/* ─── SERVICES ─────────────────────────────────────────────── */
.services-section {
  background: var(--bg-alt);
  position: relative;
}

.services-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--bg-service);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: clamp(28px, 3.5vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-dim), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.service-card:hover { border-color: var(--border); transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.4); }
.service-card:hover::after { opacity: 1; }

.service-icon { font-size: 2rem; line-height: 1; }

.service-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.service-desc {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.7;
  flex: 1;
}

/* ─── CONTACT ──────────────────────────────────────────────── */
.contact-section {
  background: var(--bg-deep);
  position: relative;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(48px, 6vw, 90px);
  align-items: start;
}

.contact-body {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.75;
  margin-bottom: 18px;
}

.contact-email {
  display: inline-block;
  color: var(--gold);
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 2px;
  margin-top: 8px;
  transition: var(--transition);
}

.contact-email:hover { color: var(--gold-light); border-bottom-color: var(--gold-light); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 12px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  width: 100%;
  -webkit-appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%239a9390'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.form-group select option { background: #1a1d25; }

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* ─── FOOTER ───────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 20px 40px;
}

.footer-brand { display: flex; flex-direction: column; gap: 4px; }

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.footer-nav {
  display: flex;
  gap: 28px;
}

.footer-nav a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer-nav a:hover { color: var(--gold); }

.footer-social {
  display: flex;
  gap: 16px;
}

.social-link {
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
}

.social-link:hover { color: var(--gold); transform: translateY(-2px); }

.footer-copy {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

/* ─── ANIMATIONS ───────────────────────────────────────────── */
.fade-in, .fade-in-left, .fade-in-right {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-left { transform: translateX(-30px); }
.fade-in-right { transform: translateX(30px); }

.fade-in.visible,
.fade-in-left.visible,
.fade-in-right.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Stagger children */
.work-grid .project-card:nth-child(2) { transition-delay: 0.1s; }
.work-grid .project-card:nth-child(3) { transition-delay: 0.2s; }
.work-grid .project-card:nth-child(4) { transition-delay: 0.3s; }

.services-grid .service-card:nth-child(2) { transition-delay: 0.08s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.16s; }
.services-grid .service-card:nth-child(4) { transition-delay: 0.24s; }
.services-grid .service-card:nth-child(5) { transition-delay: 0.32s; }

/* ─── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-image-wrap { max-width: 380px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; }
  .footer-copy { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  :root { --section-pad: 64px; }
  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,12,16,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-link { font-size: 1.4rem; }
  .nav-link.cta-nav { font-size: 1rem; }
  .nav-toggle { display: flex; z-index: 200; position: relative; }
  .nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero-ctas { flex-direction: column; align-items: center; }
  .hero-ctas .btn { width: 100%; max-width: 280px; justify-content: center; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-nav, .footer-social { justify-content: center; }
}
