/* ===========================
   Canopi Landing Page
   Canopi design system — premium, earthy, angular
   =========================== */

:root {
    --forest:        #1B6B4A;
    --forest-deep:   #0F3D2A;
    --forest-soft:   #E6EFE9;
    --cream:         #F2ECDD;
    --cream-soft:    #F8F4E9;
    --paper:         #FBFAF5;
    --ink:           #1A2421;
    --slate:         #5C6660;
    --mist:          #9AA39C;
    --rule:          #D6D2C5;
    --rule-soft:     #E5E2D6;
    --good:          #1B6B4A;
    --caution:       #C8893D;
    --risk:          #A04432;
    --neutral:       #6B7563;

    --charcoal:      #2a2c28;

    --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--charcoal);
    color: var(--ink);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

/* ===========================
   Navigation
   =========================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--forest-deep);
    border-bottom: 1px solid rgba(242, 236, 221, 0.12);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.9rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.nav-brand .brand-icon {
    font-size: 1.15rem;
    color: var(--forest-soft);
    align-self: center;
}

.nav-brand .brand-logo {
    height: 26px;
    width: 26px;
    align-self: center;
}

.nav-brand .brand-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--cream);
    text-transform: uppercase;
    letter-spacing: 0.32em;
}

.nav-brand .brand-sub {
    font-size: 0.6rem;
    color: rgba(242, 236, 221, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-weight: 700;
}

.btn-login {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    padding: 0.65rem 1.4rem;
    border-radius: 0;
    border: 1px solid rgba(242, 236, 221, 0.45);
    background: transparent;
    color: var(--cream);
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.btn-login:hover {
    background: var(--cream);
    color: var(--forest-deep);
    border-color: var(--cream);
}

/* ===========================
   Login Modal
   =========================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(13, 22, 16, 0.72);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
    padding: 1.5rem;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: var(--paper);
    border-radius: 0;
    padding: 2.75rem 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);
    border-top: 4px solid var(--forest);
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 0.9rem;
    right: 1.1rem;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--mist);
    cursor: pointer;
    line-height: 1;
    transition: color 0.18s;
}

.modal-close:hover {
    color: var(--ink);
}

.modal-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.modal-icon {
    font-size: 1.6rem;
    color: var(--forest);
    margin-bottom: 0.9rem;
}

.modal-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
}

.modal-header p {
    color: var(--slate);
    font-size: 0.875rem;
    line-height: 1.55;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-group label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--slate);
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--rule);
    border-radius: 0;
    background: var(--cream-soft);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--ink);
    transition: border-color 0.18s, box-shadow 0.18s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--forest);
    box-shadow: 0 0 0 3px rgba(27, 107, 74, 0.12);
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem;
    background: var(--forest-deep);
    color: var(--cream);
    border: none;
    border-radius: 0;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: background 0.18s;
}

.btn-submit:hover {
    background: var(--forest);
}

.btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.submit-loader {
    width: 1.05rem;
    height: 1.05rem;
    border: 2px solid rgba(242, 236, 221, 0.3);
    border-radius: 50%;
    border-top-color: var(--cream);
    animation: spin 0.8s linear infinite;
}

.form-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--mist);
    line-height: 1.5;
}

.login-success {
    text-align: center;
    padding: 1rem 0;
}

.login-success i {
    font-size: 2.4rem;
    color: var(--forest);
    margin-bottom: 0.9rem;
}

.login-success h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.6rem;
}

.login-success p {
    color: var(--slate);
    font-size: 0.875rem;
    line-height: 1.55;
}

/* ===========================
   Hero
   =========================== */

.hero {
    position: relative;
    padding: 11rem 2rem 7rem;
    text-align: center;
    background:
        radial-gradient(900px 480px at 50% -10%, rgba(27, 107, 74, 0.35), transparent 70%),
        linear-gradient(180deg, #1d2a23 0%, var(--charcoal) 100%);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(242, 236, 221, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(242, 236, 221, 0.04) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: 780px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--forest-soft);
    border: 1px solid rgba(242, 236, 221, 0.25);
    padding: 0.5rem 1.1rem;
    margin-bottom: 1.75rem;
}

.hero h1 {
    font-size: 3.4rem;
    font-weight: 300;
    line-height: 1.08;
    color: var(--cream);
    letter-spacing: -0.02em;
    margin-bottom: 1.4rem;
}

.hero h1 br + * { font-weight: 700; }

.hero-sub {
    font-size: 1.1rem;
    color: rgba(242, 236, 221, 0.7);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 2.25rem;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.btn-primary-lg {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    padding: 1rem 2.75rem;
    background: var(--forest);
    color: var(--cream);
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.18s, transform 0.18s;
}

.btn-primary-lg:hover {
    background: var(--forest-deep);
    transform: translateY(-2px);
}

.hero-price {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-weight: 700;
    color: var(--caution);
}

/* ===========================
   Section scaffolding
   =========================== */

.section-sub {
    color: var(--slate);
    font-size: 1.02rem;
    line-height: 1.65;
    max-width: 660px;
    margin: 0 auto 3rem;
}

/* ===========================
   Features Grid
   =========================== */

.features {
    padding: 5.5rem 2rem;
    background: var(--cream);
}

.features-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
}

.feature-card {
    background: var(--paper);
    padding: 2rem 1.85rem;
    transition: background 0.18s;
}

.feature-card:hover {
    background: var(--cream-soft);
}

.feature-icon {
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid var(--rule);
    background: var(--forest-soft);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
}

.feature-icon i {
    font-size: 1.1rem;
    color: var(--forest);
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.55rem;
    color: var(--ink);
    letter-spacing: -0.005em;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--slate);
    line-height: 1.6;
}

