/* ============================================================
   Alliance Corpo — HMS Product Page Styles
   ============================================================ */

/* ─── HMS Hero ─── */
.hms-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--color-dark);
    padding-top: var(--nav-h);
}

.hms-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 30% 50%, rgba(181, 255, 71, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 70% at 80% 30%, rgba(71, 207, 255, 0.04) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

.hms-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 0%, transparent 75%);
}

.hms-hero-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: clamp(10rem, 25vw, 28rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(181, 255, 71, 0.08);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    line-height: 1;
    z-index: 0;
}

.hms-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    gap: 48px;
    min-height: calc(100vh - var(--nav-h));
    padding: 80px 0 60px;
}

.hms-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hms-back-link {
    font-size: 0.85rem;
    color: var(--color-text-dim);
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hms-back-link:hover {
    color: var(--color-accent);
}

.hms-hero-sub {
    font-size: 1.1rem;
    color: var(--color-text-dim);
    max-width: 460px;
    line-height: 1.75;
}

.hms-hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.hms-hero-trust {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.hms-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-dim);
}

.hms-trust-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-accent);
    flex-shrink: 0;
}

.hms-hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .hms-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 60px 0 40px;
    }

    .hms-hero-copy {
        align-items: center;
    }

    .hms-hero-sub {
        max-width: none;
    }

    .hms-hero-actions {
        justify-content: center;
    }

    .hms-hero-trust {
        justify-content: center;
    }

    .hms-hero-visual {
        order: -1;
        margin-bottom: 20px;
    }
}


/* ─── Screenshot Frame (Browser Chrome) ─── */
.screenshot-frame {
    background: #0e0e0e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(181, 255, 71, 0.04);
    transition: var(--transition-base);
}

.screenshot-frame:hover {
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(181, 255, 71, 0.08);
    transform: translateY(-4px);
}

.screenshot-frame-dots {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.screenshot-frame-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.screenshot-frame-dots span:first-child {
    background: #ff5f57;
}

.screenshot-frame-dots span:nth-child(2) {
    background: #ffbd2e;
}

.screenshot-frame-dots span:nth-child(3) {
    background: #28c840;
}

.screenshot-frame img {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-frame-hero {
    max-width: 620px;
    width: 100%;
}

/* Light section screenshot frame */
.section-light .screenshot-frame {
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.section-light .screenshot-frame:hover {
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.section-light .screenshot-frame-dots {
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.section-light .screenshot-frame-dots span {
    background: rgba(0, 0, 0, 0.08);
}

.section-light .screenshot-frame-dots span:first-child {
    background: #ff5f57;
}

.section-light .screenshot-frame-dots span:nth-child(2) {
    background: #ffbd2e;
}

.section-light .screenshot-frame-dots span:nth-child(3) {
    background: #28c840;
}


/* ─── Pain Grid ─── */
.pain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .pain-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .pain-grid {
        grid-template-columns: 1fr;
    }
}

.pain-card {
    padding: 32px;
    background: var(--color-dark-3);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.pain-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff5f57, transparent);
    opacity: 0;
    transition: var(--transition-base);
}

.pain-card:hover {
    border-color: rgba(255, 95, 87, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.pain-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 95, 87, 0.1);
    border: 1px solid rgba(255, 95, 87, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.pain-card-icon svg {
    width: 22px;
    height: 22px;
    stroke: #ff5f57;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Pain icon color variants */
.pain-icon-orange {
    background: rgba(255, 189, 46, 0.1);
    border-color: rgba(255, 189, 46, 0.2);
}

.pain-icon-orange svg {
    stroke: #ffbd2e;
}

.pain-icon-red {
    background: rgba(255, 95, 87, 0.1);
    border-color: rgba(255, 95, 87, 0.2);
}

.pain-icon-red svg {
    stroke: #ff5f57;
}

.pain-icon-purple {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.2);
}

.pain-icon-purple svg {
    stroke: #a855f7;
}

.pain-icon-cyan {
    background: rgba(71, 200, 255, 0.1);
    border-color: rgba(71, 200, 255, 0.2);
}

.pain-icon-cyan svg {
    stroke: #47c8ff;
}

.pain-icon-yellow {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.2);
}

.pain-icon-yellow svg {
    stroke: #ffd700;
}

.pain-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 10px;
    letter-spacing: -0.015em;
}

.pain-card p {
    font-size: 0.87rem;
    color: var(--color-text-dim);
    line-height: 1.7;
}


/* ─── Solution Split ─── */
.solution-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
    align-items: center;
}

@media (max-width: 900px) {
    .solution-split {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .solution-visual {
        order: -1;
    }
}

.solution-copy h2 {
    margin-bottom: 20px;
}

.solution-copy>p {
    line-height: 1.8;
    margin-bottom: 24px;
}

.solution-checks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.solution-checks li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.solution-checks li svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Light section check colors */
.section-light .solution-checks li svg {
    stroke: #3a6b00;
}


/* ─── Screenshot Gallery ─── */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

@media (max-width: 900px) {
    .screenshot-gallery {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 600px;
        margin: 0 auto;
    }
}

.screenshot-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.screenshot-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-white);
    letter-spacing: -0.015em;
}

.screenshot-card p {
    font-size: 0.87rem;
    color: var(--color-text-dim);
    line-height: 1.7;
}


/* ─── Use Case Grid ─── */
.usecase-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

@media (max-width: 1100px) {
    .usecase-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .usecase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .usecase-grid {
        grid-template-columns: 1fr;
    }
}

.usecase-card {
    padding: 32px 24px;
    background: var(--color-dark-2);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.usecase-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(181, 255, 71, 0.4), transparent);
    opacity: 0;
    transition: var(--transition-base);
}

