:root {
    --midnight: #0d1830;
    --navy: #13284a;
    --ivory: #f5f1e8;
    --paper: #fffdf8;
    --gold: #b9965b;
    --gold-deep: #9c7640;
    --sage: #95a399;
    --ink: #111b2b;
    --muted: #637084;
    --line: rgba(13, 24, 48, 0.15);
    --max: 1240px;
}

html { background: var(--ivory); }

body {
    background: var(--ivory);
    color: var(--ink);
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.55;
}

body::selection { background: rgba(185, 150, 91, 0.28); }

.container {
    max-width: var(--max);
    padding-inline: 28px;
}

header {
    background: rgba(245, 241, 232, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

nav {
    max-width: var(--max);
    height: 88px;
    padding-inline: 28px;
}

.logo {
    gap: 0;
    color: var(--midnight);
}

.logo-icon,
.logo > span { display: none; }

.logo-image {
    display: block;
    width: 224px;
    height: auto;
}

.cta-nav { gap: 14px; }

.btn-secondary,
.btn-primary,
.btn-large,
.btn-outline-large,
.btn-ghost {
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn-secondary {
    color: var(--navy);
    border-color: rgba(13, 24, 48, 0.2);
    background: transparent;
}

.btn-secondary:hover {
    color: var(--midnight);
    border-color: var(--gold);
}

.btn-primary,
.btn-large {
    color: #fff;
    background: var(--midnight);
    border: 1px solid var(--midnight);
    box-shadow: none;
}

.btn-primary:hover,
.btn-large:hover {
    color: #fff;
    background: var(--navy);
    border-color: var(--navy);
    transform: translateY(-2px);
    box-shadow: none;
}

.btn-outline-large,
.btn-ghost {
    color: var(--midnight);
    border: 1px solid rgba(13, 24, 48, 0.24);
    background: transparent;
}

.btn-outline-large:hover,
.btn-ghost:hover {
    color: var(--midnight);
    border-color: var(--gold);
    background: rgba(185, 150, 91, 0.08);
    transform: translateY(-2px);
}

.btn-large { padding: 17px 30px; }

.hero {
    min-height: auto;
    padding: 76px 0 54px;
    background:
        linear-gradient(90deg, rgba(185, 150, 91, 0.12) 0 1px, transparent 1px) calc(50% - 610px) 0 / 1px 100% no-repeat,
        var(--ivory);
}

.hero::before,
.hero::after { display: none; }

.hero-content {
    max-width: var(--max);
    padding-inline: 28px;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: 34px 58px;
    align-items: center;
}

.hero-copy { padding-block: 30px; }

.badge {
    margin-bottom: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--gold-deep);
    border-radius: 0;
    font-size: 11px;
    letter-spacing: 0.18em;
}

.pulse-dot {
    width: 18px;
    height: 1px;
    border-radius: 0;
    background: var(--gold);
    animation: none;
}

.hero h1,
.section-title,
.cta-title {
    color: var(--midnight);
    font-family: "Inter Tight", Inter, "Helvetica Neue", Arial, sans-serif;
    font-weight: 650;
    letter-spacing: -0.045em;
}

.hero h1 {
    max-width: 650px;
    margin-bottom: 26px;
    font-size: clamp(48px, 5.4vw, 78px);
    line-height: 0.98;
}

.gradient-text {
    color: var(--gold-deep);
    background: none;
    -webkit-text-fill-color: currentColor;
}

.hero-subtitle {
    max-width: 620px;
    margin-bottom: 34px;
    color: var(--muted);
    font-size: clamp(17px, 1.5vw, 21px);
    line-height: 1.55;
}

.hero-actions { gap: 12px; }

.hero-visual {
    position: relative;
    min-height: 570px;
    overflow: hidden;
    border-radius: 32px;
    background: var(--navy);
}

.hero-visual::before,
.hero-visual::after {
    content: "";
    position: absolute;
    z-index: 2;
    width: 44px;
    height: 44px;
    border-color: var(--gold);
    pointer-events: none;
}

.hero-visual::before {
    top: 24px;
    left: 24px;
    border-top: 3px solid var(--gold);
    border-left: 3px solid var(--gold);
}

.hero-visual::after {
    right: 24px;
    bottom: 24px;
    border-right: 3px solid var(--gold);
    border-bottom: 3px solid var(--gold);
}

.hero-visual picture,
.hero-visual img {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-visual img {
    position: absolute;
    inset: 0;
    object-fit: cover;
    object-position: 54% center;
    filter: saturate(0.76) contrast(0.94) brightness(1.05);
}

.hero-visual__caption {
    position: absolute;
    z-index: 3;
    right: 24px;
    bottom: 24px;
    max-width: 260px;
    padding: 16px 18px;
    background: rgba(13, 24, 48, 0.9);
    color: #fff;
    font-size: 13px;
    letter-spacing: 0.04em;
}

.hero-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 8px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.stat-item {
    padding: 24px 24px 24px 0;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    border-radius: 0;
}

.stat-item + .stat-item { padding-left: 24px; }
.stat-item:last-child { border-right: 0; }
.stat-item:hover { transform: none; border-color: var(--line); }

.stat-value {
    color: var(--midnight);
    font-size: 32px;
    font-weight: 650;
    letter-spacing: -0.04em;
}

.stat-label {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.section { padding: 112px 0; }

.section-soft { background: rgba(255, 253, 248, 0.7); }

.section-dark {
    color: #fff;
    background: var(--midnight);
}

.section-header {
    max-width: 900px;
    margin-bottom: 54px;
    text-align: left;
}

.section-title {
    max-width: 820px;
    margin-inline: 0;
    margin-bottom: 20px;
    font-size: clamp(38px, 4.8vw, 64px);
    line-height: 1.02;
}

.section-subtitle {
    max-width: 720px;
    margin-inline: 0;
    color: var(--muted);
    font-size: 18px;
}

.section-dark .section-title { color: #fff; }
.section-dark .section-subtitle { color: rgba(255, 255, 255, 0.68); }

.cards-3,
.cards-4 {
    gap: 0;
    border-top: 1px solid var(--line);
}

.card {
    padding: 34px 28px 42px 0;
    background: transparent;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
}

.card + .card { padding-left: 28px; }
.card:last-child { border-right: 0; }

.card:hover {
    transform: translateY(-4px);
    border-color: var(--line);
    box-shadow: none;
}

.card-icon {
    width: auto;
    height: auto;
    justify-content: flex-start;
    margin-bottom: 44px;
    border-radius: 0;
    background: transparent;
    color: var(--gold-deep);
    font-size: 13px;
    letter-spacing: 0.16em;
}

.card-title {
    margin-bottom: 14px;
    color: var(--midnight);
    font-size: 22px;
    font-weight: 650;
    line-height: 1.25;
}

.card-description { color: var(--muted); }

.steps-container {
    position: relative;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    margin-top: 36px;
}

.steps-container::before {
    content: "";
    position: absolute;
    top: 38px;
    left: 6%;
    right: 6%;
    height: 1px;
    background: linear-gradient(90deg, rgba(185, 150, 91, 0.25), var(--gold));
    transform: rotate(-2.4deg);
    transform-origin: left center;
}

.step {
    position: relative;
    z-index: 1;
    padding: 0 16px 10px 0;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.step:hover { transform: translateY(-5px); border: 0; }

.step-number {
    width: 76px;
    height: 76px;
    margin: 0 0 28px;
    border: 1px solid rgba(185, 150, 91, 0.72);
    border-radius: 50%;
    background: var(--midnight);
    color: var(--gold);
    font-size: 18px;
}

.step:not(:last-child)::after {
    content: "↗";
    position: absolute;
    top: 18px;
    right: 8px;
    color: var(--gold);
    font-size: 22px;
}

.step-title { color: #fff; font-weight: 650; }
.step-description { color: rgba(255, 255, 255, 0.62); }

.demo-layout,
.integration-layout,
.form-wrapper { gap: 24px; }

.demo-box,
.integration-box,
.side-box,
.form-info,
.form-card {
    padding: 34px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 28px;
    color: var(--ink);
    box-shadow: none;
}

.demo-box h3,
.integration-box h3,
.side-box h3,
.form-info h3,
.form-card h3 {
    color: var(--midnight);
    font-weight: 650;
    letter-spacing: -0.02em;
}

.demo-question {
    padding: 24px 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
}

.demo-question h4 { color: var(--midnight); font-weight: 650; }

#demo-quiz .demo-box {
    border: 1px solid rgba(24, 32, 43, 0.06);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(18, 32, 43, 0.12);
}

#demo-quiz .choice-card,
#demo-quiz .image-choice {
    position: relative;
    color: var(--ink);
    border: 1px solid #d8dde5;
    border-radius: 18px;
    background: #fff;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

#demo-quiz .choice-grid {
    grid-template-columns: 1fr;
    gap: 14px;
}

#demo-quiz .choice-card:hover,
#demo-quiz .image-choice:hover {
    border-color: #87a1bd;
    transform: translateY(-2px);
}

#demo-quiz .choice-card.active,
#demo-quiz .image-choice.active {
    border-color: #17324d;
    background: #fbfdff;
    box-shadow: 0 0 0 4px rgba(23, 50, 77, 0.08);
}

#demo-quiz .choice-card::after,
#demo-quiz .image-choice::after {
    content: "✓";
    position: absolute;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #17324d;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(23, 50, 77, 0.25), 0 0 0 3px rgba(255, 255, 255, 0.86);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

#demo-quiz .choice-card::after {
    top: 50%;
    right: 18px;
    transform: translateY(-50%) scale(0.84);
}

#demo-quiz .image-choice::after {
    top: 12px;
    right: 12px;
    transform: scale(0.84);
}

#demo-quiz .choice-card.active::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

#demo-quiz .image-choice.active::after {
    opacity: 1;
    transform: scale(1);
}

