:root {
    color-scheme: dark;
    --carbon: #101211;
    --carbon-soft: #171b18;
    --ink: #f7f1e4;
    --muted: #b9c2b5;
    --line: rgba(247, 241, 228, 0.16);
    --green: #59dc91;
    --amber: #f3b74d;
    --cyan: #6ed8e4;
    --paper: #efe8d6;
    --paper-ink: #171b18;
    --paper-muted: #596258;
    --paper-line: rgba(23, 27, 24, 0.14);
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--carbon);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(247, 241, 228, 0.12);
    background: rgba(16, 18, 17, 0.88);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1120px, calc(100% - 40px));
    min-height: 64px;
    margin: 0 auto;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 800;
}

.brand-mark {
    display: inline-grid;
    grid-template-columns: repeat(3, 5px);
    align-items: end;
    width: 28px;
    height: 28px;
    padding: 5px;
    border: 1px solid rgba(89, 220, 145, 0.42);
    border-radius: 6px;
}

.brand-mark span {
    display: block;
    width: 5px;
    border-radius: 4px;
    background: var(--green);
}

.brand-mark span:nth-child(1) {
    height: 9px;
}

.brand-mark span:nth-child(2) {
    height: 17px;
    background: var(--amber);
}

.brand-mark span:nth-child(3) {
    height: 12px;
    background: var(--cyan);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.92rem;
}

.main-nav a,
.header-action {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    padding: 0 12px;
}

.main-nav a:hover,
.header-action:hover {
    background: rgba(247, 241, 228, 0.08);
    color: var(--ink);
}

.header-action {
    border: 1px solid rgba(247, 241, 228, 0.18);
    color: var(--ink);
    font-weight: 700;
}

.hero {
    position: relative;
    isolation: isolate;
    min-height: min(760px, calc(100svh - 112px));
    overflow: hidden;
    display: grid;
    align-items: center;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(90deg, rgba(16, 18, 17, 0.96) 0%, rgba(16, 18, 17, 0.82) 34%, rgba(16, 18, 17, 0.22) 72%),
        url("../images/cassy-audio-cdn-hero.png");
    background-size: cover;
    background-position: center right;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    z-index: -1;
    height: 42%;
    background: linear-gradient(0deg, rgba(16, 18, 17, 0.96), rgba(16, 18, 17, 0));
}

.hero-content {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 50px 0 116px;
}

.eyebrow,
.section-kicker {
    margin: 0 0 14px;
    color: var(--green);
    font-size: 0.86rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: 6.4rem;
    line-height: 0.92;
    font-weight: 900;
}

.hero-copy {
    width: min(590px, 100%);
    margin: 24px 0 0;
    color: rgba(247, 241, 228, 0.82);
    font-size: 1.18rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 6px;
    padding: 0 18px;
    font-weight: 800;
}

.button.primary {
    background: var(--green);
    color: #06100a;
}

.button.secondary {
    border: 1px solid rgba(247, 241, 228, 0.26);
    background: rgba(247, 241, 228, 0.08);
    color: var(--ink);
}

.button:hover {
    transform: translateY(-1px);
}

.hero-strip {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid rgba(247, 241, 228, 0.16);
    background: rgba(16, 18, 17, 0.78);
    backdrop-filter: blur(14px);
}

.hero-strip div {
    min-height: 86px;
    padding: 18px 22px;
    border-right: 1px solid rgba(247, 241, 228, 0.12);
}

.hero-strip div:last-child {
    border-right: 0;
}

.hero-strip span,
.cache-row span,
.endpoint-panel span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-strip strong {
    display: block;
    margin-top: 5px;
    font-size: 1rem;
}

.intro-band,
.light-section {
    background: var(--paper);
    color: var(--paper-ink);
}

.section,
.intro-band {
    padding: 76px 0;
}

.section-inner {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.intro-grid,
.split-layout,
.contract-grid,
.ops-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
    gap: 56px;
    align-items: center;
}

.intro-grid h2,
.split-layout h2,
.contract-grid h2,
.ops-grid h2 {
    margin: 0;
    font-size: 2.6rem;
    line-height: 1.05;
}

.intro-grid p:last-child,
.split-layout p,
.contract-grid p {
    margin: 0;
    color: var(--paper-muted);
    font-size: 1.04rem;
}

.dark-section {
    background: var(--carbon);
    color: var(--ink);
}

.dark-section .section-kicker {
    color: var(--amber);
}

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

.step-card,
.cache-panel,
.endpoint-panel {
    border-radius: 8px;
}

.step-card {
    min-height: 235px;
    padding: 22px;
    border: 1px solid var(--line);
    background: var(--carbon-soft);
}

.step-number {
    color: var(--amber);
    font-weight: 900;
}

.step-card h3 {
    margin: 42px 0 10px;
    font-size: 1.35rem;
}

.step-card p {
    margin: 0;
    color: var(--muted);
}

.cache-panel {
    border: 1px solid var(--paper-line);
    background: #fbf6e8;
}

.cache-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 20px;
    padding: 0 20px;
    border-bottom: 1px solid var(--paper-line);
}

.cache-row:last-child {
    border-bottom: 0;
}

.cache-row strong {
    text-align: right;
}

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

.endpoint-panel {
    display: grid;
    gap: 12px;
    padding: 22px;
    border: 1px solid rgba(110, 216, 228, 0.32);
    background: #0b0f0d;
}

.endpoint-panel span {
    color: var(--cyan);
}

.endpoint-panel code {
    display: block;
    overflow-wrap: anywhere;
    color: var(--ink);
    font: 700 1rem ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.operations-section {
    background: #161815;
    color: var(--ink);
}

.operations-section .section-kicker {
    color: var(--green);
}

.ops-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ops-list li {
    min-height: 70px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    border: 1px solid rgba(247, 241, 228, 0.14);
    border-radius: 8px;
    background: rgba(247, 241, 228, 0.04);
    color: rgba(247, 241, 228, 0.84);
    font-weight: 750;
}

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

    .hero-content {
        padding: 42px 0 148px;
    }

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

    .hero-copy {
        font-size: 1.05rem;
    }

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

    .hero-strip div {
        min-height: 70px;
        padding: 14px 16px;
    }

    .intro-grid,
    .split-layout,
    .contract-grid,
    .ops-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

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

    .section,
    .intro-band {
        padding: 58px 0;
    }
}

@media (max-width: 640px) {
    .header-inner,
    .hero-content,
    .section-inner {
        width: min(100% - 28px, 1120px);
    }

    .header-action {
        display: none;
    }

    .hero {
        min-height: calc(100svh - 104px);
    }

    .hero::before {
        background-image:
            linear-gradient(90deg, rgba(16, 18, 17, 0.97) 0%, rgba(16, 18, 17, 0.76) 64%, rgba(16, 18, 17, 0.38) 100%),
            url("../images/cassy-audio-cdn-hero.png");
        background-position: 58% center;
    }

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

    .hero-actions {
        display: grid;
    }

    .hero-strip {
        position: relative;
        margin-top: -110px;
    }

    .hero-strip strong {
        font-size: 0.92rem;
    }

    .intro-grid h2,
    .split-layout h2,
    .contract-grid h2,
    .ops-grid h2 {
        font-size: 2rem;
    }

    .step-grid,
    .ops-list {
        grid-template-columns: 1fr;
    }

    .step-card {
        min-height: 190px;
    }

    .cache-row {
        display: grid;
        align-content: center;
        justify-content: stretch;
        gap: 4px;
        padding: 12px 16px;
    }

    .cache-row strong {
        text-align: left;
    }
}
