/* Homepage foundational sections */
html {
    scroll-snap-type: y mandatory;
}

section,
header,
footer {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    position: relative;
    overflow: hidden;
    padding-top: 72px;
}

/* Floating organic blobs */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
    animation: hero-float 10s ease-in-out infinite;
    pointer-events: none;
}

.hero::before {
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.15);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.hero::after {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    bottom: 10%;
    left: -5%;
    animation-delay: -5s;
}

@keyframes hero-float {
    0%, 100% { transform: translateY(0) scale(1); }
    33% { transform: translateY(-25px) scale(1.05); }
    66% { transform: translateY(10px) scale(0.95); }
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 1;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Staggered hero entrance */
.hero-content > * {
    opacity: 0;
    transform: translateY(35px);
    animation: hero-entrance 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation-delay: 0.15s;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation-delay: 0.35s;
}

.hero .cta-btn {
    animation-delay: 0.55s;
}

@keyframes hero-entrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Features Section */
.features {
    padding: 5rem 5%;
    background: white;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    background: var(--light);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition:
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent);
    box-shadow:
        0 20px 45px rgba(45, 95, 93, 0.12),
        0 8px 20px rgba(45, 95, 93, 0.08);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--primary);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(-5deg);
    color: var(--accent);
}

.feature-card h3 {
    font-family: Georgia, serif;
    font-weight: 400;
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* App Section */
.app-section {
    padding: 5rem 5%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    text-align: center;
}

/* Breath Wave Feature List */
.key-features-wave {
    max-width: 400px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.features-heading {
    font-family: Georgia, serif;
    font-size: 1.6rem;
    color: white;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.features-list-wave {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-wave-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideIn 0.6s ease-out var(--delay) both;
    cursor: default;
    user-select: none;
}

.feature-wave-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(8px);
    border-color: rgba(244, 162, 97, 0.4);
}

.feature-number-wave {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    animation: homepage-breathe 3s ease-in-out infinite;
    animation-delay: var(--delay);
}

/* Preserve the original subtle homepage pulse without global keyframe collisions. */
@keyframes homepage-breathe {
    0%, 100% { transform: scale(1); opacity: 0.08; }
    50% { transform: scale(1.1); opacity: 0.15; }
}

.feature-num {
    font-family: Georgia, serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    z-index: 1;
}

.feature-text-wave {
    font-family: -apple-system, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.01em;
}

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

/* Cooperation Section */
.cooperation {
    padding: 5rem 5%;
    background: var(--light);
    text-align: center;
}

.cooperation-content {
    max-width: 1200px;
    margin: 0 auto;
}

.cooperation-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 900px) {
    .cooperation-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}

.coop-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    transition:
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 2px solid transparent;
}

.coop-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent);
    box-shadow:
        0 20px 50px rgba(45, 95, 93, 0.15),
        0 8px 20px rgba(45, 95, 93, 0.1);
}

.coop-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--primary);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
}

.coop-icon svg {
    width: 100%;
    height: 100%;
}

.coop-card:hover .coop-icon {
    transform: scale(1.15) rotate(-5deg);
    color: var(--accent);
}

.coop-card h3 {
    font-family: Georgia, serif;
    font-weight: 400;
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.contact-cta {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    max-width: 600px;
    margin: 3rem auto 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ================================
   Email Link Button - Organic Style
   ================================ */
.email-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 1.1rem 2.25rem;
    background: white;
    border-radius: 50px;
    transition:
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.3s ease,
        border-color 0.3s ease;
    position: relative;
    isolation: isolate;
    box-shadow:
        0 2px 12px rgba(45, 95, 93, 0.12),
        0 4px 20px rgba(45, 95, 93, 0.08);
    border: 2px solid rgba(45, 95, 93, 0.15);
}

/* Decorative gradient background effect */
.email-link::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 52px;
    z-index: -1;
}

.email-link:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(45, 95, 93, 0.25),
        0 12px 35px rgba(45, 95, 93, 0.15);
    border-color: transparent;
}

.email-link:hover::before {
    opacity: 1;
}

/* Focus state for accessibility */
.email-link:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

.app-content {
    max-width: 800px;
    margin: 0 auto;
}

