/* =========================================================
   BYALL GROUP — HOME PAGE
========================================================= */

/* HOME-SPECIFIC FOUNDATION */

.home-page {
    --home-ink: #14212a;
    --home-muted: #5c6971;
    --home-blue: #087b9e;
    --home-gold: var(--byall-gold, #e9ad14);
}

/* Hero handles its own fixed-header clearance */
body.home-page > main {
    padding-top: 0;
}

.home-page main,
.home-page main *,
.home-page main *::before,
.home-page main *::after {
    box-sizing: border-box;
}

.home-page main .container {
    width: min(1200px, calc(100% - 64px));
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 0;
}

.home-icon-library {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.home-icon {
    display: block;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-page main .section-label {
    display: block;
    margin-bottom: 18px;
    color: var(--home-blue);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.home-page main h2 {
    margin: 0;
    color: var(--home-ink);
    font-size: clamp(32px, 3.3vw, 46px);
    font-weight: 600;
    line-height: 1.14;
    letter-spacing: -0.035em;
}

.home-page main a {
    text-decoration: none;
}

.home-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    min-height: 54px;
    padding: 16px 26px;
    background: var(--home-gold);
    color: #111;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    transition: background-color 0.2s ease;
}

.home-button > span {
    font-size: 21px;
    line-height: 1;
}

.home-button:hover {
    background: #f2c34c;
}

.home-text-link {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    width: fit-content;
    padding: 8px 0;
    border-bottom: 2px solid var(--home-gold);
    color: var(--home-ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.home-text-link > span {
    color: var(--home-blue);
    font-size: 20px;
}

.home-section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: end;
    gap: 64px;
    margin-bottom: 42px;
}

.home-section-heading > p {
    max-width: 420px;
    margin: 0;
    color: var(--home-muted);
    font-size: 16px;
    line-height: 1.75;
}


/* =========================================================
   01. VIDEO HERO
========================================================= */

.home-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 760px;
    height: 92vh;
    max-height: 960px;
    overflow: hidden;
    background: #111 url("/assets/images/byall-poster.jpg")
        center / cover no-repeat;
    color: #fff;
}

.home-hero-video {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
}

.home-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        90deg,
        rgba(5, 8, 10, 0.80) 0%,
        rgba(5, 8, 10, 0.60) 40%,
        rgba(5, 8, 10, 0.24) 100%
    );
    pointer-events: none;
}

.home-hero-inner {
    position: relative;
    z-index: 2;
}

.home-hero-content {
    max-width: 720px;
    padding-top: 120px;
    padding-bottom: 145px;
}

.home-hero-label {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 26px;
    color: #d9dfe2;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.label-line {
    flex-shrink: 0;
    width: 42px;
    height: 2px;
    background: var(--home-gold);
}

.home-hero h1 {
    max-width: 720px;
    margin: 0;
    color: #fff;
    font-size: clamp(44px, 4.7vw, 66px);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.home-hero h1 span {
    display: block;
    margin-top: 7px;
}

.home-hero-text {
    max-width: 500px;
    margin: 28px 0 0;
    color: #e0e5e8;
    font-size: 18px;
    line-height: 1.7;
}

.home-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 34px;
}

.home-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-height: 44px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.home-hero-secondary > span {
    color: var(--home-gold);
    font-size: 21px;
}

.home-hero-bottom {
    position: absolute;
    inset: auto 0 0;
    z-index: 3;
    background: rgba(7, 10, 12, 0.74);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.home-hero-bottom-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-info {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
    min-height: 86px;
}

.hero-info + .hero-info {
    padding-left: 36px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-info > span {
    color: var(--home-gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hero-info p {
    margin: 0;
    color: #e0e5e8;
    font-size: 12px;
    line-height: 1.6;
}

.hero-video-toggle {
    position: absolute;
    right: 4%;
    bottom: 106px;
    z-index: 4;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(7, 10, 12, 0.70);
    color: #fff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.hero-video-toggle[hidden] {
    display: none;
}


/* =========================================================
   02. ABOUT
========================================================= */

.home-about {
    padding: 96px 0;
    background: #fff;
}

.home-about-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 72px;
}

.home-about-content {
    max-width: 520px;
}

.about-lead {
    margin: 24px 0 0;
    color: #293943;
    font-size: 19px;
    line-height: 1.65;
}

.about-text {
    margin: 18px 0 0;
    color: var(--home-muted);
    font-size: 16px;
    line-height: 1.8;
}

.home-about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
}

.home-about-tags > span {
    padding: 7px 11px;
    border: 1px solid #dce3e5;
    color: #45555f;
    font-size: 11px;
    line-height: 1.5;
}

.home-about .home-text-link {
    margin-top: 26px;
}

.home-about-image {
    position: relative;
    height: 490px;
}

.home-about-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.62) contrast(0.94) brightness(0.98);
}

.image-accent {
    position: absolute;
    left: -12px;
    bottom: -12px;
    width: 85px;
    height: 85px;
    border-left: 4px solid var(--home-blue);
    border-bottom: 4px solid var(--home-gold);
    pointer-events: none;
}

.home-image-caption {
    position: absolute;
    inset: auto 0 0;
    padding: 28px 24px 20px;
    background: linear-gradient(transparent, rgba(10, 20, 27, 0.86));
    color: #fff;
    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   03. SERVICES
========================================================= */

.home-capabilities {
    padding: 90px 0;
    background: #eef2f1;
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.capability-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 30px 24px;
    border: 1px solid #dae2e2;
    background: #fff;
    color: var(--home-ink);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.home-icon-box {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    margin-bottom: 28px;
    border-radius: 14px;
    background: #eaf4f6;
    color: var(--home-blue);
}

.capability-item h3 {
    margin: 0 0 16px;
    color: var(--home-ink);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.capability-item p {
    margin: 0 0 28px;
    color: var(--home-muted);
    font-size: 14px;
    line-height: 1.8;
}

.home-card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid #e0e6e8;
    color: var(--home-ink);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}

.home-card-link > span {
    color: var(--home-blue);
    font-size: 22px;
}


/* =========================================================
   04. MARKETS
========================================================= */

.home-markets {
    padding: 96px 0;
    background: #fff;
}

.home-markets-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.home-market-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dce3e5;
    background: #fff;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.home-market-photo {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: #22323d;
}

.home-market-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        transparent 40%,
        rgba(8, 17, 24, 0.78)
    );
    pointer-events: none;
}

