/* ============================================
   MATIKS: MATH AND BRAIN GAMES
   Organic Design System
   ============================================ */

/* --- CSS Variables --- */
:root {
    --color-primary: #2d6a4f;
    --color-primary-dark: #1b4332;
    --color-primary-light: #40916c;
    --color-secondary: #f0ebe3;
    --color-secondary-dark: #e3ddd3;
    --color-accent: #e07a5f;
    --color-accent-light: #f2a48b;
    --color-accent-dark: #c9604a;
    --color-cream: #faf8f5;
    --color-sand: #d4c5a9;
    --color-terracotta: #c97c5d;
    --color-text: #2c2c2c;
    --color-text-light: #5a5a5a;
    --color-text-muted: #8a8a7c;
    --color-white: #ffffff;
    --color-success: #40916c;
    --color-error: #c9604a;

    --font-display: 'Comfortaa', cursive;
    --font-body: 'Nunito', sans-serif;

    --shadow-soft: 0 4px 20px rgba(45, 106, 79, 0.08);
    --shadow-medium: 0 8px 32px rgba(45, 106, 79, 0.12);
    --shadow-large: 0 16px 48px rgba(45, 106, 79, 0.15);
    --shadow-warm: 0 6px 24px rgba(224, 122, 95, 0.15);
    --shadow-card: 0 2px 12px rgba(45, 106, 79, 0.06);

    --radius-blob-1: 30% 70% 70% 30% / 30% 30% 70% 70%;
    --radius-blob-2: 60% 40% 30% 70% / 60% 30% 70% 40%;
    --radius-blob-3: 40% 60% 60% 40% / 50% 40% 60% 50%;
    --radius-blob-4: 70% 30% 50% 50% / 40% 60% 40% 60%;
    --radius-soft: 24px;
    --radius-softer: 32px;
    --radius-pill: 999px;

    --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 0.2s ease;

    --container-max: 1200px;
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-cream);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

ul {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-primary-dark);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.3rem); }

p {
    margin-bottom: 1rem;
    color: var(--color-text-light);
}

::selection {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Blob Decorations --- */
.blob {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    opacity: 0.08;
}

.blob-hero-1 {
    width: 500px;
    height: 500px;
    background: var(--color-primary);
    border-radius: var(--radius-blob-1);
    top: -100px;
    right: -150px;
    animation: blobMorph1 12s ease-in-out infinite;
}

.blob-hero-2 {
    width: 350px;
    height: 350px;
    background: var(--color-accent);
    border-radius: var(--radius-blob-2);
    bottom: -80px;
    left: -100px;
    animation: blobMorph2 15s ease-in-out infinite;
}

.blob-hero-3 {
    width: 200px;
    height: 200px;
    background: var(--color-sand);
    border-radius: var(--radius-blob-3);
    top: 40%;
    left: 50%;
    animation: blobMorph3 10s ease-in-out infinite;
    opacity: 0.12;
}

.blob-about-1 {
    width: 400px;
    height: 400px;
    background: var(--color-primary-light);
    border-radius: var(--radius-blob-4);
    top: -50px;
    left: -120px;
    animation: blobMorph2 14s ease-in-out infinite;
}

.blob-about-2 {
    width: 300px;
    height: 300px;
    background: var(--color-accent);
    border-radius: var(--radius-blob-1);
    bottom: -60px;
    right: -80px;
    animation: blobMorph1 11s ease-in-out infinite;
}

.blob-feat-1 {
    width: 450px;
    height: 450px;
    background: var(--color-accent);
    border-radius: var(--radius-blob-3);
    top: 10%;
    right: -150px;
    animation: blobMorph3 13s ease-in-out infinite;
}

.blob-feat-2 {
    width: 280px;
    height: 280px;
    background: var(--color-primary);
    border-radius: var(--radius-blob-2);
    bottom: 5%;
    left: -80px;
    animation: blobMorph1 16s ease-in-out infinite;
}

.blob-test-1 {
    width: 500px;
    height: 500px;
    background: var(--color-primary);
    border-radius: var(--radius-blob-1);
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    animation: blobMorph2 12s ease-in-out infinite;
}

.blob-faq-1 {
    width: 380px;
    height: 380px;
    background: var(--color-accent);
    border-radius: var(--radius-blob-4);
    top: 20%;
    right: -120px;
    animation: blobMorph3 14s ease-in-out infinite;
}

.blob-contact-1 {
    width: 500px;
    height: 500px;
    background: var(--color-primary);
    border-radius: var(--radius-blob-2);
    top: -150px;
    left: -200px;
    animation: blobMorph1 13s ease-in-out infinite;
}

.blob-contact-2 {
    width: 350px;
    height: 350px;
    background: var(--color-accent);
    border-radius: var(--radius-blob-3);
    bottom: -100px;
    right: -100px;
    animation: blobMorph2 16s ease-in-out infinite;
}

@keyframes blobMorph1 {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25% { border-radius: 58% 42% 56% 44% / 48% 60% 40% 52%; }
    50% { border-radius: 50% 50% 34% 66% / 56% 36% 64% 44%; }
    75% { border-radius: 42% 58% 64% 36% / 34% 52% 48% 66%; }
}

@keyframes blobMorph2 {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    33% { border-radius: 40% 60% 50% 50% / 40% 50% 50% 60%; }
    66% { border-radius: 50% 50% 40% 60% / 55% 45% 55% 45%; }
}

@keyframes blobMorph3 {
    0%, 100% { border-radius: 40% 60% 60% 40% / 50% 40% 60% 50%; }
    50% { border-radius: 55% 45% 45% 55% / 45% 55% 45% 55%; }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0; }
}

