/* ==========================================================================
   HOME PAGE STYLES
   Hero, logo bar, feature cards, mockups, capabilities, feature modal.
   ========================================================================== */


/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
    position: relative;
    min-height: 90vh;
    min-height: 90dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: calc(var(--m-nav-height) + 80px) 0 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, var(--m-white) 0%, var(--m-off-white) 100%);
    border-bottom: 1px solid var(--m-border);
    overflow: hidden;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
}

.hero-blob-1 {
    width: 60%;
    height: 60%;
    top: -5%;
    right: -5%;
    background: radial-gradient(circle, rgba(77, 190, 190, 0.28) 0%, transparent 70%);
    filter: blur(40px);
}

.hero-blob-2 {
    width: 50%;
    height: 50%;
    bottom: 10%;
    left: -5%;
    background: radial-gradient(circle, rgba(81, 138, 200, 0.22) 0%, transparent 70%);
    filter: blur(40px);
}

.hero-blob-3 {
    width: 40%;
    height: 40%;
    bottom: -5%;
    right: 10%;
    background: radial-gradient(circle, rgba(123, 97, 255, 0.18) 0%, transparent 70%);
    filter: blur(40px);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--m-container-wide);
    width: calc(100% - 2 * var(--m-margin));
    margin: 0 auto;
    padding: 0 var(--m-grid-gap);
}

.hero-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--m-text-light);
    margin-bottom: 24px;
}

.hero-stat-value {
    color: var(--m-teal);
    font-variant-numeric: tabular-nums;
}

.hero-title {
    font-size: clamp(40px, 5.5vw, 68px);
    font-weight: 700;
    line-height: 1.08;
    color: var(--m-navy);
    max-width: 800px;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--m-gradient-start) 0%, var(--m-gradient-mid) 50%, var(--m-gradient-end) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.6;
    color: var(--m-text);
    max-width: 560px;
    margin-bottom: 40px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}


/* ==========================================================================
   LOGO BAR
   ========================================================================== */

.logo-bar {
    position: relative;
    z-index: 1;
    max-width: var(--m-container-wide);
    width: calc(100% - 2 * var(--m-margin));
    margin: auto auto 0;
    padding: var(--m-gutter);
    overflow: hidden;
    border-top: 1px solid var(--m-border);
}

.logo-bar-track {
    display: flex;
    align-items: center;
    gap: 64px;
    animation: scroll-logos 30s linear infinite;
    width: max-content;
}

.logo-bar-item {
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--m-navy);
    opacity: 0.25;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

@keyframes scroll-logos {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}


/* ==========================================================================
   FEATURE CARDS (Stripe-style grid)
   ========================================================================== */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--m-grid-gap);
}

/* Grid stacking: frame and body occupy the same cell */
.feature-card {
    display: grid;
    border-radius: var(--m-radius-lg);
    cursor: pointer;
}

.feature-card > * {
    grid-area: 1 / 1;
}

/* Visual frame — border, background, scales on hover */
.feature-card-frame {
    position: relative;
    border-radius: var(--m-radius-lg);
    border: 1px solid var(--m-border);
    overflow: hidden;
    background: var(--m-off-white);
    transform-origin: center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease, background 0.4s ease;
}

.feature-card:hover .feature-card-frame {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* Card body — completely static, no transform */
.feature-card-body {
    position: relative;
    z-index: 1;
    padding: 36px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Card sizes */
.feature-card-lg {
    grid-column: span 8;
    min-height: 440px;
}

.feature-card-md {
    grid-column: span 4;
    min-height: 440px;
}

.feature-card-sm {
    grid-column: span 4;
    min-height: 340px;
}

/* Card content */
.feature-card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--m-navy);
    line-height: 1.3;
    max-width: 320px;
    margin-bottom: 8px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .feature-card-title {
    transform: translate(-0.5em, -0.5em);
}

.feature-card-expand {
    position: absolute;
    top: 36px;
    right: 36px;
    width: 20px;
    height: 20px;
    color: var(--m-text-light);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s ease;
}

.feature-card:hover .feature-card-expand {
    transform: translate(0.5em, -0.5em);
    color: var(--m-blue);
}

.feature-card-desc {
    font-size: 15px;
    color: var(--m-text);
    line-height: 1.5;
    max-width: 360px;
    margin-bottom: 24px;
}

/* Card preview (mock UI area) */
.feature-card-preview {
    flex: 1;
    position: relative;
    margin: 0 -12px -12px;
    border-radius: var(--m-radius) var(--m-radius) 0 0;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

/* ==========================================================================
   CAPABILITIES GRID
   ========================================================================== */

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--m-grid-gap);
}

.capability-card {
    grid-column: span 4;

    padding: 32px;
    border-radius: var(--m-radius);
    border: 1px solid var(--m-border);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.capability-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border-color: #d0d5dd;
}

.capability-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: var(--m-off-white);
    color: var(--m-teal);
}

.capability-icon svg {
    width: 20px;
    height: 20px;
}

