/* ============================================
   Nature Reels — Web Demo Styles
   ============================================ */

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

:root {
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --color-bg: #000;
  --color-text: #fff;
  --color-accent: rgba(255, 255, 255, 0.85);
  --color-muted: rgba(255, 255, 255, 0.5);
  --phone-width: 390px;
  --phone-height: 844px;
  --phone-radius: 48px;
}

html, body {
  height: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Splash Screen
   ============================================ */

.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.8s ease;
}

.splash.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-content {
  text-align: center;
  animation: splashIn 1s ease forwards;
}

.splash-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.splash-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

.splash-tagline {
  font-size: 0.9rem;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.6s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Phone Frame (desktop)
   ============================================ */

.phone-frame {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Desktop: show phone mockup */
@media (min-width: 768px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
  }

  .phone-frame {
    width: var(--phone-width);
    height: var(--phone-height);
    max-height: 90vh;
    border-radius: var(--phone-radius);
    border: 3px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    position: relative;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.05),
      0 25px 80px rgba(0, 0, 0, 0.6),
      0 0 120px rgba(255, 255, 255, 0.03);
  }

  .phone-notch {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: #000;
    border-radius: 20px;
    z-index: 20;
  }
}

@media (max-width: 767px) {
  .phone-notch {
    display: none;
  }
}

/* ============================================
   Feed Container
   ============================================ */

.feed {
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.feed::-webkit-scrollbar {
  display: none;
}

/* ============================================
   Slide (video + CTA)
   ============================================ */

.slide {
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  background: #000;
}

.slide-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================
   Overlay (category label)
   ============================================ */

.slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  pointer-events: none;
}

.category-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   Sound Button
   ============================================ */

.sound-btn {
  position: absolute;
  top: 20px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
  padding: 0;
}

.sound-btn:active {
  background: rgba(255, 255, 255, 0.2);
}

.sound-btn svg {
  width: 18px;
  height: 18px;
}

/* Adjust for desktop notch */
@media (min-width: 768px) {
  .sound-btn {
    top: 44px;
  }
}

/* ============================================
   Feed Logo (watermark)
   ============================================ */

.feed-logo {
  position: fixed;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.feed-logo.visible {
  opacity: 1;
}

/* Mobile: top-left */
@media (max-width: 767px) {
  .feed-logo {
    top: 16px;
    left: 16px;
  }
}

/* Desktop: inside phone frame, top-left */
@media (min-width: 768px) {
  .feed-logo {
    top: 50%;
    left: 50%;
    transform: translate(
      calc(-1 * var(--phone-width) / 2 + 16px),
      calc(-1 * min(var(--phone-height), 90vh) / 2 + 44px)
    );
  }
}

/* ============================================
   CTA Screen
   ============================================ */

.slide-cta {
  background: linear-gradient(160deg, #0a1a0f 0%, #000 40%, #0a0f1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-content {
  text-align: center;
  padding: 32px 28px;
  width: 100%;
  max-width: 340px;
}

.cta-logo {
  width: 48px;
  height: 48px;
  margin: 0 auto 24px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.2s forwards;
}

.cta-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: 12px;
  line-height: 1.2;
}

.cta-subtitle {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.5;
  margin-bottom: 32px;
}

/* ============================================
   Email Form
   ============================================ */

.cta-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta-input {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.cta-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.cta-input:focus {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.cta-button {
  width: 100%;
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: #000;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.01em;
}

.cta-button:hover {
  background: #fff;
}

.cta-button:active {
  transform: scale(0.98);
}

.cta-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   Tally Embed
   ============================================ */

.tally-embed {
  width: 100%;
  margin-top: 8px;
}

.tally-embed iframe {
  width: 100%;
  border: none;
}

/* ============================================
   Thank You State
   ============================================ */

.thank-you {
  text-align: center;
}

.thank-you-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
  animation: fadeUp 0.5s ease forwards;
}

.thank-you-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 8px;
  animation: fadeUp 0.5s ease 0.1s forwards;
  opacity: 0;
}

.thank-you-sub {
  font-size: 0.85rem;
  color: var(--color-muted);
  animation: fadeUp 0.5s ease 0.2s forwards;
  opacity: 0;
}

/* ============================================
   Scroll Hint (subtle bounce on first slide)
   ============================================ */

.slide:first-child::after {
  content: '';
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 24px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  animation: scrollHint 2s ease-in-out infinite;
}

@keyframes scrollHint {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.3; }
  50% { transform: translateX(-50%) translateY(10px); opacity: 0.8; }
}

/* Hide scroll hint after first scroll */
.feed.scrolled .slide:first-child::after {
  display: none;
}
