/*
 * Sova Design System v2.0
 * Simplified, purposeful components
 * Less is more - typography over containers
 */

/* ========================================
   CORE ANIMATIONS
   Smooth, purposeful scroll effects
   ======================================== */

:root {
    --ease-smooth: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Fade up - the primary scroll animation */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slide from sides */
.slide-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
}

.slide-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
}

.slide-left.visible,
.slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale in with subtle bounce */
.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-bounce);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children - for grids and lists */
.stagger > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
}

.stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

.stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.stagger.visible > *:nth-child(7) { transition-delay: 0.35s; }
.stagger.visible > *:nth-child(8) { transition-delay: 0.4s; }
.stagger.visible > *:nth-child(9) { transition-delay: 0.45s; }
.stagger.visible > *:nth-child(10) { transition-delay: 0.5s; }

/* Parallax-style scroll (subtle) */
.parallax-slow {
    transition: transform 0.1s linear;
}

/* Keyframe for hero and initial animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   UNIFIED BUTTONS
   One system: pop primary, outline secondary
   ======================================== */

.sova-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    border-radius: 32px;
    font-family: var(--font-primary, 'Montserrat', sans-serif);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s var(--ease-smooth),
                box-shadow 0.3s var(--ease-smooth),
                background 0.3s var(--ease-smooth);
}

/* Shine effect */
.sova-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.5s ease;
}

.sova-btn:hover::before {
    left: 100%;
}

/* Primary - chartreuse pop */
.sova-btn--primary {
    background: #ccff00;
    color: #4d4141;
}

.sova-btn--primary:hover {
    background: #d9ff33;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(204, 255, 0, 0.35);
}

/* Secondary - outline */
.sova-btn--secondary {
    background: transparent;
    color: #eaffc4;
    border: 2px solid rgba(234, 255, 196, 0.4);
}

.sova-btn--secondary:hover {
    border-color: #eaffc4;
    background: rgba(234, 255, 196, 0.08);
    transform: translateY(-3px);
}

/* Ghost - minimal */
.sova-btn--ghost {
    background: transparent;
    color: #eaffc4;
    padding: 0.75rem 1.5rem;
}

.sova-btn--ghost:hover {
    color: #ccff00;
}

.sova-btn--ghost::before {
    display: none;
}

/* Sizes */
.sova-btn--lg {
    padding: 1.25rem 3.5rem;
    font-size: 1.125rem;
}

.sova-btn--sm {
    padding: 0.75rem 1.75rem;
    font-size: 0.875rem;
}

/* Inverted - for green/light backgrounds */
.sova-btn--inverted {
    background: var(--sova-brown);
    color: var(--sova-green);
}

.sova-btn--inverted:hover {
    background: var(--sova-brown-dark);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(77, 65, 65, 0.35);
}

/* ========================================
   TYPOGRAPHY-FIRST CONTENT
   Let text breathe, minimal containers
   ======================================== */

/* Large statement - no container needed */
.sova-statement {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.35;
    color: #ffffff;
    max-width: 900px;
}

.sova-statement span,
.sova-statement strong {
    color: #ccff00;
}

/* Quote - simple, elegant */
.sova-quote {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    font-style: italic;
    line-height: 1.7;
    color: #f5f5dc;
    padding-left: 1.5rem;
    border-left: 3px solid rgba(184, 215, 143, 0.4);
    margin: 2rem 0;
}

.sova-quote cite {
    display: block;
    font-size: 0.9rem;
    font-style: normal;
    color: #b8d78f;
    margin-top: 1rem;
}

/* Big quote - featured testimonial */
.sova-quote--featured {
    font-size: clamp(1.25rem, 2.5vw, 1.625rem);
    padding-left: 2rem;
    border-left-width: 4px;
    border-color: #eaffc4;
    position: relative;
}

.sova-quote--featured::before {
    content: '"';
    position: absolute;
    left: -0.5rem;
    top: -1rem;
    font-size: 5rem;
    font-weight: 700;
    color: #eaffc4;
    opacity: 0.1;
    line-height: 1;
    font-style: normal;
}

/* Highlight text - inline emphasis */
.sova-highlight {
    color: #ccff00;
    font-weight: 600;
}

/* Stats - big numbers */
.sova-stat {
    margin: 1.5rem 0;
}

.sova-stat__number {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    background: linear-gradient(135deg, #eaffc4 0%, #ccff00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    display: block;
}

.sova-stat__text {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #f5f5dc;
    opacity: 0.85;
    margin-top: 0.5rem;
}

.sova-stat__cite {
    font-size: 0.85rem;
    color: #b8d78f;
    opacity: 0.7;
    margin-top: 0.5rem;
    display: block;
}

/* Inline stat - number + text on same line */
.sova-stat--inline .sova-stat__number {
    font-size: clamp(1.5rem, 3vw, 2rem);
    display: inline;
    margin-right: 0.5rem;
}

.sova-stat--inline .sova-stat__text {
    display: inline;
    margin-top: 0;
}

/* ========================================
   GRIDS - Simple responsive layouts
   ======================================== */

.sova-grid {
    display: grid;
    gap: 2rem;
}

.sova-grid--2 { grid-template-columns: repeat(2, 1fr); }
.sova-grid--3 { grid-template-columns: repeat(3, 1fr); }
.sova-grid--4 { grid-template-columns: repeat(4, 1fr); }
.sova-grid--auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.sova-grid--tight { gap: 1.5rem; }
.sova-grid--wide { gap: 3rem; }

@media (max-width: 1024px) {
    .sova-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sova-grid--2,
    .sova-grid--3,
    .sova-grid--4 {
        grid-template-columns: 1fr;
    }
    .sova-grid { gap: 1.5rem; }
}

/* ========================================
   CARDS - Use sparingly
   Only when content truly needs grouping
   ======================================== */

.sova-card {
    background: rgba(245, 245, 220, 0.03);
    border: 1px solid rgba(234, 255, 196, 0.06);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.4s var(--ease-smooth),
                box-shadow 0.4s var(--ease-smooth),
                border-color 0.4s var(--ease-smooth);
}

.sova-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    border-color: rgba(234, 255, 196, 0.15);
}

