/* ==========================================================================
   Inner Page – Shared section classes for all modern inner pages
   Inherits design system from home-modern.css (variables, nav, footer,
   buttons, typography, gradient text, reveal animations, form card).
   Page templates compose these ip-* sections as needed.
   ========================================================================== */

/* ---------- Section stacking fix (same pattern as home-modern.css) ---------- */
body.hm-page .ip-hero,
body.hm-page .ip-split,
body.hm-page .ip-cards,
body.hm-page .ip-faq,
body.hm-page .ip-steps,
body.hm-page .ip-table-section,
body.hm-page .ip-stats,
body.hm-page .ip-partners,
body.hm-page .ip-features {
    position: relative !important;
    display: block !important;
    float: none !important;
    clear: both !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    isolation: isolate;
}

/* ---------- Section background modifiers ---------- */
body.hm-page .ip-section--light {
    background: var(--hm-white) !important;
}

body.hm-page .ip-section--gray {
    background: var(--hm-gray-100, #f0f0f0) !important;
}

body.hm-page .ip-section--dark {
    background: var(--hm-dark-deep) !important;
}

/* Light / gray section text color overrides */
body.hm-page .ip-section--light,
body.hm-page .ip-section--light h1,
body.hm-page .ip-section--light h2,
body.hm-page .ip-section--light h3,
body.hm-page .ip-section--light p,
body.hm-page .ip-section--light li,
body.hm-page .ip-section--light span,
body.hm-page .ip-section--light a,
body.hm-page .ip-section--light div {
    color: var(--hm-gray-800) !important;
}

body.hm-page .ip-section--gray,
body.hm-page .ip-section--gray h1,
body.hm-page .ip-section--gray h2,
body.hm-page .ip-section--gray h3,
body.hm-page .ip-section--gray p,
body.hm-page .ip-section--gray li,
body.hm-page .ip-section--gray span,
body.hm-page .ip-section--gray a,
body.hm-page .ip-section--gray div {
    color: var(--hm-gray-800) !important;
}

/* Dark section text color overrides */
body.hm-page .ip-section--dark,
body.hm-page .ip-section--dark h1,
body.hm-page .ip-section--dark h2,
body.hm-page .ip-section--dark h3,
body.hm-page .ip-section--dark p {
    color: var(--hm-white) !important;
}

body.hm-page .ip-section--dark .hm-section-desc {
    color: rgba(255, 255, 255, 0.7) !important;
}


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

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

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

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

/* Decorative floating code bracket */
.ip-hero-content::before {
    content: '{ }';
    position: absolute;
    top: -20px;
    right: -10px;
    font-family: 'Space Grotesk', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(34, 110, 183, 0.06);
    pointer-events: none;
    animation: hmFloatCode 6s ease-in-out infinite;
}

body.hm-page .ip-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.02em !important;
    color: var(--hm-white) !important;
    margin: 0 0 24px !important;
}

body.hm-page .ip-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;
}

.ip-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 */
.ip-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 70% 20%, rgba(34, 110, 183, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 30% 80%, rgba(238, 47, 36, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 10% 90%, rgba(96, 73, 160, 0.15) 0%, transparent 50%);
}

.ip-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    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");
}

/* Halo glow behind image area */
.ip-hero-halo {
    position: absolute;
    right: 12%;
    top: 45%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 110, 183, 0.15) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(50%, -50%);
    z-index: 2;
}

/* Canvas FX layer (grid animation) */
.ip-hero .hm-hero-fx {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.ip-hero .hm-hero-fx canvas {
    width: 100%;
    height: 100%;
}

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


/* ---------- Centered hero variant (FAQ, Contact) ---------- */
.ip-hero--centered .ip-hero-grid {
    grid-template-columns: 1fr;
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.ip-hero--centered .ip-hero-content {
    text-align: center;
}

.ip-hero--centered .hm-kicker {
    justify-content: center;
}

.ip-hero--centered .hm-hero-actions {
    justify-content: center;
}

.ip-hero--centered .ip-hero-sub {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}


/* ==========================================================================
   SPLIT SECTION (two-column: text + image)
   ========================================================================== */
.ip-split {
    padding: 100px 0;
}

.ip-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.ip-split--reverse .ip-split-grid {
    direction: rtl;
}

.ip-split--reverse .ip-split-grid > * {
    direction: ltr;
}

.ip-split-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--hm-radius-lg);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.1);
}

/* Responsive video embed inside split section */
.ip-video-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--hm-radius-lg);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.1);
}

.ip-video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--hm-radius-lg);
}

.ip-section--dark .ip-split-image img {
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(34, 110, 183, 0.12);
}

