:root {
    --kp-ink: #071817;
    --kp-ink-soft: #19312f;
    --kp-muted: #526764;
    --kp-paper: #f5f7f2;
    --kp-paper-warm: #fbfcf8;
    --kp-panel: rgba(255, 255, 255, 0.86);
    --kp-panel-solid: #ffffff;
    --kp-line: rgba(13, 49, 45, 0.12);
    --kp-line-strong: rgba(13, 49, 45, 0.2);
    --kp-teal: #0f766e;
    --kp-teal-dark: #084b46;
    --kp-teal-soft: #dff0ea;
    --kp-coral: #c2410c;
    --kp-gold: #b7791f;
    --kp-blue: #2563eb;
    --kp-violet: #6d5dfc;
    --kp-radius: 8px;
    --kp-shadow-sm: 0 10px 30px rgba(18, 35, 32, 0.08);
    --kp-shadow-md: 0 22px 70px rgba(18, 35, 32, 0.14);
    --kp-shadow-dark: 0 28px 90px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    overflow-x: clip;
}

body.landing-page {
    min-width: 320px;
    margin: 0;
    overflow-x: clip;
    background:
        radial-gradient(circle at 12% 20%, rgba(15, 118, 110, 0.08), transparent 28%),
        linear-gradient(180deg, #f7f9f4 0%, var(--kp-paper) 52%, #eef3ed 100%);
    color: var(--kp-ink);
    font-family: Arial, Helvetica, sans-serif;
    text-rendering: geometricPrecision;
}

body.landing-page.is-busy {
    overflow: hidden;
}

body.landing-page::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(7, 24, 23, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(7, 24, 23, 0.03) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, transparent, #000 18%, #000 76%, transparent);
    content: "";
}

a {
    color: inherit;
}

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

h1 {
    max-width: 760px;
    margin-bottom: 18px;
    font-size: clamp(48px, 7vw, 92px);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 14px;
    font-size: clamp(32px, 4.2vw, 56px);
    line-height: 1.03;
    font-weight: 900;
    letter-spacing: 0;
}

h3 {
    margin-bottom: 10px;
    font-size: 20px;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: 0;
}

.primary-action,
.secondary-action {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: var(--kp-radius);
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.primary-action {
    background: #ffffff;
    color: var(--kp-teal-dark);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.secondary-action {
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    backdrop-filter: blur(16px);
}

.primary-action:hover,
.primary-action:focus,
.secondary-action:hover,
.secondary-action:focus {
    transform: translateY(-1px);
}

.primary-action:focus-visible,
.secondary-action:focus-visible {
    outline: 3px solid rgba(250, 204, 21, 0.6);
    outline-offset: 3px;
}

.landing-hero {
    position: relative;
    height: 100vh;
    min-height: 680px;
    display: grid;
    align-items: end;
    overflow: hidden;
    padding: 84px max(28px, calc((100vw - 1180px) / 2)) 54px;
    color: #ffffff;
    isolation: isolate;
}

.scroll-page {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.hero-video,
.hero-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-video {
    z-index: -2;
    object-fit: cover;
    object-position: 68% center;
    background: #071817;
    filter: saturate(1.06) contrast(1.02) brightness(1.08);
}

.hero-shade {
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(3, 16, 15, 0.82), rgba(3, 16, 15, 0.48) 38%, rgba(3, 16, 15, 0.08) 72%),
        linear-gradient(0deg, rgba(3, 16, 15, 0.58), rgba(3, 16, 15, 0.05) 58%);
}

.hero-content {
    width: min(760px, 100%);
    padding-bottom: 10px;
    text-shadow: 0 2px 22px rgba(0, 0, 0, 0.38);
}

.section-label {
    margin: 0 0 12px;
    color: var(--kp-coral);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.landing-hero .section-label {
    color: #fde68a;
}

.hero-copy {
    max-width: 690px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.91);
    font-size: clamp(18px, 2.2vw, 23px);
    line-height: 1.52;
}

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

.signal-strip,
.video-section,
.modules-section,
.order-section,
.closing-section {
    width: min(1180px, calc(100% - 48px));
    margin-right: auto;
    margin-left: auto;
}

.signal-strip {
    position: relative;
    z-index: 2;
    transform: translateY(-38px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.56);
    border-radius: var(--kp-radius);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--kp-shadow-md);
    backdrop-filter: blur(22px);
}

.signal-strip article {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.58);
    transition: background 180ms ease, transform 180ms ease;
}

.signal-strip article:hover {
    background: rgba(255, 255, 255, 0.88);
    transform: translateY(-1px);
}

.feature-icon,
.signal-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid rgba(15, 118, 110, 0.12);
    border-radius: var(--kp-radius);
    background: linear-gradient(145deg, rgba(15, 118, 110, 0.13), rgba(15, 118, 110, 0.06));
    color: var(--kp-teal);
}

