/* ============================================================
   Hero Section – Illustration + CTA
   ============================================================ */

/* SVG color variables – auto-adapt to theme */
:root {
    --hero-svg-dark: #2f2e43;
    --hero-svg-light: #ffffff;
}

[data-theme="dark"],
[data-theme="dim"] {
    --hero-svg-dark: #e2e2e2;
    --hero-svg-light: #2a2a3a;
}

.hero-main-section {
    width: 100%;
    padding: 80px 0;
}

.hero-inner {
    display: flex;
    align-items: center;
    gap: var(--font-60);
}

/* Left: SVG illustration */
.hero-illustration-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-svg {
    width: 100%;
    max-width: 480px;
    height: auto;
}

/* Right: Text */
.hero-text-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--font-20);
}

/* Live badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--font-10);
    background: rgba(var(--primary-color-rgb), 0.08);
    border: 1px solid rgba(var(--primary-color-rgb), 0.15);
    padding: var(--font-8) var(--font-16);
    border-radius: var(--radius-xl);
    font-size: var(--font-14);
    font-weight: var(--font-weight-semibold);
    color: var(--primary-color);
    width: fit-content;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: var(--radius-circle);
    flex-shrink: 0;
}

/* Headline */
.hero-heading {
    font-family: var(--fontH);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

/* Subtitle */
.hero-subtext {
    font-size: var(--font-18);
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
    margin: 0;
    max-width: 460px;
}

/* CTA buttons */
.hero-cta-group {
    display: flex;
    align-items: center;
    gap: var(--font-15);
    flex-wrap: wrap;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: var(--font-10);
    padding: var(--font-14) var(--font-28);
    border-radius: var(--radius-xl);
    font-size: var(--font-16);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-hero:hover {
    transform: translateY(-2px);
}

.btn-hero-outline {
    display: inline-flex;
    align-items: center;
    gap: var(--font-10);
    padding: var(--font-14) var(--font-28);
    border-radius: var(--radius-xl);
    font-size: var(--font-16);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    transition: all 0.2s ease;
}

.btn-hero-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Trust line */
.hero-trust {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-14);
    color: var(--text-muted);
    flex-wrap: wrap;
}

.hero-trust-dot {
    color: var(--border-color);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .hero-main-section {
        padding: 50px 0;
    }

    .hero-inner {
        flex-direction: column-reverse;
        gap: 30px;
        text-align: center;
    }

    .hero-illustration-wrap {
        width: 100%;
    }

    .hero-svg {
        max-width: 320px;
    }

    .hero-text-wrap {
        align-items: center;
    }

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

    .hero-cta-group {
        justify-content: center;
    }

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

@media (max-width: 480px) {
    .hero-main-section {
        padding: 30px 0 20px;
    }

    .btn-hero,
    .btn-hero-outline {
        padding: 12px 22px;
        font-size: var(--font-15);
    }

    .hero-heading {
        font-size: var(--font-36);
        line-height: var(--line-height-extra-tight);
        letter-spacing: -1px;
    }
}

/* ============================================================
   Features Section
   ============================================================ */
.features-section {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-family: var(--fontH);
    font-size: var(--font-32);
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: var(--font-weight-bold);
}

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--font-30);
    max-width: var(--contentW);
    margin: 0 auto;
}

.feature-card {
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    border: none;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-8px);
}

.feature-icon {
    width: var(--font-60);
    height: var(--font-60);
    border-radius: var(--radius-circle);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--font-25);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

.feature-title {
    font-family: var(--fontH);
    font-size: var(--font-24);
    margin-bottom: 15px;
    font-weight: var(--font-weight-bold);
    z-index: 2;
    position: relative;
}

.feature-desc {
    font-size: var(--font-15);
    line-height: var(--line-height-relaxed);
    margin: 0;
    z-index: 2;
    position: relative;
}