.capability-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--m-navy);
    margin-bottom: 8px;
}

.capability-desc {
    font-size: 14px;
    color: var(--m-text);
    line-height: 1.5;
}


/* ==========================================================================
   FEATURE MODAL
   ========================================================================== */

body.feature-modal-open {
    overflow: hidden;
}

.fm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 37, 64, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
}

.fm-wrapper {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    padding: 24px;
}

.fm-dialog {
    position: relative;
    max-width: var(--m-container);
    width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    background: var(--m-white);
    border-radius: var(--m-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fm-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--m-off-white);
    border: 1px solid var(--m-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--m-text);
    cursor: pointer;
    z-index: 1;
    transition: background 0.15s ease, color 0.15s ease;
}

.fm-close:hover {
    background: var(--m-border);
    color: var(--m-navy);
}

.fm-body {
    overflow-y: auto;
    padding: 72px 56px 48px;
}

/* Hero */
.fm-hero {
    margin-bottom: 40px;
}

.fm-title {
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 700;
    color: var(--m-navy);
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
}

.fm-lead {
    font-size: 17px;
    color: var(--m-text);
    line-height: 1.6;
    max-width: 640px;
}

/* Hero image placeholder */
.fm-image-hero {
    margin-bottom: 48px;
}

.fm-image-placeholder {
    border: 2px dashed var(--m-border);
    border-radius: var(--m-radius);
    padding: 64px 24px;
    text-align: center;
    font-size: 14px;
    color: var(--m-text-light);
    background: var(--m-off-white);
}

/* Sections */
.fm-section {
    margin-bottom: 40px;
}

.fm-section:last-child {
    margin-bottom: 0;
}

.fm-section-title {
    font-size: 20px;
    font-weight: 650;
    color: var(--m-navy);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.fm-text {
    font-size: 15px;
    color: var(--m-text);
    line-height: 1.7;
    max-width: 720px;
}

.fm-text + .fm-text {
    margin-top: 12px;
}

/* Checklist */
.fm-checklist {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fm-check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    color: var(--m-text);
    line-height: 1.5;
}

.fm-check-item svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--m-teal);
    margin-top: 1px;
}

/* Steps */
.fm-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.fm-step {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fm-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--m-teal);
    color: var(--m-white);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-step-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--m-navy);
}

.fm-step-desc {
    font-size: 14px;
    color: var(--m-text);
    line-height: 1.6;
}

/* Concerns (also used on pricing FAQ) */
.fm-concerns {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fm-concern {
    background: var(--m-off-white);
    border-radius: var(--m-radius);
    padding: 24px;
}

.fm-concern-q {
    font-size: 15px;
    font-weight: 600;
    color: var(--m-navy);
    margin-bottom: 8px;
}

.fm-concern-a {
    font-size: 14px;
    color: var(--m-text);
    line-height: 1.6;
}

/* Gallery */
.fm-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Transitions — Backdrop */
.fm-backdrop-enter {
    transition: opacity 0.3s ease-out;
}

.fm-backdrop-enter-start {
    opacity: 0;
}

.fm-backdrop-enter-end {
    opacity: 1;
}

.fm-backdrop-leave {
    transition: opacity 0.2s ease-in;
}

.fm-backdrop-leave-start {
    opacity: 1;
}

.fm-backdrop-leave-end {
    opacity: 0;
}

/* Transitions — Dialog wrapper */
.fm-dialog-enter {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.fm-dialog-enter-start {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
}

.fm-dialog-enter-end {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.fm-dialog-leave {
    transition: opacity 0.2s ease-in, transform 0.2s ease-in;
}

.fm-dialog-leave-start {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.fm-dialog-leave-end {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
}


/* ==========================================================================
   RESPONSIVE — Home page elements
   ========================================================================== */

@media (max-width: 1024px) {
    .feature-card-lg {
        grid-column: span 12;
    }

    .feature-card-md,
    .feature-card-sm {
        grid-column: span 6;
    }

    .capability-card {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: calc(var(--m-nav-height) + 60px) 0 80px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-card-lg,
    .feature-card-md,
    .feature-card-sm {
        grid-column: span 1;
        min-height: 360px;
    }

    .capability-card {
        grid-column: span 1;
    }

    .capabilities-grid {
        grid-template-columns: 1fr;
    }

    /* Feature modal — tablet */
    .fm-body {
        padding: 40px 24px;
    }

    .fm-close {
        width: 36px;
        height: 36px;
        top: 16px;
        right: 16px;
    }

    .fm-title {
        padding-right: 48px;
    }

    .fm-wrapper {
        padding: 12px;
    }

    .fm-gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Feature modal — mobile */
    .fm-body {
        padding: 32px 16px;
    }

    .fm-wrapper {
        padding: 8px;
    }

    .fm-dialog {
        max-height: 95vh;
        max-height: 95dvh;
        border-radius: var(--m-radius);
    }

    .fm-steps {
        grid-template-columns: 1fr;
    }
}
