/* =========================================================
   ROOT
========================================================= */

:root {
    --background: #f7f8fc;
    --card: #ffffff;
    --text: #101828;
    --muted: #667085;
    --line: #e4e7ec;

    --brand: #635bff;
    --brand-dark: #5148d9;
    --brand-light: #eeecff;

    --good: #12b76a;
    --warning: #f79009;
    --bad: #f04438;

    --shadow:
        0 20px 60px rgba(16, 24, 40, 0.10);
}


/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;

    background:
        radial-gradient(
            circle at 50% -12%,
            #e9e7ff 0,
            #f7f8fc 38%
        );

    color: var(--text);

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.55;
}


a {
    color: inherit;
    text-decoration: none;
}


button,
input {
    font: inherit;
}


/* =========================================================
   CONTAINER
========================================================= */

.container {
    width: min(
        1120px,
        calc(100% - 28px)
    );

    margin-inline: auto;
}


/* =========================================================
   HEADER
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(255, 255, 255, 0.92);

    backdrop-filter: blur(16px);

    border-bottom:
        1px solid var(--line);
}


.header-inner {
    min-height: 70px;

    display: flex;
    align-items: center;

    gap: 28px;
}


.logo {
    font-size: 20px;
    font-weight: 950;

    letter-spacing: -0.04em;

    white-space: nowrap;
}


.logo span {
    color: var(--brand);
}


/* =========================================================
   MAIN NAV
========================================================= */

.main-nav {
    display: flex;
    align-items: center;

    gap: 8px;
}


.nav-link,
.nav-dropdown-toggle {
    border: 0;

    background: transparent;

    color: var(--muted);

    padding: 10px 12px;

    border-radius: 10px;

    cursor: pointer;

    font-size: 14px;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.nav-link:hover,
.nav-dropdown-toggle:hover {
    background: var(--brand-light);

    color: var(--brand-dark);
}


/* =========================================================
   DROPDOWN
========================================================= */

.nav-dropdown {
    position: relative;
}


.nav-dropdown-toggle {
    display: flex;
    align-items: center;

    gap: 6px;
}


.dropdown-arrow {
    font-size: 16px;

    transition:
        transform 0.2s ease;
}


/*
   Rotate arrow when dropdown is open
*/

.nav-dropdown.open
.nav-dropdown-toggle
.dropdown-arrow {
    transform: rotate(180deg);
}


/*
   Dropdown menu
*/

.nav-dropdown-menu {
    position: absolute;

    top: calc(100% + 10px);

    left: 0;

    width: 260px;

    padding: 8px;

    background: #ffffff;

    border:
        1px solid var(--line);

    border-radius: 16px;

    box-shadow:
        0 20px 50px
        rgba(16, 24, 40, 0.15);

    opacity: 0;

    visibility: hidden;

    transform:
        translateY(-6px);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}


/*
   OPEN STATE
*/

.nav-dropdown.open
.nav-dropdown-menu {
    opacity: 1;

    visibility: visible;

    transform:
        translateY(0);
}


/*
   Dropdown links
*/

.nav-dropdown-menu a {
    display: block;

    padding: 12px;

    border-radius: 10px;
}


.nav-dropdown-menu a:hover {
    background: var(--brand-light);
}


.nav-dropdown-menu strong {
    display: block;

    font-size: 14px;
}


.nav-dropdown-menu small {
    display: block;

    margin-top: 2px;

    color: var(--muted);

    font-size: 12px;
}


/* =========================================================
   MOBILE MENU
========================================================= */

.mobile-menu-button {
    display: none;

    margin-left: auto;

    border: 0;

    background: transparent;

    font-size: 24px;

    cursor: pointer;
}


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

.hero {
    text-align: center;

    padding-top: 70px;

    padding-bottom: 40px;
}


.hero-badge {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding: 7px 13px;

    border:
        1px solid #d9d6ff;

    background: #f0efff;

    color: var(--brand-dark);

    border-radius: 999px;

    font-size: 13px;

    font-weight: 850;
}


.hero h1 {
    max-width: 920px;

    margin:
        20px auto 18px;

    font-size:
        clamp(44px, 7vw, 74px);

    line-height: 0.98;

    letter-spacing: -0.06em;
}


.hero h1 span {
    background:
        linear-gradient(
            90deg,
            var(--brand),
            #8b5cf6
        );

    -webkit-background-clip: text;

    background-clip: text;

    color: transparent;
}


.hero-description {
    max-width: 760px;

    margin-inline: auto;

    color: var(--muted);

    font-size: 18px;
}


.privacy-note {
    margin-top: 12px;

    color: #7a8699;

    font-size: 13px;
}


/* =========================================================
   DOCTOR CARD
========================================================= */

.doctor-card {
    margin-top: 25px;

    padding: 12px;

    background:
        rgba(255, 255, 255, 0.94);

    border:
        1px solid var(--line);

    border-radius: 28px;

    box-shadow: var(--shadow);
}


/* =========================================================
   DROP ZONE
========================================================= */

.drop-zone {
    min-height: 330px;

    display: grid;

    place-items: center;

    padding: 35px;

    border:
        2px dashed #cbd5e1;

    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            #fbfcff,
            #f4f6fb
        );

    transition:
        0.2s ease;
}


