/* Лендинг API. Светлая тема RechAI, без тёмного переключателя. */

:root {
    --bg: #e7edf5;
    --paper: #ffffff;
    --ink: #18181b;
    --muted: #3f3f46;
    --quiet: #52525b;
    --line: rgba(24, 24, 27, 0.12);
    --accent: #6d28d9;
    --accent-2: #9333ea;
    --lilac: #c4b5fd;
    --soft: rgba(147, 51, 234, 0.12);
    --shadow: 0 24px 60px rgba(24, 24, 27, 0.08);
    --max: 1120px;
    color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 70% 42% at 80% -10%, rgba(147, 51, 234, 0.14), transparent 60%),
        radial-gradient(ellipse 40% 30% at 0% 20%, rgba(99, 102, 241, 0.08), transparent 55%),
        var(--bg);
    color: var(--ink);
    font-family: system-ui, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.5;
}

body::before {
    content: "";
    position: fixed;
    inset: auto auto 8% -8%;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(147, 51, 234, 0.08);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}

a { color: inherit; }

img, svg { display: block; max-width: 100%; }

.wrap {
    width: min(var(--max), calc(100% - 48px));
    margin: 0 auto;
    min-width: 0;
}

.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 72px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(24, 24, 27, 0.08);
    backdrop-filter: blur(18px);
}

