/* ============================================================
   SamuraiGuard Landing — Parallax Design
   Palette: #0a0a0a (bg), #dc2626 (accent), #f0f0f0 (fg)
   ============================================================ */

:root {
    --bg:          #0a0a0a;
    --panel:       #111111;
    --panel-2:     #181818;
    --border:      #1e1e1e;
    --border-hov:  #2e2e2e;
    --fg:          #f0f0f0;
    --muted:       #555555;
    --muted-2:     #888888;
    --accent:      #dc2626;
    --accent-br:   #ef4444;
    --accent-deep: #991b1b;
    --glow:        rgba(220, 38, 38, 0.18);
    --shadow:      0 8px 40px rgba(0, 0, 0, 0.7);
    --radius:      12px;
    --nav-h:       64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--accent-br); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   CANVAS — частицы на весь экран
   ============================================================ */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    height: var(--nav-h);
    transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.88);
    border-color: var(--border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    color: var(--muted-2);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}

.nav-links a:hover { color: var(--fg); text-decoration: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.15s, color 0.15s, border-color 0.15s;
    text-decoration: none !important;
}

.btn:hover { transform: translateY(-2px); }
.btn-icon { font-size: 17px; }

.btn.primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.38);
}
.btn.primary:hover {
    background: var(--accent-br);
    box-shadow: 0 8px 36px rgba(220, 38, 38, 0.55);
}

.btn.secondary {
    background: transparent;
    color: var(--muted-2);
    border: 1px solid var(--border-hov);
}
.btn.secondary:hover {
    color: var(--fg);
    border-color: var(--muted);
    background: rgba(255,255,255,0.04);
}

.btn.ghost {
    background: transparent;
    color: var(--muted);
    border: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.btn.ghost:hover {
    color: var(--fg);
    background: transparent;
}

.btn.disabled {
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: default;
    pointer-events: none;
    box-shadow: none;
}
.btn.disabled:hover { transform: none; }

.btn-sm { padding: 8px 18px !important; font-size: 13px !important; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
}

/* --- Параллакс-слои --- */
.hero-parallax {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.parallax-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    will-change: transform;
}

.orb-1 {
    width: 680px; height: 680px;
    top: -160px; left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(220, 38, 38, 0.20) 0%, transparent 65%);
}

.orb-2 {
    width: 460px; height: 460px;
    top: 25%; left: 8%;
    background: radial-gradient(circle, rgba(153, 27, 27, 0.14) 0%, transparent 68%);
}

.orb-3 {
    width: 320px; height: 320px;
    top: 15%; right: 8%;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.09) 0%, transparent 70%);
}

/* Сетка-фон (синусоидальный паттерн) */
.hero-grid {
    position: absolute;
    inset: -10%;
    background-image:
        linear-gradient(rgba(220, 38, 38, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 38, 38, 0.045) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse 75% 75% at 50% 45%, black 10%, transparent 65%);
    -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 45%, black 10%, transparent 65%);
    will-change: transform;
}

/* Катана-слэш — декоративная диагональ */
.katana-slash {
    position: absolute;
    width: 1px;
    height: 55%;
    top: 8%;
    left: calc(50% - 220px);
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(220, 38, 38, 0.40) 35%,
        rgba(220, 38, 38, 0.18) 75%,
        transparent 100%
    );
    transform: rotate(-18deg);
    will-change: transform;
}
.katana-slash::after {
    content: '';
    position: absolute;
    inset: 0 -6px;
    background: inherit;
    filter: blur(6px);
    opacity: 0.6;
}

/* --- Hero контент --- */
.hero-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-h) + 64px) 0 56px;
    position: relative;
    z-index: 2;
    text-align: center;
}
.hero-content .container { width: 100%; }

.logo-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid rgba(220, 38, 38, 0.35);
    padding: 5px 16px;
    border-radius: 20px;
    margin-bottom: 36px;
    background: rgba(220, 38, 38, 0.07);
}

.hero-title {
    font-size: clamp(40px, 7.5vw, 84px);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.03em;
    margin-bottom: 28px;
}

.gradient-text {
    background: linear-gradient(135deg, #c41a1a 0%, #ef4444 48%, #fca5a5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lead {
    max-width: 580px;
    margin: 0 auto 44px;
    font-size: clamp(16px, 1.75vw, 19px);
    color: var(--muted-2);
    line-height: 1.72;
}

.cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.badges {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.badge.accent {
    border-color: rgba(220, 38, 38, 0.38);
    color: var(--accent-br);
    background: rgba(220, 38, 38, 0.07);
}

/* Scroll-cue — анимированная стрелка вниз */
.scroll-cue {
    margin-top: 56px;
    width: 24px;
    height: 24px;
    border-right: 2px solid rgba(255,255,255,0.18);
    border-bottom: 2px solid rgba(255,255,255,0.18);
    transform: rotate(45deg);
    margin-left: auto;
    margin-right: auto;
    animation: cue-bounce 2.2s ease-in-out infinite;
}
@keyframes cue-bounce {
    0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.3; }
    55%       { transform: rotate(45deg) translateY(6px); opacity: 0.9; }
}

/* --- Hero stats bar --- */
.hero-stats-bar {
    position: relative;
    z-index: 2;
    background: rgba(8, 8, 8, 0.75);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 28px 0;
}

.hero-stats {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stat {
    flex: 1;
    min-width: 160px;
    text-align: center;
    padding: 4px 28px;
}

.stat-sep {
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--border) 25%, var(--border) 75%, transparent);
    flex-shrink: 0;
    align-self: stretch;
}

