:root {
    --bg-page: #fef8f1;
    --text-primary: #100d08;
    --text-secondary: #1e201f;
    --text-muted: #1d1f1f;
    --accent-red: #bd100b;
    --accent-rule: #ae0e0e;
    --icon-circle: #fbedda;
    --card-bg: #ffffff;
    --card-desc: #1d1f1f;
    --footer-bg: #fcedda;
    --footer-border: #f2dec7;
    --footer-divider: #a9a9a9;

    --onboarding: #b30a09;
    --underwriting: #fc6c02;
    --claims-uw: #c50a45;
    --policy: #03636a;
    --claims-ops: #3f6221;
    --finance: #72369c;

    --header-h: clamp(48px, 5.7vh, 62px);
    --gutter-x: clamp(16px, 6.5vw, 125px);
    --card-gap: clamp(16px, 2.2vh, 24px);
    --hub-gap: clamp(20px, 1.93vw, 37px);
    --card-min-h: clamp(160px, 18.3vh, 198px);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body.iac-page {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

.bg-pattern {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: var(--bg-page) url("/wp-content/themes/insurance/img/insurance-ai-exhibits/bg-pattern.png") center / cover no-repeat;
    animation: bg-drift 18s ease-in-out infinite alternate;
}

@keyframes bg-drift {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% {
        transform: scale(1.03) translate(-0.4%, 0.3%);
    }
}

.wave-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}

.page-shell {
    position: relative;
    z-index: 1;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.page-gutter {
    padding-left: var(--gutter-x);
    padding-right: var(--gutter-x);
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
}

/* Header */
.site-header {
    flex: 0 0 auto;
    padding-top: clamp(12px, 2.2vh, 24px);
    padding-bottom: clamp(8px, 1vh, 12px);
}

.brand-logo {
    display: block;
    line-height: 0;
}

.brand-logo img {
    height: clamp(140px, 11.5vw, 220px);
    width: auto;
    max-height: var(--header-h);
    object-fit: contain;
}

.tap-hint {
    max-width: 255px;
    font-size: clamp(12px, 0.85vw, 16px);
    font-weight: 400;
    line-height: 1.2;
    color: var(--text-primary);
}

.tap-hint img {
    flex-shrink: 0;
}

/* Main */
.page-main {
    min-height: 0;
}

.hero-heading {
    flex: 0 0 auto;
    padding-bottom: clamp(12px, 2vh, 28px);
}

.hero-title {
    margin: 0;
    font-weight: 700;
    font-size: clamp(26px, 3.75vw, 72px);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.hero-title .text-accent {
    color: var(--accent-red);
}

.hero-rule {
    width: clamp(48px, 3.75vw, 72px);
    height: 4px;
    margin-top: clamp(12px, 1.8vh, 20px);
    background: var(--accent-rule);
}

.hero-subtitle {
    margin: clamp(10px, 1.2vh, 16px) 0 0;
    font-size: clamp(14px, 1.35vw, 26px);
    font-weight: 500;
    line-height: 1.15;
    color: var(--text-secondary);
}

/* Hub grid */
.hub-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    flex: 1 1 auto;
    padding-bottom: clamp(8px, 1.2vh, 16px);
}

.hub-grid {
    display: grid;
    grid-template-columns: minmax(0, 578fr) minmax(240px, 511fr) minmax(0, 578fr);
    column-gap: var(--hub-gap);
    align-items: center;
    justify-items: stretch;
    width: 100%;
    max-width: 1741px;
    margin-inline: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.hub-col {
    display: flex;
    flex-direction: column;
    gap: var(--card-gap);
    justify-content: center;
    align-self: center;
    min-height: 0;
}

.hub-col-left {
    align-items: stretch;
}

.hub-col-right {
    align-items: stretch;
}

.hub-col-center {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}

/* Service cards */
.service-card {
    --theme-color: var(--onboarding);
    flex: 0 0 auto;
    min-height: var(--card-min-h);
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid rgba(242, 222, 199, 0.9);
    border-left: 5px solid var(--theme-color);
    border-radius: 10px;
    box-shadow: 0 2px 14px rgba(16, 13, 8, 0.08);
    padding: clamp(16px, 1.8vh, 26px) clamp(16px, 1.6vw, 32px) clamp(12px, 1.4vh, 18px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 13, 8, 0.1);
}

.theme-onboarding { --theme-color: var(--onboarding); }
.theme-underwriting { --theme-color: var(--underwriting); }
.theme-claims-uw { --theme-color: var(--claims-uw); }
.theme-policy { --theme-color: var(--policy); }
.theme-claims-ops { --theme-color: var(--claims-ops); }
.theme-finance { --theme-color: var(--finance); }

.card-body-inner {
    display: flex;
    gap: clamp(10px, 1.25vw, 24px);
    align-items: flex-start;
    flex: 1 1 auto;
    min-height: 0;
}

.card-icon-wrap {
    flex: 0 0 auto;
    width: clamp(52px, 5vw, 96px);
    height: clamp(52px, 5vw, 96px);
    border-radius: 50%;
    background: var(--icon-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(14px, 1.35vw, 22px);
}

.card-icon-wrap img {
    width: clamp(24px, 2vw, 40px);
    height: clamp(24px, 2vw, 40px);
    object-fit: contain;
}

.card-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.card-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: clamp(14px, 1.45vw, 28px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.01em;
    color: var(--theme-color);
    white-space: nowrap;
    max-width: 100%;
}

.card-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 27px;
    padding: 0 4px;
    border-radius: 4px;
    background: var(--theme-color);
    color: #fff;
    font-size: clamp(12px, 0.85vw, 16px);
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.card-desc {
    margin: clamp(8px, 1vh, 14px) 0 0;
    font-size: clamp(12px, 0.95vw, 18px);
    font-weight: 400;
    line-height: 1.35;
    color: var(--card-desc);
}

.card-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: clamp(10px, 1.2vh, 16px);
    border-top: 1px solid rgba(169, 169, 169, 0.4);
}

.demo-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(11px, 0.73vw, 14px);
    font-weight: 500;
    color: var(--text-muted);
    min-width: 0;
}

.demo-meta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-arrow-btn {
    flex: 0 0 auto;
    width: clamp(28px, 1.9vw, 36px);
    height: clamp(28px, 1.9vw, 36px);
    line-height: 0;
}

.card-arrow-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Center hub – single Figma export (avoids broken connector layers) */
.center-hub {
    width: 100%;
    max-width: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.center-hub-image {
    width: 100%;
    height: auto;
    max-width: 700px;
    max-height: min(52vh, 700px);
    object-fit: contain;
    display: block;
}

/* Footer */
.site-footer {
    flex: 0 0 auto;
    padding-top: clamp(4px, 0.8vh, 12px);
    padding-bottom: clamp(12px, 1.8vh, 24px);
}

.footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(16px, 2.75vw, 48px);
    background: var(--footer-bg);
    border: 1px solid var(--footer-border);
    border-radius: 12px;
    padding: clamp(10px, 1.3vh, 14px) clamp(16px, 1.5vw, 28px);
    width: 100%;
    max-width: 1133px;
    margin: 0 auto;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 1 auto;
    font-size: clamp(11px, 0.85vw, 16px);
    font-weight: 400;
    line-height: 1.25;
    color: var(--text-primary);
    white-space: nowrap;
}

.footer-item img {
    flex-shrink: 0;
    width: clamp(22px, 1.7vw, 32px);
    height: auto;
}

.footer-item-highlight {
    flex: 1 1 280px;
    min-width: 0;
    border-right: 1px solid var(--footer-divider);
    padding-right: clamp(16px, 1.5vw, 28px);
    margin-right: clamp(4px, 0.5vw, 8px);
    white-space: normal;
}

.footer-item-highlight p {
    margin: 0;
    line-height: 1.25;
}

/* Tablet */
@media (max-width: 1199.98px) {
    .hub-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr) minmax(0, 1fr);
    }

    .card-title {
        white-space: normal;
    }

    .footer-bar {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 10px;
    }

    .footer-item-highlight {
        border-right: none;
        max-width: 100%;
        width: 100%;
        justify-content: center;
        padding-right: 0;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--footer-divider);
    }
}