.app-preview {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.phone-mockup {
    width: 250px;
    height: 500px;
    background: white;
    border-radius: 30px;
    padding: 1rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    position: relative;
    overflow: hidden;
}

.breathing-animation {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #3D8B7A, #5AB89A);
    border-radius: 50%;
    animation: homepage-breathe 4s ease-in-out infinite;
}

/* ================================
   Homepage Latest Articles Section
   ================================ */

.home-blog {
  padding: 5rem 5%;
  background: white;
  text-align: center;
}

.home-blog-content {
  max-width: 1200px;
  margin: 0 auto;
}

.home-blog-subtitle {
  font-size: 1.15rem;
  color: #555;
  max-width: 600px;
  margin: 0.75rem auto 2.5rem;
  line-height: 1.7;
}

.home-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: left;
}

/* Homepage Article Card */
.home-article-card {
  background: var(--light);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.home-article-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow:
    0 20px 60px rgba(45, 95, 93, 0.15),
    0 8px 20px rgba(45, 95, 93, 0.1);
}

.home-article-card-image-wrapper {
  position: relative;
  overflow: hidden;
}

.home-article-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.home-article-card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-size: cover;
  background-position: top center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-article-card-image[data-image-position="center"] {
  background-position: center;
}

.home-article-card-image[data-image-position="bottom"] {
  background-position: bottom center;
}

.home-article-card-image[data-image-position="top"] {
  background-position: top center;
}

/* Homepage cards own their lazy-image presentation. */
.home-article-card-image.lazy-bg {
  --lazy-full: '';
  background-color: #e8e4e1;
}

.home-article-card-image.lazy-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, #e8e4e1, #f5f2f0, #e8e4e1);
  background-size: 200% 100%;
  animation: home-lazy-shimmer 1.5s ease-in-out infinite;
  transition: opacity 0.3s ease-out;
}

.home-article-card-image.lazy-bg.loaded {
  background-image: var(--lazy-full);
}

.home-article-card-image.lazy-bg.loaded::before {
  opacity: 0;
}

@keyframes home-lazy-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.home-article-card-image .category-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  padding: 0.4rem 0.9rem;
  border-radius: 16px;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.home-article-card-image .category-breathing {
  background: rgba(45, 95, 93, 0.88);
}

.home-article-card-image .category-stress-relief {
  background: rgba(139, 90, 90, 0.88);
}

.home-article-card-image .category-sleep {
  background: rgba(89, 100, 139, 0.88);
}

.home-article-card-image .category-mindfulness {
  background: rgba(107, 142, 123, 0.88);
}

.home-article-card-image .category-pregnancy {
  background: rgba(201, 169, 166, 0.92);
  color: #5A4A48;
}

.home-article-card-image .category-lifestyle {
  background: rgba(165, 135, 85, 0.88);
}

.home-article-card:hover .home-article-card-image {
  transform: scale(1.08);
}

.home-article-card-content {
  padding: 1.5rem 1.75rem 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.home-article-card-content-link {
  text-decoration: none;
  color: inherit;
}

.home-article-card .article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  color: #666;
  font-size: 0.85rem;
}

.home-article-card .article-meta time {
  font-weight: 500;
}

.home-article-card .read-time {
  color: var(--primary);
  font-weight: 600;
}

.home-article-card .article-title {
  margin-bottom: 0.6rem;
  color: var(--dark);
  font: 500 1.5rem/1.3 "Playfair Display", Georgia, serif;
  transition: color 0.3s;
}

.home-article-card .article-excerpt {
  display: -webkit-box;
  margin-bottom: 1.25rem;
  overflow: hidden;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home-article-card .read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.3s;
}

.home-article-card .read-more-arrow {
  transition: transform 0.3s;
}

.home-article-card-content-link:hover .article-title,
.home-article-card:hover .article-title {
  color: var(--primary);
}

.home-article-card:hover .read-more {
  gap: 0.75rem;
}

.home-article-card:hover .read-more-arrow {
  transform: translateX(4px);
}

/* View All CTA */
.home-blog-cta {
  margin-top: 3rem;
}

.home-blog-view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  padding: 0.75rem 2rem;
  border: 2px solid var(--primary);
  border-radius: 50px;
  transition:
    background 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.home-blog-view-all:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(45, 95, 93, 0.25);
}

