/* ============================================
   DOWNHOME — World-class, zero dependencies
   ============================================ */

/* --- Design Tokens --- */
:root {
  --surface-0: #141212;
  --surface-1: #201E1E;
  --surface-2: #2A2727;
  --surface-3: #353232;
  --text-primary: #EBEBEB;
  --text-secondary: rgba(235,235,235,0.65);
  --text-muted: rgba(235,235,235,0.4);
  --accent: #C4A662;
  --accent-glow: rgba(196,166,98,0.15);
  --white: #fff;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* --- Fonts --- */
@font-face {
  font-family: 'Reckless';
  src: url('fonts/Reckless-Bold.woff2') format('woff2'),
       url('fonts/Reckless-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--surface-1);
  color: var(--text-primary);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }
body.loading { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }

/* --- Page Loader --- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--surface-0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}

.page-loader img {
  width: 120px;
  opacity: 0;
  transform: scale(0.9);
  animation: loaderReveal 0.6s 0.2s var(--ease-out) forwards;
}

@keyframes loaderReveal {
  to { opacity: 1; transform: scale(1); }
}

.page-loader.done {
  opacity: 0;
  visibility: hidden;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s, padding 0.4s, box-shadow 0.4s, transform 0.4s;
}

.header.scrolled {
  background: rgba(20, 18, 18, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: var(--space-sm) var(--space-lg);
  box-shadow: 0 1px 0 var(--surface-3);
}

.header.hidden { transform: translateY(-100%); }
.header.menu-active { transform: translateY(0) !important; background: transparent !important; box-shadow: none !important; }

.header-logo img {
  height: 55px;
  width: auto;
  transition: opacity 0.3s, height 0.3s;
}
.header-logo:hover img { opacity: 0.7; }
.header.scrolled .header-logo img { height: 40px; }

/* --- Hamburger --- */
.hamburger {
  width: 30px;
  height: 22px;
  position: relative;
  z-index: 210;
  touch-action: manipulation;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--white);
  position: absolute;
  left: 0;
  transition: all 0.4s var(--ease);
  border-radius: 1px;
}

.hamburger span:nth-child(1) { top: 0; width: 16px; }
.hamburger span:nth-child(2) { top: 10px; width: 24px; }
.hamburger span:nth-child(3) { top: 10px; width: 24px; }
.hamburger span:nth-child(4) { top: 20px; width: 16px; }

.hamburger.active span:nth-child(1),
.hamburger.active span:nth-child(4) { opacity: 0; width: 0; }
.hamburger.active span:nth-child(2) { transform: rotate(45deg); background: var(--surface-1); }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg); background: var(--surface-1); }

/* --- Menu Overlay --- */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 140;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}
.menu-overlay.active { opacity: 1; visibility: visible; }

/* --- Menu Panel --- */
.menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  background: var(--text-primary);
  z-index: 150;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: 80px 50px;
  overscroll-behavior: contain;
}

.menu-panel.open { transform: translateX(0); }

.close-menu {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--surface-1);
  transition: opacity 0.3s, transform 0.3s;
  touch-action: manipulation;
}
.close-menu:hover { opacity: 0.5; transform: rotate(90deg); }

.menu-panel .menu-logo {
  width: 200px;
  max-width: 60%;
}

.menu-panel .social-icons {
  display: flex;
  gap: 4px;
}

.menu-panel .social-icons a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--surface-1);
  border-radius: 50%;
  transition: all 0.3s;
}
.menu-panel .social-icons a:hover {
  background: var(--accent);
  color: var(--surface-0);
}

.menu-panel nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.menu-panel nav a {
  font-size: 20px;
  font-weight: 400;
  color: var(--surface-1);
  padding: 10px 20px;
  position: relative;
  transition: color 0.3s;
  touch-action: manipulation;
}

/* Expanding underline on hover */
.menu-panel nav a::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.35s var(--ease), left 0.35s var(--ease);
}
.menu-panel nav a:hover::after {
  width: 60%;
  left: 20%;
}
.menu-panel nav a:hover { color: var(--surface-0); }

/* --- Hero Slider --- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  will-change: opacity;
}
.hero-slide.active { opacity: 1; }

/* Ken Burns zoom on active slide */
.hero-slide img.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenBurns 12s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes kenBurns {
  from { transform: scale(1.0); }
  to { transform: scale(1.06); }
}

/* Gradient overlay on all slides */
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.05) 40%,
    rgba(0,0,0,0.4) 80%,
    rgba(0,0,0,0.6) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.hero-slide .slide-text,
.hero-slide .slide-logo,
.hero-slide .slide-tagline {
  z-index: 2;
  position: absolute;
}