.sova-card__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #eaffc4;
    margin: 0 0 0.5rem 0;
}

.sova-card__text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #f5f5dc;
    opacity: 0.8;
    margin: 0;
}

.sova-card__meta {
    font-size: 0.8rem;
    color: #b8d78f;
    margin-top: 0.75rem;
    opacity: 0.6;
}

/* Featured card - stands out */
.sova-card--featured {
    border-color: rgba(234, 255, 196, 0.2);
    background: rgba(234, 255, 196, 0.05);
}

/* Compact card */
.sova-card--compact {
    padding: 1.5rem;
}

/* ========================================
   LISTS - Clean, scannable
   ======================================== */

.sova-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sova-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.sova-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #b8d78f;
}

/* Checklist variant */
.sova-list--check li::before {
    content: '✓';
    color: #ccff00;
}

/* Numbered list */
.sova-list--numbered {
    counter-reset: item;
}

.sova-list--numbered li {
    padding-left: 2.5rem;
}

.sova-list--numbered li::before {
    content: counter(item);
    counter-increment: item;
    position: absolute;
    left: 0;
    width: 1.75rem;
    height: 1.75rem;
    background: rgba(234, 255, 196, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #eaffc4;
}

/* ========================================
   DIVIDERS & SPACERS
   ======================================== */

.sova-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(234, 255, 196, 0.2) 20%,
        rgba(234, 255, 196, 0.2) 80%,
        transparent 100%
    );
    margin: 4rem 0;
}

.sova-spacer { height: 4rem; }
.sova-spacer--sm { height: 2rem; }
.sova-spacer--lg { height: 6rem; }

/* ========================================
   SECTION LAYOUTS
   ======================================== */

.sova-section {
    padding: 5rem 0;
    position: relative;
}

.sova-section--sm { padding: 3rem 0; }
.sova-section--lg { padding: 7rem 0; }

/* Section title */
.sova-section__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.sova-section__title span {
    color: #ccff00;
}

.sova-section__intro {
    font-size: 1.25rem;
    color: #b8d78f;
    margin-bottom: 3rem;
    max-width: 700px;
    line-height: 1.7;
}

/* ========================================
   UNIFIED PAGE BACKGROUNDS
   Consistent visual treatment across all pages
   ======================================== */

/* Standard page hero with bird watermark */
.sova-page-hero {
    position: relative;
    overflow: hidden;
}

.sova-page-hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -12%;
    width: 55%;
    height: 130%;
    background: url('../logos/sova-logo-icon-transparent-outlined.png') no-repeat center;
    background-size: contain;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.sova-page-hero > * {
    position: relative;
    z-index: 1;
}

/* Alternate section backgrounds - for visual rhythm */
.sova-section--alt {
    background: rgba(255, 255, 255, 0.02);
}

.sova-section--dark {
    background: linear-gradient(180deg, rgba(45, 36, 36, 0.5) 0%, rgba(77, 65, 65, 1) 100%);
}

/* Fixed bird icon - chat link in bottom right */
.sova-bird-link {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    opacity: 0.35;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
}

.sova-bird-link:hover {
    opacity: 0.6;
    transform: scale(1.05);
}

.sova-bird-link img {
    height: 45px;
    width: auto;
}

/* Section divider - gradient line */
.sova-section-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--sova-pop, #ccff00) 20%, var(--sova-green, #eaffc4) 50%, var(--sova-pop, #ccff00) 80%, transparent 100%);
    opacity: 0.5;
    margin: 0;
}

/* ========================================
   HERO
   ======================================== */

.sova-hero {
    padding: 5rem 0 3rem;
    position: relative;
}

.sova-hero__title {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: #eaffc4;
    margin: 0 0 1rem 0;
}

.sova-hero__title span {
    color: #ccff00;
}

.sova-hero__intro {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    line-height: 1.7;
    color: #b8d78f;
    max-width: 650px;
}

/* ========================================
   SCROLL PROGRESS & UTILITIES
   ======================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #ccff00, #eaffc4);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s linear;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: rgba(77, 65, 65, 0.9);
    border: 1px solid rgba(234, 255, 196, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #eaffc4;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #4d4141;
    border-color: #eaffc4;
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .fade-in-up,
    .slide-left,
    .slide-right,
    .scale-in,
    .stagger > *,
    .sova-card,
    .sova-btn {
        transition: none !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

@media (max-width: 768px) {
    .sova-hero {
        padding: 3rem 0 2rem;
    }

    .sova-section {
        padding: 3rem 0;
    }

    .sova-statement {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }
}