/* ===========================
   Examples Section
   =========================== */

.examples {
    padding: 5.5rem 2rem;
    background: var(--paper);
}

.examples-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.examples-inner h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 0.8rem;
    color: var(--ink);
    letter-spacing: -0.015em;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.example-card {
    border-radius: 0;
    overflow: hidden;
    border: 1px solid var(--rule);
    background: var(--paper);
    transition: box-shadow 0.18s, transform 0.18s;
    text-align: left;
}

.example-card:hover {
    box-shadow: 0 14px 32px rgba(15, 61, 42, 0.16);
    transform: translateY(-3px);
}

.example-img {
    height: 200px;
    background-color: #1d2a23;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.example-img-placeholder {
    font-size: 2.6rem;
    color: var(--forest-soft);
    opacity: 0.4;
}

/* Hide placeholder if image loads */
.example-img[style*="url"] .example-img-placeholder {
    display: none;
}

.example-label {
    padding: 1.35rem 1.4rem 1.5rem;
    border-top: 1px solid var(--rule);
}

.example-label h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--ink);
}

.example-label p {
    font-size: 0.83rem;
    color: var(--slate);
    line-height: 1.55;
}

.sample-download {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1rem;
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--forest-deep);
    text-decoration: none;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--forest);
    border-radius: 0;
    transition: background 0.18s, color 0.18s;
}

.sample-download:hover {
    background: var(--forest);
    color: var(--cream);
}

.sample-download i {
    font-size: 0.85rem;
}

/* ===========================
   Methodology / Data Sources
   =========================== */

.methodology {
    padding: 5.5rem 2rem;
    background: var(--cream);
}

.methodology-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.methodology-inner h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 0.8rem;
    color: var(--ink);
    letter-spacing: -0.015em;
}

.datasource-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin: 3rem 0;
    background: var(--rule);
    border: 1px solid var(--rule);
}

.datasource-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    background: var(--paper);
    border-radius: 0;
    padding: 1.65rem 1rem;
    transition: background 0.18s;
}

.datasource-card:hover {
    background: var(--cream-soft);
}

.datasource-card img {
    height: 38px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    filter: grayscale(40%);
    transition: filter 0.2s;
}

.datasource-card:hover img {
    filter: grayscale(0%);
}

.datasource-fallback {
    height: 38px;
    width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--forest);
}

.datasource-card span {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--slate);
    text-align: center;
}

.methodology-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    text-align: left;
}

.method-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--forest);
    padding: 1.4rem 1.5rem;
}

.method-item > i {
    font-size: 1.15rem;
    color: var(--forest);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.method-item h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--ink);
}

.method-item p {
    font-size: 0.82rem;
    color: var(--slate);
    line-height: 1.6;
}

/* ===========================
   Bottom CTA
   =========================== */

.cta {
    padding: 6rem 2rem;
    background:
        radial-gradient(700px 360px at 50% 0%, rgba(27, 107, 74, 0.4), transparent 70%),
        var(--forest-deep);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(242, 236, 221, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(242, 236, 221, 0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
}

.cta-inner {
    position: relative;
    max-width: 660px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 2.1rem;
    font-weight: 300;
    color: var(--cream);
    letter-spacing: -0.015em;
    margin-bottom: 0.8rem;
}

.cta p {
    color: rgba(242, 236, 221, 0.72);
    font-size: 1.02rem;
    line-height: 1.65;
    margin-bottom: 2.25rem;
}

.cta .btn-primary-lg {
    background: var(--cream);
    color: var(--forest-deep);
}

.cta .btn-primary-lg:hover {
    background: var(--cream-soft);
    transform: translateY(-2px);
}

/* ===========================
   Footer
   =========================== */

.footer {
    padding: 2.5rem 2rem;
    background: var(--forest-deep);
    color: rgba(242, 236, 221, 0.55);
    text-align: center;
    border-top: 1px solid rgba(242, 236, 221, 0.1);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--cream);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.footer-brand i {
    color: var(--forest-soft);
}

.footer-logo {
    height: 18px;
    width: 18px;
}

.footer-links a {
    color: var(--forest-soft);
    text-decoration: none;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-copy {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(242, 236, 221, 0.4);
}

/* ===========================
   Animations
   =========================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 900px) {
    .features-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .examples-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }

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

    .methodology-details {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.6rem;
    }
}

@media (max-width: 600px) {
    .nav-inner {
        padding: 0.75rem 1rem;
    }

    .nav-brand .brand-name {
        letter-spacing: 0.2em;
    }

    .hero {
        padding: 8.5rem 1.25rem 4.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-sub {
        font-size: 0.95rem;
    }

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

    .features, .examples, .methodology, .cta {
        padding: 3.5rem 1.25rem;
    }

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

    .modal {
        padding: 2rem 1.5rem;
    }
}

/* ===========================
   Utility
   =========================== */

.hidden {
    display: none !important;
}
