/* ============================================
   RESONANCE — Vintage Cinematic Design
   ============================================ */

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

/* --- Tokens --- */
:root {
  --bg: #0f0d0a;
  --text: #f5efe6;
  --text-soft: rgba(245, 239, 230, 0.65);
  --text-muted: rgba(245, 239, 230, 0.35);
  --accent: #d4a574;
  --accent-soft: rgba(212, 165, 116, 0.2);
  --border: rgba(245, 239, 230, 0.08);
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font-family: var(--font-sans);
  border: none;
  outline: none;
  background: none;
}

/* ============================================
   HERO — Full-screen background image
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg iframe {
  width: 100vw;
  height: 100vh;
  pointer-events: auto;
  /* Allow clicking to play if needed */
}

/* Film grain overlay */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' 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");
  z-index: 1;
  pointer-events: none;
}

/* Bottom gradient fade for text readability */
.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%;
  background: linear-gradient(to top, rgba(15, 13, 10, 0.95) 0%, rgba(15, 13, 10, 0.6) 50%, transparent 100%);
  z-index: 2;
  pointer-events: none;
  /* Let clicks pass through to iframe */
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 720px;
  padding: 0 48px;
}

.hero-logo {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 1s ease 0.2s forwards;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 1s ease 0.4s forwards;
}

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

.hero-description {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-soft);
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 1s ease 0.6s forwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 40px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border-radius: 0;
  transition: all 0.4s ease;
  opacity: 0;
  animation: fadeUp 1s ease 0.8s forwards;
}

.hero-cta:hover {
  background: var(--text);
  letter-spacing: 4px;
}

.hero-cta svg {
  transition: transform 0.3s ease;
}

.hero-cta:hover svg {
  transform: translateX(4px);
}

/* Nav - minimal, top-right */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.4s ease;
}

.nav.scrolled {
  padding: 16px 48px;
  background: rgba(15, 13, 10, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 2px;
  color: #b3885d;
  /* Darker shade of var(--accent) #d4a574 */
}

.nav-join {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #b3885d;
  /* Darker shade of var(--accent) #d4a574 */
  transition: opacity 0.3s ease;
}

.nav-join:hover {
  opacity: 0.7;
}

/* ============================================
   WAITLIST — Full-viewport slide (warm theme)
   ============================================ */
.waitlist {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 48px;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

/* Stretch background full width */
.waitlist {
  max-width: none;
}

.waitlist>* {
  max-width: 560px;
  width: 100%;
}

.waitlist .label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
}

.waitlist h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--text);
}

.waitlist h2 em {
  font-style: italic;
  color: var(--accent);
}

.waitlist .sub {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 48px;
}

.waitlist-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.waitlist-count span {
  color: var(--accent);
  font-weight: 500;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.form input {
  width: 100%;
  padding: 18px 0;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  transition: border-color 0.3s ease;
}

.form input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form input:focus {
  border-color: var(--accent);
}

.form-btn {
  margin-top: 16px;
  padding: 18px 40px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  transition: all 0.4s ease;
}

.form-btn:hover {
  background: var(--text);
  letter-spacing: 5px;
}

.success-msg {
  display: none;
  padding: 32px 0;
}

.success-msg.show {
  display: block;
  animation: fadeUp 0.5s ease;
}

/* Form validation styles */
.form-field {
  width: 100%;
}

.form-error {
  display: block;
  font-size: 0.78rem;
  color: #ff6b6b;
  margin-top: 6px;
  min-height: 1.2em;
  transition: opacity 0.3s ease;
}

.form input.input-error {
  border-bottom-color: #ff6b6b;
}

.form input.input-success {
  border-bottom-color: var(--accent);
}

.form-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.success-msg h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 12px;
  color: var(--text);
}

.success-msg p {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================
   FOOTER — Minimal
   ============================================ */
.footer {
  padding: 40px 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

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

/* Staggered delays for cascading entrance */
.reveal:nth-child(1) {
  transition-delay: 0s;
}

.reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.reveal:nth-child(4) {
  transition-delay: 0.3s;
}

.reveal:nth-child(5) {
  transition-delay: 0.4s;
}

.reveal:nth-child(6) {
  transition-delay: 0.5s;
}

/* Hero parallax effect (applied via JS) */
.hero-content {
  transition: opacity 0.1s ease, transform 0.1s ease;
}

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

/* --- Tablet and small screens --- */
@media (max-width: 768px) {
  .nav {
    padding: 20px 24px;
  }

  .nav.scrolled {
    padding: 14px 24px;
  }

  .nav-brand {
    font-size: 1.1rem;
  }

  .hero {
    padding: 0 0 60px;
  }

  .hero-content {
    padding: 0 24px;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3.2rem);
  }

  .hero-description {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .hero-cta {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 18px 32px;
  }

  .waitlist {
    padding: 60px 24px;
  }

  .form input {
    padding: 16px 0;
    font-size: 1rem;
  }

  .form-btn {
    padding: 18px 32px;
    width: 100%;
  }

  .footer {
    padding: 32px 24px;
    flex-direction: column;
    gap: 12px;
  }
}

/* --- Small phones --- */
@media (max-width: 480px) {
  .nav {
    padding: 16px 16px;
  }

  .nav.scrolled {
    padding: 12px 16px;
  }

  .nav-brand {
    font-size: 1rem;
    letter-spacing: 1px;
  }

  .nav-join {
    font-size: 0.7rem;
    letter-spacing: 2px;
  }

  .hero {
    padding: 0 0 48px;
  }

  .hero-content {
    padding: 0 16px;
  }

  .hero-title {
    font-size: clamp(1.8rem, 9vw, 2.6rem);
    margin-bottom: 16px;
  }

  .hero-description {
    font-size: 0.88rem;
    margin-bottom: 28px;
  }

  .hero-cta {
    font-size: 0.78rem;
    padding: 16px 24px;
    letter-spacing: 1.5px;
  }

  .waitlist {
    padding: 48px 16px;
  }

  .waitlist h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .waitlist .sub {
    font-size: 0.88rem;
    margin-bottom: 32px;
  }

  .form input {
    padding: 14px 0;
    font-size: 0.95rem;
  }

  .form-btn {
    padding: 16px 24px;
    font-size: 0.78rem;
    letter-spacing: 2px;
  }

  .footer {
    padding: 24px 16px;
  }
}