@keyframes scrollDown {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.5; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border-radius: var(--radius-pill);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 4px 16px rgba(45, 106, 79, 0.3);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: var(--color-white);
    box-shadow: 0 6px 24px rgba(45, 106, 79, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* --- Header / Navigation --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(250, 248, 245, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all var(--transition-smooth);
    border-bottom: 1px solid rgba(45, 106, 79, 0.05);
}

.main-header.scrolled {
    background: rgba(250, 248, 245, 0.95);
    box-shadow: 0 2px 20px rgba(45, 106, 79, 0.08);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    z-index: 1001;
}

.nav-logo-img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-blob-1);
    object-fit: cover;
    transition: border-radius 1s ease;
}

.nav-logo:hover .nav-logo-img {
    border-radius: var(--radius-blob-2);
}

.nav-logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary-dark);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links li a {
    display: block;
    padding: 10px 18px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    border-radius: var(--radius-pill);
    transition: all var(--transition-fast);
}

.nav-links li a:hover {
    color: var(--color-primary);
    background: rgba(45, 106, 79, 0.06);
}

.nav-cta {
    background: var(--color-primary) !important;
    color: var(--color-white) !important;
    padding: 10px 24px !important;
    box-shadow: 0 2px 12px rgba(45, 106, 79, 0.2);
}

.nav-cta:hover {
    background: var(--color-primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(45, 106, 79, 0.3);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle-bar {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--color-primary-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.nav-toggle.active .nav-toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.active .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .nav-toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--header-height) + 40px) 0 60px;
    overflow: hidden;
    background: linear-gradient(170deg, var(--color-cream) 0%, var(--color-secondary) 50%, rgba(45, 106, 79, 0.03) 100%);
}

.hero-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    animation: fadeInLeft 0.8s ease forwards;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(45, 106, 79, 0.08);
    color: var(--color-primary);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    margin-bottom: 24px;
    border: 1px solid rgba(45, 106, 79, 0.12);
}

.hero-title {
    margin-bottom: 20px;
    color: var(--color-primary-dark);
    letter-spacing: -0.5px;
}

.text-accent {
    color: var(--color-accent);
    position: relative;
}

