/* ==========================================================================
   Startup Investment – Page-specific styles
   Inherits design system from home-modern.css (variables, nav, footer,
   buttons, typography, gradient text, reveal animations, form card).
   ========================================================================== */

/* ---------- Section stacking fix (same pattern as home-modern.css) ---------- */
body.hm-page .si-hero,
body.hm-page .si-requirements,
body.hm-page .si-guarantee,
body.hm-page .si-inbox,
body.hm-page .si-cost-table-section,
body.hm-page .si-financing {
    position: relative !important;
    display: block !important;
    float: none !important;
    clear: both !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    isolation: isolate;
}

/* ==========================================================================
   HERO (inner page variant – two-column: text + image, no canvas/robot)
   ========================================================================== */
.si-hero {
    background: var(--hm-dark-deep) !important;
    padding: 160px 0 100px;
    overflow: visible;
}

.si-hero > .hm-wrap {
    max-width: 75% !important;
    padding: 0 24px !important;
}

.si-hero-grid {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 56px;
    align-items: center;
}

.si-hero-content {
    position: relative;
    z-index: 10;
}

/* Decorative floating code bracket (matches Home Modern) */
.si-hero-content::before {
    content: '{ }';
    position: absolute;
    top: -20px;
    right: -40px;
    font-family: 'Courier New', monospace;
    font-size: 5rem;
    font-weight: 300;
    color: rgba(34, 110, 183, 0.06);
    letter-spacing: 0.2em;
    pointer-events: none;
    animation: siFloatCode 8s ease-in-out infinite;
}

@keyframes siFloatCode {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.06; }
    50% { transform: translateY(-15px) rotate(3deg); opacity: 0.1; }
}

body.hm-page .si-hero-title {
    font-family: var(--hm-font-display) !important;
    font-size: clamp(2rem, 4vw, 3rem) !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.03em;
    color: var(--hm-white) !important;
    margin: 0 0 24px !important;
}

body.hm-page .si-hero-sub {
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7) !important;
    margin: 0 0 32px !important;
}

.si-hero-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--hm-radius-lg);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(34, 110, 183, 0.12);
}

/* Gradient mesh background on hero (reuse hm-hero pattern) */
.si-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(120% 115% at 70% 36%, rgba(18, 50, 90, 0.6) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 10% 90%, rgba(96, 73, 160, 0.15) 0%, transparent 50%);
}

.si-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* Halo glow behind image area */
.si-hero-halo {
    position: absolute;
    right: 12%;
    top: 45%;
    transform: translateY(-50%);
    width: min(50vh, 560px);
    height: min(60vh, 680px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(77, 200, 255, 0.25), rgba(123, 97, 255, 0.12) 45%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 2;
}

/* Text color overrides for hero */
body.hm-page .si-hero,
body.hm-page .si-hero h1,
body.hm-page .si-hero h2,
body.hm-page .si-hero h3,
body.hm-page .si-hero p {
    color: var(--hm-white) !important;
}

/* ==========================================================================
   CORE REQUIREMENTS (3 card grid)
   ========================================================================== */
.si-requirements {
    background: var(--hm-white) !important;
    padding: 100px 0;
}

body.hm-page .si-requirements,
body.hm-page .si-requirements h1,
body.hm-page .si-requirements h2,
body.hm-page .si-requirements h3 {
    color: var(--hm-gray-800) !important;
}

body.hm-page .si-requirements p {
    color: var(--hm-gray-600) !important;
}

.si-requirements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.si-req-card {
    background: var(--hm-white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--hm-radius-lg);
    padding: 36px 28px;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
    position: relative;
    overflow: hidden;
}

.si-req-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 20px 60px rgba(34, 110, 183, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: rgba(34, 110, 183, 0.18);
}

.si-req-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--hm-gradient-neon);
    background-size: 200% auto;
    opacity: 0;
    transition: opacity 0.4s;
}

.si-req-card:hover::before {
    opacity: 1;
    animation: siGradientSlide 2s linear infinite;
}

