/* ============================================================
   HOME PAGE STYLES — css/home.css
   ============================================================ */

/* ============================================================
   HERO SECTION CONTAINER
   ============================================================ */
.hero-section {
    min-height: 100vh;
    padding-top: var(--nav-height-desktop);
    padding-bottom: var(--space-md);
    display: flex;
    align-items: stretch;
}
.hero-section__inner {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: var(--space-md);
    align-items: stretch;
    flex: 1;
}

/* ============================================================
   BASE CARD STYLES (shared by all 3 hero cards)
   ============================================================ */
.hero-card {
    background-color: var(--color-offwhite);
    border: 1px solid rgba(57, 62, 70, 0.12);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: box-shadow var(--duration-normal) var(--ease-standard),
                transform var(--duration-normal) var(--ease-standard);
}
.hero-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

/* ============================================================
   HERO MAIN CARD (Card 1 — the large image card)
   ============================================================ */
.hero-card--main {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 520px;
    position: relative;
    border: 1.5px solid rgba(57, 62, 70, 0.18);
}

/* Image layer — fills the entire card */
.hero-card__image-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* FADE OVERLAYS
   Overlay 1 (hero-card__fade-margins): Creates the fade-to-card-color
   effect on all 4 edges of the image.
   Overlay 2 (hero-card__fade-top): Creates the top 40% fade for text readability. */

.hero-card__fade-margins {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Using inset box-shadow for reliable uniform-margin fade — tightened to ~5% */
    box-shadow: inset 0 0 10px 5px var(--color-offwhite);
    border-radius: var(--radius-lg);
    pointer-events: none;
}

.hero-card__fade-top {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        to bottom,
        rgba(247, 247, 247, 0.97) 0%,
        rgba(247, 247, 247, 0.90) 8%,
        rgba(247, 247, 247, 0.70) 22%,
        rgba(247, 247, 247, 0.40) 34%,
        transparent 42%
    );
    pointer-events: none;
}

/* Text content on top of everything */
.hero-card__content {
    position: relative;
    z-index: 3;
    padding: var(--space-lg) var(--space-xl) 0 var(--space-xl);
}
.hero-card__subtext {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-secondary-slate);
    margin-bottom: var(--space-sm);
}
.hero-card__title {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.5px;
    color: var(--color-primary-dark);
}

/* Scroll hint at bottom of hero card — absolute to stay pinned at bottom */
.hero-card__scroll-hint {
    position: absolute;
    bottom: var(--space-md);
    left: var(--space-xl);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: rgba(29, 43, 54, 0.5);
    letter-spacing: 0.3px;
    pointer-events: none;
}

/* ============================================================
   RIGHT COLUMN (Cards 2 and 3)
   ============================================================ */
.hero-section__right-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.hero-card--clients {
    flex: 1;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
}
.hero-card--about {
    flex: 0 0 auto;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.hero-card__label {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(29, 43, 54, 0.4);
    margin-bottom: var(--space-sm);
}

/* Client list inside Card 2 */
.client-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex: 1;
}
.client-list__item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px var(--space-sm);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(57, 62, 70, 0.1);
    background-color: rgba(247, 247, 247, 0.8);
    transition: background-color var(--duration-fast) var(--ease-standard);
}
.client-list__item:hover {
    background-color: rgba(60, 81, 94, 0.06);
}
.client-list__logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}
.client-list__name {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary-dark);
}

/* Card 3 — About */
.hero-card--about__heading {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary-dark);
}
.hero-card--about__body {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-charcoal);
    flex: 1;
}

/* Shared text link style used across hero cards */
.hero-card__text-link {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-secondary-slate);
    margin-top: var(--space-sm);
    transition: color var(--duration-fast) var(--ease-standard),
                gap var(--duration-fast) var(--ease-standard);
    gap: 4px;
}
.hero-card__text-link:hover {
    color: var(--color-primary-dark);
    gap: 8px;
}

/* ============================================================
   BENTO GRID SECTION
   ============================================================ */
.bento-section {
    padding: var(--space-2xl) 0;
}
.bento-grid {
    display: grid;
    grid-template-columns: 30% 15% 1fr;
    grid-template-rows: 240px auto;
    gap: var(--space-md);
}

/* Base bento card */
.bento-card {
    background-color: var(--color-offwhite);
    border: 1px solid rgba(57, 62, 70, 0.12);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: box-shadow var(--duration-normal) var(--ease-standard),
                transform var(--duration-normal) var(--ease-standard);
}
.bento-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

/* Bento Card 1 — Photo card */
.bento-card--photo {
    grid-column: 1;
    grid-row: 1;
    min-height: 240px;
    height: 100%;
}
.bento-card__image-wrap {
    position: absolute;
    inset: 0;
}
.bento-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.bento-card__fade-margins {
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* Using inset box-shadow for the margin fade — tightened to ~5% */
    box-shadow: inset 0 0 24px 12px var(--color-offwhite);
    border-radius: var(--radius-lg);
}