#demo-quiz .choice-inner {
    padding: 18px 64px 18px 18px;
    gap: 6px;
    min-height: 0;
}

#demo-quiz .choice-title,
#demo-quiz .image-label {
    color: var(--ink);
    font-size: 17px;
    line-height: 1.3;
}

#demo-quiz .choice-text {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

#demo-quiz .image-choice { overflow: hidden; }

#demo-quiz .image-thumb {
    height: 176px;
    border-color: #d8dde5;
    background: #f5f7fa;
}

#demo-quiz .image-thumb picture,
#demo-quiz .image-thumb img {
    display: block;
    width: 100%;
    height: 100%;
}

#demo-quiz .image-thumb img {
    object-fit: cover;
    filter: saturate(0.82) contrast(0.96);
}

#demo-quiz .image-label {
    padding: 14px 14px 16px;
    text-align: left;
}

#demo-quiz .range-wrap {
    padding: 24px;
    border: 1px solid #d8dde5;
    border-radius: 18px;
    background: #f5f7fa;
}

#demo-quiz .range-value,
.score-preview-value { color: var(--gold-deep); }
#demo-quiz input[type="range"] { accent-color: #17324d; }
#demo-quiz .range-labels { color: var(--muted); }

#demo-quiz .score-preview {
    background: rgba(185, 150, 91, 0.08);
    border-color: rgba(185, 150, 91, 0.3);
    border-radius: 18px;
}