/* Mobile – single column, numeric order, no page scroll */
@media (max-width: 767.98px) {
    .hub-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(7, minmax(0, 1fr));
        gap: clamp(4px, 0.7vh, 8px);
        overflow: hidden;
    }

    .hub-col {
        display: contents;
    }

    .hub-col-center {
        order: 0;
    }

    .center-hub {
        order: 0;
        max-height: 100%;
        max-width: min(220px, 72vw);
        margin: 0 auto;
    }

    .service-card[data-theme="onboarding"] { order: 1; }
    .service-card[data-theme="underwriting"] { order: 2; }
    .service-card[data-theme="claims-underwriting"] { order: 3; }
    .service-card[data-theme="policy-operations"] { order: 4; }
    .service-card[data-theme="claims-operations"] { order: 5; }
    .service-card[data-theme="finance"] { order: 6; }

    .service-card {
        min-height: 0;
        padding: 10px 14px 8px;
    }

    .card-title {
        white-space: normal;
        flex-wrap: wrap;
    }

    .card-icon-wrap {
        width: 40px;
        height: 40px;
        padding: 10px;
    }

    .card-icon-wrap img {
        width: 20px;
        height: 20px;
    }

    .card-title {
        font-size: 13px;
    }

    .card-desc {
        font-size: 11px;
        margin-top: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .card-footer-row {
        padding-top: 4px;
    }

    .footer-bar {
        gap: 10px;
        padding: 8px 10px;
    }

    .footer-item:not(.footer-item-highlight) {
        width: calc(50% - 8px);
        justify-content: center;
        font-size: 11px;
    }

    .footer-item-highlight {
        font-size: 11px;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: clamp(22px, 6.5vw, 32px);
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .card-body-inner {
        flex-direction: row;
    }

    .footer-item:not(.footer-item-highlight) {
        width: 100%;
    }
}

/* Short viewport – tighten vertical rhythm */
@media (max-height: 760px) {
    .hero-heading {
        padding-bottom: 6px;
    }

    .hero-rule {
        margin-top: 8px;
    }

    :root {
        --card-gap: clamp(10px, 1.5vh, 16px);
        --card-min-h: clamp(120px, 15vh, 160px);
    }

    .card-icon-wrap {
        width: 48px;
        height: 48px;
    }

    .center-hub-image {
        /* max-height: min(28vh, 220px); */
    }
}

/* Demo modal — Figma popup specs */
.demo-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 3vw, 48px);
}