.home-blog-view-all:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 1024px) {
  .home-blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.2rem;
  }

  .home-blog {
    padding: 3.5rem 5%;
  }

  .home-blog-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .home-blog-subtitle {
    font-size: 1rem;
  }
}

/* ================================
   Our Apps Section (Homepage)
   ================================ */
.our-apps {
    padding: 5rem 5%;
    background: linear-gradient(160deg, #eef8f7 0%, var(--light) 55%, #fef3eb 100%);
    text-align: center;
}

.our-apps-content {
    max-width: 1100px;
    margin: 0 auto;
}

.our-apps-subtitle {
    font-size: 1.15rem;
    color: #555;
    margin: 0.5rem auto 3rem;
    max-width: 580px;
    line-height: 1.65;
}

.our-apps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .our-apps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 800px;
    }
}

@media (max-width: 640px) {
    .our-apps-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}


.app-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #FDFCFE; /* Cloud White */
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(42, 22, 53, 0.05);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
    border: 1px solid rgba(42, 22, 53, 0.04);
    position: relative;
    cursor: pointer;
    scroll-margin-top: calc(var(--navbar-height) + 1rem);
}

.app-card-visual {
    height: 180px;
    width: 100%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.app-card--wellness .app-card-visual {
    background: linear-gradient(135deg, #DCD6E3 0%, #F2B5D4 50%, #A0E8D3 100%);
    background-size: 200% 200%;
    animation: breathingGradient 8s ease-in-out infinite;
}

.app-card--entertainment .app-card-visual {
    background: linear-gradient(135deg, #2A1635 0%, #6B4C8A 100%);
    background-size: 200% 200%;
    animation: breathingGradient 10s ease-in-out infinite;
}

.app-card--showdown .app-card-visual {
    background: var(--showdown-theme-background);
}

.app-card-visual::before {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(10px);
}

.app-card:hover,
.app-card:focus-visible {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 24px 48px rgba(42, 22, 53, 0.08);
    outline: none;
}

.app-card:focus-visible {
    outline: 3px solid #A0E8D3;
    outline-offset: 4px;
}

.app-card-inner {
    padding: 2.5rem 2rem;
    position: relative;
    z-index: 2;
    background: #FDFCFE;
    border-top-left-radius: 32px;
    margin-top: -20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.app-card-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Albert Sans', sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.25rem;
    width: fit-content;
}

.app-card-badge--wellness {
    background: rgba(160, 232, 211, 0.3); /* Mint */
    color: #2A1635; /* Aubergine */
}

.app-card-badge--entertainment {
    background: rgba(42, 22, 53, 0.05);
    color: #2A1635;
}

.app-card-name {
    font-family: 'Epilogue', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #2A1635;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.app-card-tagline {
    font-family: 'Albert Sans', sans-serif;
    font-size: 1.05rem;
    color: rgba(42, 22, 53, 0.7);
    line-height: 1.6;
    margin-bottom: 2rem;
    flex: 1;
}

.app-card-cta {
    display: inline-flex;
    align-items: center;
    font-family: 'Albert Sans', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #2A1635;
    transition: color 0.3s ease, transform 0.3s ease;
}

.app-card--wellness .app-card-cta {
    color: #2A1635;
}

.app-card--entertainment .app-card-cta {
    color: #2A1635;
}

.app-card:hover .app-card-cta {
    transform: translateX(8px);
}

/* Homepage breathing-app details center independently on compact screens. */
@media (max-width: 768px) {
    .key-features-wave {
        text-align: center;
        align-items: center;
    }

    .key-features-wave .cta-btn {
        margin-left: auto;
        margin-right: auto;
    }

    .key-features-wave p {
        text-align: center;
    }
}

/* Preserve all homepage motion preferences after owning base rules. */
@media (prefers-reduced-motion: reduce) {
    .hero-content > *,
    .feature-card,
    .coop-card,
    .feature-icon,
    .coop-icon {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }

    .hero::before,
    .hero::after {
        animation: none !important;
    }

    .home-article-card,
    .home-article-card-image,
    .home-blog-view-all,
    .app-card {
        transition: none !important;
    }

    .home-article-card:hover,
    .app-card:hover {
        transform: none;
    }
}