body.hm-page .ip-split-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 16px;
}


/* ==========================================================================
   CARD GRID SECTION
   ========================================================================== */
.ip-cards {
    padding: 100px 0;
}

.ip-cards-grid {
    display: grid;
    gap: 32px;
    margin-top: 48px;
}

.ip-cards-grid--2col {
    grid-template-columns: repeat(2, 1fr);
}

.ip-cards-grid--3col {
    grid-template-columns: repeat(3, 1fr);
}

.ip-cards-grid--4col {
    grid-template-columns: repeat(4, 1fr);
}

.ip-card {
    background: var(--hm-white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--hm-radius-lg);
    padding: 36px 28px;
    text-align: center;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    position: relative;
    overflow: hidden;
}

.ip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--hm-gradient-neon);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.ip-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.ip-card:hover::before {
    opacity: 1;
}

/* Dark section card variant */
.ip-section--dark .ip-card {
    background: var(--hm-dark-card);
    border-color: var(--hm-surface-border);
}

.ip-card-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 110, 183, 0.1), rgba(96, 73, 160, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

body.hm-page .ip-card-title {
    font-family: var(--hm-font-display) !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    margin: 0 0 12px !important;
}

body.hm-page .ip-card-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--hm-gray-600) !important;
    margin: 0 !important;
}

.ip-section--dark .ip-card-desc {
    color: rgba(255, 255, 255, 0.6) !important;
}


/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */
.ip-faq {
    padding: 100px 0;
}

.ip-faq-group {
    max-width: 900px;
    margin: 0 auto 48px;
}

.ip-faq-group:last-child {
    margin-bottom: 0;
}

body.hm-page .ip-faq-group-title {
    font-family: var(--hm-font-display) !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    margin: 0 0 24px !important;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(34, 110, 183, 0.15);
}

.ip-faq-item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--hm-radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.ip-faq-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.ip-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--hm-white);
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: var(--hm-font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--hm-gray-800);
    transition: background 0.2s;
    gap: 16px;
}

.ip-faq-question:hover {
    background: var(--hm-gray-100, #f8f9fa);
}

.ip-faq-toggle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 110, 183, 0.1), rgba(96, 73, 160, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease, background 0.3s;
}

.ip-faq-toggle svg {
    width: 14px;
    height: 14px;
    stroke: var(--hm-blue);
    stroke-width: 2;
    fill: none;
    transition: transform 0.3s ease;
}

.ip-faq-item.ip-faq-open .ip-faq-toggle {
    background: var(--hm-blue);
    transform: rotate(180deg);
}

.ip-faq-item.ip-faq-open .ip-faq-toggle svg {
    stroke: var(--hm-white);
}

.ip-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), padding 0.3s;
}

.ip-faq-item.ip-faq-open .ip-faq-answer {
    max-height: 800px;
}

.ip-faq-answer-inner {
    padding: 0 24px 24px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--hm-gray-600);
}

body.hm-page .ip-faq-answer-inner p {
    color: var(--hm-gray-600) !important;
    margin-bottom: 12px;
}

body.hm-page .ip-faq-answer-inner p:last-child {
    margin-bottom: 0;
}

/* Dark section FAQ */
.ip-section--dark .ip-faq-item {
    border-color: var(--hm-surface-border);
}

.ip-section--dark .ip-faq-question {
    background: var(--hm-dark-card);
    color: var(--hm-white);
}

.ip-section--dark .ip-faq-question:hover {
    background: var(--hm-dark-surface);
}


/* ==========================================================================
   NUMBERED STEPS / PROCESS
   ========================================================================== */
.ip-steps {
    padding: 100px 0;
}

.ip-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.ip-step {
    text-align: center;
    padding: 32px 20px;
    border-radius: var(--hm-radius-lg);
    background: var(--hm-white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.ip-step:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.ip-step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--hm-gradient-neon);
    color: var(--hm-white);
    font-family: var(--hm-font-display);
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

body.hm-page .ip-step-title {
    font-family: var(--hm-font-display) !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin: 0 0 12px !important;
}

body.hm-page .ip-step-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--hm-gray-600) !important;
    margin: 0 !important;
}


/* ==========================================================================
   DATA TABLE SECTION
   ========================================================================== */
.ip-table-section {
    padding: 100px 0;
}

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

.ip-table-header {
    padding: 32px 32px 16px;
}

body.hm-page .ip-table-header h3 {
    font-family: var(--hm-font-display) !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    margin: 0 0 8px !important;
    color: var(--hm-gray-800) !important;
}