.demo-modal[hidden] {
    display: none !important;
}

.demo-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 13, 8, 0.55);
    cursor: pointer;
}

.demo-modal-panel {
    position: relative;
    z-index: 2;
    width: min(100%, 584px);
    max-height: min(90vh, 720px);
    overflow: auto;
    background: #fef8f1;
    border: none;
    border-left: 6px solid var(--modal-theme, var(--onboarding));
    border-radius: 8px;
    box-shadow: 0 12px 48px rgba(16, 13, 8, 0.2);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.demo-modal-panel--tall {
    max-height: min(92vh, 820px);
}

.demo-modal-close {
    position: relative;
    align-self: flex-end;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.demo-modal-close img {
    width: 20px;
    height: 20px;
    display: block;
}

.demo-modal-close:hover {
    opacity: 0.75;
}

.demo-modal-inner {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.demo-modal-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin: 0;
}

.demo-modal-icon-wrap {
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #fbedda;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.demo-modal-icon-wrap img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.demo-modal-heading {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.demo-modal-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 32px;
    color: var(--modal-theme, var(--onboarding));
}

.demo-modal-title .card-num {
    min-width: 26px;
    width: 26px;
    height: 27px;
    font-size: 16px;
    line-height: 22px;
    border-radius: 4px;
    background: var(--modal-theme, var(--onboarding));
}

.demo-modal-desc {
    margin: 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 22px;
    color: #000;
}

.demo-modal-panel[data-theme="finance"] .demo-modal-desc {
    font-size: 16px;
}

.demo-modal-body {
    width: 100%;
}

.demo-list-heading {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 600;
    line-height: normal;
    color: #000;
}

.demo-list-heading-rule {
    position: relative;
    height: 2px;
    margin-bottom: 24px;
    background: #e8e0d6;
}

.demo-list-heading-rule::before {
    content: "";
    position: absolute;
    left: 0;
    top: -1px;
    width: 71px;
    height: 4px;
    background: var(--modal-theme, var(--onboarding));
    border-radius: 1px;
}

.demo-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.demo-list-item {
    margin: 0;
    padding: 0;
}

.demo-list-item-link {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: #fff1e2;
    border: 1px solid #f0e1ce;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.demo-list-item--compact .demo-list-item-link {
    padding: 16px 24px;
}

.demo-list-item-link:hover {
    border-color: var(--modal-theme, var(--onboarding));
    box-shadow: 0 4px 12px rgba(16, 13, 8, 0.08);
}

.demo-list-item-link:focus-visible {
    outline: 2px solid var(--modal-theme, var(--onboarding));
    outline-offset: 2px;
}

.demo-list-item-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.demo-list-item-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

.demo-list-item-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: normal;
    color: #000;
}

.demo-list-item-action {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.demo-list-item-action img {
    width: 30px;
    height: 30px;
    display: block;
}

.demo-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: clamp(44px, 4vw, 56px);
    height: clamp(64px, 8vh, 88px);
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease;
}

.demo-modal-nav:hover {
    background: rgba(255, 255, 255, 0.28);
}

.demo-modal-nav-prev {
    left: clamp(8px, 2vw, 32px);
}

.demo-modal-nav-next {
    right: clamp(8px, 2vw, 32px);
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 767.98px) {
    .demo-modal-nav {
        display: none;
    }

    .demo-modal-panel {
        max-height: 85vh;
        padding: 24px 20px;
    }

    .demo-modal-inner {
        max-width: 100%;
    }

    .demo-modal-title {
        font-size: clamp(20px, 5vw, 28px);
        line-height: 1.15;
    }

    .demo-modal-desc {
        font-size: clamp(15px, 3.5vw, 18px);
    }

    .demo-list-item-label {
        font-size: clamp(16px, 4vw, 20px);
    }

    .demo-list-item-link {
        gap: 16px;
        padding: 16px;
    }

    .demo-list-item--compact .demo-list-item-link {
        padding: 14px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-card {
        transition: none;
    }

    .bg-pattern {
        animation: none;
    }

    .demo-list-item-link {
        transition: none;
    }
}
