/* ==========================================================================
   VINYLCRATE - MAIN STYLESHEET
   Website: vinyl-crate.com
   Description: Marketing website for VinylCrate iOS app - Vinyl collection management
   ========================================================================== */

/* ==========================================================================
   IMPORTS - BASE STYLES
   ========================================================================== */

@import url('base/variables.css');
@import url('base/typography.css');
@import url('base/layout.css');

/* ==========================================================================
   IMPORTS - COMPONENTS
   ========================================================================== */

@import url('components/buttons.css');
@import url('components/cards.css');
@import url('components/navigation.css');
@import url('components/footer-enhanced.css');

/* ==========================================================================
   IMPORTS - PHASE 2 ENHANCEMENTS
   ========================================================================== */

@import url('components/hero-enhanced.css');
@import url('components/carousel.css');
@import url('components/newsletter.css');
@import url('components/device-mockups.css');
@import url('components/feature-sections.css');

/* ==========================================================================
   GLOBAL STYLES
   ========================================================================== */

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

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

body {
  margin: 0;
  padding: 0;
  /* Removed min-height and flex to prevent footer from sticking to viewport bottom */
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-background);
  transition: var(--transition-colors);
}

main {
  /* Removed flex: 1 - footer will now only appear after content */
  min-height: auto;
}

/* ==========================================================================
   HERO SECTION STYLES
   ========================================================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, var(--color-background) 0%, var(--color-surface) 100%);
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, var(--color-accent-primary-alpha) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, var(--color-accent-teal-alpha) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, var(--color-accent-secondary-alpha) 0%, transparent 50%);
  z-index: var(--z-behind);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: var(--space-8);
}

.hero-app-icon {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-2xl);
  margin: 0 auto var(--space-6);
  box-shadow: var(--shadow-lg);
  transition: var(--transition-transform);
  border: 3px solid var(--color-accent-primary-alpha);
}

.hero-app-icon:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: var(--shadow-xl), var(--shadow-accent-primary);
  border-color: var(--color-accent-primary);
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: var(--font-weight-black);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--color-text-primary); /* Fallback */
}

.hero-subtitle {
  font-size: var(--font-size-2xl);
  color: var(--color-accent-primary);
  margin-bottom: var(--space-4);
  font-weight: var(--font-weight-medium);
}

.hero-description {
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

/* ==========================================================================
   FEATURES SECTION STYLES
   ========================================================================== */

.features-section {
  background: var(--color-background);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-4);
  position: relative;
}

.section-title.gradient {
  background: linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--color-text-primary); /* Fallback */
}

.section-subtitle {
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: var(--line-height-relaxed);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-12);
}

/* ==========================================================================
   SCREENSHOTS SECTION STYLES
   ========================================================================== */

.screenshots-section {
  background: var(--color-surface);
  position: relative;
}

.screenshots-container {
  position: relative;
  margin-top: var(--space-12);
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
  max-width: 1200px;
  margin: 0 auto;
}

/* ==========================================================================
   CALL TO ACTION SECTION STYLES
   ========================================================================== */

.cta-section {
  background: linear-gradient(135deg, var(--color-background) 0%, var(--color-surface) 100%);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 30% 70%, var(--color-accent-primary-alpha) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, var(--color-accent-teal-alpha) 0%, transparent 50%);
  z-index: var(--z-behind);
}

.cta-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.cta-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--color-text-primary); /* Fallback */
}

.cta-description {
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: var(--line-height-relaxed);
}

.cta-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   ANIMATION KEYFRAMES
   ========================================================================== */

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* ==========================================================================
   UTILITY ANIMATIONS
   ========================================================================== */

.animate-fade-in-up {
  animation: fadeInUp var(--duration-slow) var(--ease-spring) forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft var(--duration-slow) var(--ease-spring) forwards;
}

.animate-fade-in-right {
  animation: fadeInRight var(--duration-slow) var(--ease-spring) forwards;
}

.animate-scale-in {
  animation: scaleIn var(--duration-normal) var(--ease-spring) forwards;
}

.animate-float {
  animation: float 3s var(--ease-in-out) infinite;
}

.animate-pulse {
  animation: pulse 2s var(--ease-in-out) infinite;
}

/* Intersection Observer animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--duration-slow) var(--ease-spring);
}

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

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* ==========================================================================
   PAGE-SPECIFIC STYLES
   ========================================================================== */

.page-content {
  padding: var(--space-20) 0;
}

