/* ==========================================================================
   Projects — category page, plus the shared shell every project sub-page
   reuses (Vanilla / Seeds / Produce each link this file before their own).
   ========================================================================== */

/* ============================ Category hero ============================ */
.projects-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: clamp(28rem, 62vh, 40rem);
    padding: calc(var(--header-h) + 4rem) 0 clamp(3rem, 6vw, 4.5rem);
    overflow: hidden;
    isolation: isolate;
}

.projects-hero-media {
    position: absolute;
    inset: 0;
    z-index: -2;
    --focus-y: 65%;
}

.projects-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg,
        rgba(15, 32, 22, 0.68) 0%,
        rgba(15, 32, 22, 0.32) 42%,
        rgba(15, 32, 22, 0.84) 100%);
}

.projects-hero-panel { max-width: 44rem; }

.projects-hero-title {
    font-size: clamp(2.125rem, 5.2vw, 3.75rem);
    margin-bottom: 1.375rem;
    color: var(--ink-invert);
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
}

.projects-hero-lead {
    max-width: 34rem;
    font-size: clamp(1rem, 1.15vw, 1.0625rem);
    line-height: 1.78;
    color: rgba(244, 248, 242, 0.86);
}

/* ============================ Project rows ============================ */
.projects-list .container {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.project-row {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    align-items: stretch;
    padding: 0;
    text-decoration: none;
    color: inherit;
}

.project-row-reverse { direction: rtl; }
.project-row-reverse > * { direction: ltr; }

/* The photo is taken out of flow so the row's height is set by its text, not
   by the image's intrinsic aspect. That is what lets one portrait file and one
   landscape file sit in the same row shape without pre-cut variants. */
.project-row-media {
    position: relative;
    overflow: hidden;
    min-height: 16rem;
}

.project-row-media .photo {
    position: absolute;
    inset: 0;
    transition: transform var(--t-slow);
}

/* One file per photograph — only the framing differs between rows */
.row-vanilla { --focus-y: 30%; }
.row-seeds   { --focus-y: 50%; }
.row-produce { --focus-y: 50%; }
.row-palmiet { --focus-y: 45%; }

.project-row:hover .project-row-media img { transform: scale(1.05); }

.project-row-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.75rem, 3.5vw, 3rem);
}

.project-row-index {
    font-family: 'Termina', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--ngp-leaf);
    margin-bottom: 0.75rem;
}

.project-row-title {
    font-size: clamp(1.375rem, 2.4vw, 1.875rem);
    font-weight: 600;
    margin-bottom: 0.875rem;
}

.project-row-text {
    font-size: clamp(0.9375rem, 1.05vw, 1rem);
    line-height: 1.75;
    color: var(--ink-muted);
    margin-bottom: 1.375rem;
    max-width: 34rem;
}

.project-row-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin-bottom: 1.75rem;
}

.project-row-tags li {
    padding: 0.4375rem 0.875rem;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(83, 134, 101, 0.24);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ngp-sage);
}

.project-row-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--ngp-sage);
    transition: gap var(--t-fast), color var(--t-fast);
}

.project-row:hover .project-row-link {
    gap: 0.9375rem;
    color: var(--ngp-forest);
}

/* ============================ Category CTA ============================ */
.projects-cta-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1.75rem, 4vw, 3.5rem);
    flex-wrap: wrap;
}

.projects-cta-panel > div { flex: 1 1 28rem; }
.projects-cta-panel .section-title { margin-bottom: 1rem; }

/* ==========================================================================
   Shared project sub-page shell
   Each sub-page sets --project-accent to tint its own hero and highlights.
   ========================================================================== */
.project-page { --project-accent: var(--ngp-leaf-bright); }

/* ---------- Sub-page hero ---------- */
.project-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: clamp(28rem, 66vh, 42rem);
    padding: calc(var(--header-h) + 4rem) 0 clamp(3rem, 6vw, 4.5rem);
    overflow: hidden;
    isolation: isolate;
}

.project-hero-media {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.project-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg,
        rgba(15, 32, 22, 0.70) 0%,
        rgba(15, 32, 22, 0.30) 40%,
        rgba(15, 32, 22, 0.86) 100%);
}

.project-hero-panel { max-width: 44rem; }

.project-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    list-style: none;
    margin-bottom: 1.25rem;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: rgba(244, 248, 242, 0.6);
}

.project-breadcrumb a {
    color: rgba(244, 248, 242, 0.8);
    text-decoration: none;
    transition: color var(--t-fast);
}

.project-breadcrumb a:hover { color: #fff; }

.project-breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    opacity: 0.45;
}

.project-hero-index {
    display: block;
    font-family: 'Termina', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--project-accent);
    margin-bottom: 0.75rem;
}