.feature-icon svg,
.signal-icon svg {
    width: 22px;
    height: 22px;
}

.signal-strip span {
    font-size: 14px;
    font-weight: 900;
}

.signal-strip article > span:last-child {
    text-transform: uppercase;
}

.modules-section,
.video-section,
.order-section {
    min-height: 100svh;
    justify-content: center;
    padding: 42px 0;
}

.modules-section,
.video-section {
    display: flex;
    flex-direction: column;
}

.section-heading {
    width: min(800px, 100%);
    margin-bottom: 26px;
}

.section-heading p:not(.section-label),
.closing-section p {
    color: var(--kp-muted);
    font-size: 16px;
    line-height: 1.62;
}

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

.module-grid article {
    position: relative;
    min-height: 172px;
    overflow: hidden;
    padding: 16px;
    border: 1px solid var(--kp-line);
    border-radius: var(--kp-radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.76)),
        var(--kp-panel-solid);
    box-shadow: var(--kp-shadow-sm);
}

.module-grid article::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--kp-teal), rgba(15, 118, 110, 0));
    content: "";
}

.module-grid article:nth-child(1),
.module-grid article:nth-child(5),
.module-grid article:nth-child(6) {
    grid-column: span 2;
}

.module-grid article:nth-child(7) {
    grid-column: span 2;
}

.module-grid h3 {
    margin-top: 13px;
    font-size: 19px;
}

.module-grid ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--kp-muted);
    font-size: 13.5px;
    line-height: 1.34;
}

.module-grid article:not(:nth-child(1)):not(:nth-child(5)):not(:nth-child(6)):not(:nth-child(7)) ul {
    grid-template-columns: 1fr;
}

.module-grid li {
    position: relative;
    padding-left: 18px;
}

.module-grid li::before {
    position: absolute;
    top: 0.58em;
    left: 0;
    width: 8px;
    height: 8px;
    border: 2px solid rgba(15, 118, 110, 0.22);
    border-radius: 50%;
    background: var(--kp-teal);
    content: "";
    transform: translateY(-50%);
}

.module-grid article:nth-child(2) .feature-icon,
.module-grid article:nth-child(5) .feature-icon {
    border-color: rgba(37, 99, 235, 0.14);
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.13), rgba(37, 99, 235, 0.05));
    color: var(--kp-blue);
}

.module-grid article:nth-child(3) .feature-icon,
.module-grid article:nth-child(6) .feature-icon {
    border-color: rgba(183, 121, 31, 0.18);
    background: linear-gradient(145deg, rgba(183, 121, 31, 0.15), rgba(183, 121, 31, 0.05));
    color: var(--kp-gold);
}

.module-grid article:nth-child(4) .feature-icon,
.module-grid article:nth-child(7) .feature-icon {
    border-color: rgba(109, 93, 252, 0.15);
    background: linear-gradient(145deg, rgba(109, 93, 252, 0.13), rgba(109, 93, 252, 0.05));
    color: var(--kp-violet);
}

.video-section {
    width: min(1220px, calc(100% - 48px));
}

.video-section .section-heading {
    margin-bottom: 20px;
}

.video-layout {
    position: relative;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: var(--kp-radius);
    background:
        linear-gradient(135deg, rgba(11, 79, 74, 0.46), rgba(7, 24, 23, 0.92)),
        #071817;
    box-shadow: var(--kp-shadow-dark);
}

