/* =========================================================
   HOMEPAGE PROJECT SHOWCASE
   ========================================================= */

.home-projects {
    background: #f5f6f7;
}

.home-projects-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.home-projects-heading > div {
    max-width: 760px;
}

.home-projects-heading .section-intro {
    margin-bottom: 0;
}

.home-projects-all-link {
    flex: 0 0 auto;
}

.home-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.home-project-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(24, 37, 49, 0.12);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(24, 37, 49, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.home-project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(24, 37, 49, 0.13);
}

.home-project-image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #dfe3e6;
}

.home-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 260ms ease;
}

.home-project-card:hover .home-project-image img {
    transform: scale(1.035);
}

.home-project-image-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    background:
        linear-gradient(135deg, rgba(27, 50, 67, 0.95), rgba(52, 73, 87, 0.92));
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-project-featured-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.45rem 0.75rem;
    background: rgba(255, 255, 255, 0.94);
    color: #1b3243;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.home-project-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.5rem;
}

.home-project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.9rem;
    min-height: 1.2rem;
    margin-bottom: 0.7rem;
    color: #69757e;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.home-project-meta span + span {
    position: relative;
    padding-left: 0.9rem;
}

.home-project-meta span + span::before {
    position: absolute;
    left: 0;
    content: "•";
}

.home-project-content h3 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    line-height: 1.2;
}

.home-project-content h3 a {
    color: #1b3243;
    text-decoration: none;
}

.home-project-content h3 a:hover,
.home-project-content h3 a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.home-project-content p {
    margin: 0 0 1.25rem;
    color: #56636c;
    line-height: 1.65;
}

.home-project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    margin-top: auto;
    color: #1b3243;
    font-weight: 800;
    text-decoration: none;
}

.home-project-link span {
    transition: transform 160ms ease;
}

.home-project-link:hover span,
.home-project-link:focus-visible span {
    transform: translateX(4px);
}

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

    .home-project-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        max-width: calc(50% - 0.75rem);
    }
}

@media (max-width: 700px) {
    .home-projects-heading {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 1.75rem;
    }

    .home-projects-all-link {
        width: 100%;
        text-align: center;
    }

    .home-projects-grid {
        grid-template-columns: 1fr;
    }

    .home-project-card:last-child:nth-child(odd) {
        grid-column: auto;
        max-width: none;
    }
}

/* Homepage hero photo caption */
.home-hero-photo-caption {
    margin: 10px 0 0;
    color: #5f6b76;
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.45;
}


/* =========================================================
   HOMEPAGE HERO ROTATION
   ========================================================= */
.home-hero-rotator {
    position: relative;
}

.home-hero-slides {
    position: relative;
    overflow: hidden;
}

.home-hero-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 700ms ease;
}

.home-hero-slide:first-child {
    position: relative;
}

.home-hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.home-hero-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero-control {
    position: absolute;
    top: calc(50% - 28px);
    z-index: 3;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(17, 35, 58, 0.78);
    color: #fff;
    cursor: pointer;
    font-size: 1.3rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.home-hero-control:hover,
.home-hero-control:focus-visible {
    background: #11233a;
}

.home-hero-control-prev { left: 12px; }
.home-hero-control-next { right: 12px; }

.home-hero-caption-area {
    min-height: 2.2rem;
}

.home-hero-photo-caption {
    display: none;
    margin: 10px 0 0;
    color: #5f6b76;
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.45;
}

.home-hero-photo-caption.is-active {
    display: block;
}

.home-hero-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.home-hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 1px solid #60717e;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.home-hero-dot.is-active {
    background: #1b3243;
}

@media (prefers-reduced-motion: reduce) {
    .home-hero-slide { transition: none; }
}

/* Phase 4.3: keep the gold accent tight to the rotating image. */
.home-hero-slides .home-hero-slide:first-child {
    position: absolute;
}

.home-hero-slides .home-hero-slide {
    width: 100%;
    height: 100%;
}

.home-hero-caption-area {
    min-height: 0;
}
