:root {
    --bg: #f7faff;
    --surface: #ffffff;
    --surface-soft: #eef5ff;
    --text: #15213f;
    --muted: #64708b;
    --line: #dce5f4;
    --accent: #2f7cf6;
    --accent-dark: #1958c7;
    --violet: #7957e5;
    --aqua: #34c6f4;
    --sun: #ffcf35;
    --header-bg: rgba(247, 250, 255, .86);
    --section-soft: #fbfdfc;
    --footer-bg: #ffffff;
    --integration-bg: #15213f;
    --integration-text: #d5ddf0;
    --button-text: #ffffff;
    --logo-filter: none;
    --shadow: 0 24px 70px rgba(29, 57, 111, .13);
}

:root[data-theme="dark"] {
    --bg: #0c1222;
    --surface: #121b31;
    --surface-soft: #17243f;
    --text: #eef4ff;
    --muted: #aab7d1;
    --line: #253554;
    --accent: #5aa2ff;
    --accent-dark: #89bdff;
    --violet: #9b7cff;
    --aqua: #45d1ff;
    --sun: #ffd45a;
    --header-bg: rgba(12, 18, 34, .86);
    --section-soft: #0f1729;
    --footer-bg: #0f1729;
    --integration-bg: #070b14;
    --integration-text: #c6d3eb;
    --button-text: #ffffff;
    --logo-filter: drop-shadow(0 10px 24px rgba(93, 156, 255, .2));
    --shadow: 0 24px 70px rgba(0, 0, 0, .32);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    letter-spacing: 0;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 96px;
    padding: 14px clamp(20px, 5vw, 72px);
    background: var(--header-bg);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
    border-bottom-color: var(--line);
}

.brand {
    display: inline-grid;
    gap: 0;
    min-width: 260px;
}

.brand img {
    flex: 0 0 auto;
}

.brand-logo {
    display: block;
    width: 210px;
    height: auto;
    filter: var(--logo-filter);
}

.brand-caption {
    display: block;
    margin-top: -11px;
    padding-left: 82px;
    line-height: 1;
}

.brand-caption small {
    display: inline-block;
    color: transparent;
    background: linear-gradient(90deg, #49c8ff, #7b83ff 52%, #b084ff);
    -webkit-background-clip: text;
    background-clip: text;
    font-size: 14px;
    font-weight: 560;
    text-transform: lowercase;
}

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

.nav a {
    padding: 10px 12px;
    border-radius: 8px;
}

.nav a:hover,
.nav a.is-active {
    color: var(--accent-dark);
    background: var(--surface-soft);
}

.menu-toggle {
    display: none;
}

.theme-toggle {
    position: relative;
    display: block;
    width: 42px;
    height: 42px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    filter: drop-shadow(0 12px 24px rgba(47, 124, 246, .18));
    transition: transform .18s ease, filter .18s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    filter: drop-shadow(0 16px 30px rgba(47, 124, 246, .26));
}

.theme-toggle:hover .theme-toggle__image--light {
    filter:
        drop-shadow(0 0 5px rgba(37, 223, 255, .45))
        drop-shadow(0 0 12px rgba(37, 223, 255, .28));
}

.theme-toggle:hover .theme-toggle__image--dark {
    filter:
        drop-shadow(0 0 5px rgba(143, 100, 255, .48))
        drop-shadow(0 0 12px rgba(143, 100, 255, .3));
}

.theme-toggle__image {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    height: auto;
    object-fit: contain;
    transition: filter .18s ease;
}

.theme-toggle__image--light {
    display: none;
}

:root[data-theme="dark"] .theme-toggle__image--dark {
    display: none;
}

:root[data-theme="dark"] .theme-toggle__image--light {
    display: block;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(430px, .78fr) minmax(560px, 1.22fr);
    align-items: center;
    gap: clamp(26px, 3.6vw, 62px);
    min-height: calc(100vh - 96px);
    padding: 56px clamp(20px, 5vw, 72px) 42px;
    isolation: isolate;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, var(--bg) 0%, rgba(12, 18, 34, .72) 34%, rgba(12, 18, 34, .58) 100%),
        url('/src/hero-tech-bg.png') center / cover no-repeat;
    opacity: .34;
    pointer-events: none;
}

:root:not([data-theme="dark"]) .hero::before {
    display: none;
}

.hero-copy {
    max-width: 680px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 800;
}

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