.hero-stat-num {
    font-size: clamp(30px, 4.2vw, 46px);
    font-weight: 900;
    color: var(--accent-br);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 48px rgba(220, 38, 38, 0.45);
}

.hero-stat-label {
    font-size: 11.5px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

/* ============================================================
   SECTIONS
   ============================================================ */
section {
    position: relative;
    padding: 112px 0;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 72px;
}

section h2 {
    font-size: clamp(28px, 3.8vw, 48px);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 18px;
}

.section-lead {
    max-width: 600px;
    margin: 0 auto;
    color: var(--muted-2);
    font-size: 16px;
    line-height: 1.72;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(17, 17, 17, 0.55) 50%,
        transparent 100%
    );
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 26px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.22s;
}

/* Курсорное свечение (glow при наведении мыши) */
.feature::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        340px circle at var(--mx, 50%) var(--my, 50%),
        rgba(220, 38, 38, 0.07),
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
}
.feature:hover::before { opacity: 1; }

.feature:hover {
    border-color: rgba(220, 38, 38, 0.28);
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.08), var(--shadow);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 34px;
    margin-bottom: 18px;
    display: block;
    filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.28));
}

.feature h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.015em;
}

.feature p {
    color: var(--muted-2);
    font-size: 14px;
    line-height: 1.68;
}

/* ============================================================
   HOW IT WORKS — TIMELINE
   ============================================================ */
.how {
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(12, 8, 8, 0.4) 50%,
        transparent 100%
    );
}

.timeline {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
}

.timeline-line {
    position: absolute;
    left: 27px;
    top: 28px;
    bottom: 28px;
    width: 2px;
    background: linear-gradient(180deg,
        var(--accent) 0%,
        var(--accent-deep) 65%,
        transparent 100%
    );
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.35);
}

.timeline-step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.step-num {
    width: 56px; height: 56px; min-width: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 900;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 28px rgba(220, 38, 38, 0.5);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    margin-top: 6px;
}

.step-body {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 26px;
    flex: 1;
    transition: border-color 0.22s;
}
.step-body:hover { border-color: var(--border-hov); }

.step-body strong {
    display: block;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.015em;
}

.step-body span {
    color: var(--muted-2);
    font-size: 14px;
    line-height: 1.65;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq .container { max-width: 740px; }

.faq-list details {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    overflow: hidden;
    transition: border-color 0.22s;
}
.faq-list details[open] {
    border-color: rgba(220, 38, 38, 0.28);
}

.faq-list summary {
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    list-style: none;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: color 0.15s;
    gap: 16px;
}
.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
    content: '';
    flex-shrink: 0;
    width: 20px; height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.faq-list details[open] summary::after {
    transform: rotate(45deg);
}

.faq-list details p {
    padding: 0 24px 22px;
    color: var(--muted-2);
    font-size: 14px;
    line-height: 1.72;
    margin: 0;
}
.faq-list details p em { color: var(--fg); font-style: normal; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    position: relative;
    z-index: 1;
    padding: 44px 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-brand {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-copy {
    color: var(--muted);
    font-size: 13px;
}

/* ============================================================
   REVEAL ANIMATIONS (Intersection Observer)
   ============================================================ */
.reveal-up {
    opacity: 0;
    transform: translateY(36px);
    transition:
        opacity  0.65s ease var(--delay, 0ms),
        transform 0.65s ease var(--delay, 0ms);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-28px);
    transition:
        opacity  0.6s ease var(--delay, 0ms),
        transform 0.6s ease var(--delay, 0ms);
}

.reveal-up.visible,
.reveal-left.visible {
    opacity: 1;
    transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    .nav-links a:not(.btn) { display: none; }
    .hero-stats { flex-direction: column; gap: 0; }
    .stat-sep {
        width: 60%;
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--border) 30%, var(--border) 70%, transparent);
        align-self: center;
        margin: 4px 0;
    }
    .hero-stat { border: none !important; }
    .timeline-line { display: none; }
    section { padding: 80px 0; }
    .footer-inner { justify-content: center; text-align: center; }
}

@media (max-width: 560px) {
    .grid { grid-template-columns: 1fr; }
    .hero-title { letter-spacing: -0.02em; }
    .hero-content { padding-top: calc(var(--nav-h) + 44px); padding-bottom: 44px; }
    .scroll-cue { margin-top: 40px; }
    .step-num { width: 44px; height: 44px; min-width: 44px; font-size: 18px; }
    .katana-slash { display: none; }
}