.hero-slide .slide-text {
  top: 58%;
  left: 5%;
  font-family: 'Reckless', Georgia, serif;
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: 0.5px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s 0.3s ease, transform 0.9s 0.3s ease;
  text-shadow: 0 2px 40px rgba(0,0,0,0.5);
}
.hero-slide.active .slide-text {
  opacity: 1;
  transform: translateY(0);
}

.hero-slide .slide-logo {
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  max-width: 800px;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-slide.active .slide-logo { opacity: 1; }

.hero-slide .slide-tagline {
  top: 62%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Reckless', Georgia, serif;
  font-size: clamp(16px, 2vw, 24px);
  color: var(--white);
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.8s 0.3s ease;
  letter-spacing: 1px;
}
.hero-slide.active .slide-tagline { opacity: 1; }

/* --- Interior Hero (Video) --- */
.interior-hero {
  height: 65vh;
  height: 65dvh;
  min-height: 350px;
}

.interior-hero .video-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--surface-0);
}

.interior-hero .video-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 177.78vh;
  height: 100vh;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: none;
}

.interior-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 100%);
  z-index: 1;
}

/* --- Triangle Dividers --- */
.divider-top,
.divider-bottom {
  position: absolute;
  left: 0;
  right: 0;
  overflow: hidden;
  line-height: 0;
  z-index: 2;
}
.divider-top { top: -1px; }
.divider-bottom { bottom: -1px; }

.divider-top svg,
.divider-bottom svg {
  display: block;
  width: 100%;
  height: 45px;
}

/* --- Sections --- */
.section {
  padding: var(--space-xl) 0;
  position: relative;
}

.container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.about-grid h2 {
  font-family: 'Reckless', Georgia, serif;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.25;
}

.about-grid p {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-secondary);
}

/* --- McGraw Quote --- */
.mcgraw-section {
  position: relative;
  padding: var(--space-2xl) 0;
  overflow: hidden;
}

.mcgraw-section .parallax-bg,
.partnerships-section .parallax-bg {
  position: absolute;
  inset: -30%;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
}

.mcgraw-section::after,
.partnerships-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

.mcgraw-section .section-content,
.partnerships-section .section-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.separator {
  width: 30px;
  height: 1px;
  background: var(--accent);
  margin: var(--space-md) auto;
  opacity: 0.6;
}

.mcgraw-section h2 {
  font-family: 'Reckless', Georgia, serif;
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}

.mcgraw-section .quote {
  font-family: 'Reckless', Georgia, serif;
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.5;
  margin: var(--space-md) 0;
  font-style: italic;
}

.mcgraw-section .attribution {
  font-size: 12px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
}

/* --- Nashville --- */
.nashville-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.nashville-grid h3 {
  font-family: 'Reckless', Georgia, serif;
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: var(--space-md);
}

.nashville-grid p {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-secondary);
}

.nashville-img {
  border-radius: 3px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

.nashville-img:hover {
  transform: scale(1.02);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.5);
}

/* --- Skydance --- */
.skydance-section {
  text-align: center;
  padding: var(--space-xl) 0;
  background: var(--surface-0);
}

.skydance-section .backed-by {
  font-family: 'Reckless', Georgia, serif;
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.skydance-logo {
  width: 180px;
  margin: 0 auto var(--space-lg);
  opacity: 0.85;
}

.skydance-section .drop-cap-text {
  max-width: 680px;
  margin: 0 auto;
}

.skydance-section .drop-cap-text p {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-secondary);
  text-align: left;
}

.skydance-section .drop-cap-text p::first-letter {
  font-family: 'Reckless', Georgia, serif;
  font-size: 3.8em;
  float: left;
  line-height: 0.8;
  margin: 6px 12px 0 0;
  color: var(--accent);
}

/* --- Partnerships --- */
.partnerships-section {
  position: relative;
  padding: var(--space-2xl) 0;
  overflow: hidden;
}

.partnerships-section h2 {
  font-family: 'Reckless', Georgia, serif;
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.5;
  margin-bottom: var(--space-lg);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 16px 44px;
  border: 1px solid var(--accent);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: all 0.35s var(--ease);
  position: relative;
}
.btn:hover {
  background: var(--accent);
  color: var(--surface-0);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: var(--space-xl) 0 var(--space-lg);
  background: var(--surface-0);
  border-top: 1px solid var(--surface-2);
}

