/* Cozy Pomodoro - Premium Soft Landing Page */

:root {
  /* Cozy Color Palette - Cozy Light Theme */
  --bg-color: #ffffff;
  --text-main: rgba(0, 0, 0, 0.87);
  --text-muted: rgba(0, 0, 0, 0.6);
  --text-inverse: #ffffff;
  /* New variable for text on primary/dark backgrounds */
  --primary-color: #ff5722;
  --primary-hover: #e64a19;
  --secondary-color: #ffccbc;
  --glass-bg: rgba(255, 255, 255, 0.45);
  /* For glassmorphism */
  --glass-border: rgba(255, 255, 255, 0.6);
  --surface-color: #ffffff;
  --surface-raised: #fffbf7;
  --border-color: #ffe0b2;

  /* Layout & Spacing */
  --spacing-sm: 8px;
  --spacing-md: 24px;
  /* Increased for breathing room */
  --spacing-lg: 48px;
  /* Increased */
  --spacing-xl: 96px;
  /* Increased */

  --radius-md: 16px;
  --radius-pill: 500px;

  /* Shadows - Soft & Premium */
  --shadow-md: 0 8px 24px rgba(74, 63, 53, 0.08);
  --shadow-float: 0 20px 60px -10px rgba(255, 87, 34, 0.25);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Open Sans", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
  /* Space for sticky nav on mobile */
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
  /* CRITICAL FIX: Prevent horizontal scroll globally */
  width: 100%;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

ul {
  list-style: none;
}

/* Utilities */
.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-xl) 0;
  scroll-margin-top: 2rem;
}

/* Scroll Animation Utilities */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

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

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

.hidden {
  display: none !important;
}

/* Badges */
.badge-soft {
  display: inline-block;
  background: var(--secondary-color);
  color: var(--primary-color);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-premium {
  display: inline-block;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
}

/* Header */
.header {
  padding: var(--spacing-lg) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.desktop-nav .nav-link {
  font-weight: 600;
  color: var(--text-muted);
  margin-left: var(--spacing-lg);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.desktop-nav .nav-link:hover {
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  padding: 40px 0 80px;
  display: flex;
  flex-direction: column;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.hero-title {
  font-size: 3rem;
  line-height: 1.1;
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-lg);
  max-width: 500px;
}

.hero-subtitle strong {
  color: var(--text-main);
}

.hero-actions {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.hero-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.8;
  margin-bottom: var(--spacing-lg);
}

.cta-button {
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.cta-button.primary {
  background-color: var(--primary-color);
  color: var(--text-inverse);
  /* Fix contrast */
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.2);
}

.cta-button.primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

.cta-button.secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.cta-button.secondary:hover {
  border-color: var(--text-main);
  background-color: var(--surface-raised);
}

.full-width {
  width: 100%;
  text-align: center;
}

/* Mobile First Tweaks */
@media (max-width: 768px) {
  .cta-button {
    width: 100%;
    /* Full width for thumbs */
    display: block;
    text-align: center;
    padding: 16px;
    /* Larger touch target */
  }

  .hero-actions {
    flex-direction: column;
    /* Stack buttons */
    width: 100%;
  }

  .hero-title {
    font-size: 2.5rem;
    /* Better fit for narrow screens */
  }
}

/* Hero Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-mockup {
  max-width: 100%;
  height: auto;
  max-height: 550px;
  border-radius: 32px;
  box-shadow: var(--shadow-float);
  transform: rotate(-3deg);
  transition: transform 0.5s ease;
}

.hero-mockup:hover {
  transform: rotate(0deg) scale(1.02);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }

  50% {
    transform: translateY(-10px) rotate(-3deg);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* Mini Theme Switcher */
.theme-switcher-mini {
  background: var(--surface-raised);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-md);
  box-shadow: var(--shadow-md);
}

.theme-label-sm {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.theme-buttons {
  display: flex;
  gap: 8px;
}

.theme-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s;
}

.theme-btn:hover {
  transform: scale(1.1);
}

/* Highlight/New User */
.social-proof {
  text-align: center;
  margin-top: -20px;
  margin-bottom: var(--spacing-xl);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.social-proof strong {
  color: var(--primary-color);
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.step-card {
  text-align: center;
}

.step-icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
}

.step-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--text-main);
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Benefits List */
.benefits-list {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--text-main);
  background: var(--surface-raised);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
}

.check-icon {
  color: #4CAF50;
  font-weight: bold;
}

/* Theme Pack */
.theme-pack-section {
  background-color: var(--surface-raised);
}

.theme-pack-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

/* Carousel Fix: STRICT Constraints for Desktop Overflow */
.carousel-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  /* Fill parent */
  max-width: 500px;
  /* Limit visual width on desktop to prevent huge spread */
  margin: 0 auto;
  /* Center it */
  padding: 20px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
  mask-image: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
}

