/* ============================================================
   FILE: /assets/css/layout.css
   STATUS: CHANGED

   Purpose:
   Shared public containers, heroes, buttons, and service sections.
   Typography is controlled by base.css.

   Future note:
   Reuse these layouts across public pages. Keep page-specific
   artwork positioning and animation in their own stylesheets.
   ============================================================ */

/* ============================================================
   Purpose: Consistent public page width and continuous background
   ============================================================ */

#main-content {
    min-height: 100vh;
    width: 100%;
    margin: 0;
    overflow: clip;
}

.hero-section,
.page-section,
.service-sections,
.breadcrumbs {
    width: min(calc(100% - 2 * var(--site-gutter)), var(--site-max-width));
    margin-inline: auto;
}

/* ============================================================
   Purpose: Shared hero composition and supporting text spacing
   ============================================================ */

.hero-section {
    min-height: calc(100svh - 10rem);
    display: flex;
    align-items: center;
}

.hero-section__inner {
    width: 100%;
}

.eyebrow,
.hero-eyebrow {
    margin: 0 0 1.7rem;
}

.hero-section h1 {
    margin: 0;
}

.hero-section__bottom {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 2rem;
    margin-top: 3rem;
}

.hero-section__text {
    max-width: 37rem;
    margin: 0;
}

.hero-section__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.25rem;
}

/* ============================================================
   Purpose: Shared button shape, hover, and keyboard focus
   ============================================================ */

.button,
.home-button {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    min-height: 3.3rem;
    padding: 0.9rem 1.4rem;
    border: 1px solid rgba(236, 196, 242, 0.35);
    border-radius: var(--radius-pill);
    transition:
        background 180ms ease,
        border-color 180ms ease;
}

.button:hover,
.home-button:hover {
    background: rgba(121, 72, 135, 0.18);
    border-color: var(--color-purple-pale);
}

.button:focus-visible,
.home-button:focus-visible {
    outline: 2px solid var(--color-purple-pale);
    outline-offset: 5px;
}

.button--primary {
    background: var(--color-purple-main);
}

/* ============================================================
   Purpose: Shared muted divider lines and numbered service labels
   ============================================================ */

.service-feature {
    border-top: 1px solid rgba(236, 196, 242, 0.15);
    scroll-margin-top: 7rem;
}

.service-feature__masthead {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.service-feature__composition {
    position: relative;
    display: grid;
    align-items: center;
    min-height: clamp(32rem, 52vw, 49rem);
    isolation: isolate;
}

.service-feature h2 {
    z-index: 1;
    margin: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

.service-feature--left h2,
.left h2 {
    text-align: left;
}

.service-feature__details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    max-width: 64rem;
    margin-inline: auto;
}

.service-feature__details p {
    max-width: 39rem;
    margin: 0;
}

/* ============================================================
   Purpose: Service page rows with one quarter-width artwork area
   Future note: Keep detailed services beside one selected image;
   reserve project galleries for Selected Work.
   ============================================================ */

.service-detail__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    align-items: center;
    gap: clamp(1.5rem, 3vw, 3rem);
    margin-top: 3rem;
}

.service-detail__artwork {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding: 1.5rem;
    border: 1px dashed rgba(196, 196, 196, 0.2);
    background: rgba(121, 72, 135, 0.04);
    text-align: center;
}

.service-detail__artwork p {
    margin: 0;
}

.service-detail__content {
    min-width: 0;
}

.service-detail__content h2 {
    margin: 0 0 1.5rem;
    text-align: left;
    overflow-wrap: normal;
}

.service-detail__content > p {
    max-width: 48rem;
    margin: 0;
}

.service-detail__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 2rem;
    margin: 2rem 0 0;
    padding: 0 0 0 1.25rem;
}

.service-page-work-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    border-top: 1px solid rgba(236, 196, 242, 0.15);
}

.service-page-work-link p {
    margin: 0;
}

/* ============================================================
   Purpose: Breadcrumb and general content spacing
   ============================================================ */

.breadcrumbs {
    padding-top: 8rem;
}

.breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    list-style: none;
    padding: 0;
}

.breadcrumbs__separator {
    margin-right: 0.6rem;
}

.page-section p {
    max-width: 48rem;
}

.page-section .button {
    margin-top: 1.5rem;
}

/* ============================================================
   Purpose: Responsive shared layouts without typography overrides
   ============================================================ */

@media (max-width: 900px) {
    /* Increase hero H1s only; section headings keep their current size. */
    .hero-section h1 {
        font-size: calc(clamp(1.65rem, 5.8vw, 4.6rem) + 0.8rem);
    }

    /* Centre section headings and paragraphs across mobile pages. */
    main h1,
    main h2,
    main h3,
    main p,
    .service-feature h2,
    .service-detail__content h2 {
        text-align: center;
    }

    .hero-section__text,
    .service-detail__content > p {
        margin-inline: auto;
    }

    .service-detail__row {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-detail__artwork {
        width: min(100%, 18rem);
    }

    .hero-section__bottom {
        align-items: start;
        flex-direction: column;
    }

    .service-feature__composition {
        min-height: 37rem;
        align-items: start;
        padding-top: 4rem;
    }

    .service-feature__details {
        gap: 1.5rem;
    }
}

@media (max-width: 600px) {
    .service-detail__list {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-section {
        min-height: calc(92svh - 10rem);
    }

    .hero-section__bottom {
        margin-top: 2rem;
    }

    .service-feature__masthead {
        flex-wrap: wrap;
    }

    .service-feature__masthead span:last-child {
        margin-left: auto;
        text-align: right;
    }

    .service-feature__composition {
        min-height: 29rem;
        padding-top: 3rem;
    }

    .service-feature__details {
        flex-direction: column;
        align-items: start;
    }
}

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