/* Bento Card 2 — Machines */
.bento-card--machines {
    grid-column: 2 / 4;
    grid-row: 1;
    padding: var(--space-lg);
    display: flex;
    align-items: center;
}
.bento-card--machines__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: var(--space-lg);
}
.bento-card--machines__left {
    flex: 1;
}
.bento-label {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(29, 43, 54, 0.4);
    margin-bottom: var(--space-xs);
}
.bento-card--machines__headline {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
    color: var(--color-primary-dark);
}
.bento-card--machines__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: flex-start;
    padding: 0;
    margin: 0;
}
.bento-card--machines__list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    color: var(--color-secondary-slate);
    width: 100%;
}
.machine-dot {
    display: block;
    width: 6px;
    height: 6px;
    min-width: 6px;
    min-height: 6px;
    border-radius: 50%;
    background-color: var(--color-secondary-slate);
    flex-shrink: 0;
}

/* Row 2 of bento: Card 3 — Fabric */
.bento-card--fabric {
    grid-column: 1 / 3;
    grid-row: 2;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
}
.bento-card--fabric__headline {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--color-primary-dark);
    margin-bottom: var(--space-sm);
}
.bento-card--fabric__accent {
    font-size: 48px;
    display: block;
    color: var(--color-secondary-slate);
}
.bento-card--fabric__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    margin-bottom: var(--space-sm);
    flex: 1;
    align-content: flex-start;
}
.bento-card--fabric__tags span {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    background-color: rgba(60, 81, 94, 0.08);
    color: var(--color-secondary-slate);
}

/* Right stack — Cards 4 and 5 */
.bento-right-stack {
    grid-column: 3;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.bento-card--export {
    flex: 1;
    padding: var(--space-md);
}
.bento-card--export__headline {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin: var(--space-xs) 0 var(--space-sm);
}
.bento-card--export__body {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-charcoal);
}
.bento-card--years {
    flex: 1;
    padding: var(--space-md);
    background-color: var(--color-primary-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.bento-years__number {
    font-family: var(--font-heading);
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    color: var(--color-offwhite);
}
.bento-years__number span {
    font-size: 40px;
    color: var(--color-secondary-slate);
}
.bento-years__label {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(247, 247, 247, 0.8);
    margin-top: var(--space-xs);
    margin-bottom: var(--space-sm);
}
.bento-years__sub {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(247, 247, 247, 0.5);
}

/* ============================================================
   TABLET RESPONSIVE (768px to 1023px)
   ============================================================ */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-section__inner {
        grid-template-columns: 1fr 320px;
    }
    .hero-card__title {
        font-size: 36px;
    }
    .bento-card--machines__headline {
        font-size: 30px;
    }
    .bento-years__number {
        font-size: 48px;
    }
}

/* ============================================================
   MOBILE RESPONSIVE (below 768px)
   ============================================================ */
@media (max-width: 767px) {
    /* Hero section — stacked layout */
    .hero-section {
        min-height: auto;
        padding-top: var(--nav-height-mobile);
        padding-bottom: var(--space-sm);
    }
    .hero-section__inner {
        grid-template-columns: 1fr;
        grid-template-rows: 60vh auto;
        gap: var(--space-sm);
    }

    /* Main hero card takes 60% of viewport height */
    .hero-card--main {
        grid-row: 1;
        min-height: 60vh;
    }
    .hero-card__title {
        font-size: 30px;
    }
    .hero-card__content {
        padding: var(--space-lg) var(--space-md) var(--space-md);
    }

    /* Cards 2 and 3 share the remaining row side by side */
    .hero-section__right-col {
        grid-row: 2;
        flex-direction: row;
        gap: var(--space-sm);
    }
    .hero-card--clients {
        flex: 1;
        min-width: 0;
    }
    .hero-card--about {
        flex: 1;
        min-width: 0;
    }
    .hero-card--about__body {
        font-size: 12px;
    }
    /* On mobile, client list items show only the logo and name, no border box */
    .client-list__item {
        padding: 8px var(--space-xs);
    }
    .client-list__logo {
        width: 28px;
        height: 28px;
    }
    .client-list__name {
        font-size: 12px;
    }

    /* Bento grid — mobile layout */
    .bento-section {
        padding: var(--space-xl) 0;
    }
    .bento-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }
    .bento-card--photo {
        grid-column: 2;
        grid-row: 2;
        min-height: 140px;
    }
    .bento-card--machines {
        grid-column: 1 / 3;
        grid-row: 1;
        padding: var(--space-md);
    }
    .bento-card--machines__headline {
        font-size: 28px;
    }
    .bento-card--fabric {
        grid-column: 1;
        grid-row: 2 / 5;
        padding: var(--space-md);
    }
    .bento-card--fabric__headline {
        font-size: 22px;
    }
    .bento-card--fabric__accent {
        font-size: 32px;
    }
    .bento-right-stack {
        grid-column: 2;
        grid-row: 3 / 5;
    }
    .bento-card--export__headline {
        font-size: 20px;
    }
    .bento-years__number {
        font-size: 40px;
    }
}
