/*
Theme Name: Crescendo
Theme URI: https://soundbyteinc.com
Author: John / SoundByte Inc.
Author URI: https://soundbyteinc.com
Description: A cinematic, dark-themed WordPress theme designed for film composers and music professionals. Features a single-page layout with hero, portfolio, about, and contact sections.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: crescendo
Tags: one-page, dark, portfolio, music, film, composer
*/

/* ============================================
   CSS VARIABLES & RESET
   ============================================ */
:root {
  --color-bg-deep: #07070a;
  --color-bg: #0c0c10;
  --color-bg-card: #13131a;
  --color-bg-card-hover: #1a1a24;
  --color-border: rgba(201, 169, 110, 0.12);
  --color-border-subtle: rgba(255, 255, 255, 0.06);
  --color-gold: #c9a96e;
  --color-gold-light: #dfc090;
  --color-gold-dim: rgba(201, 169, 110, 0.15);
  --color-text: #e8e4dd;
  --color-text-muted: #8a8590;
  --color-text-dim: #5a5660;
  --color-white: #f5f2ed;
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Barlow', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --section-padding: clamp(80px, 10vw, 140px);
  --container-width: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--color-bg-deep);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-gold-light);
}

::selection {
  background: var(--color-gold);
  color: var(--color-bg-deep);
}

/* ============================================
   GRAIN OVERLAY
   ============================================ */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  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)'/%3E%3C/svg%3E");
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
}

.site-nav.scrolled {
  background: rgba(7, 7, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 40px;
  border-bottom: 1px solid var(--color-border);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-white);
  letter-spacing: 0.02em;
}

.nav-logo span {
  color: var(--color-gold);
}

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

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width 0.4s var(--ease-out-expo);
}

.nav-links a:hover {
  color: var(--color-white);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--color-white);
  margin: 6px 0;
  transition: all 0.3s ease;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(201, 169, 110, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(201, 169, 110, 0.02) 0%, transparent 60%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to top, var(--color-bg-deep), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s var(--ease-out-expo) 0.3s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--color-white);
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1.2s var(--ease-out-expo) 0.5s forwards;
}

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

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 44px;
  line-height: 1.8;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s var(--ease-out-expo) 0.8s forwards;
}

.hero-cta {
  display: inline-flex;
  gap: 20px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s var(--ease-out-expo) 1s forwards;
}

.btn {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 40px;
  border: none;
  cursor: pointer;
  transition: all 0.4s var(--ease-out-expo);
  display: inline-block;
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-bg-deep);
}

.btn-primary:hover {
  background: var(--color-gold-light);
  color: var(--color-bg-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(201, 169, 110, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  color: var(--color-white);
  border-color: var(--color-gold);
  transform: translateY(-2px);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out-expo) 1.5s forwards;
}

.hero-scroll-indicator span {
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--color-gold), transparent);
  margin: 0 auto;
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ============================================
   SECTION COMMON
   ============================================ */
.section {
  padding: var(--section-padding) 24px;
  position: relative;
}

.section-container {
  max-width: var(--container-width);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 64px;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 16px;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  color: var(--color-white);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-divider {
  width: 48px;
  height: 1px;
  background: var(--color-gold);
  margin-top: 24px;
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */
.section-portfolio {
  background: var(--color-bg);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.portfolio-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  overflow: hidden;
  transition: all 0.5s var(--ease-out-expo);
  position: relative;
}

.portfolio-card:hover {
  border-color: var(--color-border);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.portfolio-card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
  background: var(--color-bg-deep);
}

.portfolio-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo);
  filter: grayscale(30%) brightness(0.85);
}

.portfolio-card:hover .portfolio-card-image img {
  transform: scale(1.05);
  filter: grayscale(0%) brightness(1);
}

.portfolio-card-image .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 7, 10, 0.8) 0%, transparent 60%);
  pointer-events: none;
}

/* Placeholder when no image */
.portfolio-card-image .placeholder-visual {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-bg-card) 0%, var(--color-bg-deep) 100%);
  position: relative;
  overflow: hidden;
}

.portfolio-card-image .placeholder-visual::before {
  content: '♪';
  font-size: 3rem;
  color: var(--color-gold-dim);
  opacity: 0.5;
}

