/* ========================================
   OKPW — the project page (scripts/build_project_pages.py)
   ========================================
   White ground, olive and light-green accents, on the site's own tokens. Phone first: one column,
   a 16px gutter at every width, nothing wider than the screen. */

.ppg main { padding-top: calc(var(--nav-height, 64px) + 28px); }

/* ---------------------------------------------------------------- the head */

.pp-crumb { font-size: 0.85rem; margin: 0 0 14px; }
.pp-crumb a { color: var(--gray-400); text-decoration: none; }
.pp-crumb a:hover, .pp-crumb a:focus { color: var(--olive); text-decoration: underline; }

.pp-head h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 7vw, 3.4rem);
    line-height: 1.05;
    margin: 10px 0 8px;
    text-wrap: balance;
}
.pp-type { color: var(--gray-600); font-size: 1.05rem; margin: 0 0 22px; }

.pp-facts {
    list-style: none;
    margin: 0 0 26px;
    padding: 18px 0 0;
    border-top: 1px solid var(--gray-200);
    display: flex;
    flex-wrap: wrap;
    gap: 14px 36px;
}
.pp-facts li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pp-facts b {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--charcoal);
    font-variant-numeric: tabular-nums;
}
.pp-facts span {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-400);
}

/* <picture> only chooses the file (AVIF, WebP or the original); it and its <source>s draw no box,
   or the sources would take a row of the model's grid */
.ppg picture { display: contents; }
.ppg picture > source { display: none; }

/* ---------------------------------------------------------------- the hero */

.pp-hero { margin: 0 0 clamp(36px, 7vw, 72px); }
.pp-hero img { display: block; width: 100%; height: auto; }

/* ---------------------------------------------------------------- the body */

.pp-body > section { margin: 0 0 clamp(44px, 8vw, 88px); }
.pp-body h2 {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 3.4vw, 1.9rem);
    margin: 0 0 18px;
    text-wrap: balance;
}
.pp-body figure { margin: 0; }
.pp-body figcaption {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--gray-600);
    margin-top: 10px;
    max-width: 62ch;
}

/* the model: white is what was there, mint is what we built */
.pp-model figure {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: clamp(10px, 3vw, 28px);
}
.pp-model img { display: block; width: 100%; height: auto; max-width: 100%; }
.pp-model figcaption { padding: 0 2px; }

/* the film: it loads only when it is asked for */
.pp-reel video {
    display: block;
    width: 100%;
    max-width: 340px;
    height: auto;
    border-radius: 10px;
    background: var(--gray-100);
}
.pp-reel-cap { font-size: 0.92rem; color: var(--gray-600); margin: 10px 0 0; max-width: 62ch; }

/* the job, in photographs */
.pp-shot-grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
.pp-shot-grid img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;              /* one frame for every shot, so a portrait cannot run away */
    object-fit: cover;
    border-radius: 8px;
    background: var(--gray-100);
}
.pp-shot-grid figure:first-child img { aspect-ratio: 16 / 9; }

/* how long it took */
.pp-bar {
    position: relative;
    height: 16px;
    border-radius: 999px;
    background: var(--gray-200);
    overflow: hidden;
}
.pp-bar-fill { position: absolute; inset: 0; background: var(--olive); }
.pp-bar-mark {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.55);
}
.pp-bar-cap {
    font-size: 0.92rem;
    color: var(--gray-600);
    margin: 10px 0 0;
    font-variant-numeric: tabular-nums;
}

/* what would work like this cost */
.pp-cost {
    background: #EAF3DE;
    border-radius: 12px;
    padding: clamp(22px, 5vw, 38px);
}
.pp-cost h2 { margin-bottom: 16px; }
.pp-cost-btn { display: inline-flex; }
.pp-cost-note {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--olive-dark);
    margin: 14px 0 0;
    max-width: 58ch;
}

/* the drawings */
.pp-plates { display: grid; grid-template-columns: 1fr; gap: 26px; }
.pp-plate-img {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 10px;
}
.pp-plate-img img { display: block; width: 100%; height: auto; }

/* more projects */
.pp-case {
    display: inline-block;
    margin-bottom: 26px;
    font-weight: 600;
    color: var(--olive);
    text-decoration: none;
    border-bottom: 2px solid #CCF4D9;
    padding-bottom: 2px;
}
.pp-case:hover, .pp-case:focus { border-bottom-color: var(--olive); }
.pp-next-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.pp-next-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.25s var(--ease-out-quart), transform 0.25s var(--ease-out-quart);
}
.pp-next-card:hover, .pp-next-card:focus-visible {
    box-shadow: 0 10px 30px rgba(26, 26, 26, 0.1);
    transform: translateY(-2px);
}
.pp-next-card img { display: block; width: 100%; height: 190px; object-fit: cover; }
.pp-next-name {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 14px 16px 2px;
}
.pp-next-type { display: block; font-size: 0.88rem; color: var(--gray-600); padding: 0 16px 16px; }
.pp-next-all { margin: 24px 0 0; font-size: 0.95rem; }
.pp-next-all a { color: var(--olive); font-weight: 600; }

/* ---------------------------------------------------------------- wider screens */

@media (min-width: 700px) {
    .pp-shot-grid, .pp-next-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pp-shot-grid figure:first-child { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
    .pp-body { max-width: 1100px; }
    .pp-plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pp-model figure { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: center; }
    .pp-model figcaption { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .pp-next-card { transition: none; }
    .pp-next-card:hover, .pp-next-card:focus-visible { transform: none; }
}