.home-market-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.72);
    transition: transform 0.35s ease;
}

.home-market-category {
    position: absolute;
    left: 24px;
    bottom: 20px;
    z-index: 1;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.home-market-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 28px 26px;
}

.home-market-content h3 {
    margin: 0 0 16px;
    color: var(--home-ink);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.home-market-content p {
    margin: 0 0 24px;
    color: var(--home-muted);
    font-size: 14px;
    line-height: 1.8;
}


/* =========================================================
   05. PROCESS
========================================================= */

.home-process {
    padding: 80px 0;
    background: #f2f4f2;
}

.home-process .home-section-heading {
    grid-template-columns: minmax(0, 1fr) auto;
}

.home-process-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-process-grid > li {
    padding-top: 24px;
    border-top: 1px solid #cbd6d9;
}

.home-process-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 22px;
    border-radius: 50%;
    background: #fff;
    color: var(--home-blue);
    font-size: 12px;
    font-weight: 700;
}

.home-process-grid h3 {
    margin: 0 0 14px;
    color: var(--home-ink);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

.home-process-grid p {
    margin: 0;
    color: var(--home-muted);
    font-size: 15px;
    line-height: 1.8;
}


/* =========================================================
   06. WHY BYALL
========================================================= */

.home-why {
    padding: 90px 0;
    background: #14212a;
    color: #fff;
}

.home-why-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 72px;
}

.home-page .home-why .section-label {
    color: var(--home-gold);
}

.home-page .home-why h2 {
    color: #fff;
}

.home-why-intro > p {
    max-width: 430px;
    margin: 24px 0 0;
    color: #c3ced4;
    font-size: 16px;
    line-height: 1.8;
}

.home-why .home-text-link {
    margin-top: 26px;
    color: #fff;
}

.home-why .home-text-link > span {
    color: var(--home-gold);
}

.home-why-principles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
}

.home-why-item {
    min-width: 0;
    padding-top: 24px;
    border-top: 1px solid #3b4a54;
}

.home-why-item > .home-icon {
    margin-bottom: 20px;
    color: #50b5ca;
}

.home-why-item h3 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.home-why-item p {
    margin: 0;
    color: #c3ced4;
    font-size: 14px;
    line-height: 1.8;
}


/* =========================================================
   07. CONTACT CTA
========================================================= */

.home-cta {
    padding: 72px 0;
    background: #eaf0ee;
}

.home-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.home-cta p {
    margin: 18px 0 0;
    color: var(--home-muted);
    font-size: 16px;
    line-height: 1.7;
}

