/* =========================
   GLOBAL
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green: #1f7a4d;
    --green-dark: #145236;
    --green-light: #dff4e8;
    --cream: #f7f5ec;
    --white: #ffffff;
    --text: #19352a;
    --muted: #718078;
    --orange: #f29b38;
    --border: #dfe7e1;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "DM Sans", sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.6;
}


/* =========================
   NAVBAR
========================= */

.navbar {
    height: 78px;
    padding: 0 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--green-light);
    font-size: 23px;
}

.logo h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 20px;
    line-height: 1;
}

.logo span {
    font-size: 11px;
    color: var(--muted);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.streak {
    padding: 9px 14px;
    border-radius: 30px;
    background: #fff4df;
    font-size: 13px;
    font-weight: 600;
}

.profile-btn {
    border: none;
    background: var(--green-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}


/* =========================
   HERO
========================= */

.hero {
    min-height: 550px;
    padding: 70px 7%;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            #e5f4e9,
            #f7f5ec
        );
}

.hero-content {
    width: 52%;
    position: relative;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 7px 13px;
    border-radius: 20px;
    background: white;
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 18px;
}

.hero h1 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(48px, 6vw, 82px);
    line-height: 0.98;
    max-width: 700px;
    letter-spacing: -3px;
}

.hero h1 span {
    color: var(--green);
}

.hero p {
    margin: 25px 0;
    max-width: 570px;
    color: var(--muted);
    font-size: 17px;
}

.primary-btn,
.secondary-btn,
.complete-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    transition: 0.25s;
}

.primary-btn {
    background: var(--green);
    color: white;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: 15px;
    box-shadow: 0 8px 20px rgba(31,122,77,0.18);
}

.primary-btn:hover {
    transform: translateY(-2px);
    background: var(--green-dark);
}

.secondary-btn {
    background: var(--green-light);
    color: var(--green-dark);
    padding: 12px 17px;
    border-radius: 10px;
}

.secondary-btn:hover {
    background: #ccebd9;
}


/* =========================
   HERO ART
========================= */

.hero-art {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 50%;
    height: 100%;
}

.sun {
    position: absolute;
    width: 130px;
    height: 130px;
    background: #ffd47b;
    border-radius: 50%;
    top: 80px;
    right: 25%;
}

.mountain {
    position: absolute;
    bottom: -100px;
    width: 0;
    height: 0;
    border-left: 250px solid transparent;
    border-right: 250px solid transparent;
    border-bottom: 350px solid #b8d8c3;
}

.mountain-back {
    right: 10%;
}

.mountain-front {
    right: 35%;
    border-bottom-color: #7eb491;
    transform: scale(0.8);
}

.tree {
    position: absolute;
    font-size: 80px;
    bottom: 30px;
}

.tree-one {
    right: 7%;
}

.tree-two {
    right: 30%;
    bottom: 50px;
    font-size: 65px;
}

.tree-three {
    right: 46%;
    bottom: 10px;
    font-size: 55px;
}


/* =========================
   DASHBOARD
========================= */

.dashboard {
    padding: 65px 7%;
    background: white;
}

.section-title,
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.small-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--green);
    letter-spacing: 1.5px;
}

h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 30px;
    line-height: 1.2;
}

.xp-box {
    background: var(--green-light);
    padding: 12px 18px;
    border-radius: 12px;
    text-align: center;
}

.xp-box span {
    display: block;
    font-size: 10px;
    color: var(--green);
    font-weight: 700;
}

