/* =============================================================================
   HOME.CSS
   Shared page components plus homepage sections.
   ============================================================================= */

.home-title,
.home-section-title,
.sys-title {
    text-transform: uppercase;
}

.hero-sys-label,
.home-section-label,
.sys-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--accent-strong);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-sys-label::before,
.home-section-label::before,
.sys-eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--accent);
}

.home-title {
    font-size: clamp(3.8rem, 5vw, 5rem);
    line-height: 0.92;
    max-width: none;
    margin-bottom: 20px;
}

.home-title .title-line,
.home-title .title-accent {
    display: block;
}

.home-title .title-accent {
    color: var(--accent);
}

.home-subtitle,
.sys-subtitle,
.home-section-subtitle {
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.home-subtitle {
    max-width: 34ch;
    margin-bottom: 38px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.home-tech-divider {
    width: min(1280px, calc(100% - 96px));
    height: 1px;
    margin: 0 auto 40px;
    background: linear-gradient(90deg, transparent, rgba(8, 27, 54, 0.12), transparent);
    position: relative;
}

.tech-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border: 2px solid var(--accent);
    background: #ffffff;
    transform: translate(-50%, -50%) rotate(45deg);
}

.home-section-shell,
.sys-container {
    padding: 44px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
}

.home-section-shell:not(.reveal),
.sys-container {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-section-shell.is-visible,
.sys-container.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.home-section-header,
.sys-header {
    margin-bottom: 28px;
}

.home-section-title,
.sys-title {
    font-size: clamp(2.1rem, 4vw, 3.5rem);
    line-height: 1;
}

.home-section-subtitle,
.sys-subtitle {
    max-width: 58ch;
    margin-top: 14px;
}

.sys-section {
    width: min(1280px, calc(100% - 96px));
    margin: 0 auto 56px;
}

.icon-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: 1px solid var(--accent-line);
    background: linear-gradient(180deg, rgba(0, 102, 255, 0.08) 0%, rgba(255, 255, 255, 0.8) 100%);
    color: var(--accent-strong);
    flex-shrink: 0;
}

.icon-frame svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.home-hero {
    position: relative;
    padding-top: 44px;
    padding-bottom: 28px;
}

.home-hero-shell {
    min-height: 700px;
    overflow: hidden;
    background:
        linear-gradient(120deg, #081b36 0%, #071a35 58%, #0a2447 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.home-hero-layout {
    display: grid;
    grid-template-rows: auto auto;
    gap: 46px;
    min-height: 100%;
    padding: 54px 46px 36px;
    position: relative;
}

.home-hero-copy,
.home-hero-media,
.home-hero-main,
.hero-proof-strip {
    position: relative;
    z-index: 1;
}

.home-hero-main {
    display: grid;
    grid-template-columns: minmax(280px, 0.68fr) minmax(620px, 1.32fr);
    gap: 44px;
    align-items: center;
    min-height: 460px;
}

.home-hero-copy {
    padding: 20px 0 28px 0;
}

.home-hero-copy .hero-sys-label,
.home-hero-copy .home-title,
.home-hero-copy .home-subtitle {
    color: #ffffff;
}

.home-hero-copy .hero-sys-label {
    color: rgba(255, 255, 255, 0.75);
}

.home-hero-copy .hero-sys-label::before {
    background: rgba(255, 255, 255, 0.4);
}

.home-hero-copy .home-subtitle {
    color: rgba(255, 255, 255, 0.74);
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.hero-metric {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.hero-metric strong {
    display: block;
    color: #ffffff;
    font-size: 0.86rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-metric span {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.84rem;
    line-height: 1.55;
}

.home-hero-media {
    min-width: 0;
    height: 420px;
    display: flex;
    align-items: center;
}

.hero-stage-visual {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    align-items: center;
    justify-content: stretch;
    padding: 0 18px;
}

.hero-stage-panel {
    position: relative;
    display: grid;
    height: 420px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    transform: skewX(-6deg);
}

.hero-stage-panel + .hero-stage-panel {
    box-shadow: -2px 0 0 rgba(0, 102, 255, 0.46);
}

.hero-stage-panel img {
    grid-area: 1 / 1;
    width: 126%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    transform: translateX(-9%) skewX(6deg) scale(1.12);
}

.hero-stage-label {
    grid-area: 1 / 1;
    align-self: end;
    z-index: 2;
    min-height: 108px;
    padding: 22px 18px 20px 22px;
    background: rgba(8, 27, 54, 0.94);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.hero-stage-label strong {
    display: block;
    font-size: 0.78rem;
    line-height: 1.2;
    text-transform: uppercase;
    color: #ffffff;
    transform: skewX(6deg);
    transform-origin: left bottom;
}

.hero-stage-label span {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
    line-height: 1.35;
    transform: skewX(6deg);
    transform-origin: left top;
}

.hero-proof-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
}

.hero-proof-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.hero-proof-item strong {
    display: block;
    font-size: 0.78rem;
    line-height: 1.2;
    text-transform: uppercase;
    color: #ffffff;
}

.hero-proof-item span {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.82rem;
    line-height: 1.45;
}

.hero-proof-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-proof-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-width: 0;
    padding-right: 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-proof-item:last-child {
    border-right: 0;
    padding-right: 0;
}

.hero-proof-icon {
    width: 44px;
    height: 44px;
    color: #5aa1ff;
}

.capability-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 56px;
}

.capability-item {
    padding: 24px;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
}

.capability-item h3 {
    margin: 18px 0 10px;
    font-size: 1.4rem;
}

.capability-item p {
    font-size: 0.94rem;
    line-height: 1.7;
}

.service-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.service-card {
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.service-card-image {
    aspect-ratio: 1.38;
    overflow: hidden;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-card-body {
    padding: 22px;
}

.service-card-body h3 {
    font-size: 1.35rem;
    margin-bottom: 10px;
}

.service-card-body p {
    min-height: 3.5em;
    font-size: 0.94rem;
    line-height: 1.7;
}

.service-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--accent-strong);
    font-size: 0.9rem;
    font-weight: 600;
}

.why-grid,
.industry-grid-home {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.industry-grid-home {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.why-card,
.industry-tile {
    padding: 22px;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
}

.why-card h3,
.industry-tile h3 {
    margin: 16px 0 10px;
    font-size: 1.28rem;
}

.why-card p,
.industry-tile p {
    font-size: 0.93rem;
    line-height: 1.7;
}

.workflow-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.workflow-step {
    position: relative;
    padding: 24px 20px;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    background: #ffffff;
}

.workflow-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    margin-bottom: 16px;
    background: var(--navy);
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
}

.workflow-step h3 {
    font-size: 1.18rem;
    margin-bottom: 10px;
}

.workflow-step p {
    font-size: 0.9rem;
    line-height: 1.65;
}

.case-study-panel {
    display: grid;
    grid-template-columns: minmax(340px, 0.95fr) minmax(0, 1.05fr);
    gap: 28px;
    padding: 34px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(8, 27, 54, 0.98) 0%, rgba(8, 27, 54, 0.95) 100%);
    box-shadow: var(--shadow-lg);
}

.case-study-media {
    border-radius: 18px;
    overflow: hidden;
    min-height: 100%;
}

.case-study-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-study-copy .hero-sys-label,
.case-study-copy h2,
.case-study-copy p,
.case-study-copy li {
    color: #ffffff;
}

.case-study-copy .hero-sys-label {
    color: rgba(255, 255, 255, 0.74);
}

.case-study-copy .hero-sys-label::before {
    background: rgba(255, 255, 255, 0.38);
}

.case-study-copy h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.case-study-copy p {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.75;
}

.case-study-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
    list-style: none;
}

.case-study-list li {
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
}

.cta-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
}

.cta-band .home-section-subtitle {
    margin-top: 16px;
}

.cta-band-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 22px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.cta-band-contact a {
    color: var(--accent-strong);
    font-weight: 600;
}

@media (max-width: 1180px) {
    .capability-strip,
    .why-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-showcase-grid,
    .industry-grid-home {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workflow-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .case-study-panel {
        grid-template-columns: 1fr;
    }

    .home-hero-shell {
        min-height: 0;
    }

    .home-hero-main,
    .case-study-panel {
        grid-template-columns: 1fr;
    }

    .home-hero-main {
        min-height: 0;
    }

    .home-hero-copy {
        padding-right: 0;
    }

    .home-hero-media {
        height: 360px;
    }

    .hero-stage-panel {
        height: 360px;
    }

    .hero-proof-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .home-tech-divider,
    .sys-section {
        width: calc(100% - 48px);
    }

    .home-section-shell,
    .sys-container {
        padding: 34px;
    }
}

@media (max-width: 768px) {
    .home-tech-divider,
    .sys-section {
        width: calc(100% - 32px);
    }

    .home-title {
        max-width: none;
        font-size: 3.4rem;
    }

    .home-section-shell,
    .sys-container,
    .home-hero-layout,
    .case-study-panel {
        padding: 24px;
    }

    .home-hero-layout {
        gap: 34px;
    }

    .hero-actions,
    .cta-band {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-metrics,
    .hero-proof-strip,
    .capability-strip,
    .service-showcase-grid,
    .why-grid,
    .industry-grid-home,
    .workflow-strip,
    .case-study-list {
        grid-template-columns: 1fr;
    }

    .home-hero {
        padding-top: 32px;
    }

    .home-hero-main {
        gap: 28px;
    }

    .home-hero-media {
        height: auto;
    }

    .hero-stage-visual {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 0;
    }

    .hero-stage-panel {
        height: 230px;
        transform: skewX(-4deg);
    }

    .hero-stage-panel img {
        transform: translateX(-7%) skewX(4deg) scale(1.08);
    }

    .hero-stage-label strong,
    .hero-stage-label span {
        transform: skewX(4deg);
    }

    .hero-proof-item {
        padding-right: 0;
        padding-bottom: 16px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .hero-proof-item:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .service-card-body p {
        min-height: 0;
    }
}
