/*
 * Halaman Beranda
 * Navigasi: dasar, hero, navbar, konten utama, demo NER,
 * alur penggunaan, daftar tanaman, CTA, footer, dan responsif.
 */

/* 01. Variabel dan gaya dasar */

:root {
    --green-dark: #0a2f20;
    --green: #1e7448;
    --green-pale: #eef8f1;
    --text: #17251d;
    --white: #ffffff;
    --cream: #f7f8f2;
    --line: #dbe5dd;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    background: var(--cream);
    color: var(--text);
    font-family: "Inter", sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

button, input, textarea {
    font: inherit;
}

img {
    max-width: 100%;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 999;
    padding: 9px 14px;
    border-radius: 8px;
    background: var(--white);
    color: var(--green-dark);
    font-weight: 700;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

/* 02. Hero homepage */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--green);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    background: currentColor;
}

.header {
    background: var(--green);
    color: var(--white);
}

.header-inner {
    width: min(calc(100% - 40px), var(--container));
    min-height: 420px;
    margin: 0 auto;
    padding: 72px 0;
    display: flex;
    align-items: center;
}

.header-copy {
    max-width: 880px;
}

.header .eyebrow {
    color: #9de0b6;
}

.header h1 {
    margin: 18px 0 20px;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.header h1 span {
    color: #aee9c1;
}

.header-copy > p {
    max-width: 660px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1rem;
}

.header-actions {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.header-primary-action, .header-secondary-action {
    min-height: 46px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

.header-primary-action {
    background: #aee9c1;
    color: var(--green-dark);
}

.header-secondary-action {
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--white);
}

/* 03. Navigasi utama */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
}

.navbar-content {
    width: min(calc(100% - 40px), var(--container));
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    max-width: 430px;
    color: var(--green-dark);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.25;
}

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

.nav-links a {
    padding: 9px 14px;
    border-radius: 999px;
    color: #405248;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-links a:hover, .nav-links .nav-active {
    background: var(--green-pale);
    color: var(--green);
}

.nav-links .nav-cta {
    margin-left: 5px;
    padding-inline: 18px;
    background: var(--green-dark);
    color: var(--white);
}

.nav-links .nav-cta:hover {
    background: var(--green);
    color: var(--white);
}

/* 04. Responsif hero dan navigasi */

@media (max-width: 700px) {
    .navbar-content {
        width: 100%;
        min-height: auto;
        padding: 10px 14px;
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .navbar .brand {
        max-width: none;
        font-size: 0.7rem;
    }

    .nav-links {
        width: 100%;
        overflow-x: auto;
    }

}

@media (max-width: 520px) {
    .header-inner {
        width: min(calc(100% - 28px), var(--container));
    }

    .header-inner {
        min-height: auto;
        padding: 52px 0;
        text-align: center;
    }

    .eyebrow, .header-actions {
        justify-content: center;
    }

    .header h1 {
        font-size: 2.45rem;
    }

    .header-primary-action, .header-secondary-action {
        width: 100%;
        justify-content: center;
    }

}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

}

/* 05. Struktur dan heading konten utama */

:root {
    --muted: #617068;
    --radius: 20px;
    --shadow: 0 18px 45px rgba(16, 60, 40, 0.1);
}

.container {
    width: min(calc(100% - 40px), var(--container));
    margin: 0 auto;
    padding: 72px 0 30px;
}

.section {
    margin-bottom: 95px;
    scroll-margin-top: 90px;
}

.section-heading {
    margin-bottom: 32px;
    display: grid;
    grid-template-columns: 1fr 0.7fr;
    align-items: end;
    gap: 50px;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--green);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-kicker::before {
    content: "";
    width: 24px;
    height: 2px;
    background: currentColor;
}

.section-title {
    margin: 9px 0 0;
    color: var(--green-dark);
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

/* 06. Demo interaktif NER */

.home-story {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    align-items: center;
    gap: 70px;
}

.home-story-copy h2 {
    margin: 10px 0 22px;
    color: var(--green-dark);
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.home-story-copy p {
    margin: 0 0 17px;
    color: var(--muted);
    font-size: 0.92rem;
}

.text-link {
    display: inline-flex;
    gap: 8px;
    margin-top: 6px;
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

.home-entity-demo {
    padding: 32px;
    border: 1px solid #cfe4d6;
    border-radius: 28px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.home-demo-heading {
    padding-bottom: 18px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--line);
}

.home-demo-heading > div > span {
    color: var(--green);
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
}

.home-demo-heading h3 {
    margin: 3px 0 0;
    color: var(--green-dark);
    font-size: 1rem;
}

.home-demo-badge {
    align-self: flex-start;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--green-pale);
    color: var(--green);
    font-size: 0.6rem;
    font-weight: 800;
}

.home-demo-sentence {
    margin: 26px 0;
    color: #304238;
    font-size: 1.2rem;
    line-height: 2;
}

.home-demo-sentence mark {
    padding: 3px 6px;
    border-radius: 6px;
    transition: opacity 0.2s;
}

.home-demo-sentence mark[data-entity="HERB"] {
    background: #c7ebd1;
}

.home-demo-sentence mark[data-entity="COMPOUND"] {
    background: #fae9b7;
}

.home-demo-sentence mark[data-entity="DISEASE"] {
    background: #f8d6d6;
}

.home-demo-sentence mark[data-entity="POPULATION"] {
    background: #f8dfc2;
}

.home-demo-sentence mark.is-muted {
    opacity: 0.2;
}

.home-demo-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.home-demo-controls button {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--muted);
    cursor: pointer;
    font-size: 0.6rem;
    font-weight: 800;
}

.home-demo-controls button:hover, .home-demo-controls button.is-selected {
    border-color: var(--green-dark);
    background: var(--green-dark);
    color: var(--white);
}

.home-demo-description {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-left: 3px solid var(--green);
    background: var(--green-pale);
    color: var(--muted);
    font-size: 0.72rem;
}

/* 07. Alur penggunaan sistem */

.home-process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.home-process-grid article {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.home-process-grid article > span {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--green-dark);
    color: #c8f2d5;
    font-size: 0.63rem;
    font-weight: 800;
}

.home-process-grid h3 {
    margin: 28px 0 8px;
    color: var(--green-dark);
}

.home-process-grid p {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}

/* 08. Daftar tanaman penelitian */

.herbal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.herbal-card {
    min-height: 260px;
    padding: 25px;
    display: grid;
    grid-template-columns: 1fr 125px;
    align-content: start;
    gap: 0 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.card-topline {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-number {
    color: #9da9a1;
    font-size: 0.68rem;
    font-weight: 800;
}

.tag {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--green-pale);
    color: var(--green);
    font-size: 0.58rem;
    font-weight: 800;
}

.herbal-image-wrapper {
    grid-column: 2;
    grid-row: 2 / span 4;
    width: 125px;
    height: 125px;
    overflow: hidden;
    border-radius: 16px;
    background: var(--green-pale);
}

.herbal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.herbal-card h3 {
    margin: 0 0 8px;
    color: var(--green-dark);
    font-size: 1.3rem;
}

.herbal-card p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.8rem;
}

.latin-name {
    color: var(--green);
    font-size: 0.78rem;
    font-style: italic;
}

/* 09. Ajakan analisis */

.home-final-cta {
    padding: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    border-radius: 28px;
    background: var(--green-dark);
    color: var(--white);
}

.home-final-cta .section-kicker {
    color: #9de0b6;
}

.home-final-cta h2 {
    margin: 8px 0 10px;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.home-final-cta p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.84rem;
}

.home-final-cta > a {
    min-width: 190px;
    padding: 11px 17px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-radius: 999px;
    background: #aee9c1;
    color: var(--green-dark);
    font-size: 0.76rem;
    font-weight: 800;
    text-decoration: none;
}

/* 10. Footer */

.footer {
    padding: 44px 20px;
    background: var(--green-dark);
    color: var(--white);
}

.footer-inner {
    width: min(100%, var(--container));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.4fr auto;
    align-items: center;
    gap: 28px;
}

.footer-inner > div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.footer p, .footer small {
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.72rem;
}

/* 11. Responsif konten dan footer */

@media (max-width: 900px) {
    .home-story {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .footer small {
        grid-column: 1 / -1;
    }

}

@media (max-width: 700px) {
    .section-heading, .home-process-grid, .herbal-grid {
        grid-template-columns: 1fr;
    }

    .home-final-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-final-cta > a {
        width: 100%;
    }

}

@media (max-width: 520px) {
    .container {
        width: min(calc(100% - 28px), var(--container));
        padding-top: 52px;
    }

    .section {
        margin-bottom: 70px;
    }

    .home-entity-demo, .home-final-cta {
        padding: 24px;
        border-radius: 20px;
    }

    .home-demo-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .herbal-card {
        min-height: auto;
        grid-template-columns: 1fr 95px;
    }

    .herbal-image-wrapper {
        width: 95px;
        height: 95px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-inner > div {
        justify-content: center;
    }

    .footer small {
        grid-column: auto;
    }

}