.xp-box strong {
    font-size: 25px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.stat-card {
    border: 1px solid var(--border);
    border-radius: 17px;
    padding: 23px;
    background: #fcfdfc;
}

.stat-icon {
    font-size: 26px;
    margin-bottom: 15px;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.stat-card strong {
    display: block;
    margin-top: 3px;
    font-size: 25px;
}


/* =========================
   MAIN SECTIONS
========================= */

.main-section {
    padding: 75px 7%;
}

.section-heading p {
    color: var(--muted);
    margin-top: 5px;
}


/* =========================
   CHALLENGE
========================= */

.challenge-card {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.challenge-image {
    min-height: 300px;
    display: grid;
    place-items: center;
    font-size: 130px;
    background:
        linear-gradient(
            145deg,
            #dff4e8,
            #9ac9a9
        );
}

.challenge-content {
    padding: 45px;
}

.challenge-tag,
.ai-label {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--green-light);
    color: var(--green);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.challenge-content h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 34px;
    margin: 15px 0 10px;
}

.challenge-content p {
    color: var(--muted);
    max-width: 500px;
}

.challenge-meta {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    font-size: 13px;
    font-weight: 600;
}

.complete-btn {
    background: var(--green);
    color: white;
    padding: 13px 18px;
    border-radius: 10px;
}


/* =========================
   SCANNER
========================= */

.scanner {
    background: white;
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
}

.upload-area {
    min-height: 330px;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    padding: 40px;
    border: 2px dashed #b9cfc1;
    margin: 20px;
    border-radius: 18px;
}

.upload-icon {
    font-size: 55px;
    margin-bottom: 10px;
}

.upload-area h3 {
    font-size: 24px;
}

.upload-area p {
    color: var(--muted);
    margin: 5px 0 20px;
}

.upload-btn {
    display: inline-block;
    padding: 12px 20px;
    background: var(--green);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

.preview-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

.preview-area img {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover;
}

.scan-result {
    padding: 45px;
}

.scan-result h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 32px;
    margin: 15px 0 8px;
}

.scan-result p {
    color: var(--muted);
}

.confidence {
    margin: 25px 0;
    padding: 15px;
    background: var(--green-light);
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
}


/* =========================
   PHONE DOWN
========================= */

.phone-section {
    padding: 100px 7%;
    background: var(--green-dark);
    color: white;
    text-align: center;
}

.phone-content {
    max-width: 650px;
    margin: auto;
}

.phone-icon {
    font-size: 55px;
    margin-bottom: 15px;
}

.phone-section .small-label {
    color: #9ee0b9;
}

.phone-section h2 {
    font-size: 45px;
    margin: 10px 0;
}

.phone-section p {
    color: #c9dfd2;
    max-width: 550px;
    margin: auto;
}

.timer {
    font-family: "Space Grotesk", sans-serif;
    font-size: 80px;
    margin: 25px 0;
    font-weight: 700;
}


/* =========================
   PROGRESS
========================= */

.level {
    background: var(--green-light);
    padding: 10px 15px;
    border-radius: 10px;
}

.progress-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 25px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e8eee9;
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--green);
    border-radius: 20px;
    transition: width 0.5s;
}

.achievements {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.achievement {
    padding: 25px;
    border-radius: 15px;
    background: white;
    border: 1px solid var(--border);
    text-align: center;
}

.achievement div {
    font-size: 35px;
    margin-bottom: 8px;
}

.achievement span {
    font-size: 13px;
    font-weight: 700;
}

.locked {
    filter: grayscale(1);
    opacity: 0.45;
}


/* =========================
   FOOTER
========================= */

footer {
    padding: 45px 7%;
    background: #102b20;
    color: white;
    text-align: center;
}

.footer-logo {
    font-family: "Space Grotesk", sans-serif;
    font-size: 22px;
    font-weight: 700;
}

footer p {
    color: #b7c9bf;
    margin: 8px 0;
}

footer span {
    font-size: 12px;
    color: #7f9a8c;
}


/* =========================
   MODAL
========================= */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: grid;
    place-items: center;
    z-index: 999;
    padding: 20px;
}

.modal-content {
    position: relative;
    background: white;
    width: 100%;
    max-width: 400px;
    padding: 35px;
    border-radius: 22px;
    text-align: center;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 12px;
    border: none;
    background: none;
    font-size: 30px;
    cursor: pointer;
}

.profile-avatar {
    width: 75px;
    height: 75px;
    display: grid;
    place-items: center;
    margin: auto;
    border-radius: 50%;
    background: var(--green-light);
    font-size: 35px;
}

.profile-stat {
    margin-top: 15px;
    padding: 12px;
    background: #f7faf8;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
}

.hidden {
    display: none !important;
}


/* =========================
   RESPONSIVE
========================= */

@media(max-width: 850px) {

    .hero {
        min-height: 650px;
    }

    .hero-content {
        width: 100%;
    }

    .hero-art {
        opacity: 0.25;
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .challenge-card {
        grid-template-columns: 1fr;
    }

    .preview-area {
        grid-template-columns: 1fr;
    }

    .achievements {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media(max-width: 550px) {

    .navbar {
        padding: 0 5%;
    }

    .streak {
        display: none;
    }

    .hero,
    .dashboard,
    .main-section {
        padding-left: 5%;
        padding-right: 5%;
    }

    .hero h1 {
        font-size: 50px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .challenge-content {
        padding: 30px;
    }

    .achievements {
        grid-template-columns: 1fr 1fr;
    }

    .timer {
        font-size: 60px;
    }

}