.home-cta .home-button {
    flex-shrink: 0;
}


/* =========================================================
   INTERACTION & ACCESSIBILITY
========================================================= */

@media (hover: hover) {
    .capability-item:hover {
        transform: translateY(-5px);
        border-color: #86b4c0;
        box-shadow: 0 14px 30px rgba(20, 33, 42, 0.07);
    }

    .home-market-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 32px rgba(20, 33, 42, 0.09);
    }

    .home-market-card:hover img {
        transform: scale(1.035);
    }
}

.home-page main a:focus-visible,
.hero-video-toggle:focus-visible {
    outline: 3px solid var(--home-blue);
    outline-offset: 5px;
}

.home-hero a:focus-visible,
.home-why a:focus-visible,
.hero-video-toggle:focus-visible {
    outline-color: var(--home-gold);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1050px) {
    .capabilities-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-about-grid,
    .home-why-grid {
        gap: 40px;
    }

    .home-market-content {
        padding: 24px 20px;
    }

    .home-market-content h3 {
        font-size: 23px;
    }
}

@media (max-width: 900px) {
    .home-hero {
        height: auto;
        min-height: 740px;
        max-height: none;
    }

    .home-hero-content {
        padding-top: 150px;
        padding-bottom: 150px;
    }

    .home-about-grid,
    .home-why-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 44px;
    }

    .home-about-content {
        max-width: 680px;
    }

    .home-about-image {
        height: 440px;
    }

    .home-section-heading,
    .home-process .home-section-heading {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .home-markets-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-market-card {
        display: grid;
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    }

    .home-market-photo {
        height: 100%;
        min-height: 260px;
    }

    .home-market-content {
        padding: 30px;
    }

    .home-process-grid {
        gap: 24px;
    }

    .hero-info {
        gap: 12px;
    }

    .hero-info + .hero-info {
        padding-left: 20px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {
    .home-page main .container {
        width: calc(100% - 40px);
    }

    .home-page main h2 {
        font-size: clamp(30px, 8vw, 38px);
    }

    .home-about,
    .home-capabilities,
    .home-markets,
    .home-process,
    .home-why {
        padding: 64px 0;
    }

    .home-hero {
        min-height: 720px;
        background-position: 62% center;
    }

    .home-hero-video,
    .hero-video-toggle {
        display: none;
    }

    .home-hero-overlay {
        background: rgba(5, 8, 10, 0.70);
    }

    .home-hero-content {
        padding-top: 140px;
        padding-bottom: 150px;
    }

    .home-hero-label {
        gap: 10px;
        max-width: 330px;
        font-size: 9px;
        letter-spacing: 0.10em;
    }

    .label-line {
        width: 26px;
    }

    .home-hero h1 {
        font-size: clamp(34px, 8.5vw, 44px);
        line-height: 1.1;
    }

    .home-hero-text {
        font-size: 16px;
    }

    .home-hero-actions {
        gap: 22px;
    }

    .home-hero-bottom-inner {
        grid-template-columns: minmax(0, 1fr);
        padding-block: 12px;
    }

    .hero-info {
        display: grid;
        grid-template-columns: 80px minmax(0, 1fr);
        min-height: 36px;
        gap: 8px;
    }

    .hero-info + .hero-info {
        padding-left: 0;
        border-left: 0;
    }

    .hero-info > span {
        font-size: 9px;
    }

    .hero-info p {
        font-size: 11px;
    }

    .about-lead {
        font-size: 18px;
    }

    .home-about-image {
        height: 340px;
    }

    .image-accent {
        left: -8px;
        bottom: -8px;
        width: 64px;
        height: 64px;
    }

    .capabilities-grid,
    .home-process-grid,
    .home-why-principles {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .capability-item {
        padding: 28px;
    }

    .home-icon-box {
        margin-bottom: 22px;
    }

    .home-market-card {
        display: flex;
    }

    .home-market-photo {
        height: 230px;
        min-height: 0;
    }

    .home-market-content {
        padding: 26px;
    }

    .home-market-content h3 {
        font-size: 26px;
    }

    .home-process-grid {
        gap: 30px;
    }

    .home-why-principles {
        gap: 28px;
    }

    .home-cta {
        padding: 56px 0;
    }

    .home-cta-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 28px;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
    .home-page main *,
    .home-page main *::before,
    .home-page main *::after {
        transition: none;
        animation: none;
    }

    .home-hero-video,
    .hero-video-toggle {
        display: none;
    }
}