.score-preview-label,
.form-note,
.submit-hint { color: var(--muted); }

.risk-pill.pending {
    background: rgba(13, 24, 48, 0.05);
    border-color: var(--line);
    color: var(--muted);
}

.risk-pill.low {
    background: rgba(149, 163, 153, 0.18);
    border-color: rgba(70, 98, 79, 0.25);
    color: #46624f;
}

.risk-pill.medium {
    background: rgba(185, 150, 91, 0.12);
    border-color: rgba(185, 150, 91, 0.3);
    color: var(--gold-deep);
}

.risk-pill.high {
    background: rgba(148, 75, 70, 0.08);
    border-color: rgba(148, 75, 70, 0.2);
    color: #8a4945;
}

.integration-code {
    background: var(--midnight);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e8e2d8;
}

.mini-list li { color: var(--muted); }
.mini-list li::before {
    width: 9px;
    height: 9px;
    border-radius: 0;
    background: transparent;
    border-top: 2px solid var(--gold);
    border-right: 2px solid var(--gold);
}

.highlight-box,
.quiz-container {
    color: var(--muted);
    background: rgba(149, 163, 153, 0.09);
    border-color: rgba(149, 163, 153, 0.28);
}

.form-section { background: var(--paper); }

.form-group label { color: var(--navy); }

