:root {
    --bg: #0a0f1a;
    --bg-soft: #111827;
    --card: #151f33;
    --card-border: #24344d;
    --header-bg: #eef4fb;
    --header-border: #c9d8eb;
    --text: #eef3fb;
    --muted: #9bb0c9;
    --accent: #5b2c80;
    --accent-light: #7c3aed;
    --accent-blue: #3b82f6;
    --success: #34d399;
    --danger: #fecaca;
    --danger-bg: rgba(127, 29, 29, 0.45);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    --radius: 16px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(91, 44, 128, 0.35), transparent 42%),
        radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.18), transparent 35%),
        var(--bg);
    color: var(--text);
    line-height: 1.55;
    padding:
        calc(12px + var(--safe-top))
        calc(12px + var(--safe-right))
        calc(24px + var(--safe-bottom))
        calc(12px + var(--safe-left));
}

a {
    color: #93c5fd;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: min(1080px, 100%);
    margin: 0 auto;
}

.logo-link img {
    display: block;
    width: min(200px, 100%);
    height: auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    background: var(--header-bg);
    border: 1px solid var(--header-border);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.logo-link:hover {
    text-decoration: none;
    opacity: 0.92;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    color: #fff;
    box-shadow: 0 10px 24px rgba(91, 44, 128, 0.35);
}

.btn-secondary {
    background: rgba(59, 130, 246, 0.14);
    color: #dbeafe;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--card-border);
}

.btn-block {
    width: 100%;
}

.hero {
    display: grid;
    gap: 24px;
    margin-bottom: 32px;
}

.hero-card,
.section-card,
.form-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 28px 22px;
}

.hero h1 {
    margin: 0 0 14px;
    font-size: clamp(1.35rem, 4vw, 2rem);
    line-height: 1.25;
    text-align: center;
}

.hero p {
    margin: 0 0 12px;
    color: var(--muted);
}

.hero p:last-child {
    margin-bottom: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.section-title {
    margin: 0 0 18px;
    font-size: clamp(1.15rem, 3vw, 1.5rem);
}

.benefits {
    margin-bottom: 32px;
}

.trial-cta {
    margin-bottom: 32px;
}

.trial-cta__card {
    text-align: center;
}

.trial-cta__title {
    margin-bottom: 12px;
}

.trial-cta__lead {
    margin-left: auto;
    margin-right: auto;
    max-width: 36rem;
}

.trial-cta__status,
.trial-flow-status {
    margin: 14px 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.trial-cta__status.is-error,
.trial-flow-status.is-error {
    color: #fecaca;
}

.trial-enter-card {
    text-align: center;
}

.trial-enter-lead {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 600;
    color: #dbeafe;
}

.trial-register-frame {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding:
        calc(16px + var(--safe-top))
        calc(16px + var(--safe-right))
        calc(16px + var(--safe-bottom))
        calc(16px + var(--safe-left));
}

.trial-register-frame[hidden] {
    display: none;
}

.trial-register-frame__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(4px);
}

.trial-register-frame__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    max-height: calc(100vh - 32px - var(--safe-top) - var(--safe-bottom));
    overflow: auto;
    padding: 22px 18px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}

.trial-register-frame__title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    text-align: center;
}

.trial-register-frame__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.12);
    color: #dbeafe;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.trial-register-frame__close:hover {
    background: rgba(59, 130, 246, 0.22);
}

body.trial-register-open {
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.benefits-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}

.benefit-card {
    background: var(--bg-soft);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.benefit-card[open] {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
}

.benefit-card__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.benefit-card__summary::-webkit-details-marker {
    display: none;
}

.benefit-card__summary::marker {
    content: "";
}

.benefit-card__summary:hover {
    background: rgba(59, 130, 246, 0.06);
}

.benefit-card__summary:focus-visible {
    outline: 2px solid rgba(124, 58, 237, 0.55);
    outline-offset: -2px;
}

.benefit-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: #dbeafe;
    line-height: 1.35;
}

.benefit-card__chevron {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    transition: transform 0.2s ease, background 0.15s ease;
}

.benefit-card__chevron::before {
    content: "›";
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 700;
    transform: translateX(1px);
}

.benefit-card[open] .benefit-card__chevron {
    transform: rotate(90deg);
    background: rgba(59, 130, 246, 0.22);
}

.benefit-card__body {
    padding: 0 16px 16px;
    border-top: 1px solid rgba(36, 52, 77, 0.65);
}

.benefit-card__body p {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 0.94rem;
}

.benefit-card strong {
    color: #f8fafc;
}

.trial-section {
    display: grid;
    gap: 18px;
    margin-bottom: 28px;
}

.form-card {
    padding: 22px 18px;
}

.form-card h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.form-lead {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.92rem;
}

label {
    display: block;
    margin: 0 0 6px;
    font-size: 0.86rem;
    color: #c5d4e8;
}

input {
    width: 100%;
    margin-bottom: 14px;
    padding: 12px 13px;
    border-radius: 10px;
    border: 1px solid #334863;
    background: #0f1a2b;
    color: var(--text);
    font: inherit;
}

input:focus {
    outline: 2px solid rgba(124, 58, 237, 0.45);
    border-color: #7c3aed;
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.92rem;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.site-footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
    padding-top: 8px;
}

.site-footer p {
    margin: 0 0 8px;
}

.fab-menu {
    position: fixed;
    z-index: 1000;
    left: calc(12px + var(--safe-left));
    top: calc(96px + var(--safe-top));
}

.fab-menu__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--header-border);
    border-radius: 12px;
    background: var(--header-bg);
    color: #1e3a5f;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.fab-menu__toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
}

.fab-menu__toggle:focus-visible {
    outline: 2px solid rgba(124, 58, 237, 0.55);
    outline-offset: 2px;
}

.fab-menu__icon,
.fab-menu__icon::before,
.fab-menu__icon::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.fab-menu__icon {
    position: relative;
}

.fab-menu__icon::before,
.fab-menu__icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.fab-menu__icon::before {
    top: -6px;
}

.fab-menu__icon::after {
    top: 6px;
}

.fab-menu.is-open .fab-menu__icon {
    background: transparent;
}

.fab-menu.is-open .fab-menu__icon::before {
    top: 0;
    transform: rotate(45deg);
}

.fab-menu.is-open .fab-menu__icon::after {
    top: 0;
    transform: rotate(-45deg);
}

.fab-menu__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    padding: 8px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: rgba(21, 31, 51, 0.98);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.fab-menu__panel[hidden] {
    display: none;
}

.fab-menu__link {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    color: #eef3fb;
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.fab-menu__link:hover {
    text-decoration: none;
    background: rgba(59, 130, 246, 0.14);
    color: #dbeafe;
}

.fab-menu__link + .fab-menu__link {
    margin-top: 4px;
}

@media (min-width: 640px) {
    body {
        padding:
            calc(20px + var(--safe-top))
            calc(20px + var(--safe-right))
            calc(32px + var(--safe-bottom))
            calc(20px + var(--safe-left));
    }

    .fab-menu {
        left: calc(20px + var(--safe-left));
        top: calc(104px + var(--safe-top));
    }

    .hero-card {
        padding: 34px 30px;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trial-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .form-card {
        padding: 24px 22px;
    }
}

@media (min-width: 960px) {
    .benefits-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
