/* ===================================================
   Home — hero + how-it-works
   =================================================== */

.home {
    --home-display: "Fraunces", Georgia, "Times New Roman", serif;
    --home-body: "Manrope", "Segoe UI", sans-serif;
    --home-accent: #0ea5e9;
    --home-accent-deep: #0369a1;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    font-family: var(--home-body);
}

/* ---------- Hero (first viewport, one composition) ---------- */
.home-hero {
    position: relative;
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    color: #f8fafc;
}

.home-hero__visual {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(120deg, rgba(2, 6, 23, 0.55) 0%, rgba(2, 6, 23, 0.2) 45%, rgba(2, 6, 23, 0.65) 100%),
        url("https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=1920&q=80");
    background-size: cover;
    background-position: center 30%;
    transform: scale(1.06);
    animation: homeKen 22s ease-in-out infinite alternate;
}

.home-hero__shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 55% at 20% 85%, rgba(14, 165, 233, 0.28), transparent 55%),
        linear-gradient(to top, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.35) 42%, rgba(2, 6, 23, 0.25) 100%);
    pointer-events: none;
}

.home-hero__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3rem) clamp(2.5rem, 7vw, 5rem);
}

.home-hero__brand {
    margin: 0 0 0.65rem;
    font-family: var(--home-display);
    font-size: clamp(2.75rem, 8vw, 4.75rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: #fff;
}

.home-hero__title {
    margin: 0 0 0.85rem;
    font-family: var(--home-body);
    font-size: clamp(1.15rem, 2.6vw, 1.55rem);
    font-weight: 600;
    line-height: 1.35;
    color: #e2e8f0;
    max-width: 22ch;
}

.home-hero__lead {
    margin: 0 0 1.75rem;
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    line-height: 1.6;
    color: #94a3b8;
    max-width: 36rem;
}

.home-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.7rem 1.35rem;
    border-radius: 8px;
    font-family: var(--home-body);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.home-btn:hover {
    transform: translateY(-2px);
}

.home-btn:active {
    transform: translateY(0);
}

.home-btn--primary {
    background: var(--home-accent);
    color: #04101c;
}

.home-btn--primary:hover {
    background: #38bdf8;
}

.home-btn--ghost {
    background: transparent;
    color: #f8fafc;
    border: 1px solid rgba(248, 250, 252, 0.35);
}

.home-btn--ghost:hover {
    border-color: #f8fafc;
    background: rgba(248, 250, 252, 0.08);
}

/* ---------- How it works ---------- */
.home-flow {
    background: var(--bg);
    color: var(--body-text);
    padding: clamp(3rem, 8vw, 5.5rem) clamp(1.25rem, 4vw, 3rem);
    border-top: 1px solid var(--line);
}

.home-flow__wrap {
    max-width: 960px;
    margin: 0 auto;
}

.home-flow__title {
    margin: 0 0 0.4rem;
    font-family: var(--home-display);
    font-size: clamp(1.75rem, 3.5vw, 2.35rem);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.home-flow__sub {
    margin: 0 0 2.25rem;
    color: var(--muted);
    font-size: 1rem;
    max-width: 28rem;
}

.home-flow__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
}

.home-flow__step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.1rem 1.35rem;
    padding: 1.35rem 0;
    border-top: 1px solid var(--line);
    align-items: start;
}

.home-flow__step:last-child {
    border-bottom: 1px solid var(--line);
}

.home-flow__num {
    font-family: var(--home-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--home-accent-deep);
    line-height: 1.2;
    min-width: 2.2rem;
}

html[data-theme="dark"] .home-flow__num {
    color: var(--home-accent);
}

.home-flow__step h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
}

.home-flow__step p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--muted);
    max-width: 40rem;
}

/* ---------- Motion ---------- */
.animate-in {
    opacity: 0;
    transform: translateY(18px);
    animation: homeRise 0.7s ease forwards;
}

.animate-in--delay-1 { animation-delay: 0.12s; }
.animate-in--delay-2 { animation-delay: 0.24s; }
.animate-in--delay-3 { animation-delay: 0.36s; }

@keyframes homeRise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes homeKen {
    from { transform: scale(1.06) translate3d(0, 0, 0); }
    to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero__visual {
        animation: none;
        transform: none;
    }
    .animate-in {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .home-btn:hover {
        transform: none;
    }
}

@media (max-width: 640px) {
    .home-hero {
        align-items: flex-end;
        min-height: calc(100svh - var(--nav-h));
    }

    .home-hero__cta {
        flex-direction: column;
    }

    .home-btn {
        width: 100%;
    }

    .home-flow__step {
        gap: 0.75rem 1rem;
    }
}
