:root {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --dark: #111827;
    --dark-2: #1f2937;
    --success: #10b981;
    --info: #0ea5e9;
    --warning: #f59e0b;
    --shadow: 0 24px 70px rgba(15, 23, 42, .14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

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

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

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.container {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(229, 231, 235, .82);
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(18px);
    transition: background .35s ease-in-out, border-color .35s ease-in-out, box-shadow .35s ease-in-out;
}

.site-header.is-scrolled {
    border-color: rgba(203, 213, 225, .88);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 34px rgba(15, 23, 42, .08);
}

.nav {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.nav-links,
.nav-actions,
.hero-actions,
.footer-brand,
.footer-inner,
.cta,
.cta-actions,
.endpoint,
.workflow-item {
    display: flex;
    align-items: center;
}

.brand {
    min-width: 250px;
    gap: 12px;
}

.brand-logo {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.brand-copy strong {
    display: block;
    color: var(--text);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.1;
}

.brand-copy small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.nav-links {
    gap: 26px;
    color: #475569;
    font-size: 14px;
    font-weight: 800;
}

.nav-links a {
    padding: 8px 0;
}

.nav-links a:hover {
    color: var(--brand-primary);
}

.nav-actions,
.hero-actions,
.cta-actions {
    gap: 10px;
}

.btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--text);
    padding: 0 16px;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, .2);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
}

.btn-primary {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: white;
}

.btn-light {
    border-color: rgba(255, 255, 255, .32);
    background: rgba(255, 255, 255, .12);
    color: white;
}

.btn-ghost {
    background: var(--surface-soft);
}

.btn-lg {
    min-height: 48px;
    padding: 0 20px;
}

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #111827 52%, #2a1621 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .72), transparent 88%);
    opacity: .48;
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 96px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .98));
    pointer-events: none;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 680px;
    grid-template-columns: minmax(0, 1fr) minmax(390px, 470px);
    gap: 48px;
    align-items: center;
    padding: 76px 0 104px;
}

.hero-content {
    display: flex;
    max-width: 760px;
    flex-direction: column;
    justify-content: center;
    color: white;
}

.hero-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    padding: 8px 12px;
    color: rgba(255, 255, 255, .88);
    font-size: 13px;
    font-weight: 850;
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 0 5px rgba(16, 185, 129, .16);
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    max-width: 780px;
    margin-top: 24px;
    font-size: clamp(42px, 7vw, 78px);
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0;
}

.hero p {
    max-width: 680px;
    margin-top: 22px;
    color: rgba(255, 255, 255, .82);
    font-size: 18px;
    font-weight: 650;
    line-height: 1.8;
}

.hero-actions {
    flex-wrap: wrap;
    margin-top: 32px;
}

.hero-metrics {
    display: grid;
    max-width: 860px;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 42px;
}

.hero-metrics div {
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    padding: 16px;
    backdrop-filter: blur(10px);
}

.hero-metrics strong {
    display: block;
    font-size: 18px;
}

.hero-metrics span {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
    font-weight: 700;
}

.hero-panel {
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    padding: 18px;
    color: white;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .32);
    backdrop-filter: blur(18px);
}

.hero-panel-head,
.hero-panel-stats,
.hero-activity div {
    display: flex;
    align-items: center;
}

.hero-panel-head {
    justify-content: space-between;
    gap: 16px;
}

.hero-panel-head span,
.hero-panel-stats span {
    display: block;
    color: rgba(255, 255, 255, .62);
    font-size: 12px;
    font-weight: 900;
}

.hero-panel-head strong {
    display: block;
    margin-top: 4px;
    font-size: 19px;
    font-weight: 950;
}

.hero-panel-head b {
    border-radius: 999px;
    background: rgba(16, 185, 129, .16);
    color: #86efac;
    padding: 7px 11px;
    font-size: 12px;
}

.hero-panel-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.hero-panel-stats div {
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(15, 23, 42, .52);
    padding: 14px;
}

.hero-panel-stats strong {
    display: block;
    margin-top: 6px;
    font-size: 20px;
    font-weight: 950;
}

.hero-chart {
    display: grid;
    height: 210px;
    grid-template-columns: repeat(7, 1fr);
    align-items: end;
    gap: 10px;
    margin-top: 18px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background:
        linear-gradient(to top, rgba(255, 255, 255, .12) 1px, transparent 1px),
        rgba(15, 23, 42, .4);
    background-size: 100% 25%;
    padding: 18px;
}

.hero-chart span {
    display: block;
    min-height: 32px;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, #f9a8d4, var(--brand-primary));
    box-shadow: 0 14px 28px rgba(236, 72, 153, .22);
}

.hero-activity {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.hero-activity div {
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    background: rgba(15, 23, 42, .42);
    padding: 11px 12px;
}

.hero-activity i {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .12);
}

.hero-activity span {
    min-width: 0;
    flex: 1;
    color: rgba(255, 255, 255, .7);
    font-size: 13px;
    font-weight: 800;
}

.hero-activity strong {
    color: white;
    font-size: 13px;
    font-weight: 950;
    text-align: right;
}