@keyframes siGradientSlide {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.si-req-card:hover .si-req-icon {
    background: linear-gradient(135deg, rgba(34, 110, 183, 0.2), rgba(238, 47, 36, 0.15));
    transform: scale(1.08);
}

.si-req-icon {
    transition: background 0.4s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.si-req-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(34, 110, 183, 0.1), rgba(238, 47, 36, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
}

.si-req-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Font Awesome fallback icon */
.si-req-icon--fa {
    font-size: 1.8rem;
    color: var(--hm-blue);
}

body.hm-page .si-req-card h3 {
    font-family: var(--hm-font-display) !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    margin: 0 0 12px !important;
    color: var(--hm-gray-800) !important;
}

body.hm-page .si-req-card p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--hm-gray-600) !important;
    margin: 0 !important;
}

/* ==========================================================================
   EXPENDITURE GUARANTEE (text + image)
   ========================================================================== */
.si-guarantee {
    background: var(--hm-gray-50, #f8f9fa) !important;
    padding: 100px 0;
}

body.hm-page .si-guarantee,
body.hm-page .si-guarantee h1,
body.hm-page .si-guarantee h2,
body.hm-page .si-guarantee h3 {
    color: var(--hm-gray-800) !important;
}

body.hm-page .si-guarantee p {
    color: var(--hm-gray-600) !important;
}

.si-guarantee-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.si-guarantee-text .hm-section-title {
    margin-bottom: 24px !important;
}

.si-guarantee-text .hm-btn {
    margin-top: 28px;
}

body.hm-page .si-guarantee-text p,
body.hm-page .si-guarantee-text li {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--hm-gray-600) !important;
}

.si-guarantee-img img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--hm-radius-lg);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   iCODE IN A BOX (dark section – features list + image)
   ========================================================================== */
.si-inbox {
    background: var(--hm-dark-deep) !important;
    padding: 100px 0;
}

body.hm-page .si-inbox,
body.hm-page .si-inbox h1,
body.hm-page .si-inbox h2,
body.hm-page .si-inbox h3 {
    color: var(--hm-white) !important;
}

body.hm-page .si-inbox p {
    color: rgba(255, 255, 255, 0.7) !important;
}

.si-inbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    margin-top: 48px;
}

.si-inbox-features {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.si-inbox-feature {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.si-inbox-feature-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(34, 110, 183, 0.25), rgba(238, 47, 36, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
}

.si-inbox-feature-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.si-inbox-feature-icon--fa {
    font-size: 1.4rem;
    color: var(--hm-cyan);
}

body.hm-page .si-inbox-feature h4 {
    font-family: var(--hm-font-display) !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: var(--hm-white) !important;
    margin: 0 0 4px !important;
}

body.hm-page .si-inbox-feature p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 !important;
}

.si-inbox-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--hm-radius-lg);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(34, 110, 183, 0.12);
}

/* Subtle aura glow */
.si-inbox::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 50% 60% at 85% 75%, rgba(34, 110, 183, 0.08), transparent 60%),
        radial-gradient(ellipse 40% 50% at 10% 20%, rgba(96, 73, 160, 0.06), transparent 60%);
}

/* ==========================================================================
   COST BREAKDOWN TABLE
   ========================================================================== */
.si-cost-table-section {
    background: var(--hm-white) !important;
    padding: 100px 0;
}

body.hm-page .si-cost-table-section,
body.hm-page .si-cost-table-section h1,
body.hm-page .si-cost-table-section h2,
body.hm-page .si-cost-table-section h3 {
    color: var(--hm-gray-800) !important;
}

.si-cost-table-wrap {
    margin-top: 48px;
    background: var(--hm-white);
    border-radius: var(--hm-radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.si-cost-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--hm-font-body);
}

/* Table header */
.si-cost-table thead {
    background: var(--hm-dark-deep);
}