.usecase-card:hover {
    border-color: rgba(181, 255, 71, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

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

.usecase-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(181, 255, 71, 0.08);
    border: 1px solid rgba(181, 255, 71, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.usecase-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-accent);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.usecase-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.usecase-card p {
    font-size: 0.82rem;
    color: var(--color-text-dim);
    line-height: 1.7;
}


/* ─── Comparison Table ─── */
.comparison-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    background: #fff;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 600px;
}

.comparison-table thead th {
    padding: 20px 24px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
    background: #f8faf5;
    border-bottom: 2px solid rgba(0, 0, 0, 0.06);
    color: #1a2a16;
}

.comparison-table thead th:first-child {
    border-radius: 16px 0 0 0;
}

.comparison-table thead th:last-child {
    border-radius: 0 16px 0 0;
}

.comparison-table tbody td {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
    color: #3a4a35;
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.comparison-table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 16px;
}

.comparison-table tbody tr:last-child td:last-child {
    border-radius: 0 0 16px 0;
}

.comparison-table tbody td:first-child {
    font-family: var(--font-display);
    font-weight: 600;
    color: #0d1a0a;
}

.col-old {
    color: #8b5b5b;
}

.col-new {
    color: #2d6b00;
    background: rgba(181, 255, 71, 0.04);
}

.compare-bad {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 95, 87, 0.12);
    color: #ff5f57;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 10px;
    flex-shrink: 0;
}

.compare-good {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(181, 255, 71, 0.2);
    color: #3a6b00;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 10px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .comparison-table-wrap {
        border: none;
        box-shadow: none;
        background: transparent;
        overflow: visible;
        padding: 0;
    }

    .comparison-table {
        min-width: 100%;
        display: block;
    }

    .comparison-table thead {
        display: none;
    }

    .comparison-table tbody,
    .comparison-table tr,
    .comparison-table td {
        display: block;
        width: 100%;
    }

    .comparison-table tbody {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .comparison-table tr {
        background: #fff;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: var(--radius-md);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
        overflow: hidden;
    }

    .comparison-table td {
        padding: 14px 20px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        border-radius: 0 !important;
    }

    .comparison-table td:first-child {
        background: #f8faf5;
        font-size: 1rem;
        border-bottom: 2px solid rgba(0, 0, 0, 0.06);
    }

    .comparison-table td:last-child {
        border-bottom: none;
        background: rgba(181, 255, 71, 0.04);
    }

    .comparison-table td:nth-child(2)::before {
        content: "Traditional";
        display: block;
        font-family: var(--font-display);
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #8b5b5b;
        margin-bottom: 8px;
        font-weight: 600;
    }

    .comparison-table td:nth-child(3)::before {
        content: "Alliance HMS";
        display: block;
        font-family: var(--font-display);
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #2d6b00;
        margin-bottom: 8px;
        font-weight: 600;
    }
}


/* ─── Demo CTA Section ─── */
.hms-demo-cta {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hms-demo-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(181, 255, 71, 0.06) 0%, transparent 60%);
    pointer-events: none;
}


/* ─── FAQ ─── */
.faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.faq-item {
    background: var(--color-dark-2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-base);
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.faq-item.active {
    border-color: rgba(181, 255, 71, 0.2);
}

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

.faq-question:hover {
    color: var(--color-accent);
}

.faq-chevron {
    width: 20px;
    height: 20px;
    stroke: var(--color-text-dim);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-chevron {
    transform: rotate(180deg);
    stroke: var(--color-accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), padding 0.35s ease;
    padding: 0 24px;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 24px 20px;
}

.faq-answer p {
    font-size: 0.9rem;
    color: var(--color-text-dim);
    line-height: 1.8;
}


/* ─── Feature Card Wide (resets for HMS context) ─── */
.feature-card-wide {
    grid-column: 1 / -1;
}

.feature-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

@media (max-width: 768px) {
    .feature-card-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}


/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
    .screenshot-frame:hover {
        transform: none;
    }

    .pain-card:hover,
    .usecase-card:hover {
        transform: none;
    }

    .faq-answer {
        transition: none;
    }
}

/* ─── Mobile Performance ─── */
@media (max-width: 768px) {

    .screenshot-frame:hover,
    .pain-card:hover,
    .usecase-card:hover {
        transform: none;
    }
}