.section {
    padding: 76px 0;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .72s ease-in-out, transform .72s ease-in-out;
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card.reveal-on-scroll,
.endpoint.reveal-on-scroll,
.workflow-item.reveal-on-scroll {
    transition-delay: calc(var(--reveal-index, 0) * 70ms);
}

.section-muted {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
}

.section-heading {
    max-width: 760px;
    margin-bottom: 28px;
}

.section-heading.compact {
    margin-bottom: 18px;
}

.section-heading span,
.cta-label {
    color: var(--brand-primary);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.section-heading h2,
.cta h2 {
    margin-top: 9px;
    color: var(--text);
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 950;
    line-height: 1.08;
}

.section-copy,
.feature-card p,
.endpoint p,
.cta p,
.site-footer,
.workflow-item span {
    color: var(--muted);
    font-weight: 700;
}

.section-copy {
    max-width: 620px;
    font-size: 17px;
    line-height: 1.8;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.feature-card {
    min-height: 220px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.feature-card span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: var(--brand-secondary);
    color: var(--brand-primary);
    font-size: 12px;
    font-weight: 950;
}

.feature-card h3 {
    margin-top: 22px;
    color: var(--text);
    font-size: 18px;
}

.feature-card p {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.7;
}

.api-layout {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 42px;
    align-items: start;
}

.code-block {
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 16px;
}

.code-block small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.code-block code {
    display: block;
    margin-top: 8px;
    overflow-wrap: anywhere;
    border-radius: 7px;
    background: var(--dark);
    color: white;
    padding: 12px;
    font-size: 14px;
}

.endpoint-list {
    display: grid;
    gap: 12px;
}

.endpoint {
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 16px;
}

.method {
    display: inline-flex;
    width: 58px;
    min-height: 30px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #e0f2fe;
    color: #075985;
    font-size: 12px;
    font-weight: 950;
}

.method.post {
    background: #dcfce7;
    color: #166534;
}

.endpoint strong {
    color: var(--text);
    font-size: 15px;
}

.endpoint p {
    margin-top: 5px;
    font-size: 13px;
}

.operations {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr);
    gap: 36px;
    align-items: stretch;
}

.profit-preview {
    min-height: 420px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
    padding: 22px;
    box-shadow: var(--shadow);
}

.profit-preview-head,
.profit-kpis,
.profit-legend {
    display: flex;
    align-items: center;
}

.profit-preview-head {
    justify-content: space-between;
    gap: 16px;
}

.profit-preview-head span,
.profit-kpis span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.profit-preview-head strong {
    display: block;
    margin-top: 4px;
    color: var(--text);
    font-size: 20px;
    font-weight: 950;
}

.profit-preview-head b {
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    padding: 7px 11px;
    font-size: 13px;
}

.profit-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 22px;
}

.profit-kpis div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 14px;
}

.profit-kpis strong {
    display: block;
    margin-top: 6px;
    color: var(--text);
    font-size: 18px;
}

.profit-chart {
    display: grid;
    height: 190px;
    grid-template-columns: repeat(7, 1fr);
    align-items: end;
    gap: 12px;
    margin-top: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(to top, rgba(148, 163, 184, .18) 1px, transparent 1px);
    background-size: 100% 25%;
    padding: 18px;
}

.profit-chart span {
    display: block;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, var(--brand-primary), #be185d);
    box-shadow: 0 10px 18px rgba(236, 72, 153, .22);
}

.profit-legend {
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.profit-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.profit-legend i {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.legend-revenue {
    background: var(--brand-primary);
}

.legend-profit {
    background: var(--success);
}

.operations-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.workflow {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.workflow-item {
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 14px;
}

.workflow-item b {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    background: var(--brand-primary);
    color: white;
}

.section-cta {
    background: var(--brand-secondary);
}

.cta {
    justify-content: space-between;
    gap: 24px;
}

.cta > div:first-child {
    max-width: 720px;
}

.cta p {
    margin-top: 10px;
    line-height: 1.7;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: white;
}

.footer-inner {
    min-height: 84px;
    justify-content: space-between;
    gap: 20px;
    font-size: 14px;
}

.footer-brand {
    gap: 10px;
    color: var(--text);
    font-weight: 900;
}

.footer-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

@media (max-width: 1040px) {
    .nav-links {
        display: none;
    }

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

    .api-layout,
    .operations,
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        gap: 28px;
        padding: 64px 0 92px;
    }

    .hero-content,
    .hero-metrics {
        max-width: none;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100% - 24px, 1160px);
    }

    .nav {
        min-height: 68px;
        gap: 12px;
    }

    .brand {
        min-width: 0;
    }

    .brand-copy small,
    .nav-actions .btn-ghost {
        display: none;
    }

    .btn {
        min-height: 40px;
        padding: 0 13px;
    }

    .hero-grid {
        min-height: auto;
        padding: 48px 0 78px;
    }

    .hero-metrics,
    .feature-grid,
    .hero-panel-stats {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        padding: 14px;
    }

    .hero-chart {
        height: 170px;
        gap: 8px;
        padding: 14px;
    }

    .hero-activity strong {
        max-width: 130px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero p {
        font-size: 16px;
    }

    .section {
        padding: 56px 0;
    }

    .profit-preview {
        min-height: 300px;
    }

    .profit-kpis {
        grid-template-columns: 1fr;
    }

    .cta,
    .footer-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-actions {
        flex-wrap: wrap;
    }
}

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

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }

    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}