/* Specific Card Colors */
.feature-card-light-purple {
    background: var(--color-purple-light);
    color: var(--color-text-dark-card);
}

.feature-card-light-purple .feature-icon {
    background: var(--color-text-dark-card);
    color: var(--text-light);
}

.feature-card-light-purple .feature-desc {
    color: var(--color-text-muted-card);
}

.feature-card-deep-purple {
    background: var(--primary-color);
    color: var(--text-light);
}

.feature-card-deep-purple .feature-icon {
    background: rgba(var(--text-light-rgb), 0.2);
    color: var(--text-light);
}

.feature-card-deep-purple .feature-desc {
    color: rgba(var(--text-light-rgb), 0.85);
}

.feature-card-yellow {
    background: var(--color-yellow-accent);
    color: var(--color-text-dark-card);
}

.feature-card-yellow .feature-icon {
    background: var(--color-text-dark-card);
    color: var(--color-yellow-accent);
}

.feature-card-yellow .feature-desc {
    color: var(--color-text-muted-card);
}

/* Optional: Add playful shapes to backgrounds */
.feature-card::before,
.feature-card::after {
    content: '';
    position: absolute;
    z-index: 1;
    pointer-events: none;
    opacity: 0.2;
}

.feature-card-light-purple::before {
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    border-radius: var(--radius-circle);
    border: 20px solid var(--primary-color);
}

.feature-card-deep-purple::after {
    bottom: -30px;
    right: -10px;
    width: 150px;
    height: 100px;
    background: var(--color-purple-light);
    border-radius: 50px 50px 0 0;
    transform: rotate(-30deg);
}

.feature-card-yellow::before {
    top: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    background-image: radial-gradient(var(--color-text-dark-card) 20%, transparent 20%);
    background-size: 15px 15px;
    opacity: 0.15;
}

/* ============================================================
   How It Works Section
   ============================================================ */
.hiw-section {
    padding: 80px 0;
    background-color: var(--bg-primary);
}

.hiw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: var(--contentW);
    margin: 0 auto;
    position: relative;
}

.hiw-step {
    text-align: center;
    position: relative;
    padding: 20px;
}

.hiw-number {
    width: 60px;
    height: 60px;
    background: var(--color-purple-light);
    color: var(--primary-color);
    border-radius: 20px 20px 20px 5px;
    /* Playful leaf/blob shape */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fontH);
    font-size: var(--font-28);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--font-25);
    position: relative;
    z-index: 2;
    transform: rotate(-10deg);
}

/* Fix inner text rotation */
.hiw-number span {
    transform: rotate(10deg);
}

.hiw-title {
    font-family: var(--fontH);
    font-size: var(--font-22);
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: var(--font-weight-bold);
}

.hiw-desc {
    font-size: var(--font-15);
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
}

/* Dotted curved line connecting steps - Desktop */
@media (min-width: 896px) {
    .hiw-step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 45px;
        left: 60%;
        width: 80%;
        height: 40px;
        border-top: 3px dashed var(--color-purple-border);
        border-radius: 50% 50% 0 0;
        z-index: 1;
        opacity: 0.6;
    }

    .hiw-step:nth-child(even):not(:last-child)::after {
        top: 20px;
        border-top: none;
        border-bottom: 3px dashed var(--color-purple-border);
        border-radius: 0 0 50% 50%;
    }
}

/* Mobile curved dotted connecting lines */
@media (max-width: 896px) {
    .hiw-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hiw-number {
        width: 50px;
        height: 50px;
        font-size: var(--font-22);
        margin-bottom: 15px;
    }

    .hiw-title {
        font-size: var(--font-18);
        margin-bottom: 8px;
    }

    .hiw-step {
        padding: 40px 20px 60px;
    }

    .hiw-step:last-child {
        padding-bottom: 0;
    }

    .hiw-step:not(:last-child)::after {
        content: '';
        position: absolute;
        bottom: -30px;
        left: calc(50% - 30px);
        width: 60px;
        height: 120px;
        border-left: 3px dashed var(--color-purple-border);
        border-radius: 50% 0 0 50%;
        z-index: 1;
        opacity: 0.5;
    }

    .hiw-step:nth-child(even):not(:last-child)::after {
        left: 50%;
        border-left: none;
        border-right: 3px dashed var(--color-purple-border);
        border-radius: 0 50% 50% 0;
    }
}