.drop-zone.dragging {
    border-color: var(--brand);

    background: #f1f0ff;
}


.upload-icon {
    width: 70px;
    height: 70px;

    margin-inline: auto;
    margin-bottom: 16px;

    display: grid;
    place-items: center;

    border-radius: 22px;

    background: #ebe9ff;

    color: var(--brand);

    font-size: 30px;
}


.drop-zone h2 {
    margin: 0 0 8px;

    font-size: 25px;
}


.drop-zone p {
    max-width: 650px;

    margin:
        0 auto 20px;

    color: var(--muted);
}


.supported-formats {
    margin-top: 11px;

    color: #98a2b3;

    font-size: 12px;
}


/* =========================================================
   BUTTONS
========================================================= */

.primary-button,
.secondary-button {
    padding:
        12px 18px;

    border-radius: 12px;

    font-weight: 850;

    cursor: pointer;
}


.primary-button {
    border: 0;

    color: #ffffff;

    background: var(--brand);

    box-shadow:
        0 8px 18px
        rgba(99, 91, 255, 0.2);
}


.secondary-button {
    border:
        1px solid var(--line);

    background: #ffffff;

    color: var(--text);
}


/* =========================================================
   GOALS
========================================================= */

.goal-selector {
    max-width: 800px;

    margin:
        20px auto 0;
}


.goal-selector label {
    display: block;

    color: #7a8699;

    font-size: 12px;
}


.goal-buttons,
.profile-buttons,
.platform-buttons {
    display: flex;

    flex-wrap: wrap;

    justify-content: center;

    gap: 8px;

    margin-top: 9px;
}


.goal-button,
.profile-buttons button,
.platform-buttons button {
    padding:
        8px 12px;

    border:
        1px solid var(--line);

    border-radius: 999px;

    background: #ffffff;

    color: var(--muted);

    cursor: pointer;

    font-size: 12px;
}


.goal-button.active,
.profile-buttons button.active,
.platform-buttons button.active {
    border-color: #c9c5ff;

    background: var(--brand-light);

    color: var(--brand-dark);

    font-weight: 850;
}


/* =========================================================
   REPORT
========================================================= */

.image-report {
    display: none;

    padding: 18px;

    text-align: left;
}


.report-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;
}


.report-header h2 {
    margin: 0;
}


.health-score {
    width: 72px;
    height: 72px;

    position: relative;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        conic-gradient(
            var(--good) var(--score, 0%),
            #e8edf3 0
        );
}


.health-score::after {
    content: "";

    position: absolute;

    inset: 7px;

    border-radius: 50%;

    background: #ffffff;
}


.health-score strong {
    position: relative;

    z-index: 2;
}


/* =========================================================
   DIAGNOSIS
========================================================= */

.diagnosis-box {
    margin-top: 14px;

    padding: 18px;

    border:
        1px solid #ded9ff;

    border-radius: 18px;

    background: #f1efff;
}


.diagnosis-box strong {
    display: block;

    font-size: 17px;
}


.diagnosis-box span {
    display: block;

    margin-top: 4px;

    color: #5f5b82;
}


/* =========================================================
   CHECKS
========================================================= */

.image-checks {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 10px;

    margin-top: 14px;
}


.image-check {
    padding: 14px;

    border:
        1px solid var(--line);

    border-radius: 15px;

    background: #ffffff;
}


.check-top {
    display: flex;

    justify-content: space-between;

    gap: 10px;
}


.check-status {
    font-size: 11px;

    font-weight: 900;
}


.status-good {
    color: var(--good);
}


.status-warning {
    color: var(--warning);
}


.status-bad {
    color: var(--bad);
}


.image-check small {
    color: var(--muted);
}


/* =========================================================
   ACTION BUTTONS
========================================================= */

.action-buttons {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 14px;
}


/* =========================================================
   TOOL PANELS
========================================================= */