body.hm-page .si-cost-table thead th {
    color: var(--hm-white) !important;
    font-family: var(--hm-font-display);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 12px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Merged "Amount" header spanning Low + High */
body.hm-page .si-cost-table thead th.si-th-amount {
    text-align: center !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Low/High sub-headers in second header row */
body.hm-page .si-cost-table thead tr:nth-child(2) th {
    text-align: center;
    font-size: 0.75rem;
    padding: 8px 18px;
    border-bottom: none;
}

/* Vertically align the rowspan headers */
body.hm-page .si-cost-table thead th[rowspan] {
    vertical-align: middle;
}

/* Table body */
body.hm-page .si-cost-table tbody td {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.9rem;
    color: var(--hm-gray-800) !important;
}

/* Amount columns — right-aligned, mono weight */
body.hm-page .si-cost-table tbody td:nth-child(2),
body.hm-page .si-cost-table tbody td:nth-child(3) {
    text-align: right;
    font-family: var(--hm-font-display);
    font-weight: 500;
    white-space: nowrap;
}

/* Payment, When Due, Payee columns */
body.hm-page .si-cost-table tbody td:nth-child(4),
body.hm-page .si-cost-table tbody td:nth-child(5),
body.hm-page .si-cost-table tbody td:nth-child(6) {
    font-size: 0.85rem;
    color: var(--hm-gray-600) !important;
    white-space: nowrap;
}

/* Alternating row stripes */
.si-cost-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.si-cost-table tbody tr:hover {
    background: rgba(34, 110, 183, 0.04);
}

/* Total row */
.si-cost-row-total {
    background: var(--hm-dark-deep) !important;
}

.si-cost-row-total:hover {
    background: var(--hm-dark-deep) !important;
}

body.hm-page .si-cost-row-total td,
body.hm-page .si-cost-row-total td:nth-child(n) {
    color: var(--hm-white) !important;
    font-weight: 700 !important;
    font-size: 1.05rem;
    border-bottom: none;
}

/* Footnote */
.si-cost-footnote {
    padding: 16px 24px;
    font-size: 0.85rem;
    color: var(--hm-gray-500) !important;
    font-style: italic;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    line-height: 1.6;
}

/* ==========================================================================
   FINANCING PARTNERSHIP
   ========================================================================== */
.si-financing {
    background: var(--hm-gray-50, #f8f9fa) !important;
    padding: 100px 0;
}

body.hm-page .si-financing,
body.hm-page .si-financing h1,
body.hm-page .si-financing h2,
body.hm-page .si-financing h3 {
    color: var(--hm-gray-800) !important;
}

body.hm-page .si-financing p {
    color: var(--hm-gray-600) !important;
}

.si-financing-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 56px;
    align-items: center;
}

.si-financing-text .hm-section-title {
    margin-bottom: 24px !important;
}

.si-financing-text .hm-btn {
    margin-top: 28px;
}

body.hm-page .si-financing-text p {
    font-size: 1rem;
    line-height: 1.75;
}

.si-financing-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.si-financing-logo img {
    max-width: 300px;
    height: auto;
    display: block;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
    .si-hero > .hm-wrap {
        max-width: 90% !important;
    }

    .si-hero-grid,
    .si-guarantee-grid,
    .si-inbox-grid,
    .si-financing-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .si-requirements-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .si-financing-logo {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .si-hero {
        padding: 120px 0 60px;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }

    .si-hero > .hm-wrap {
        max-width: 100% !important;
        padding: 0 16px !important;
    }

    body.hm-page .si-hero-title {
        font-size: clamp(1.6rem, 6vw, 2.2rem) !important;
    }

    .si-requirements,
    .si-guarantee,
    .si-inbox,
    .si-cost-table-section,
    .si-financing {
        padding: 60px 0;
    }

    /* Cost table horizontal scroll on small screens */
    .si-cost-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .si-cost-table {
        min-width: 780px;
    }

    body.hm-page .si-cost-table thead th,
    body.hm-page .si-cost-table tbody td {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .si-req-card {
        padding: 28px 20px;
    }

    /* Kill heavy effects on mobile */
    .si-hero::after,
    .si-inbox::after,
    .si-hero-halo {
        display: none !important;
    }

    .si-hero-content::before {
        display: none;
    }

    .si-hero-image img {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    }
}

@media (max-width: 480px) {
    body.hm-page .si-cost-table thead th,
    body.hm-page .si-cost-table tbody td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .si-financing-logo img {
        max-width: 200px;
    }
}
