.hero-section {
    position: relative;
    max-width: var(--site-max-width);
    margin: 127px auto 60px;
    padding: 0 var(--page-padding);
    background-color: var(--bg-body);
}

/* Pull the intro up toward the hero on the homepage only */
.main-content {
    padding-top: 0;
    padding-bottom: 0;
}

/* Horizontal hairlines between homepage sections */
.home-divider {
    height: 1px;
    max-width: var(--site-max-width);
    margin: 0 auto;
    padding: 0 var(--page-padding);
    box-sizing: border-box;
    background-color: var(--border-light);
    background-clip: content-box;
}

.home-divider--inner {
    max-width: none;
    padding: 0;
    margin: 0;
}

/* Match the hero caption kicker sizing */
.projects-section .section-header h3 {
    font-size: 1.05rem;
    letter-spacing: 0.2em;
}

/* Hybrid intro layout */
.intro-block {
    position: relative;
    padding: 100px 0 100px;
    overflow: visible;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.grid-line {
    position: absolute;
    background-color: var(--border-light);
    opacity: 0.03;
}

.grid-v-1,
.grid-v-2,
.grid-v-3 {
    width: 1px;
    height: 100%;
    top: 0;
}

.grid-v-1 { left: 15%; }
.grid-v-2 { left: 45%; }
.grid-v-3 { left: 75%; }

.grid-h-1,
.grid-h-2 {
    height: 1px;
    width: 100%;
    left: 0;
}

.grid-h-1 { top: 25%; }
.grid-h-2 { top: 65%; }

.accent-element {
    position: absolute;
    top: 30%;
    right: 10%;
    width: 2px;
    height: 200px;
    background: linear-gradient(to bottom,
            transparent,
            var(--border-light) 20%,
            var(--border-light) 80%,
            transparent);
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
}

.hybrid-title {
    position: relative;
    z-index: 2;
    /* shrink-wraps to the widest line so the whole staggered block
       centers in the section while keeping its internal offsets;
       the -0.41em corrects for box slack vs the visual text extents */
    display: table;
    margin-left: auto;
    margin-right: auto;
    /* "the city lives" centers on the middle Selected Work card below */
    left: -1.012em;
    margin-bottom: 0;
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: -0.03em;
    color: var(--text-main);
    text-transform: lowercase;
}

.title-line {
    display: block;
    position: relative;
    margin-bottom: 0.15em;
}

.title-line-1 { text-align: left; }
.title-line-2 { text-align: left; padding-left: 3.8em; }
.title-line-3 { text-align: left; padding-left: 3.8em; }
.title-line-4 { text-align: left; padding-left: 2.025em; }

.title-word {
    display: inline-block;
    margin-right: 0.25em;
    /* Stroke renders behind the glyph fill: cleaner edges while the
       bold/italic reveal animates */
    paint-order: stroke fill;
}

/* No trailing margin: keeps the shrink-wrapped title box equal to the
   visual text width so the centering is true */
.title-line .title-word:last-child {
    margin-right: 0;
}

@media (max-width: 768px) {
    .hero-section {
        margin: 110px auto 40px;
    }

    .intro-block {
        padding: 80px 0 60px;
        min-height: auto;
    }

    .hybrid-title {
        font-size: clamp(2rem, 10vw, 4rem);
        margin-bottom: 50px;
    }

    /* Tagline lines never break mid-line ("the way" / "the city lives") */
    .title-line {
        white-space: nowrap;
    }

    /* Mobile keeps the approved left-anchored stagger; centering is desktop-only */
    .hybrid-title {
        display: block;
        margin-left: 0;
        margin-right: 0;
        left: 0;
    }

    .accent-element {
        height: 120px;
        right: 5%;
    }

    .grid-v-2,
    .grid-h-2 {
        display: none;
    }
}

@media (max-width: 480px) {
    /* A touch smaller so the staggered lines fit without wrapping;
       the em-based indents scale with it, keeping the geometry */
    .hybrid-title {
        font-size: clamp(1.8rem, 11.4vw, 3rem);
    }
}

/* Selected work grid overrides.
   Top padding matches the caption-to-hairline spacing at the top of the page. */
.projects-section {
    padding: 65px 0 0;
    margin-bottom: 80px;
}

/* Header-to-images spacing matches the hero image-to-title gap (36.5px);
   grid gap matches the hairline-to-Selected-Work spacing (65px) */
.projects-section .section-header {
    margin-bottom: 8px;
}

.projects-section .projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 65px;
    margin-top: 0;
}

.projects-section .project-item {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.projects-section .project-image {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    margin-bottom: 0;
    background-color: var(--bg-card);
    position: relative;
}

.projects-section .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.projects-section .project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.4));
    transition: background 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.projects-section .project-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    z-index: 2;
    padding: 0 20px;
    pointer-events: none;
}

.projects-section .project-info h4 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #FFFFFF;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: letter-spacing 0.5s ease;
}

.projects-section .project-info p {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 5px;
}

.projects-section .project-item:hover .project-image img {
    transform: scale(1.05);
}

.projects-section .project-item:hover .project-info h4 {
    letter-spacing: 0.17em;
}

@media (max-width: 991px) {
    .projects-section .projects-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}