.tool-panel {
    display: none;

    margin-top: 15px;

    padding: 17px;

    border:
        1px solid var(--line);

    border-radius: 18px;

    background: #fbfcfe;
}


.tool-panel h3 {
    margin-top: 0;
}


.tool-panel p {
    color: var(--muted);

    font-size: 14px;
}


/* =========================================================
   SLIDER
========================================================= */

.quality-slider {
    display: grid;

    grid-template-columns:
        auto 1fr auto;

    align-items: center;

    gap: 10px;

    margin-top: 15px;
}


.quality-slider input {
    width: 100%;

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


/* =========================================================
   STATISTICS
========================================================= */

.statistics {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 10px;
}


.stat {
    padding:
        7px 10px;

    border:
        1px solid var(--line);

    border-radius: 9px;

    background: #ffffff;

    font-size: 12px;
}


/* =========================================================
   COMPARISON
========================================================= */

.comparison-panel {
    display: none;

    margin-top: 15px;
}


.comparison-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 12px;
}


.comparison-pane {
    padding: 10px;

    border:
        1px solid var(--line);

    border-radius: 15px;

    background: #f7f8fa;
}


.comparison-pane img {
    width: 100%;

    height: 250px;

    margin-top: 8px;

    object-fit: contain;

    border-radius: 10px;

    background: #ffffff;
}


.saving-message {
    margin-top: 10px;

    padding: 12px;

    border:
        1px solid #b7ebcc;

    border-radius: 12px;

    background: #ecfdf3;

    color: #087443;

    font-weight: 850;
}


/* =========================================================
   CROP
========================================================= */

.crop-layout {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 15px;

    margin-top: 15px;
}


.crop-stage {
    position: relative;

    min-height: 300px;

    display: grid;

    place-items: center;

    overflow: hidden;

    border-radius: 14px;

    background: #111111;
}


.crop-stage img {
    max-width: 100%;

    max-height: 420px;
}


.crop-frame {
    position: absolute;

    border:
        2px solid #ffffff;

    box-shadow:
        0 0 0 9999px
        rgba(0, 0, 0, 0.5);

    pointer-events: none;
}


.crop-information {
    padding: 20px;

    border:
        1px solid var(--line);

    border-radius: 20px;

    background: #ffffff;
}


/* =========================================================
   CONTENT SECTIONS
========================================================= */

.content-section {
    padding:
        70px 0;
}


.content-section h2 {
    margin: 0 0 10px;

    text-align: center;

    font-size: 33px;

    letter-spacing: -0.04em;
}


.section-intro {
    max-width: 720px;

    margin:
        0 auto 28px;

    text-align: center;

    color: var(--muted);
}


/* =========================================================
   INFO CARDS
========================================================= */

.three-columns {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 14px;
}


.info-card {
    padding: 20px;

    border:
        1px solid var(--line);

    border-radius: 18px;

    background: #ffffff;
}


.info-card p {
    color: var(--muted);

    font-size: 14px;
}


.step-number {
    color: var(--brand);

    font-size: 12px;

    font-weight: 850;
}


/* =========================================================
   TOOLS GRID
========================================================= */

.tools-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 12px;
}


.tool-card {
    padding: 18px;

    border:
        1px solid var(--line);

    border-radius: 16px;

    background: #ffffff;
}


.tool-card strong {
    display: block;
}


.tool-card span {
    color: var(--muted);

    font-size: 14px;
}


/* =========================================================
   FAQ
========================================================= */

.faq {
    max-width: 850px;

    margin-inline: auto;
}


.faq details {
    margin: 8px 0;

    padding:
        15px 17px;

    border:
        1px solid var(--line);

    border-radius: 13px;

    background: #ffffff;
}


.faq summary {
    cursor: pointer;

    font-weight: 750;
}


.faq p {
    color: var(--muted);
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    padding: 30px 0;

    border-top:
        1px solid var(--line);

    color: var(--muted);

    font-size: 13px;
}


.footer-inner {
    display: flex;

    justify-content: space-between;

    gap: 15px;

    flex-wrap: wrap;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {

    .main-nav {
        gap: 2px;
    }

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

}


@media (max-width: 760px) {

    .main-nav {
        display: none;
    }

    .mobile-menu-button {
        display: block;
    }

    .hero {
        padding-top: 48px;
    }

    .hero h1 {
        font-size: 47px;
    }

    .image-checks,
    .comparison-grid,
    .crop-layout,
    .three-columns {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 430px) {

    .container {
        width:
            calc(100% - 20px);
    }

    .hero h1 {
        font-size: 40px;
    }

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

}