.hero-subtitle {
    font-size: 1.15rem;
    margin-bottom: 36px;
    max-width: 520px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

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

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.stat-suffix {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.hero-image {
    position: relative;
    animation: fadeInRight 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-image-blob {
    position: relative;
    border-radius: var(--radius-blob-1);
    overflow: hidden;
    box-shadow: var(--shadow-large);
    animation: blobMorph1 12s ease-in-out infinite;
    transition: border-radius 12s ease-in-out;
}

.hero-screenshot {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.hero-floating-card {
    position: absolute;
    background: var(--color-white);
    padding: 12px 20px;
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary-dark);
}

.hero-float-1 {
    top: -20px;
    right: -20px;
    animation: float 4s ease-in-out infinite;
}

.hero-float-2 {
    bottom: 30px;
    left: -30px;
    animation: floatSlow 5s ease-in-out infinite;
}

.float-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(45, 106, 79, 0.1);
    border-radius: 50%;
    color: var(--color-primary);
    font-weight: 700;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    animation: fadeIn 1s ease 1s forwards;
    opacity: 0;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--color-text-muted);
    border-bottom: 2px solid var(--color-text-muted);
    transform: rotate(45deg);
    animation: scrollDown 2s ease-in-out infinite;
}

/* --- Ticker Section --- */
.ticker-section {
    background: var(--color-primary);
    padding: 16px 0;
    overflow: hidden;
    position: relative;
}

.ticker-wrapper {
    overflow: hidden;
    width: 100%;
}

.ticker-track {
    display: flex;
    gap: 0;
    animation: tickerScroll 30s linear infinite;
    white-space: nowrap;
    width: max-content;
}

.ticker-item {
    display: inline-block;
    padding: 0 32px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-white);
    white-space: nowrap;
}

/* --- Section Headers --- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(45, 106, 79, 0.08);
    color: var(--color-primary);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    margin-bottom: 16px;
}

.section-desc {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* --- About Section --- */
.about-section {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}

.about-grid {
    display: grid;
    gap: 40px;
}

.about-card-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    background: var(--color-white);
    padding: 40px;
    border-radius: var(--radius-softer);
    box-shadow: var(--shadow-soft);
}

.about-card-image {
    border-radius: var(--radius-blob-2);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    animation: blobMorph2 14s ease-in-out infinite;
}

.about-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.about-card-content h3 {
    margin-bottom: 16px;
}

.about-card-content p {
    line-height: 1.8;
}

.about-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.value-card {
    background: var(--color-white);
    padding: 32px 28px;
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-card);
    text-align: center;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-primary);
    border-radius: 0 0 var(--radius-soft) var(--radius-soft);
    transform: scaleX(0);
    transition: transform var(--transition-smooth);
}

.value-card:hover::before {
    transform: scaleX(1);
}

.value-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-medium);
}

.value-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(45, 106, 79, 0.08);
    color: var(--color-primary);
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: var(--radius-blob-1);
    margin-bottom: 16px;
    transition: border-radius 1s ease;
}

.value-card:hover .value-icon {
    border-radius: var(--radius-blob-3);
    background: rgba(45, 106, 79, 0.12);
}

.value-card h4 {
    margin-bottom: 8px;
}

.value-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* --- Features Section --- */
.features-section {
    position: relative;
    padding: 100px 0;
    background: var(--color-secondary);
    overflow: hidden;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--color-white);
    padding: 36px 30px;
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-medium);
}

.feature-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(45, 106, 79, 0.08);
    line-height: 1;
    margin-bottom: 16px;
}

.feature-card h3 {
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.feature-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.feature-large {
    grid-column: span 2;
    grid-row: span 2;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--color-primary);
    color: var(--color-white);
}

.feature-large h3 {
    color: var(--color-white);
    font-size: 1.6rem;
}

.feature-large p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
    max-width: 400px;
}

.feature-large .feature-number {
    color: rgba(255, 255, 255, 0.15);
    font-size: 4rem;
}

.feature-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.feature-blob-inner {
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-blob-1);
    animation: blobMorph1 8s ease-in-out infinite;
}

