/* ==========================================================================
   Sydra Landing Page Style Sheet
   ========================================================================== */

/* Design Tokens & Custom Variables */
:root {
  --font-heading: 'Syne', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Color Palette (Deep Forest Vibe) - Warm, rich, organic, less dark */
  --bg-base: #06170E;
  --bg-gradient-start: #0A2618;
  --bg-gradient-end: #05140C;
  
  --color-text-primary: #f0f7f3;
  --color-text-secondary: #B2C5B6;
  --color-text-muted: #6e846c;
  
  --color-accent-emerald: #10B981;
  --color-accent-mint: #4ade80;
  --color-accent-dark-green: #064e3b;
  --color-accent-gold: #d4af37;
  
  /* Glassmorphism & UI Accents */
  --glass-bg: rgba(9, 29, 18, 0.5);
  --glass-border: rgba(110, 231, 183, 0.08);
  --glass-border-focus: rgba(110, 231, 183, 0.25);
  --glass-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  
  /* Transitions */
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 35%, var(--bg-gradient-start), var(--bg-gradient-end));
  color: var(--color-text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('ba.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.06; /* faint visibility */
  z-index: 0; /* sits behind content elements but on top of base gradient */
  pointer-events: none;
}

/* Ambient Radial Glow */
.ambient-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vw;
  height: 90vw;
  max-width: 1200px;
  max-height: 1200px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.03) 0%, rgba(5, 150, 105, 0.01) 60%, rgba(0,0,0,0) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Video Preloader / Revealer Overlay */
#intro-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background-color: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 1.2s;
}

#intro-video {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  pointer-events: none;
}

/* Skip Intro Button */
.skip-btn {
  position: absolute;
  bottom: 40px;
  right: 40px;
  background: rgba(6, 22, 11, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 101;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, transform 0.3s ease, border-color 0.3s ease;
}

.skip-btn:hover {
  border-color: var(--color-accent-mint);
  color: var(--color-text-primary);
  transform: translateY(-2px);
}

.skip-btn.show {
  opacity: 0.7;
  visibility: visible;
}

.skip-btn.show:hover {
  opacity: 1;
}

/* Intro Overlay Fade-Out State */
#intro-container.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* Main App Container */
#app-content {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

.container {
  width: 100%;
  max-width: 680px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* Content Reveal Animation States */
.content-hidden .logo-wrapper,
.content-hidden .hero,
.content-hidden .subscription-section,
.content-hidden .footer {
  opacity: 0;
  transform: translateY(25px);
}

.content-visible .logo-wrapper {
  animation: revealUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.content-visible .hero {
  animation: revealUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.content-visible .subscription-section {
  animation: revealUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.content-visible .footer {
  animation: revealUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
}

/* Header & Logo styling */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.logo-wrapper {
  position: relative;
  width: 220px;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-wrapper:hover {
  transform: scale(1.04);
}

.sydra-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Logo Internal SVG Path Animations */
.logo-leaf {
  transition: filter 0.3s ease;
}
.logo-wrapper:hover .logo-leaf {
  filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.6));
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-indent: 0.3em; /* offsets the letter spacing centering error */
  background: linear-gradient(135deg, var(--color-text-primary) 30%, var(--color-text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.tagline {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text-primary);
  max-width: 580px;
  margin: 0 auto;
}

.sub-tagline {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* Subscription Form Card */
.subscription-section {
  width: 100%;
}

.glass-card {
  width: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 8px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--glass-shadow);
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

.glass-card:focus-within {
  border-color: var(--glass-border-focus);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(52, 211, 153, 0.08);
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group {
  display: flex;
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  overflow: hidden;
  padding: 4px;
}

#email-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-primary);
  padding: 16px 20px;
  width: 100%;
}

#email-input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.8;
}

/* Button & Loading / Success Transitions */
#submit-btn {
  background: linear-gradient(135deg, var(--color-accent-mint) 0%, var(--color-accent-emerald) 100%);
  border: none;
  outline: none;
  color: #020804;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  padding: 0 28px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease, opacity 0.3s ease, filter 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

#submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0) 100%);
  opacity: 0.15;
  transition: opacity 0.3s ease;
}

#submit-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08) drop-shadow(0 0 8px rgba(52, 211, 153, 0.3));
}

#submit-btn:active {
  transform: translateY(1px);
}

#submit-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

#submit-btn.loading .btn-text {
  opacity: 0;
}

#submit-btn.loading .spinner {
  display: block;
}

/* SVG Spinner animation */
.spinner {
  position: absolute;
  width: 20px;
  height: 20px;
  animation: rotate 2s linear infinite;
  display: none;
}

.spinner .path {
  stroke: #020804;
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}

/* Form Message Response Container */
.form-message {
  display: none;
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 10px 16px 4px 16px;
  text-align: left;
  color: var(--color-text-secondary);
}

.form-message.visible {
  display: block;
  animation: fadeIn 0.3s ease forwards;
}

.form-message.success {
  color: var(--color-accent-mint);
}

.form-message.error {
  color: #F87171;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer Section */
.footer {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.copyright {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

/* Keyframe Animations */
@keyframes revealUp {
  0% {
    opacity: 0;
    transform: translateY(25px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

/* Responsive Breakpoints */
@media (max-width: 600px) {
  #app-content {
    padding: 30px 15px;
  }
  
  .container {
    gap: 30px;
  }
  
  .brand-name {
    font-size: 1.85rem;
    letter-spacing: 0.25em;
  }
  
  .tagline {
    font-size: 1.25rem;
    padding: 0 10px;
  }

  .sub-tagline {
    font-size: 0.9rem;
    padding: 0 10px;
  }
  
  .glass-card {
    padding: 6px;
    border-radius: 16px;
  }
  
  .input-group {
    flex-direction: column;
    background: transparent;
    padding: 0;
    gap: 10px;
  }
  
  #email-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 0.9rem;
  }

  #email-input:focus {
    border-color: var(--glass-border-focus);
    background: rgba(0, 0, 0, 0.4);
  }
  
  #submit-btn {
    padding: 14px;
    border-radius: 12px;
    width: 100%;
    font-size: 0.95rem;
  }
  
  .skip-btn {
    bottom: 25px;
    right: 25px;
    padding: 8px 16px;
    font-size: 0.75rem;
  }
}