.portfolio-card-body {
  padding: 28px 28px 32px;
}

.portfolio-card-category {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 10px;
  display: block;
}

.portfolio-card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-white);
  margin-bottom: 10px;
  line-height: 1.25;
}

.portfolio-card-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.portfolio-card-description {
  font-size: 0.9rem;
  color: var(--color-text-dim);
  line-height: 1.7;
}

.portfolio-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.portfolio-card-tags span {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-dim);
  transition: all 0.3s ease;
}

.portfolio-card:hover .portfolio-card-tags span {
  border-color: var(--color-border);
  color: var(--color-text-muted);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.section-about {
  background: var(--color-bg-deep);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.about-image-wrapper {
  position: relative;
}

.about-image {
  width: 100%;
  aspect-ratio: 4/5;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  overflow: hidden;
  position: relative;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-image .placeholder-about {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--color-bg-card) 0%, var(--color-bg-deep) 100%);
  font-family: var(--font-display);
  font-size: 6rem;
  color: var(--color-gold-dim);
  opacity: 0.3;
}

.about-image-wrapper::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: -20px;
  bottom: -20px;
  border: 1px solid var(--color-border);
  z-index: -1;
}

.about-text h3 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 300;
  color: var(--color-white);
  margin-bottom: 24px;
  line-height: 1.2;
}

.about-text p {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border-subtle);
}

.stat-item .stat-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--color-gold);
  line-height: 1;
  display: block;
  margin-bottom: 6px;
}

.stat-item .stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.section-contact {
  background: var(--color-bg);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.contact-info p {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 36px;
}

.contact-details {
  list-style: none;
  margin-bottom: 40px;
}

.contact-details li {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-details .detail-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  min-width: 80px;
}

.contact-details .detail-value {
  font-size: 0.95rem;
  color: var(--color-text);
}

.contact-details .detail-value a {
  color: var(--color-text);
  transition: color 0.3s ease;
}

.contact-details .detail-value a:hover {
  color: var(--color-gold);
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  display: block;
  margin-bottom: 8px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--color-bg-deep);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  transition: border-color 0.3s ease;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-gold);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--color-text-dim);
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form .btn {
  width: 100%;
  margin-top: 4px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  padding: 40px 24px;
  border-top: 1px solid var(--color-border-subtle);
  text-align: center;
}

.footer-content {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--color-text-dim);
}

.footer-copy a {
  color: var(--color-text-dim);
}

.footer-copy a:hover {
  color: var(--color-gold);
}

.footer-social {
  display: flex;
  gap: 20px;
}

.footer-social a {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  transition: color 0.3s ease;
}

.footer-social a:hover {
  color: var(--color-gold);
}

/* ============================================
   PLAY BUTTON OVERLAY
   ============================================ */
.portfolio-card.has-video {
  cursor: pointer;
}

.portfolio-card.has-link {
  cursor: pointer;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 3;
  opacity: 0;
  transition: all 0.4s var(--ease-out-expo);
  pointer-events: none;
}

.play-button svg circle {
  transition: all 0.4s ease;
}

.portfolio-card.has-video:hover .play-button {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.portfolio-card.has-video:hover .play-button svg circle {
  stroke: rgba(201, 169, 110, 0.8);
  fill: rgba(201, 169, 110, 0.12);
}

/* ============================================
   VIDEO LIGHTBOX
   ============================================ */
.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.video-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  width: 90vw;
  max-width: 1100px;
  z-index: 2;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.5s var(--ease-out-expo);
}

.video-lightbox.active .lightbox-content {
  transform: scale(1) translateY(0);
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 8px;
  transition: color 0.3s ease, transform 0.3s ease;
  z-index: 3;
}

.lightbox-close:hover {
  color: var(--color-white);
  transform: scale(1.1);
}

.lightbox-video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--color-border);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.lightbox-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Prevent body scroll when lightbox open */
body.lightbox-open {
  overflow: hidden;
}

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

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.1); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-image-wrapper {
    max-width: 400px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 768px) {
  .site-nav {
    padding: 16px 24px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(7, 7, 10, 0.96);
    backdrop-filter: blur(30px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1rem;
    letter-spacing: 0.2em;
  }

  .nav-toggle {
    display: block;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .footer-content {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }
}