.feature-accent {
    background: var(--color-accent);
    color: var(--color-white);
}

.feature-accent h3 {
    color: var(--color-white);
}

.feature-accent p {
    color: rgba(255, 255, 255, 0.85);
}

.feature-accent .feature-number {
    color: rgba(255, 255, 255, 0.15);
}

/* --- Gallery Section --- */
.gallery-section {
    padding: 100px 0;
    overflow: hidden;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-soft);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-large);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 16/10;
    transition: transform var(--transition-smooth);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(27, 67, 50, 0.8));
    opacity: 0;
    transition: opacity var(--transition-smooth);
    display: flex;
    align-items: flex-end;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: var(--color-white);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
}

.gallery-item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item-large img {
    aspect-ratio: auto;
    min-height: 100%;
}

.gallery-item-wide {
    grid-column: span 2;
}

/* --- Testimonials Section --- */
.testimonials-section {
    position: relative;
    padding: 100px 0;
    background: var(--color-secondary);
    overflow: hidden;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: start;
}

.testimonial-card {
    background: var(--color-white);
    padding: 36px 32px;
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-smooth);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.testimonial-featured {
    background: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.04);
}

.testimonial-featured:hover {
    transform: scale(1.04) translateY(-4px);
}

.testimonial-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.testimonial-stars span {
    color: #f0a500;
    font-size: 1.2rem;
}

.testimonial-featured .testimonial-stars span {
    color: #ffd166;
}

.testimonial-text {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-featured .testimonial-text {
    color: rgba(255, 255, 255, 0.9);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-blob-1);
    background: rgba(45, 106, 79, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-primary);
    animation: blobMorph3 10s ease-in-out infinite;
}

.testimonial-featured .author-avatar {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
}

.author-info strong {
    display: block;
    font-size: 0.95rem;
}

.testimonial-featured .author-info strong {
    color: var(--color-white);
}

.author-info span {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.testimonial-featured .author-info span {
    color: rgba(255, 255, 255, 0.6);
}

/* --- Activity Section --- */
.activity-section {
    padding: 24px 0;
    background: var(--color-cream);
}

.activity-bar {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    padding: 20px 32px;
    background: var(--color-white);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-soft);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.activity-pulse {
    width: 10px;
    height: 10px;
    background: var(--color-success);
    border-radius: 50%;
    position: relative;
}

.activity-pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

/* --- FAQ Section --- */
.faq-section {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--color-white);
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: box-shadow var(--transition-smooth);
}

.faq-item:hover {
    box-shadow: var(--shadow-soft);
}

.faq-item.active {
    box-shadow: var(--shadow-medium);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    text-align: left;
    transition: all var(--transition-fast);
}

.faq-question:hover {
    color: var(--color-primary);
}

.faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(45, 106, 79, 0.08);
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--color-primary);
    transition: all var(--transition-smooth);
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    background: var(--color-primary);
    color: var(--color-white);
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-answer p {
    padding: 0 28px 22px;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 0;
}

.faq-answer a {
    color: var(--color-accent);
    text-decoration: underline;
}

/* --- Contact Section --- */
.contact-section {
    position: relative;
    padding: 100px 0;
    background: var(--color-secondary);
    overflow: hidden;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    position: relative;
    z-index: 1;
}

.contact-info {
    padding-top: 20px;
}

.contact-info .section-title {
    text-align: left;
    margin-bottom: 20px;
}

.contact-info > p {
    font-size: 1.05rem;
    margin-bottom: 32px;
    line-height: 1.8;
}

.contact-benefits {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 40px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--color-text);
}

.benefit-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.contact-details {
    padding: 24px 28px;
    background: var(--color-white);
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-card);
}

.contact-details h4 {
    margin-bottom: 12px;
}

.contact-details p {
    font-size: 0.9rem;
    margin-bottom: 6px;
}

/* --- Signup Form --- */
.contact-form-wrapper {
    background: var(--color-white);
    padding: 44px 40px;
    border-radius: var(--radius-softer);
    box-shadow: var(--shadow-medium);
}