/* ============================================================
   Community Stats Section
   ============================================================ */
.stats-section {
    color: var(--text-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: var(--contentW);
    margin: 0 auto;
    text-align: center;
}

.stat-card {
    padding: 20px;
}

.stat-number {
    font-family: var(--fontH);
    font-size: var(--font-48);
    font-weight: var(--font-weight-bold);
    margin-bottom: 10px;
}

.stat-label {
    font-size: var(--font-16);
    font-weight: var(--font-weight-medium);
    opacity: 0.9;
}

/* Responsive for new sections */
@media (max-width: 896px) {
    .section-header {
        margin-top: 0 !important;
        margin-bottom: 30px;
    }

    .hiw-section .section-header {
        margin-top: 30px !important;
    }

    .section-title {
        font-size: var(--font-24) !important;
        margin-top: 0 !important;
        margin-bottom: 10px;
    }

    .section-subtitle {
        font-size: var(--font-15);
        margin-bottom: 30px;
    }

    .features-section,
    .hiw-section,
    .stats-section {
        padding: 50px 0 !important;
    }

    .features-grid {
        gap: 20px;
    }

    .feature-card {
        padding: 30px 20px;
        border-radius: var(--radius-lg);
    }

    .feature-icon {
        margin-bottom: 20px;
        width: 50px;
        height: 50px;
    }

    .feature-icon svg {
        width: 24px;
        height: 24px;
    }

    .feature-title {
        font-size: var(--font-20);
        margin-bottom: 10px;
    }

    /* HIW grid handled in its main media query block */

    .stat-number {
        font-size: var(--font-32);
    }

    .stat-card {
        padding: 15px;
    }
}

/* ============================================================
   Text Highlights (Handwritten style)
   ============================================================ */
.text-hl-purple,
.text-hl-yellow {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 1.3em;
    position: relative;
    display: inline-block;
    line-height: 1;
    z-index: 1;
}

@media (max-width: 896px) {

    .text-hl-purple,
    .text-hl-yellow {
        font-size: 1.25em;
    }
}

.text-hl-purple {
    color: var(--primary-color);
    /* Purple matching the SVG */
}

.text-hl-yellow {
    color: var(--color-yellow-accent);
    /* Warm yellow */
}

/* Wavy underline for purple text */
.text-hl-purple::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: -2px;
    width: calc(100% + 4px);
    height: 12px;
    background-color: var(--primary-color);
    opacity: 0.15;
    z-index: -1;
    border-radius: 4px;
    transform: rotate(-1.5deg);
}

@media (max-width: 896px) {
    .text-hl-purple::after {
        height: 10px;
        bottom: -3px;
    }
}

/* Stroke underline for yellow text */
.text-hl-yellow::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: -4px;
    width: calc(100% + 8px);
    height: 14px;
    background-color: var(--color-yellow-accent);
    opacity: 0.25;
    z-index: -1;
    border-radius: var(--radius-sm);
    transform: rotate(1deg);
}

@media (max-width: 896px) {
    .text-hl-yellow::after {
        bottom: -3px;
        height: 12px;
    }
}

/* ============================================================
   FAQ Section - Scratch Build
   ============================================================ */
.faq-section {
    padding: 80px 0;
    background-color: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

/* Decorative background elements */
.faq-section::before,
.faq-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.12;
}

.faq-section::before {
    width: 250px;
    height: 250px;
    background: var(--primary-color);
    top: -80px;
    right: -80px;
}