.video-layout::before {
    display: block;
    height: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 12px 12px, #ff7043 0 5px, transparent 6px),
        radial-gradient(circle at 34px 12px, #f5c451 0 5px, transparent 6px),
        radial-gradient(circle at 56px 12px, #4fc28b 0 5px, transparent 6px);
    content: "";
}

.demo-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border-radius: var(--kp-radius);
    background: #071817;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
    pointer-events: none;
}

.closing-section {
    min-height: calc(100svh - 82px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    padding: 42px;
}

.closing-section > div {
    padding: 36px;
    border: 1px solid var(--kp-line);
    border-radius: var(--kp-radius);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--kp-shadow-sm);
}

.closing-section p {
    max-width: 720px;
    margin-bottom: 0;
}

.closing-section .primary-action {
    background: var(--kp-teal);
    color: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 118, 110, 0.24);
}

.order-section {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1fr);
    gap: 24px;
    align-items: center;
    justify-content: stretch;
}

.order-copy,
.order-form {
    border: 1px solid rgba(13, 49, 45, 0.13);
    border-radius: var(--kp-radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78)),
        var(--kp-panel-solid);
    box-shadow: var(--kp-shadow-md);
}

.order-copy {
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 38px;
}

.order-copy p:not(.section-label) {
    max-width: 620px;
    color: var(--kp-muted);
    font-size: 16px;
    line-height: 1.65;
}

.order-preview {
    display: grid;
    gap: 8px;
    margin-top: 28px;
    padding: 18px;
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: var(--kp-radius);
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.11), rgba(37, 99, 235, 0.07));
}

.order-preview span {
    color: var(--kp-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.order-preview strong {
    font-size: 26px;
    line-height: 1.1;
}

.order-preview code {
    width: fit-content;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 7px 9px;
    border-radius: 6px;
    background: rgba(7, 24, 23, 0.08);
    color: var(--kp-teal-dark);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 900;
}

.order-form {
    display: grid;
    gap: 14px;
    padding: 22px;
}

.order-form label {
    display: grid;
    gap: 7px;
    position: relative;
}

.order-form label > span:not(.field-help) {
    color: var(--kp-ink);
    font-size: 14px;
    font-weight: 900;
}

.order-form input {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(13, 49, 45, 0.16);
    border-radius: var(--kp-radius);
    background: rgba(255, 255, 255, 0.82);
    color: var(--kp-ink);
    font: inherit;
    font-size: 15px;
    padding: 11px 12px;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.order-form input:focus {
    border-color: rgba(15, 118, 110, 0.55);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.11);
}

.order-form small {
    color: var(--kp-muted);
    font-size: 12.5px;
    line-height: 1.42;
}

.field-help {
    display: grid;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(235, 247, 243, 0.92);
    color: #244b46;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.46;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height 180ms ease, opacity 160ms ease, padding 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.field-help strong {
    color: var(--kp-teal-dark);
    font-weight: 900;
}

.order-form label:focus-within .field-help {
    max-height: 120px;
    padding: 10px 12px;
    border-color: rgba(15, 118, 110, 0.14);
    opacity: 1;
    transform: translateY(0);
}

.domain-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border: 1px solid rgba(13, 49, 45, 0.16);
    border-radius: var(--kp-radius);
    background: rgba(255, 255, 255, 0.82);
}

.domain-field:focus-within {
    border-color: rgba(15, 118, 110, 0.55);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.11);
}

.domain-field input {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.domain-field input:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.domain-field strong {
    padding-right: 12px;
    color: var(--kp-muted);
    font-size: 14px;
}

.form-status {
    display: none;
    color: var(--kp-muted);
    font-size: 13px;
    font-weight: 900;
}

.form-status:not(:empty) {
    display: block;
    min-height: 22px;
}

.form-status[data-type="working"] {
    color: var(--kp-blue);
}

.form-status[data-type="ok"],
#subdomainMessage[data-type="ok"],
#adminPasswordMessage[data-type="ok"] {
    color: var(--kp-teal);
}

.form-status[data-type="error"],
#subdomainMessage[data-type="error"],
#adminPasswordMessage[data-type="error"] {
    color: #b91c1c;
}

.order-result {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: var(--kp-radius);
    background: rgba(223, 240, 234, 0.68);
}

.order-result[hidden] {
    display: none;
}

.order-result strong {
    font-size: 15px;
}

.order-result span {
    color: var(--kp-muted);
    font-size: 13px;
}