.nav__in {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(var(--max), calc(100% - 48px));
    margin: 0 auto;
    min-width: 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    height: 40px;
    margin-right: 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.2;
    letter-spacing: 0;
    color: #18181b;
    background-image: linear-gradient(135deg, #18181b 0%, #6d28d9 58%, #9333ea 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.nav__links a {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #3f3f46;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
}

.nav__links a:hover {
    color: #18181b;
    background: rgba(24, 24, 27, 0.05);
}

.nav__cta {
    margin-left: auto;
    gap: 8px;
}

.nav__cta svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1;
    letter-spacing: -0.01em;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:focus-visible {
    outline: 2px solid #6d28d9;
    outline-offset: 3px;
}

.btn-primary {
    color: #fff;
    background: #6d28d9;
    border-color: #6d28d9;
}

.btn-primary:hover { background: #5b21b6; border-color: #5b21b6; }

.btn-ghost {
    color: #18181b;
    background: #fff;
    border-color: rgba(24, 24, 27, 0.14);
}

.btn-ghost:hover {
    background: #fafafa;
    border-color: rgba(24, 24, 27, 0.28);
}

.hero {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 480px);
    gap: 48px;
    align-items: center;
    padding: 36px 0 56px;
}

.kicker {
    margin: 0 0 16px;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

h1 {
    margin: 0;
    max-width: 12ch;
    font-size: clamp(44px, 5.6vw, 68px);
    line-height: 1.02;
    font-weight: 650;
    letter-spacing: -0.035em;
}

h1 em {
    font-style: normal;
    background-image: linear-gradient(135deg, #18181b 10%, #5b21b6 70%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead {
    margin: 22px 0 0;
    max-width: 38rem;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.5;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    color: var(--quiet);
    font-size: 14px;
    font-weight: 600;
}

.facts strong {
    color: var(--ink);
    font-weight: 700;
}

.stage {
    position: relative;
    min-width: 0;
    min-height: 460px;
    overflow: hidden;
}

.stage__word {
    position: absolute;
    right: -6%;
    top: -8%;
    margin: 0;
    font-size: clamp(140px, 18vw, 220px);
    line-height: 0.8;
    font-weight: 700;
    letter-spacing: -0.06em;
    color: rgba(109, 40, 217, 0.09);
    user-select: none;
    pointer-events: none;
}

.ticket {
    position: relative;
    margin-top: 72px;
    background: var(--paper);
    border: 1px solid rgba(24, 24, 27, 0.08);
    border-radius: 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
    min-width: 0;
}

.ticket__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e4e4e7;
}

.dot:first-child { background: #f4a4a4; }
.dot:nth-child(2) { background: #f5d48a; }
.dot:nth-child(3) { background: #9ad7b2; }

.ticket__path {
    margin-left: 8px;
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
    font-size: 13px;
    color: var(--quiet);
}

.ticket__live {
    margin-left: auto;
    font-size: 12px;
    font-weight: 650;
    color: #166534;
}

.ticket pre {
    margin: 0;
    padding: 18px 18px 8px;
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
    font-size: 14px;
    line-height: 1.55;
    color: #27272a;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ticket .k { color: #6d28d9; }
.ticket .s { color: #0f766e; }

.wave {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 72px;
    margin: 8px 16px 16px;
    padding: 0 92px 0 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(196, 181, 253, 0.28), rgba(255, 255, 255, 0.4));
}

.wave i {
    display: block;
    width: 4px;
    height: 36px;
    border-radius: 99px;
    background: #c4b5fd;
    transform-origin: center;
    animation: bar 2.6s ease-in-out infinite;
    animation-delay: calc(var(--i) * 80ms);
}

.wave i:nth-child(3n) { background: #a78bfa; }
.wave i:nth-child(7),
.wave i:nth-child(8),
.wave i:nth-child(9) { background: #7c3aed; }

.uptime {
    position: absolute;
    right: 18px;
    bottom: 28px;
    text-align: right;
}

.uptime b {
    display: block;
    font-size: 22px;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.uptime span {
    font-size: 12px;
    font-weight: 650;
    color: var(--quiet);
}

@keyframes bar {
    0%, 100% { transform: scaleY(0.35); }
    50% { transform: scaleY(1); }
}

.section { position: relative; z-index: 1; padding: 28px 0 72px; scroll-margin-top: 80px; }

h2 {
    margin: 0;
    max-width: 18ch;
    font-size: clamp(32px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 650;
}

.sub {
    margin: 14px 0 0;
    max-width: 40rem;
    color: var(--muted);
    font-size: 17px;
}

.models { margin: 28px 0 0; padding: 0; list-style: none; }

.models li {
    border-top: 1px solid var(--line);
    min-width: 0;
}

.models li:last-child { border-bottom: 1px solid var(--line); }

.models button {
    display: grid;
    grid-template-columns: 52px minmax(0, 220px) minmax(0, 1fr);
    gap: 16px;
    align-items: baseline;
    width: 100%;
    padding: 18px 4px;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    background: none;
    border: 0;
    border-radius: 10px;
}

.models button:hover .name { color: var(--accent); }

.models button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.models .num {
    font-size: 14px;
    font-weight: 650;
    color: var(--accent);
}

.models .name {
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.models .about { color: var(--muted); min-width: 0; }

.models li.is-on .name { color: var(--accent); }

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.step {
    min-width: 0;
    padding: 22px 22px 24px;
    background: var(--paper);
    border-radius: 16px;
    border: 1px solid rgba(24, 24, 27, 0.06);
}

.step b {
    display: block;
    margin-bottom: 12px;
    font-size: 28px;
    letter-spacing: -0.04em;
    color: var(--accent);
}

.step h3 { margin: 0 0 8px; font-size: 18px; }

.step p { margin: 0; color: var(--muted); font-size: 15px; }

.plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
    align-items: stretch;
}

.plan {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 20px 20px;
    background: var(--paper);
    border: 1px solid rgba(24, 24, 27, 0.08);
    border-radius: 18px;
}

.plan.is-pick {
    background:
        linear-gradient(180deg, rgba(147, 51, 234, 0.08), #fff 42%);
    border-color: rgba(109, 40, 217, 0.45);
    box-shadow: var(--shadow);
}

.plan__tag {
    min-height: 18px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.plan h3 { margin: 4px 0 0; font-size: 16px; line-height: 22px; overflow-wrap: anywhere; }

.plan__price {
    margin: 8px 0 0;
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 650;
}

.plan__price span {
    font-size: 15px;
    font-weight: 600;
    color: var(--quiet);
    letter-spacing: 0;
}

.plan__for { margin: 0; color: var(--muted); font-size: 14px; min-height: 40px; }

.plan ul {
    margin: 8px 0 16px;
    padding: 0;
    list-style: none;
    flex: 1;
}

.plan li {
    position: relative;
    padding: 7px 0 7px 16px;
    font-size: 14px;
    color: var(--ink);
}

.plan li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lilac);
}

.plan.is-pick li::before { background: var(--accent); }

.plan .btn { width: 100%; }

.faq { margin-top: 28px; }

.faq details {
    border-top: 1px solid var(--line);
}

.faq details:last-child { border-bottom: 1px solid var(--line); }

.faq summary {
    cursor: pointer;
    padding: 18px 8px;
    font-size: 17px;
    font-weight: 650;
    list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 8px;
}

.faq details p {
    margin: 0;
    padding: 0 8px 18px;
    max-width: 46rem;
    color: var(--muted);
}

.close {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 32px;
    background: var(--paper);
    border-radius: 22px;
    border: 1px solid rgba(24, 24, 27, 0.06);
}

.close h2 { max-width: 12em; }

.foot {
    position: relative;
    z-index: 1;
    padding: 12px 0 36px;
    color: var(--quiet);
    font-size: 14px;
}

.foot__in {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    justify-content: space-between;
    align-items: end;
}

.foot a { color: var(--accent); }

.foot nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }

.foot nav a { text-decoration: none; font-weight: 650; }

.reveal { opacity: 0; transform: translateY(12px); animation: in 0.7s ease forwards; }
.d2 { animation-delay: 0.12s; }

@keyframes in {
    to { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
    .hero, .steps, .plans, .close {
        grid-template-columns: minmax(0, 1fr);
    }
    .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero { min-height: 0; padding-top: 20px; }
    .stage { min-height: 0; }
    .stage__word { font-size: 120px; top: -28px; }
    .ticket { margin-top: 36px; }
    .nav__links { display: none; }
}

@media (max-width: 680px) {
    .wrap, .nav__in { width: min(var(--max), calc(100% - 32px)); }
    h1 { max-width: none; }
    .plans { grid-template-columns: minmax(0, 1fr); }
    .models button { grid-template-columns: 36px minmax(0, 1fr); }
    .models .about { grid-column: 2; }
    .close { padding: 22px; }
    .btn { white-space: normal; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { animation: none; opacity: 1; transform: none; }
    .wave i { animation: none; transform: scaleY(0.7); }
}
