:root {
    color-scheme: light;
    --bg: #f6f7f4;
    --surface: #ffffff;
    --surface-soft: #eef4ef;
    --surface-strong: #17211d;
    --text: #18201d;
    --muted: #5f6b66;
    --line: #dbe2dc;
    --brand: #0f766e;
    --brand-dark: #0b4f4a;
    --accent: #8d510f;
    --accent-on-dark: #f0b85a;
    --blue: #315f86;
    --shadow: 0 24px 60px rgba(23, 33, 29, 0.14);
    --radius: 8px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.55;
    overflow-x: hidden;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 20;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.skip-link:focus {
    top: 1rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(246, 247, 244, 0.92);
    border-bottom: 1px solid rgba(219, 226, 220, 0.9);
    backdrop-filter: blur(14px);
}

.nav-shell {
    width: calc(100vw - 2rem);
    max-width: 1180px;
    min-height: 72px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.25rem;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 44px;
    font-weight: 760;
    text-decoration: none;
    letter-spacing: 0;
}

.brand-mark {
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    display: block;
}

.brand-mark img {
    width: 100%;
    height: 100%;
}

.brand-word {
    color: var(--text);
}

.site-menu,
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-menu {
    justify-content: center;
}

.site-menu a,
.nav-login,
.site-footer a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 620;
}

.site-menu a:hover,
.site-menu a[aria-current="page"],
.nav-login:hover,
.site-footer a:hover {
    color: var(--text);
}

.mobile-menu-action {
    display: none;
}

.nav-toggle {
    display: none;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.75rem 1.05rem;
    border: 1px solid var(--brand);
    border-radius: var(--radius);
    background: var(--brand);
    color: #ffffff;
    text-decoration: none;
    font-weight: 750;
    cursor: pointer;
}

.button:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.button-secondary {
    background: #ffffff;
    border-color: var(--line);
    color: var(--text);
}

.button-secondary:hover {
    background: var(--surface-soft);
    border-color: #cbd7d0;
}

.hero .button-secondary,
.final-cta .button-secondary {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(255, 255, 255, 0.72);
    color: var(--text);
}

.hero .button-secondary:hover,
.final-cta .button-secondary:hover {
    background: #ffffff;
    border-color: #ffffff;
}

.button-small {
    min-height: 44px;
    padding: 0.6rem 0.9rem;
}

.hero {
    min-height: clamp(560px, 82svh, 680px);
    display: grid;
    align-items: end;
    position: relative;
    overflow: clip;
    background-image:
        linear-gradient(90deg, rgba(11, 20, 17, 0.9) 0%, rgba(11, 20, 17, 0.68) 42%, rgba(11, 20, 17, 0.24) 100%),
        image-set(
            url("/assets/img/email-agent-dashboard.webp") type("image/webp"),
            url("/assets/img/email-agent-dashboard.png") type("image/png")
        );
    background-size: cover;
    background-position: center;
    color: #ffffff;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 7rem;
    background: linear-gradient(180deg, transparent, var(--bg));
}

.hero-inner {
    width: calc(100vw - 2rem);
    max-width: 1180px;
    margin: 0 auto;
    padding: 4.5rem 0 5.5rem;
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin: 0 0 0.8rem;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 820;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero .eyebrow,
.final-cta .eyebrow {
    color: var(--accent-on-dark);
}

.hero h1 {
    margin: 0;
    max-width: 980px;
    font-size: 6.15rem;
    line-height: 0.92;
    letter-spacing: 0;
    overflow-wrap: normal;
    white-space: nowrap;
    text-wrap: balance;
}

.page-hero h1 {
    margin: 0;
    max-width: 780px;
    font-size: 4.5rem;
    line-height: 0.95;
    letter-spacing: 0;
    overflow-wrap: normal;
    text-wrap: balance;
}

.hero-copy {
    max-width: 660px;
    margin: 1.35rem 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    text-wrap: pretty;
}

.hero-actions,
.center-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.6rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 650px;
    gap: 0.75rem;
    margin: 2rem 0 0;
}

.hero-stats div {
    min-height: 96px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.11);
    backdrop-filter: blur(10px);
}