.order-result a {
    width: fit-content;
    max-width: 100%;
    overflow-wrap: anywhere;
    color: var(--kp-teal-dark);
    font-size: 14px;
    font-weight: 900;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.order-submit {
    min-height: 48px;
    border: 0;
    border-radius: var(--kp-radius);
    background: linear-gradient(135deg, var(--kp-teal), var(--kp-teal-dark));
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 18px 42px rgba(15, 118, 110, 0.24);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.order-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 50px rgba(15, 118, 110, 0.3);
}

.order-submit:disabled {
    cursor: wait;
    opacity: 0.74;
    transform: none;
    box-shadow: none;
}

.busy-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(7, 24, 23, 0.92), rgba(8, 75, 70, 0.82)),
        rgba(7, 24, 23, 0.9);
    backdrop-filter: blur(18px);
}

.busy-overlay[hidden] {
    display: none;
}

.busy-panel {
    width: min(100%, 420px);
    display: grid;
    justify-items: center;
    gap: 22px;
    padding: 32px 28px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--kp-radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 248, 246, 0.9)),
        #ffffff;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
    text-align: center;
}

.busy-spinner {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background:
        conic-gradient(from 0deg, var(--kp-teal), var(--kp-blue), var(--kp-gold), var(--kp-teal));
    animation: busy-spin 900ms linear infinite;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 12px), #000 calc(100% - 11px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 12px), #000 calc(100% - 11px));
}

.busy-copy {
    display: grid;
    gap: 8px;
}

.busy-copy strong {
    color: var(--kp-ink);
    font-size: 22px;
    line-height: 1.15;
    font-weight: 900;
}

.busy-copy p {
    min-height: 44px;
    margin: 0;
    color: var(--kp-muted);
    font-size: 16px;
    line-height: 1.42;
}

@keyframes busy-spin {
    to {
        transform: rotate(1turn);
    }
}

.landing-footer {
    padding: 24px 32px;
    border-top: 1px solid var(--kp-line);
    color: var(--kp-muted);
    font-size: 14px;
}

@media (max-width: 1120px) {
    .module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .module-grid article,
    .module-grid article:nth-child(1),
    .module-grid article:nth-child(5),
    .module-grid article:nth-child(6),
    .module-grid article:nth-child(7) {
        grid-column: span 1;
    }

    .module-grid article:nth-child(1) ul,
    .module-grid article:nth-child(5) ul,
    .module-grid article:nth-child(6) ul,
    .module-grid article:nth-child(7) ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .landing-hero {
        min-height: 650px;
        padding: 78px 24px 42px;
    }

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

    .closing-section {
        grid-template-columns: 1fr;
    }

    .order-section {
        grid-template-columns: 1fr;
    }

    .order-copy {
        min-height: 0;
    }

    .closing-section .primary-action {
        width: fit-content;
    }
}

@media (max-width: 760px) {
    html {
        scroll-snap-type: none;
    }

    .landing-hero {
        height: auto;
        min-height: 620px;
        padding: 64px 18px 34px;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .primary-action,
    .secondary-action {
        width: 100%;
    }

    .signal-strip,
    .video-section,
    .modules-section,
    .order-section,
    .closing-section {
        width: min(100% - 24px, 1180px);
    }

    .signal-strip,
    .module-grid {
        grid-template-columns: 1fr;
    }

    .signal-strip {
        transform: translateY(-20px);
    }

    .modules-section,
    .video-section,
    .order-section {
        min-height: 0;
        padding: 42px 0;
    }

    .order-copy,
    .order-form {
        padding: 20px;
    }

    .order-preview strong {
        font-size: 22px;
    }

    .module-grid article {
        min-height: 0;
    }

    .video-layout {
        padding: 10px;
    }

    .video-layout::before {
        height: 24px;
    }

    .closing-section {
        min-height: 0;
        padding: 42px 0;
    }

    .closing-section > div {
        padding: 24px;
    }

    .landing-footer {
        padding: 22px 18px;
    }
}

@media (max-width: 420px) {
    .domain-field {
        grid-template-columns: 1fr;
    }

    .domain-field strong {
        padding: 0 12px 12px;
    }

    .busy-panel {
        padding: 28px 20px;
    }

    .busy-copy strong {
        font-size: 20px;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