.signup-form h3 {
    margin-bottom: 28px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 14px 20px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-cream);
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    transition: all var(--transition-fast);
    outline: none;
}

.form-group input:focus {
    border-color: var(--color-primary);
    background: var(--color-white);
    box-shadow: 0 0 0 4px rgba(45, 106, 79, 0.08);
}

.form-group input.error {
    border-color: var(--color-error);
}

.form-error {
    display: block;
    font-size: 0.8rem;
    color: var(--color-error);
    margin-top: 6px;
    min-height: 18px;
}

.form-checkbox {
    display: flex;
    flex-direction: column;
}

.form-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.88rem;
    line-height: 1.5;
}

.form-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
    cursor: pointer;
}

.form-checkbox a {
    color: var(--color-accent);
    text-decoration: underline;
}

.form-message {
    margin-top: 16px;
    padding: 14px 20px;
    border-radius: var(--radius-soft);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

.form-message.success {
    background: rgba(64, 145, 108, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(64, 145, 108, 0.2);
}

.form-message.error {
    background: rgba(201, 96, 74, 0.1);
    color: var(--color-error);
    border: 1px solid rgba(201, 96, 74, 0.2);
}

/* --- Trust Section --- */
.trust-section {
    padding: 80px 0;
    background: var(--color-cream);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.trust-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--color-white);
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-smooth);
}

.trust-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(45, 106, 79, 0.08);
    color: var(--color-primary);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: var(--radius-blob-2);
    margin-bottom: 16px;
    transition: border-radius 1s ease;
}

.trust-card:hover .trust-icon {
    border-radius: var(--radius-blob-4);
}

.trust-card h4 {
    margin-bottom: 8px;
}

.trust-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* --- Footer --- */
.main-footer {
    background: var(--color-primary-dark);
    color: var(--color-white);
    padding: 80px 0 0;
    position: relative;
}

.footer-wave {
    position: absolute;
    top: -40px;
    left: 0;
    width: 100%;
    height: 40px;
    background: var(--color-cream);
    border-radius: 0 0 50% 50%;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 16px;
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-blob-1);
    object-fit: cover;
}

.footer-logo span {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-white);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    max-width: 320px;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.social-link:hover {
    background: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-2px);
}

.footer-links-col h4 {
    color: var(--color-white);
    font-size: 1rem;
    margin-bottom: 20px;
}

.footer-links-col ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links-col ul li {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links-col ul li a {
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition-fast);
}

.footer-links-col ul li a:hover {
    color: var(--color-accent-light);
}

.footer-address {
    margin-top: 24px;
}

.footer-address h4 {
    color: var(--color-white);
    font-size: 1rem;
    margin-bottom: 10px;
}

.footer-address address {
    font-style: normal;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.footer-bottom {
    padding: 28px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.footer-responsible {
    font-size: 0.8rem !important;
    color: rgba(255, 255, 255, 0.35) !important;
}

/* --- Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--color-white);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    z-index: 10000;
    padding: 20px 24px;
    border-radius: var(--radius-soft) var(--radius-soft) 0 0;
    animation: fadeInUp 0.5s ease forwards;
}

.cookie-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 280px;
}

.cookie-icon-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(45, 106, 79, 0.1);
    color: var(--color-primary);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.cookie-text p {
    font-size: 0.88rem;
    color: var(--color-text-light);
    margin-bottom: 0;
    line-height: 1.5;
}

.cookie-text a {
    color: var(--color-accent);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-cookie-accept {
    padding: 10px 24px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.btn-cookie-accept:hover {
    background: var(--color-primary-dark);
}

.btn-cookie-reject {
    padding: 10px 24px;
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-secondary-dark);
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-cookie-reject:hover {
    border-color: var(--color-text);
}

.btn-cookie-settings {
    padding: 10px 24px;
    background: transparent;
    color: var(--color-text-muted);
    border: none;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    transition: color var(--transition-fast);
}

.btn-cookie-settings:hover {
    color: var(--color-text);
}

.cookie-settings-panel {
    max-width: var(--container-max);
    margin: 16px auto 0;
    padding: 20px;
    background: var(--color-cream);
    border-radius: var(--radius-soft);
}

.cookie-setting-item {
    margin-bottom: 12px;
}

.cookie-setting-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    cursor: pointer;
}

.cookie-setting-item input[type="checkbox"] {
    accent-color: var(--color-primary);
    width: 18px;
    height: 18px;
}

.cookie-settings-panel .btn-cookie-accept {
    margin-top: 12px;
}

/* --- Legal Pages --- */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: calc(var(--header-height) + 60px) 24px 80px;
}

.legal-content h1 {
    margin-bottom: 12px;
}

.legal-content .legal-date {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 48px;
    margin-bottom: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--color-secondary-dark);
}