.faq-section::after {
    width: 200px;
    height: 200px;
    background: var(--color-purple-accent);
    bottom: -60px;
    left: -60px;
}

.faq-container {
    max-width: 800px;
    margin: 30px auto 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.faq-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    overflow: hidden;
}

.faq-item:hover {
    border-color: rgba(var(--primary-color-rgb), 0.2);
}

.faq-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(var(--primary-color-rgb), 0.05);
}

.faq-head {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    user-select: none;
}

.faq-icon-box {
    width: 38px;
    height: 38px;
    background: var(--color-purple-light);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.faq-icon-box svg {
    width: 20px !important;
    height: 20px !important;
}

.faq-head h3 {
    margin: 0;
    font-size: var(--font-16);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    font-family: var(--fontH);
    flex: 1;
    line-height: 1.4;
}

.faq-plus {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-body {
    max-height: 500px;
}

.faq-content {
    padding: 0 22px 20px 75px;
    /* Aligned with text: icon(38) + gap(15) + start-padding(22) */
    color: var(--text-secondary);
    font-size: var(--font-15);
    line-height: 1.6;
}

/* ============================================================
   Alternating Section Backgrounds & Spacing
   ============================================================ */

/* Hero: White (Primary) */
.hero-main-section {
    background-color: var(--bg-primary);
    padding: 100px 0 80px;
}

/* How It Works: Light (Secondary) */
.hiw-section {
    padding: 100px 0;
    background-color: var(--bg-secondary);
}

/* Features: White (Primary) */
.features-section {
    padding: 100px 0;
    background-color: var(--bg-primary);
}

/* Safety Rules: Light (Secondary) */
.safety-section {
    padding: 100px 0;
    background-color: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

/* Community Stats: Solid Brand Color */
.stats-section {
    position: relative;
    overflow: hidden;
    background: var(--primary-color);
    padding: 100px 0;
}

/* FAQ: White (Primary) */
.faq-section {
    padding: 100px 0;
    background-color: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

/* Redefining Safety Rules section to be more inspired */
.safety-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.safety-card {
    padding: 40px 30px;
    background: var(--bg-primary);
    /* Stand out against secondary section bg */
    border-radius: var(--radius-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    overflow: hidden;
    z-index: 2;
    border: 1px solid var(--border-color);
}

.safety-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow);
}

.safety-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.safety-icon svg {
    width: 26px !important;
    height: 26px !important;
}

.safety-card h3 {
    margin: 0;
    font-size: var(--font-20);
    font-weight: var(--font-weight-bold);
    font-family: var(--fontH);
    color: var(--text-primary);
}

.safety-card p {
    margin: 0;
    font-size: var(--font-15);
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Card Variants */
.safety-card-1 {
    border-top: 4px solid #ef4444;
}

.safety-card-1 .safety-icon {
    background: #fdf2f2;
    color: #ef4444;
}

.safety-card-2 {
    border-top: 4px solid #0ea5e9;
}

.safety-card-2 .safety-icon {
    background: #f0f9ff;
    color: #0ea5e9;
}

.safety-card-3 {
    border-top: 4px solid #22c55e;
}

.safety-card-3 .safety-icon {
    background: #f0fdf4;
    color: #22c55e;
}

.safety-card-4 {
    border-top: 4px solid #a855f7;
}

.safety-card-4 .safety-icon {
    background: #faf5ff;
    color: #a855f7;
}

/* Decorative blobs for section */
.safety-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: var(--color-purple-light);
    border-radius: 50%;
    opacity: 0.3;
    z-index: 1;
}

@media (max-width: 768px) {

    .hero-main-section,
    .hiw-section,
    .features-section,
    .safety-section,
    .stats-section,
    .faq-section {
        padding: 60px 0;
    }

    .safety-grid {
        gap: 20px;
    }

    .safety-card {
        padding: 30px 25px;
    }
}