.hero-stats dt {
    font-size: 1.3rem;
    font-weight: 820;
}

.hero-stats dd {
    margin: 0.25rem 0 0;
    color: rgba(255, 255, 255, 0.76);
}

.section,
.page-hero,
.final-cta {
    width: calc(100% - 2rem);
    max-width: 1180px;
    margin: 0 auto;
}

.section {
    padding: 5rem 0;
}

.section-tight {
    padding-top: 3.5rem;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 2rem;
}

.section-heading h2,
.split-section h2,
.final-cta h2,
.feature-matrix h2,
.form-aside h2,
.legal-copy h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    line-height: 1.04;
    letter-spacing: 0;
}

.section-heading p,
.page-hero p,
.split-section p,
.final-cta p,
.feature-matrix p,
.price-card p,
.form-aside p,
.legal-copy p {
    color: var(--muted);
}

.workflow-grid,
.feature-matrix,
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.workflow-grid article,
.feature-matrix article,
.price-card,
.form-aside {
    min-height: 100%;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.workflow-grid span,
.plan-kicker {
    color: var(--brand);
    font-weight: 820;
}

.workflow-grid h3,
.price-card h3,
.price-card h2 {
    margin: 0.75rem 0 0.5rem;
    font-size: 1.2rem;
    line-height: 1.2;
}

.workflow-grid p,
.price-card p,
.feature-matrix p {
    margin: 0;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 3rem;
    align-items: start;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.visual-proof {
    display: grid;
    grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
    border-top: 1px solid var(--line);
}

.visual-proof-copy h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.04;
    letter-spacing: 0;
}

.visual-proof-copy p {
    color: var(--muted);
}

.workflow-figure {
    margin: 0;
}

.workflow-figure img {
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.feature-list {
    display: grid;
    gap: 1rem;
}

.feature-list p {
    margin: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.pricing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-card {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.price-card.featured {
    border-color: rgba(15, 118, 110, 0.45);
    box-shadow: var(--shadow);
}

.price {
    font-size: 2.6rem;
    font-weight: 840;
    color: var(--text);
}

.price span {
    font-size: 1rem;
    color: var(--muted);
}

.price-card ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--muted);
}

.price-card .button {
    margin-top: auto;
}

.final-cta {
    margin-bottom: 5rem;
    padding: 4rem;
    border-radius: var(--radius);
    background: var(--surface-strong);
    color: #ffffff;
}

.final-cta h2 {
    max-width: 760px;
    color: #ffffff;
}

.final-cta p {
    color: rgba(255, 255, 255, 0.82);
}

.page-hero {
    padding: 5.5rem 0 3rem;
}

.page-hero.compact {
    max-width: 900px;
}

.page-hero h1 {
    color: var(--text);
    font-size: clamp(2.6rem, 7vw, 5.5rem);
}

.page-hero p {
    max-width: 720px;
    font-size: 1.15rem;
}

.feature-matrix {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-matrix article {
    min-height: 220px;
}

.feature-matrix h2 {
    font-size: 1.35rem;
}

.form-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1rem;
    align-items: start;
}

.form-section > * {
    min-width: 0;
}

.lead-form {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.lead-form label {
    color: var(--text);
    font-weight: 720;
}

.lead-form input,
.lead-form textarea,
.lead-form select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    color: var(--text);
    font: inherit;
}

.lead-form textarea {
    resize: vertical;
}

.form-error,
.form-success {
    margin: -0.35rem 0 0;
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    font-size: 0.88rem;
    line-height: 1.4;
}

.form-error {
    background: #fff1f2;
    color: #9f1239;
}

.form-success {
    background: #ecfdf5;
    color: #047857;
}

.legal-copy {
    max-width: 860px;
}

.legal-copy h2 {
    margin-top: 2rem;
    font-size: 1.4rem;
}

.site-footer {
    background: #ffffff;
    border-top: 1px solid var(--line);
    padding: 3rem 0 2rem;
}

.footer-grid {
    width: calc(100% - 2rem);
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(160px, 0.5fr));
    gap: 2rem;
}

.site-footer h2 {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
}

.site-footer p {
    max-width: 520px;
    color: var(--muted);
}

.site-footer a {
    display: block;
    min-height: 44px;
    margin: 0.25rem 0;
    padding: 0.625rem 0;
}

.footer-meta {
    width: calc(100% - 2rem);
    max-width: 1180px;
    margin: 2rem auto 0;
    color: var(--muted);
    font-size: 0.9rem;
}

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

@media (max-width: 900px) {
    .nav-shell {
        grid-template-columns: auto auto;
        justify-content: space-between;
        gap: 1rem;
    }

    .nav-toggle {
        display: inline-flex;
        min-height: 44px;
        align-items: center;
        padding: 0.5rem 0.75rem;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface);
        color: var(--text);
        font-weight: 720;
    }

    .site-menu,
    .nav-actions {
        display: none;
    }

    .site-menu.is-open {
        display: grid;
        grid-column: 1 / -1;
        justify-content: stretch;
        gap: 0;
        padding: 0.5rem 0 1rem;
    }

    .site-menu.is-open a {
        padding: 0.75rem 0;
        border-top: 1px solid var(--line);
    }

    .site-menu.is-open .mobile-menu-action {
        display: flex;
        min-height: 44px;
        align-items: center;
        justify-content: center;
        margin-top: 0.65rem;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface);
        color: var(--text);
        font-weight: 760;
    }

    .site-menu.is-open .mobile-menu-primary {
        border-color: var(--brand);
        background: var(--brand);
        color: #ffffff;
    }

    .hero {
        min-height: clamp(560px, 84svh, 620px);
        background-position: 58% center;
    }

    .hero h1 {
        max-width: 720px;
        font-size: clamp(3.25rem, 10vw, 4.55rem);
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .page-hero h1 {
        font-size: 3.6rem;
    }

    .hero-inner {
        padding: 4rem 0 5rem;
    }

    .hero-stats,
    .workflow-grid,
    .visual-proof,
    .feature-matrix,
    .pricing-grid,
    .split-section,
    .form-section,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .feature-matrix article {
        min-height: auto;
    }

    .final-cta {
        padding: 2rem;
    }
}