/* Allow larger width on very small screens? No, stick to fluid */
@media (min-width: 1024px) {
  .carousel-container {
    max-width: 600px;
  }

  /* Slightly larger on desktop but still contained */
}

.carousel-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scroll 40s linear infinite;
}

.carousel-img {
  height: 400px;
  width: auto;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Pricing Card */
.pricing-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 40px;
  border-radius: 32px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 215, 0, 0.2);
  text-align: center;
  backdrop-filter: blur(12px);
  position: relative;
  max-width: 450px;
  margin: 0 auto;
}

.price {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
  margin-bottom: 4px;
}

.currency {
  font-size: 1.5rem;
  vertical-align: top;
  margin-right: 2px;
}

.period {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pricing-features {
  text-align: left;
  margin: var(--spacing-lg) 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--text-main);
}

.pricing-features li.faded {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.guarantee-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
  opacity: 0.8;
}

/* Testimonials / Feature Cards */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  justify-content: center;
  /* Center cards if they wrap */
}

.testimonial-card {
  background: var(--surface-color);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.testimonial-card p {
  margin-bottom: 8px;
  font-size: 1.05rem;
  color: var(--text-main);
}

/* FAQ */
.faq-section {
  max-width: 800px;
  margin: 0 auto;
}

.faq-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-color);
  overflow: hidden;
}

.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  color: var(--text-main);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  font-weight: 300;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
}

.faq-item[open] summary::after {
  content: '-';
  transform: rotate(180deg);
}

.faq-item p {
  padding: 0 24px 24px;
  /* Increased padding */
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Specific Mobile FAQ Tweaks */
@media (max-width: 768px) {
  .faq-container {
    gap: 16px;
    /* More space between items */
  }

  .faq-item summary {
    padding: 18px 50px 18px 20px;
    /* Right padding prevents overlap with icon */
    font-size: 1rem;
  }

  .faq-item p {
    padding: 0 20px 20px;
  }
}

/* Footer & Other */
.footer {
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-xl) 0;
  margin-top: 50px;
  text-align: center;
  overflow: hidden;
  /* Prevent overflow from children */
  width: 100%;
}