.form-group input,
.form-group select,
.form-group textarea {
    color: var(--ink);
    background: var(--ivory);
    border-color: var(--line);
    border-radius: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(185, 150, 91, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #8b94a2; }

.cta-section {
    position: relative;
    overflow: hidden;
    padding: 120px 24px;
    background: var(--midnight);
}

.cta-section::before,
.cta-section::after {
    content: "";
    position: absolute;
    width: 64px;
    height: 64px;
}

.cta-section::before {
    top: 34px;
    left: 5%;
    border-top: 3px solid var(--gold);
    border-left: 3px solid var(--gold);
}

.cta-section::after {
    right: 5%;
    bottom: 34px;
    border-right: 3px solid var(--gold);
    border-bottom: 3px solid var(--gold);
}

.cta-title { color: #fff; }
.cta-subtitle { color: rgba(255, 255, 255, 0.68); }
.cta-section .btn-large { background: var(--gold); border-color: var(--gold); color: var(--midnight); }
.cta-section .btn-large:hover { background: #c9a86f; border-color: #c9a86f; color: var(--midnight); }

footer {
    background: var(--midnight);
    border-color: rgba(255, 255, 255, 0.11);
}

.footer-feature { color: rgba(255, 255, 255, 0.62); letter-spacing: 0.1em; }
.footer-text { color: rgba(255, 255, 255, 0.42); }

@media (prefers-reduced-motion: no-preference) {
    .hero-copy,
    .hero-visual {
        animation: rise-in 650ms cubic-bezier(.2,.75,.25,1) both;
    }
    .hero-visual { animation-delay: 90ms; }
    @keyframes rise-in {
        from { opacity: 0; transform: translateY(22px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

@media (max-width: 1080px) {
    .hero-content { grid-template-columns: 1fr 0.9fr; gap: 34px; }
    .hero-visual { min-height: 520px; }
    .steps-container { grid-template-columns: repeat(3, 1fr); }
    .steps-container::before { display: none; }
}

@media (max-width: 820px) {
    nav { height: 76px; }
    .logo-image { width: 184px; }
    .hero { padding-top: 44px; }
    .hero-content { grid-template-columns: 1fr; }
    .hero-copy { padding-block: 12px 0; }
    .hero-visual { min-height: 480px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(2) { border-right: 0; }
    .stat-item:nth-child(n+3) { border-top: 1px solid var(--line); }
    .cards-3,
    .cards-4 { grid-template-columns: 1fr 1fr; }
    .card:nth-child(2n) { border-right: 0; }
    .card:nth-child(n+3) { border-top: 1px solid var(--line); }
    .steps-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
    .container,
    nav,
    .hero-content { padding-inline: 18px; }
    nav { height: 70px; }
    .logo-image { width: 154px; }
    .cta-nav .btn-primary { padding: 9px 14px; font-size: 13px; }
    .hero h1 { font-size: clamp(43px, 13vw, 58px); }
    .hero-visual { min-height: 390px; border-radius: 28px; }
    .hero-visual__caption { left: 18px; right: 18px; max-width: none; }
    .hero-stats { grid-template-columns: 1fr 1fr; }
    .stat-item { padding: 20px 14px 20px 0; }
    .stat-item + .stat-item { padding-left: 14px; }
    .section { padding: 82px 0; }
    .section-title { font-size: 40px; }
    .cards-3,
    .cards-4 { grid-template-columns: 1fr; }
    .card,
    .card + .card {
        padding: 28px 0;
        border-right: 0;
        border-top: 1px solid var(--line);
    }
    .card:first-child { border-top: 0; }
    .card-icon { margin-bottom: 26px; }
    .steps-container { grid-template-columns: 1fr; gap: 30px; }
    .step:not(:last-child)::after { content: "↗"; right: 20px; }
    .demo-box,
    .integration-box,
    .side-box,
    .form-info,
    .form-card { padding: 24px; }
    .choice-grid { grid-template-columns: 1fr; }
    .image-grid { grid-template-columns: 1fr; }
    .image-thumb { height: 210px; }
    .cta-section { padding: 92px 18px; }
}