@media (max-width: 520px) {
    .hero {
        min-height: clamp(540px, 86svh, 590px);
        background-image:
            linear-gradient(180deg, rgba(11, 20, 17, 0.9) 0%, rgba(11, 20, 17, 0.72) 62%, rgba(11, 20, 17, 0.25) 100%),
            image-set(
                url("/assets/img/email-agent-dashboard.webp") type("image/webp"),
                url("/assets/img/email-agent-dashboard.png") type("image/png")
            );
        background-position: 62% center;
    }

    .hero h1,
    .page-hero h1 {
        font-size: clamp(2.35rem, 12vw, 3rem);
        line-height: 1;
        max-width: 100%;
    }

    .page-hero h1 {
        max-width: 100%;
        font-size: clamp(2.05rem, 10vw, 2.55rem);
        line-height: 1.05;
    }

    .hero-copy,
    .page-hero p {
        max-width: 100%;
    }

    .nav-shell,
    .hero-inner,
    .page-hero,
    .final-cta,
    .footer-grid,
    .footer-meta {
        width: calc(100vw - 2rem);
    }

    .section {
        width: 330px;
        max-width: calc(100vw - 2rem);
    }

    .form-aside p {
        max-width: calc(100% - 1rem);
        overflow-wrap: break-word;
    }

    .lead-form input,
    .lead-form textarea,
    .lead-form select {
        width: 100%;
    }

    .hero-actions,
    .center-actions {
        display: grid;
    }

    .hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
        margin-top: 1.25rem;
    }

    .hero-stats div {
        min-height: 80px;
        padding: 0.7rem 0.55rem;
    }

    .hero-stats dt {
        font-size: 1.05rem;
    }

    .hero-stats dd {
        font-size: 0.82rem;
        line-height: 1.25;
    }

    .section {
        padding: 3rem 0;
    }

    .page-hero {
        padding: 3.5rem 0 2rem;
    }
}