.page-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.page-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.page-subtitle {
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

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

@media (max-width: 768px) {
  .hero {
    min-height: 80vh;
    padding: var(--space-8) 0;
  }
  
  .hero-content {
    padding: var(--space-4);
  }
  
  .hero-title {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }
  
  .hero-actions,
  .cta-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .screenshots-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
  
  .section-title {
    font-size: var(--font-size-3xl);
  }
  
  .page-content {
    padding: var(--space-12) 0;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 70vh;
  }
  
  .hero-app-icon {
    width: 100px;
    height: 100px;
  }
  
  .screenshots-grid {
    grid-template-columns: 1fr;
  }
  
  .section-header {
    margin-bottom: var(--space-8);
  }
  
  .page-content {
    padding: var(--space-8) 0;
  }
}

/* ==========================================================================
   ACCESSIBILITY & MOTION PREFERENCES
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .hero-app-icon:hover {
    transform: none;
  }
  
  .animate-fade-in-up,
  .animate-fade-in-left,
  .animate-fade-in-right,
  .animate-scale-in,
  .animate-float,
  .animate-pulse {
    animation: none;
  }
  
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   HIGH CONTRAST MODE
   ========================================================================== */

@media (prefers-contrast: high) {
  .hero-title,
  .section-title.gradient,
  .cta-title {
    background: none;
    -webkit-text-fill-color: var(--color-text-primary);
    color: var(--color-text-primary);
  }
  
  .hero-app-icon {
    border-width: 4px;
  }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
  .hero {
    min-height: auto;
    background: white;
    color: black;
  }
  
  .hero::before {
    display: none;
  }
  
  .hero-app-icon {
    box-shadow: none;
    border: 2px solid black;
  }
  
  .btn,
  .card-feature,
  .card-screenshot {
    box-shadow: none;
    border: 1px solid black;
    break-inside: avoid;
  }
  
  header,
  .footer {
    border-color: black;
  }
  
  .hero-title,
  .section-title.gradient,
  .cta-title {
    background: none;
    -webkit-text-fill-color: black;
    color: black;
  }
}

/* ==========================================================================
   SELECTION STYLES
   ========================================================================== */

::selection {
  background-color: var(--color-accent-primary-alpha);
  color: var(--color-text-primary);
}

::-moz-selection {
  background-color: var(--color-accent-primary-alpha);
  color: var(--color-text-primary);
}

/* ==========================================================================
   SCROLLBAR STYLES (Webkit)
   ========================================================================== */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--color-accent-primary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-secondary);
}

/* ==========================================================================
   FOCUS OUTLINE UTILITIES
   ========================================================================== */

.focus-outline {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
}

.focus-outline-thin {
  outline: 1px solid var(--color-accent-primary);
  outline-offset: 1px;
}

/* ==========================================================================
   IMAGE OPTIMIZATION
   ========================================================================== */

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

.img-responsive {
  width: 100%;
  height: auto;
}

.img-rounded {
  border-radius: var(--radius-lg);
}

.img-circle {
  border-radius: var(--radius-full);
}

/* ==========================================================================
   VINYLCRATE - HOMEPAGE SPECIFIC STYLES
   ========================================================================== */

/* Hero Content Wrapper */
.hero-content-wrapper {
  padding: 2rem 0;
  max-width: 1000px;
  margin: 0 auto;
}

/* Newsletter Signup Card */
.newsletter-card {
  margin: 0 auto 3rem auto;
  max-width: 480px;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid var(--color-border);
}

.newsletter-card h3 {
  color: var(--color-accent-primary);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.newsletter-card p {
  margin-bottom: 1.5rem;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.newsletter-card .newsletter-form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.newsletter-card input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 0.875rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  background: var(--color-background);
  color: var(--color-text-primary);
}

.newsletter-card input[type="email"]:focus {
  outline: none;
  border-color: var(--color-accent-primary);
}

.newsletter-card .privacy-note {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  margin-top: 1rem;
}

/* Hero Stats */
.hero-stats-container {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 700px;
  margin: 0 auto;
}

.hero-stat-card {
  text-align: center;
  padding: 1rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.hero-stat-card .stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent-primary);
}

.hero-stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Features Section */
.features-section-home {
  padding: 4rem 0;
  background: var(--color-surface);
}

.features-section-home .section-title {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--color-text-primary);
}

.features-grid-home {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  justify-content: center;
}

.feature-card-home {
  flex: 0 1 280px;
  max-width: 300px;
}

.feature-card-home .card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card-home h3 {
  color: var(--color-accent-primary);
  margin-bottom: 0.5rem;
}

.feature-card-home p {
  color: var(--color-text-secondary);
}

/* Screenshots Section */
.screenshots-section-home {
  padding: 4rem 0;
}

.screenshots-section-home .section-title {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--color-text-primary);
}

.screenshots-section-home .section-subtitle {
  text-align: center;
  color: var(--color-text-secondary);
  margin-bottom: 3rem;
}

.screenshot-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 1rem 0;
  scroll-snap-type: x mandatory;
}

.screenshot-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
}

.screenshot-item img {
  max-width: 280px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* Privacy Highlight Section */
.privacy-section-home {
  padding: 4rem 0;
  background: var(--color-surface);
}

.privacy-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.privacy-content .privacy-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.privacy-content h2 {
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}

.privacy-content p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* CTA Section */
.cta-section-home {
  padding: 4rem 0;
  text-align: center;
}

.cta-section-home h2 {
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}

.cta-section-home p {
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

/* Skip Link (Accessibility) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-accent-primary);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  z-index: var(--z-top);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* Visually Hidden (for screen readers) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Features Page Specific */
.features-grid--two-col {
  grid-template-columns: repeat(2, 1fr);
  max-width: 700px;
  margin: 0 auto;
}

.coming-soon-section {
  text-align: center;
  padding: 2rem 0;
}

.coming-soon-section h2 {
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.coming-soon-section > p {
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

.card-feature--coming-soon {
  opacity: 0.7;
}

.cta-section-features {
  text-align: center;
  padding: 3rem 0;
}

.cta-section-features h2 {
  color: var(--color-text-primary);
}

.cta-section-features p {
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-content-wrapper {
    padding: 1rem 0;
  }

  .newsletter-card {
    padding: 1.5rem;
    margin: 0 1rem 2rem 1rem;
  }

  .hero-stats-container {
    gap: 1rem;
  }

  .hero-stat-card {
    padding: 0.75rem 1rem;
  }

  .features-grid-home {
    gap: 1.5rem;
  }

  .feature-card-home {
    flex: 0 1 100%;
    max-width: 100%;
  }

  .features-grid--two-col {
    grid-template-columns: 1fr;
  }
}