.footer-links {
  margin: 20px 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  text-decoration: underline;
  color: var(--primary-color);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Language Buttons */
.languages-list {
  display: flex;
  justify-content: center;
  gap: 12px;
  /* Increased gap */
  flex-wrap: wrap !important;
  /* Force wrapping */
  padding: 10px 20px;
  /* Better padding */
  margin-top: 20px;
  max-width: 100%;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.lang-btn:hover,
.lang-btn.active {
  background: var(--surface-raised);
  color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

/* Radio Widget - Glassmorphism Restored */
.radio-widget {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
  padding: 12px 16px;
  border-radius: 24px;
  z-index: 1500;
  width: auto;
  min-width: 240px;
  transition: bottom 0.3s, box-shadow 0.3s;
  /* Added transition for glow */
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Breathing Animation when playing */
.radio-widget.playing {
  animation: breathe-glow 4s ease-in-out infinite;
  border-color: var(--primary-color);
  /* Subtle tint */
}

@keyframes breathe-glow {

  0%,
  100% {
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
  }

  50% {
    box-shadow: 0 8px 40px 0 rgba(255, 87, 34, 0.25);
    border-color: var(--primary-color);
  }
}

.radio-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--primary-color);
}

.radio-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.track-info {
  display: flex;
  flex-direction: column;
}

#track-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.track-artist {
  display: block;
  font-size: 0.75rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-top: 2px;
  opacity: 0.9;
}

.sneak-peek-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.play-btn {
  background: var(--primary-color);
  color: var(--text-inverse);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.play-btn:hover {
  transform: scale(1.1);
}


/* Sticky Mobile CTA */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: auto;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px var(--spacing-md);
  display: flex;
  gap: var(--spacing-md);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  z-index: 2000;
  transition: transform 0.3s;
}

.sticky-cta.hidden {
  transform: translateY(100%);
}

.sticky-btn {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
}

.sticky-btn.primary {
  background: var(--primary-color);
  color: var(--text-inverse);
}

.sticky-btn.secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
}

/* Responsive Tweaks */
@media (min-width: 769px) {
  .hero-content {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .theme-pack-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .sticky-cta {
    display: none !important;
  }

  body {
    padding-bottom: 0;
  }

  .radio-widget {
    bottom: 30px;
  }
}

@media (max-width: 768px) {

  /* Hide desktop nav to prevent header cramping */
  .desktop-nav {
    display: none;
  }

  /* Fix Hero Overlap */
  .hero {
    padding-bottom: 20px;
  }

  .social-proof {
    margin-top: 20px;
    margin-bottom: 40px;
  }

  .hero-mockup {
    max-height: 400px;
    margin-top: 40px;
    margin-bottom: 20px;
  }

  /* Make Radio Widget float on mobile too, improved positioning */
  .radio-widget {
    bottom: 90px;
    right: 16px;
    /* Fixed positioning */
    transform: none;
    min-width: auto;
    width: auto;
    max-width: calc(100vw - 32px);
    /* Prevent overflow */
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.85);
  }

  .radio-header span:first-child {
    display: none;
  }

  .track-info {
    max-width: 120px;
  }

  /* Typography */
  .hero-title {
    font-size: 2.5rem;
    margin-top: 10px;
    line-height: 1.2;
  }

  .version-badge {
    margin-bottom: 24px;
    display: inline-block;
  }

  /* Grid Layouts - Forced Single Column */
  .steps-grid,
  .testimonials-grid,
  .theme-pack-grid {
    grid-template-columns: 1fr !important;
    gap: 24px;
    padding: 0 10px;
  }

  /* Prevent Grid Blowout */
  .steps-grid>*,
  .testimonials-grid>*,
  .theme-pack-grid>* {
    min-width: 0;
  }

  /* Feature Cards */
  .testimonial-card,
  .pricing-card {
    margin-bottom: 16px;
    padding: 24px;
    /* Reduced from 40px/default */
  }

  .carousel-img {
    height: 200px;
    /* Reduced height to fit better */
  }

  .carousel-container {
    max-width: 100%;
    /* Ensure it fits */
  }

  .hero-mockup {
    max-width: 85%;
    /* Slightly reduced to avoid rotation overflow */
  }

  /* CRITICAL: Container Padding Force */
  .container {
    padding-left: 20px !important;
    /* Reduced for more space */
    padding-right: 20px !important;
    width: 100%;
    box-sizing: border-box;
  }

  /* Extra spacing for specific sections if needed */
  .faq-section .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
    width: 100%;
  }

  /* Was 40px, keeping consistent */

  /* Mobile Spacing & Layout */
  .section {
    padding: 60px 0;
  }

  .hero-content {
    gap: 30px;
    padding-top: 40px;
  }

  body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
  }
}