.legal-content h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.legal-content h3 {
    font-size: 1.2rem;
    margin-top: 32px;
    margin-bottom: 12px;
}

.legal-content p {
    margin-bottom: 16px;
    line-height: 1.8;
}

.legal-content ul,
.legal-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.legal-content li {
    margin-bottom: 8px;
    line-height: 1.7;
    color: var(--color-text-light);
    list-style: disc;
}

.legal-content ol li {
    list-style: decimal;
}

.legal-content a {
    color: var(--color-accent);
    text-decoration: underline;
}

.legal-content .legal-box {
    background: var(--color-secondary);
    padding: 24px 28px;
    border-radius: var(--radius-soft);
    margin: 24px 0;
    border-left: 4px solid var(--color-primary);
}

.legal-content .legal-box p {
    margin-bottom: 8px;
}

.legal-content .legal-box p:last-child {
    margin-bottom: 0;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-subtitle {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image {
        max-width: 500px;
        margin: 0 auto;
        opacity: 1;
        animation: fadeInUp 0.8s ease 0.3s forwards;
    }

    .hero-float-1 {
        right: 0;
    }

    .hero-float-2 {
        left: 0;
    }

    .about-card-main {
        grid-template-columns: 1fr;
    }

    .about-values {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item-large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .gallery-item-wide {
        grid-column: span 2;
    }

    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials-grid .testimonial-card:last-child {
        grid-column: span 2;
        max-width: 50%;
        justify-self: center;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 360px;
        height: 100vh;
        background: var(--color-cream);
        flex-direction: column;
        padding: calc(var(--header-height) + 20px) 32px 32px;
        gap: 4px;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.1);
        transition: right 0.4s ease;
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li a {
        padding: 14px 20px;
        font-size: 1.05rem;
    }

    .hero-section {
        min-height: auto;
        padding: calc(var(--header-height) + 40px) 0 40px;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-number, .stat-suffix {
        font-size: 1.5rem;
    }

    .about-values {
        grid-template-columns: 1fr;
    }

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

    .feature-large {
        grid-column: span 1;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item-large,
    .gallery-item-wide {
        grid-column: span 1;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid .testimonial-card:last-child {
        grid-column: span 1;
        max-width: 100%;
    }

    .testimonial-featured {
        transform: none;
    }

    .testimonial-featured:hover {
        transform: translateY(-4px);
    }

    .activity-bar {
        flex-direction: column;
        gap: 12px;
        border-radius: var(--radius-soft);
        text-align: center;
    }

    .activity-item {
        justify-content: center;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .contact-form-wrapper {
        padding: 32px 24px;
    }

    .about-card-main {
        padding: 28px 24px;
    }

    .cookie-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-floating-card {
        display: none;
    }

    .blob {
        display: none;
    }

    .section-header {
        margin-bottom: 40px;
    }
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .blob {
        animation: none !important;
    }

    .hero-image-blob {
        animation: none !important;
    }

    .ticker-track {
        animation: none !important;
    }
}

:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Print Styles --- */
@media print {
    .main-header,
    .cookie-banner,
    .hero-scroll-indicator,
    .blob,
    .ticker-section {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }
}