body.hm-page .ip-table-header p {
    font-size: 0.95rem;
    color: var(--hm-gray-600) !important;
    line-height: 1.6;
    margin: 0 !important;
}

.ip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.ip-table thead {
    background: var(--hm-dark-deep);
}

body.hm-page .ip-table thead th {
    color: var(--hm-white) !important;
    font-family: var(--hm-font-display) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.ip-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    vertical-align: middle;
}

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

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

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

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

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

.ip-table-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;
}


/* ==========================================================================
   STATS / NUMBER CALLOUTS
   ========================================================================== */
.ip-stats {
    padding: 80px 0;
}

.ip-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.ip-stat {
    padding: 32px 16px;
    border-radius: var(--hm-radius-lg);
    background: var(--hm-white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

.ip-stat:hover {
    transform: translateY(-4px);
}

body.hm-page .ip-stat-number {
    font-family: var(--hm-font-display) !important;
    font-size: clamp(1.8rem, 3vw, 2.5rem) !important;
    font-weight: 800 !important;
    background: var(--hm-gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 8px !important;
}

body.hm-page .ip-stat-label {
    font-size: 0.9rem;
    color: var(--hm-gray-600) !important;
    font-weight: 500;
    margin: 0 !important;
}


/* ==========================================================================
   PARTNER LOGOS GRID
   ========================================================================== */
.ip-partners {
    padding: 80px 0;
}

.ip-partners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    align-items: center;
}

.ip-partners-grid img {
    max-height: 52px;
    width: auto;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: opacity 0.3s, filter 0.3s;
}

.ip-partners-grid img:hover {
    opacity: 1;
    filter: grayscale(0%);
}


/* ==========================================================================
   FEATURE LIST (icon + title + description rows)
   ========================================================================== */
.ip-features {
    padding: 100px 0;
}

.ip-features-list {
    margin-top: 40px;
}

.ip-feature {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ip-feature:last-child {
    border-bottom: none;
}

.ip-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(34, 110, 183, 0.1), rgba(96, 73, 160, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
}

.ip-section--dark .ip-feature {
    border-bottom-color: var(--hm-surface-border);
}

.ip-section--dark .ip-feature-icon {
    background: linear-gradient(135deg, rgba(34, 110, 183, 0.2), rgba(96, 73, 160, 0.2));
}

body.hm-page .ip-feature-title {
    font-family: var(--hm-font-display) !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    margin: 0 0 6px !important;
}

body.hm-page .ip-feature-desc {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--hm-gray-600) !important;
    margin: 0 !important;
}

.ip-section--dark .ip-feature-desc {
    color: rgba(255, 255, 255, 0.6) !important;
}


/* ==========================================================================
   FOUNDER / BIO SECTION (extends ip-split)
   ========================================================================== */
.ip-bio-name {
    font-family: var(--hm-font-display);
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 4px;
}

.ip-bio-role {
    font-size: 0.95rem;
    color: var(--hm-blue) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 24px;
}

body.hm-page .ip-bio-text p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 16px;
}


/* ==========================================================================
   VALUES LIST (simple items with icons)
   ========================================================================== */
.ip-values-list {
    list-style: none;
    padding: 0;
    margin: 32px 0 0;
}

.ip-values-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    font-size: 1.05rem;
    line-height: 1.5;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ip-values-list li:last-child {
    border-bottom: none;
}

.ip-values-check {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}


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

    .ip-hero-grid,
    .ip-split-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .ip-split--reverse .ip-split-grid {
        direction: ltr;
    }

    .ip-cards-grid--3col,
    .ip-cards-grid--4col {
        grid-template-columns: repeat(2, 1fr);
    }

    .ip-steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ip-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

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

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

    .ip-split,
    .ip-cards,
    .ip-faq,
    .ip-steps,
    .ip-table-section,
    .ip-stats,
    .ip-partners,
    .ip-features {
        padding: 60px 0;
    }

    .ip-cards-grid--2col,
    .ip-cards-grid--3col,
    .ip-cards-grid--4col {
        grid-template-columns: 1fr;
    }

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

    .ip-stats-grid {
        grid-template-columns: 1fr;
    }

    /* Table horizontal scroll */
    .ip-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ip-table {
        min-width: 600px;
    }

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

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

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

    .ip-faq-question {
        padding: 16px 18px;
        font-size: 0.95rem;
    }

    .ip-faq-answer-inner {
        padding: 0 18px 18px;
    }
}

@media (max-width: 480px) {
    .ip-table {
        font-size: 0.8rem;
    }

    .ip-table thead th {
        padding: 10px 8px;
    }

    .ip-table tbody td {
        padding: 10px 8px;
    }
}
