/* ================================================
   RACIKKOST — Design System
   
   Brand Identity:
   - Logo font: Rubik Bold (EXCLUSIVE to logo only)
   - Headings: Plus Jakarta Sans (clean, professional)
   - Body: Inter (highly readable)
   
   Color Harmony:
   All colors derive from the logo's teal-green family
   to maintain visual cohesion.
   ================================================ */

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

:root {
    /* 
       Palette derived from logo anchors:
       Logo dark teal: hsl(170, 42%, 17%)  → #1a3c40
       Logo green:     hsl(152, 69%, 45%)  → #24bf77
    */
    --brand: #24bf77;
    --brand-hover: #1eab6a;
    --brand-subtle: #e6f7ef;
    --brand-muted: #b2e5cd;

    --dark: #15322e;
    --dark-surface: #1b3f3a;

    --text: #1e3a36;
    --text-secondary: #4d706b;
    --text-muted: #7a9e99;

    --surface: #ffffff;
    --bg: #f4f7f6;
    --bg-alt: #eef2f1;
    --border: #d6e0de;

    --danger: #e74c3c;

    /* Typography */
    --font-logo: 'Rubik', sans-serif;
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --max-w: 1120px;
    --gap: 24px;
    --radius: 6px;
    --section-y: 96px;

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

.accent { color: var(--brand); }


/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 26px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.btn-primary {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.btn-primary:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(36, 191, 119, 0.2);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}

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

/* On dark backgrounds */
.btn-ghost-light {
    background: transparent;
    color: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.35);
}

.btn-ghost-light:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.08);
}


/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s var(--ease);
}

.navbar.scrolled {
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.04);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo { display: flex; align-items: center; }

.logo-img {
    height: 30px;
    width: auto;
}

/* Fallback text logo if image not loaded */
.logo-text {
    font-family: var(--font-logo);
    font-weight: 700;
    font-size: 22px;
    color: var(--dark);
    letter-spacing: -0.3px;
}

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

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 14px;
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: var(--radius);
    transition: all 0.2s var(--ease);
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg);
}

.nav-link.active {
    color: var(--brand);
    background: var(--brand-subtle);
    font-weight: 600;
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--dark);
    border-radius: 1px;
    transition: all 0.3s var(--ease);
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }


/* ========================================
   HERO
   ======================================== */
.hero {
    padding-top: 64px;
    background: var(--dark);
    position: relative;
    overflow: hidden;
}

/* Subtle grid pattern in background */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
    min-height: calc(100vh - 64px);
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.hero-label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 20px;
}

.hero-text h1 {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 16px;
    color: rgba(255,255,255,0.55);
    max-width: 440px;
    margin-bottom: 36px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 12px;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-img {
    max-width: 320px;
    opacity: 0.06;
    filter: brightness(10);
}


/* ========================================
   FEATURES
   ======================================== */
.features {
    padding: var(--section-y) 0;
    background: var(--surface);
}

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

.feature-card {
    padding: 36px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.25s var(--ease);
}

.feature-card:hover {
    border-color: var(--brand-muted);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(36, 191, 119, 0.06);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    background: var(--brand-subtle);
    border-radius: var(--radius);
    color: var(--brand);
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}


/* ========================================
   HOW IT WORKS
   ======================================== */
.how-it-works {
    padding: var(--section-y) 0;
    background: var(--bg);
}

.section-heading {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 48px;
}

.steps-grid {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.step-card {
    text-align: center;
    padding: 28px;
    flex: 1;
    max-width: 280px;
}

.step-number {
    font-family: var(--font-heading);
    font-size: 44px;
    font-weight: 800;
    color: var(--brand);
    opacity: 0.2;
    line-height: 1;
    margin-bottom: 14px;
}

.step-card h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

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

.step-divider {
    width: 40px;
    height: 1.5px;
    background: var(--border);
    margin-top: 72px;
    flex-shrink: 0;
}


/* ========================================
   CAROUSEL — Swiper Linear Marquee
   ======================================== */
.popular-section {
    padding: var(--section-y) 0;
    background: var(--surface);
}

.popular-swiper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: transparent;
    aspect-ratio: 16 / 7;
    /* Fading effect on the sides */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

/* Force linear transition for continuous scroll */
.popular-swiper .swiper-wrapper {
    transition-timing-function: linear !important;
}

.popular-swiper .swiper-slide {
    position: relative;
    width: 80vw;
    max-width: 400px;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
}

/* For multi-slide view on large screens, limit width if desired.
   Currently 100% width means 1 slide per view. Let's make it fixed width for a true marquee if preferred, or keep 100%. */
.popular-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 80px 40px 36px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
}

.caption-tag {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: var(--brand);
    padding: 3px 10px;
    border-radius: 3px;
    margin-bottom: 10px;
}

.slide-caption h3 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 6px;
}

.slide-caption p {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    max-width: 460px;
}


/* ========================================
   FAQ
   ======================================== */
.faq-section {
    padding: var(--section-y) 0;
    background: var(--bg);
}

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

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

.faq-item.open {
    border-color: var(--brand-muted);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    text-align: left;
    gap: 16px;
    transition: color 0.2s;
}

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

.faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    transition: transform 0.3s var(--ease), color 0.3s;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
    color: var(--brand);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease);
    padding: 0 20px;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 20px 18px;
}

.faq-answer p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 6px;
}

.faq-answer p:last-child { margin-bottom: 0; }


/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.6);
    padding: 64px 0 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 0.8fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.footer-logo-img {
    height: 28px;
    width: auto;
    margin-bottom: 14px;
}

.footer-brand p {
    font-size: 13px;
    max-width: 260px;
    margin-bottom: 18px;
    line-height: 1.6;
}

.footer-badges {
    display: flex;
    gap: 8px;
}

.footer-badges span {
    font-size: 11px;
    font-weight: 500;
    padding: 5px 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 18px;
}

.footer-col p {
    font-size: 13px;
    line-height: 1.7;
}

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

.footer-col ul a {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    transition: color 0.2s;
}

.footer-col ul a:hover { color: var(--brand); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    font-size: 12px;
    color: rgba(255,255,255,0.3);
}

.footer-bottom a {
    color: rgba(255,255,255,0.3);
    transition: color 0.2s;
}

.footer-bottom a:hover { color: var(--brand); }


/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
    :root { --section-y: 72px; }

    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        min-height: auto;
        padding: 64px 0;
    }
    .hero-desc { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-visual { display: none; }
    .hero-text h1 { font-size: 36px; }

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

    .steps-grid { flex-direction: column; align-items: center; }
    .step-divider { width: 1.5px; height: 24px; margin: 0; }

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

    .popular-swiper { aspect-ratio: 4 / 3; }
    .slide-caption h3 { font-size: 20px; }
}

@media (max-width: 640px) {
    :root { --section-y: 56px; }
    .section-heading { font-size: 22px; margin-bottom: 32px; }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 8px 16px;
        gap: 0;
    }
    .nav-links.open { display: flex; }
    .nav-link { width: 100%; padding: 12px; border-radius: 0; border-bottom: 1px solid var(--bg); }
    .nav-link:last-child { border-bottom: none; }
    .nav-toggle { display: flex; }

    .hero-text h1 { font-size: 28px; }
    .hero-desc { font-size: 14px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .btn { width: 100%; max-width: 280px; }

    .popular-swiper { aspect-ratio: 3 / 4; }
    .slide-caption { padding: 64px 20px 20px; }
    .slide-caption h3 { font-size: 18px; }

    .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}