h1 {
    max-width: 690px;
    margin-bottom: 22px;
    font-size: clamp(46px, 5.8vw, 78px);
    line-height: .96;
    font-weight: 850;
}

h2 {
    margin-bottom: 16px;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.04;
    font-weight: 820;
}

h3 {
    margin-bottom: 10px;
    font-size: 20px;
    line-height: 1.2;
}

.lead {
    max-width: 660px;
    margin-bottom: 30px;
    color: var(--muted);
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.55;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 520;
}

.button.primary {
    color: var(--button-text);
    background: linear-gradient(135deg, var(--accent), var(--violet));
    border-color: transparent;
}

.button.primary:hover {
    filter: brightness(.96);
}

.button.ghost {
    color: var(--accent-dark);
    background: var(--surface);
}

.button.ghost:hover {
    border-color: #b8cbf7;
}

.hero-visual {
    position: relative;
    aspect-ratio: 1672 / 941;
    min-height: 0;
    isolation: isolate;
    justify-self: stretch;
}

.hero-visual img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    opacity: 0;
    filter: drop-shadow(0 28px 40px rgba(17, 43, 35, .13));
    transition: opacity .32s ease;
    -webkit-mask-image:
        linear-gradient(90deg, transparent 0, #000 calc(8% + 10px), #000 calc(92% - 10px), transparent 100%),
        linear-gradient(180deg, transparent 0, #000 calc(10% + 10px), #000 calc(88% - 10px), transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(90deg, transparent 0, #000 calc(8% + 10px), #000 calc(92% - 10px), transparent 100%),
        linear-gradient(180deg, transparent 0, #000 calc(10% + 10px), #000 calc(88% - 10px), transparent 100%);
    mask-composite: intersect;
}

.hero-visual.is-image-ready img {
    opacity: 1;
}

.hero-visual::after {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, var(--bg) 0, rgba(255, 255, 255, 0) calc(12% + 10px), rgba(255, 255, 255, 0) calc(88% - 10px), var(--bg) 100%),
        linear-gradient(180deg, var(--bg) 0, rgba(255, 255, 255, 0) calc(14% + 10px), rgba(255, 255, 255, 0) calc(84% - 10px), var(--bg) 100%);
}

.hero-energy {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity .32s ease;
}

.hero-visual.is-energy-ready .hero-energy {
    opacity: 1;
}

.energy-routes path,
.energy-pulses path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-leds {
    pointer-events: none;
}

.hero-led {
    fill: #f6fbff;
    opacity: .28;
    filter: url('#energyGlow');
    transform-box: fill-box;
    transform-origin: center;
    animation: ledBlink var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

:root:not([data-theme="dark"]) .hero-led {
    fill: #ffffff;
    opacity: .3;
    filter:
        drop-shadow(0 0 3px rgba(255, 255, 255, .95))
        drop-shadow(0 0 8px rgba(62, 145, 255, .75));
}

:root:not([data-theme="dark"]) .hero-led--violet {
    filter:
        drop-shadow(0 0 3px rgba(255, 255, 255, .95))
        drop-shadow(0 0 8px rgba(151, 93, 255, .78));
}

.energy-routes path {
    stroke: url('#energyStroke');
    stroke-width: 1.8;
    opacity: .3;
    filter: url('#energyGlow');
}

.energy-routes path.energy-input {
    stroke: #68b8ff;
    stroke-width: 2.2;
    opacity: .72;
}

.energy-routes path.energy-output {
    stroke: #e17cff;
    stroke-width: 2.2;
    opacity: .78;
}

.energy-pulses path {
    stroke: url('#energyStroke');
    stroke-width: 2.2;
    stroke-dasharray: 54 720;
    stroke-dashoffset: 0;
    opacity: .98;
    filter: url('#energyGlow');
    animation: energyFlow 3.8s linear infinite;
    animation-delay: var(--delay);
}

.energy-pulses path.energy-input {
    stroke: #8fd0ff;
    stroke-width: 2.2;
    stroke-dasharray: 48 360;
    opacity: 1;
    animation-duration: 2.9s;
}

.energy-pulses path.energy-output {
    stroke: #f0a0ff;
    stroke-width: 2.2;
    stroke-dasharray: 48 360;
    opacity: 1;
    animation-duration: 3.1s;
}

.energy-sparks circle {
    fill: #eaf8ff;
    filter: url('#energyGlow');
    opacity: 0;
    display: none;
}

.energy-sparks circle.energy-input {
    fill: #d9ecff;
    opacity: 1;
}

.energy-sparks circle.energy-output {
    fill: #ffdfff;
    opacity: 1;
}

:root:not([data-theme="dark"]) .hero-energy {
    opacity: 0;
    mix-blend-mode: normal;
}

:root:not([data-theme="dark"]) .hero-visual.is-energy-ready .hero-energy {
    opacity: .62;
}

:root:not([data-theme="dark"]) .energy-routes path {
    filter: none;
    opacity: .22;
}

:root:not([data-theme="dark"]) .energy-routes path.energy-input {
    stroke: #4f8cff;
    opacity: .42;
}

:root:not([data-theme="dark"]) .energy-routes path.energy-output {
    stroke: #8a55e8;
    opacity: .42;
}

:root:not([data-theme="dark"]) .energy-pulses path {
    filter: none;
}

:root:not([data-theme="dark"]) .energy-pulses path.energy-input {
    stroke: #2d75ff;
    opacity: .72;
}

:root:not([data-theme="dark"]) .energy-pulses path.energy-output {
    stroke: #8c42e8;
    opacity: .74;
}

.hero-visual .hero-flow--dark {
    display: none;
}

:root[data-theme="dark"] .hero-flow--light {
    display: none;
}

:root[data-theme="dark"] .hero-flow--dark {
    display: block;
    filter: drop-shadow(0 34px 46px rgba(0, 0, 0, .32));
}

:root[data-hero-energy="off"] .hero-energy {
    display: none;
}

@keyframes energyFlow {
    to {
        stroke-dashoffset: -792;
    }
}

@keyframes ledBlink {
    0%,
    64%,
    100% {
        opacity: .18;
        transform: scale(.82);
    }

    10% {
        opacity: .95;
        transform: scale(1.24);
    }

    18% {
        opacity: .34;
        transform: scale(.94);
    }

    30% {
        opacity: .72;
        transform: scale(1.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-energy {
        display: none;
    }
}

.section {
    padding: 76px clamp(20px, 5vw, 72px);
}

.intro {
    display: grid;
    grid-template-columns: minmax(260px, .8fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: start;
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.intro p:last-child {
    max-width: 820px;
    color: var(--muted);
    font-size: 22px;
    line-height: 1.6;
}

.channels,
.feature-grid {
    display: grid;
    gap: 18px;
}

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

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

.channels article,
.feature-grid article,
.case-grid article,
.endpoint {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 40px rgba(26, 48, 40, .06);
}

.channels article {
    position: relative;
    display: grid;
    grid-template-columns: clamp(112px, 12vw, 150px) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: clamp(22px, 3vw, 34px);
    align-items: center;
    min-height: 220px;
    padding: 28px 30px;
    overflow: hidden;
}

.channels article img {
    display: block;
    grid-column: 1;
    grid-row: 1 / 3;
    width: 100%;
    max-width: 150px;
    height: auto;
    margin: 0;
    align-self: center;
    filter: drop-shadow(0 18px 30px rgba(62, 112, 255, .22));
}

.channels article h3 {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    margin: 0 0 -10px;
    line-height: 1.1;
    white-space: nowrap;
    min-width: 0;
}

.channels article p {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    margin: 0;
}

.feature-grid article {
    position: relative;
    display: grid;
    grid-template-columns: clamp(120px, 13.5vw, 171px) minmax(0, 1fr);
    gap: clamp(22px, 3vw, 34px);
    align-items: center;
    padding: 28px 30px;
    overflow: hidden;
}

.feature-icon {
    display: block;
    width: 100%;
    max-width: 171px;
    height: auto;
    filter: drop-shadow(0 18px 28px rgba(62, 112, 255, .24));
    transform: translateX(-2px);
}

.feature-grid article h3 {
    margin-top: 0;
}

.channels p,
.feature-grid p,
.case-grid p,
.integration p,
.steps p {
    color: var(--muted);
    line-height: 1.65;
}

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

.demo-stage {
    display: grid;
    grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
    gap: clamp(22px, 4vw, 42px);
    align-items: stretch;
}

.demo-controls {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: -14px;
}

.demo-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(122, 145, 178, .42);
    box-shadow: 0 0 0 1px rgba(122, 145, 178, .22);
    cursor: pointer;
    transition: width .22s ease, background .22s ease, box-shadow .22s ease, transform .22s ease;
}

.demo-dot:hover {
    transform: translateY(-1px);
    background: rgba(47, 124, 246, .62);
}

.demo-dot.is-active {
    width: 34px;
    background: linear-gradient(135deg, var(--accent), var(--violet));
    box-shadow: 0 8px 18px rgba(47, 124, 246, .28);
}

.demo-scenario {
    margin-top: 34px;
}

.section-head + .demo-scenario {
    margin-top: 0;
}

.demo-scenario__head {
    max-width: 900px;
    margin-bottom: 18px;
}

.demo-scenario__head h3 {
    margin-bottom: 10px;
    font-size: clamp(26px, 3vw, 38px);
}

.demo-scenario__head p:last-child {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
}

.demo-chat,
.demo-task {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.demo-chat {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 620px;
    overflow: hidden;
}

.demo-chat__top {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    row-gap: 2px;
    align-items: center;
    padding: 18px 20px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--violet));
}

.demo-chat__top small {
    grid-column: 2;
    opacity: .82;
}

.demo-chat__dot {
    grid-row: 1 / span 2;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .24);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
}

.demo-chat[data-channel="telegram"] .demo-chat__top {
    background: linear-gradient(135deg, #2f7cf6, #34c6f4);
}

.demo-chat[data-channel="telegram"] .demo-chat__dot {
    background: url('/src/icon-telegram.svg') center / cover no-repeat;
    box-shadow: none;
}

.demo-chat[data-channel="max"] .demo-chat__top {
    background: linear-gradient(135deg, #2b2038, #7957e5);
}

.demo-chat[data-channel="max"] .demo-chat__dot {
    background: url('/src/icon-max.svg') center / cover no-repeat;
    box-shadow: none;
}

.demo-chat[data-channel="web"] .demo-chat__top {
    background: linear-gradient(135deg, #2f7cf6, #7957e5);
}

.demo-chat[data-channel="web"] .demo-chat__dot {
    background: url('/src/icon-web.svg') center / cover no-repeat;
    box-shadow: none;
}

.demo-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    background:
        radial-gradient(circle at top right, rgba(73, 200, 255, .14), transparent 34%),
        var(--surface-soft);
    overflow: hidden;
}

.demo-message {
    max-width: 84%;
    padding: 12px 14px;
    border-radius: 16px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    animation: messageIn .36s ease both;
}

.demo-message.user {
    align-self: flex-end;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--violet));
    border-color: transparent;
}

.demo-message.system {
    align-self: center;
    max-width: 92%;
    color: var(--muted);
    font-size: 14px;
    background: transparent;
    border-style: dashed;
}

.demo-message.system.is-handoff {
    color: var(--text);
    background: linear-gradient(110deg, rgba(47, 124, 246, .12), rgba(73, 200, 255, .24), rgba(176, 132, 255, .18), rgba(47, 124, 246, .12));
    background-size: 240% 100%;
    border-color: rgba(73, 200, 255, .46);
    box-shadow: 0 12px 28px rgba(47, 124, 246, .16);
    animation: messageIn .36s ease both, handoffGlow 2.4s ease-in-out infinite;
}

.demo-message small {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
}

.demo-message.user small {
    color: rgba(255, 255, 255, .78);
}

.demo-input {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
}

.demo-input span {
    flex: 1;
    padding: 13px 14px;
    color: var(--muted);
    background: var(--surface-soft);
    border-radius: 12px;
}

.demo-input button {
    width: 44px;
    height: 44px;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: 12px;
    font-size: 22px;
}

.demo-task {
    padding: 28px;
}

.demo-task h3 {
    font-size: 30px;
}

.task-fields {
    display: grid;
    gap: 12px;
    margin: 24px 0;
}

.task-fields div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 16px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.task-fields span {
    color: var(--muted);
}

.task-fields strong {
    text-align: right;
    font-weight: 620;
}

.task-fields div.is-filled {
    border-color: rgba(47, 124, 246, .48);
    box-shadow: 0 0 0 3px rgba(47, 124, 246, .1);
}

.task-fields div.is-revealing {
    animation: fieldReveal .72s cubic-bezier(.2, 1.35, .32, 1) both;
}

.task-fields div.is-revealing strong {
    color: #fff;
    text-shadow: 0 0 18px rgba(73, 200, 255, .38);
}

.demo-result {
    padding: 18px;
    color: var(--text);
    background: linear-gradient(135deg, rgba(73, 200, 255, .16), rgba(176, 132, 255, .16));
    border: 1px solid rgba(90, 162, 255, .32);
    border-radius: 14px;
}

.demo-result.is-revealed {
    animation: resultReveal .58s ease both;
}

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

@keyframes fieldReveal {
    0% {
        opacity: .45;
        transform: scale(.96);
        background: rgba(73, 200, 255, .14);
    }
    45% {
        opacity: 1;
        transform: scale(1.045);
        background: linear-gradient(135deg, rgba(47, 124, 246, .42), rgba(121, 87, 229, .34));
        box-shadow: 0 0 0 4px rgba(73, 200, 255, .16), 0 18px 34px rgba(47, 124, 246, .26);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes resultReveal {
    0% {
        opacity: .72;
        transform: scale(.98);
    }
    60% {
        opacity: 1;
        transform: scale(1.025);
        box-shadow: 0 0 0 4px rgba(73, 200, 255, .12), 0 16px 34px rgba(47, 124, 246, .16);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes handoffGlow {
    0%, 100% {
        background-position: 0% 50%;
        box-shadow: 0 12px 28px rgba(47, 124, 246, .14);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 16px 36px rgba(121, 87, 229, .24);
    }
}

.section-head {
    max-width: 760px;
    margin-bottom: 32px;
}

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

.feature-grid article {
    min-height: 210px;
}

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

.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: steps;
}

.steps li {
    position: relative;
    min-height: 280px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.steps span {
    display: block;
    margin-bottom: 26px;
    color: var(--accent);
    font-size: 36px;
    line-height: .9;
    font-weight: 780;
}

.steps strong {
    display: block;
    margin-bottom: 10px;
    font-size: 19px;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.case-grid article {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 22px;
    row-gap: 10px;
    place-content: start;
    place-items: start;
    min-height: 230px;
    padding: 26px;
}

.case-grid img {
    grid-column: 1;
    grid-row: 1;
    width: 78px;
    height: auto;
    margin: 0;
    filter: drop-shadow(0 18px 30px rgba(62, 112, 255, .22));
}

.case-grid h3 {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin: 0;
    line-height: 1.15;
    min-width: 0;
}

.case-grid p {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
}

.integration {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
    gap: 32px;
    align-items: center;
    background: var(--integration-bg);
    color: var(--button-text);
}

.integration .eyebrow {
    color: #9ddfff;
}

.integration p {
    max-width: 760px;
    color: var(--integration-text);
    font-size: 18px;
}

.endpoint {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 88px;
    padding: 22px;
    color: var(--text);
}

.endpoint span {
    padding: 8px 10px;
    color: var(--button-text);
    background: linear-gradient(135deg, var(--accent), var(--violet));
    border-radius: 8px;
    font-size: 13px;
    font-weight: 850;
}

.endpoint code {
    overflow-wrap: anywhere;
    font-size: 18px;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 28px clamp(20px, 5vw, 72px);
    color: var(--muted);
    background: var(--footer-bg);
    border-top: 1px solid var(--line);
}

.footer span {
    color: var(--text);
    font-weight: 760;
}

@media (min-width: 981px) {
    .hero {
        min-height: auto;
        padding-top: clamp(24px, 3vw, 42px);
        padding-bottom: clamp(28px, 3vw, 44px);
    }
}

@media (min-width: 981px) and (max-width: 1420px) {
    .hero {
        grid-template-columns: minmax(360px, .68fr) minmax(610px, 1.32fr);
        gap: clamp(18px, 2.2vw, 34px);
    }

    h1 {
        font-size: clamp(42px, 5vw, 66px);
        max-width: 560px;
    }

    .hero-copy {
        max-width: 560px;
    }

    .lead {
        max-width: 540px;
        font-size: clamp(17px, 1.55vw, 20px);
    }
}

@media (min-width: 681px) and (max-width: 1280px) {
    .steps,
    .case-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .steps li {
        min-height: 240px;
    }

    .case-grid article {
        grid-template-columns: 86px minmax(0, 1fr);
        min-height: 210px;
    }

    .case-grid img {
        width: 86px;
    }
}

@media (max-width: 980px) {
    .site-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 34px 42px;
        align-items: center;
        gap: 12px;
        min-height: 76px;
        padding: 10px 18px;
        transition: min-height .22s ease, padding .22s ease;
    }

    .brand {
        min-width: 0;
    }

    .brand-logo {
        width: 190px;
    }

    .brand-caption {
        margin-top: -9px;
        padding-left: 74px;
    }

    .theme-toggle {
        width: 34px;
        height: 34px;
        justify-self: end;
        border-radius: 10px;
    }

    .theme-toggle__image {
        width: 34px !important;
        height: 34px !important;
        max-width: 34px !important;
        max-height: 34px !important;
    }

    .menu-toggle {
        position: relative;
        z-index: 22;
        display: grid;
        gap: 5px;
        place-content: center;
        justify-self: end;
        width: 42px;
        height: 42px;
        padding: 0;
        color: var(--accent-dark);
        background: transparent;
        border: 0;
        border-radius: 10px;
        cursor: pointer;
    }

    .menu-toggle span {
        display: block;
        width: 28px;
        height: 3px;
        border-radius: 999px;
        background: currentColor;
        transition: transform .18s ease, opacity .18s ease;
    }

    .site-header.is-menu-open .menu-toggle span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .site-header.is-menu-open .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .site-header.is-menu-open .menu-toggle span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav {
        position: absolute;
        top: calc(100% - 1px);
        left: 18px;
        right: 18px;
        z-index: 21;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: auto;
        max-height: 0;
        padding: 0;
        overflow: hidden;
        background: var(--header-bg);
        border: 0 solid var(--line);
        border-radius: 0 0 12px 12px;
        box-shadow: var(--shadow);
        opacity: 0;
        pointer-events: none;
        transition: max-height .24s ease, padding .24s ease, opacity .18s ease;
    }

    .site-header.is-menu-open .nav {
        max-height: 340px;
        padding: 12px;
        border-width: 1px;
        opacity: 1;
        pointer-events: auto;
    }

    .nav a {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .site-header.is-mobile-collapsed:not(.is-menu-open) {
        grid-template-columns: 1fr 42px;
        min-height: 54px;
        padding-top: 6px;
        padding-bottom: 6px;
        background: transparent;
        border-bottom-color: transparent;
        backdrop-filter: none;
    }

    .site-header.is-mobile-collapsed:not(.is-menu-open) .brand,
    .site-header.is-mobile-collapsed:not(.is-menu-open) .theme-toggle,
    .site-header.is-mobile-collapsed:not(.is-menu-open) .nav {
        display: none;
    }

    .site-header.is-mobile-collapsed:not(.is-menu-open) .menu-toggle {
        grid-column: 2;
        color: var(--accent);
        background: rgba(18, 27, 49, .72);
        border: 1px solid var(--line);
        backdrop-filter: blur(14px);
    }

    .hero,
    .intro,
    .demo-stage,
    .integration {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding-top: 40px;
    }

    .hero-visual {
        min-height: 0;
    }

    .demo-chat {
        min-height: 560px;
    }

    .steps,
    .channels,
    .case-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .channels article,
    .case-grid article {
        min-height: 180px;
    }
}

@media (max-width: 680px) {
    .hero-energy {
        display: none;
    }

    .hero-actions,
    .button {
        width: 100%;
    }

    .channels,
    .feature-grid,
    .steps,
    .case-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .endpoint {
        align-items: flex-start;
        flex-direction: column;
    }

    .channels article {
        grid-template-columns: 54px minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 16px;
        min-height: 0;
        padding: 20px;
    }

    .channels article img {
        grid-column: 1;
        grid-row: 1;
        width: 54px;
        margin: 0;
    }

    .channels article h3 {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
    }

    .channels article p {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .feature-grid article {
        grid-template-columns: 58px minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 16px;
        row-gap: 14px;
        min-height: 150px;
        padding: 20px;
    }

    .feature-icon {
        grid-column: 1;
        grid-row: 1;
        max-width: 58px;
    }

    .feature-grid article h3 {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        margin: 0;
    }

    .feature-grid article p {
        grid-column: 1 / -1;
        grid-row: 2;
        margin: 0;
    }

    .case-grid article {
        grid-template-columns: 58px minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 16px;
        row-gap: 14px;
        min-height: 0;
        padding: 20px;
    }

    .case-grid img {
        grid-column: 1;
        grid-row: 1;
        width: 58px;
    }

    .case-grid h3 {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
    }

    .case-grid p {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}