.project-hero-title {
    font-size: clamp(2.125rem, 5.2vw, 3.75rem);
    margin-bottom: 1.25rem;
    color: var(--ink-invert);
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
}

.project-hero-lead {
    max-width: 34rem;
    font-size: clamp(1rem, 1.15vw, 1.0625rem);
    line-height: 1.78;
    color: rgba(244, 248, 242, 0.86);
}

/* ---------- At a glance ---------- */
.project-glance { padding: clamp(3rem, 6vw, 4.5rem) 0 0; }

.project-glance-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.glance-item {
    display: flex;
    flex-direction: column;
    gap: 0.4375rem;
}

.glance-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ngp-sage);
}

.glance-value {
    font-family: 'Termina', sans-serif;
    font-size: clamp(0.9375rem, 1.3vw, 1.125rem);
    font-weight: 600;
    line-height: 1.35;
    color: var(--ngp-forest);
}

/* ---------- Narrative blocks ---------- */
.project-body { padding: clamp(3.5rem, 7vw, 6rem) 0; }

.project-block {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    align-items: start;
    gap: clamp(2rem, 5vw, 4.5rem);
}

.project-block + .project-block { margin-top: clamp(3rem, 6vw, 5rem); }

.project-block-title {
    font-size: clamp(1.5rem, 2.6vw, 2.125rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
}

.project-block-copy p {
    font-size: clamp(0.9375rem, 1.1vw, 1.0625rem);
    line-height: 1.8;
    color: var(--ink-muted);
}

.project-block-copy p + p { margin-top: 1.125rem; }

/* ---------- Feature: cutout product shot on glass ---------- */
.project-feature {
    position: relative;
    padding: clamp(3rem, 6vw, 5rem) 0;
    overflow: hidden;
}

.project-feature::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(38rem 26rem at 22% 30%, rgba(156, 204, 81, 0.24), transparent 66%),
        linear-gradient(180deg, rgba(238, 243, 236, 0.9), rgba(250, 248, 242, 0.4));
}

.project-feature-panel {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
}

.project-feature-figure {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 20rem;
}

.project-feature-figure::before {
    content: '';
    position: absolute;
    width: 78%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 68%);
}

.project-feature-figure img {
    position: relative;
    max-height: 26rem;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 24px 40px rgba(27, 53, 36, 0.28));
}

.project-feature-copy .section-title { margin-bottom: 1rem; }

.project-feature-list {
    list-style: none;
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.project-feature-list li {
    position: relative;
    padding-left: 1.75rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--ink-muted);
}

.project-feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5625rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--ngp-leaf-bright), var(--ngp-sage));
    box-shadow: 0 0 0 3px rgba(156, 204, 81, 0.22);
}

/* ---------- Pull quote ---------- */
.project-quote { padding: clamp(2rem, 5vw, 4rem) 0; }

.project-quote-panel { text-align: center; }

.project-quote-panel blockquote {
    font-family: 'Termina', sans-serif;
    font-size: clamp(1.125rem, 2.2vw, 1.75rem);
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.015em;
    color: var(--ink-invert);
    max-width: 44rem;
    margin: 0 auto;
}

.project-quote-panel cite {
    display: block;
    margin-top: 1.5rem;
    /* on the solid forest slab this needs to clear AA at small size */
    opacity: 0.95;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6875rem;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--project-accent);
}

/* ---------- Sub-page CTA ---------- */
.project-cta { padding: clamp(2.5rem, 5vw, 4rem) 0; }

.project-cta-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1.75rem, 4vw, 3.5rem);
    flex-wrap: wrap;
}

.project-cta-panel > div { flex: 1 1 28rem; }
.project-cta-panel .section-title { margin-bottom: 1rem; }

/* ============================ Responsive ============================ */
@media (max-width: 900px) {
    .project-row,
    .project-row-reverse { grid-template-columns: 1fr; direction: ltr; }
    /* Stacked: the container takes a banner shape and the photo still covers it */
    .project-row-media { min-height: 0; aspect-ratio: 16 / 9; }

    .project-block { grid-template-columns: 1fr; gap: 1.25rem; }
    .project-block-title { position: static; }

    .project-feature-panel { grid-template-columns: 1fr; }
    .project-feature-figure { min-height: 16rem; order: -1; }
    .project-feature-figure img { max-height: 18rem; }
}

@media (max-width: 768px) {
    .projects-hero,
    .project-hero { min-height: auto; align-items: flex-start; }

    .projects-cta-panel,
    .project-cta-panel { flex-direction: column; align-items: flex-start; }

    .projects-cta-panel .btn,
    .project-cta-panel .btn { width: 100%; }

    .project-glance-panel { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .project-glance-panel { grid-template-columns: 1fr; }
}