.footer h2 {
  font-family: 'Reckless', Georgia, serif;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.footer .subtitle {
  font-size: 14px;
  font-weight: 400;
  margin-bottom: var(--space-md);
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.footer .btn-small {
  display: inline-block;
  padding: 13px 32px;
  border: 1px solid var(--surface-3);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: all 0.3s var(--ease);
}
.footer .btn-small:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: var(--space-lg);
}

.footer-social a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.3s, transform 0.3s;
}
.footer-social a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* --- Scroll to top --- */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease);
  z-index: 50;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in.delay-1 { transition-delay: 0.15s; }
.fade-in.delay-2 { transition-delay: 0.3s; }
.fade-in.delay-3 { transition-delay: 0.45s; }

/* Zoom reveal for images */
.zoom-in {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.zoom-in.visible { opacity: 1; transform: scale(1); }

/* ============================
   RESPONSIVE
   ============================ */

@media (max-width: 1024px) {
  .header { padding: var(--space-sm) var(--space-md); }
  .header.scrolled { padding: var(--space-sm) var(--space-md); }
  .container { padding: 0 var(--space-md); }
  .about-grid { gap: var(--space-lg); }
  .nashville-grid { gap: var(--space-lg); }
  .section { padding: var(--space-lg) 0; }
  .mcgraw-section,
  .partnerships-section { padding: var(--space-xl) 0; }
}

@media (max-width: 767px) {
  .header { padding: var(--space-sm) 1.25rem; }
  .header.scrolled { padding: 0.75rem 1.25rem; }
  .header-logo img { height: 42px; }
  .header.scrolled .header-logo img { height: 34px; }

  .menu-panel {
    width: 100%;
    padding: 70px 30px;
    gap: 1.5rem;
  }
  .menu-panel .menu-logo { width: 45%; max-width: 180px; }
  .menu-panel nav a { font-size: 17px; padding: 8px 16px; }
  .close-menu { top: 16px; right: 16px; }

  .hero-slide .slide-text {
    font-size: clamp(26px, 8vw, 36px);
    left: 6%;
    right: 6%;
    top: 55%;
  }
  .hero-slide .slide-logo { width: 85%; top: 40%; }
  .hero-slide .slide-tagline { top: 60%; font-size: clamp(14px, 4vw, 18px); }

  .interior-hero { height: 50vh; height: 50dvh; min-height: 280px; }

  .section { padding: var(--space-lg) 0; }
  .container { padding: 0 20px; }

  .about-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .about-grid h2 { font-size: clamp(24px, 6vw, 32px); }
  .about-grid p { font-size: 15px; }

  .mcgraw-section,
  .partnerships-section { padding: var(--space-xl) 0; }
  .mcgraw-section .parallax-bg,
  .partnerships-section .parallax-bg { background-attachment: scroll; }
  .mcgraw-section .section-content,
  .partnerships-section .section-content { padding: 0 20px; }

  .nashville-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .nashville-grid h3 { font-size: clamp(22px, 6vw, 30px); margin-bottom: var(--space-sm); }
  .nashville-grid p { font-size: 15px; }

  .skydance-section { padding: var(--space-lg) 0; }
  .skydance-section .drop-cap-text p { font-size: 15px; }
  .skydance-logo { width: 150px; }

  .partnerships-section h2 { font-size: clamp(18px, 5vw, 24px); }
  .btn { padding: 14px 32px; font-size: 11px; }

  .footer { padding: var(--space-lg) 0 var(--space-md); }
  .footer h2 { font-size: clamp(24px, 6vw, 32px); }
  .footer-social { margin-top: var(--space-md); }

  .scroll-top { bottom: 20px; right: 20px; width: 40px; height: 40px; }

  .divider-top svg,
  .divider-bottom svg { height: 25px; }

  /* Disable Ken Burns on mobile for performance */
  .hero-slide.active img.hero-bg { animation: none; }
}

@media (max-width: 380px) {
  .header { padding: 0.75rem 1rem; }
  .header-logo img { height: 36px; }
  .hero-slide .slide-text { font-size: 24px; }
  .hero-slide .slide-logo { width: 90%; }
  .menu-panel nav a { font-size: 15px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .hero { height: 100vh; }
  .hero-slide .slide-text { top: 50%; font-size: 28px; }
  .hero-slide .slide-logo { width: 50%; top: 35%; }
  .hero-slide .slide-tagline { top: 55%; }
  .interior-hero { height: 100vh; min-height: 0; }
  .menu-panel { padding: 30px; gap: 1rem; }
  .menu-panel .menu-logo { width: 120px; }
  .menu-panel nav a { font-size: 14px; padding: 5px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .hero-slide { transition: opacity 0.3s; }
  .fade-in, .zoom-in { opacity: 1; transform: none; }
  .page-loader { display: none; }
}
