/* Standing projects: the Atlas, the Report Card and the model legislation, shown above the research list.
   Layouts are chosen by a class on <body>: v-a ruled columns, v-b tiles, v-c painted panels, v-d index rows,
   then four more tile layouts: v-e three tiles, v-f Atlas banner, v-g Report Card map, v-h framed grid. */

.projects { padding-top: clamp(56px, 7vw, 104px); }
.projects .section-title { margin-bottom: clamp(24px, 3vw, 40px); }
.proj h3 { font: 400 clamp(27px, 2.5vw, 36px)/1.1 var(--display); color: var(--ink); letter-spacing: -.006em; text-wrap: balance; }
.proj h3 a { text-decoration: none; }
.proj h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.proj-text p { max-width: 36em; margin-top: 12px; font-size: 17px; }
.proj-text .when { font-size: 15px; color: var(--muted); }
.proj-links { display: flex; flex-wrap: wrap; gap: 6px 24px; font-weight: 500; color: var(--ink); }
.proj-text .proj-links { margin-top: 20px; font-size: 16px; }

/* Motifs: the Atlas die, the 52 grades, a section sign. */
.motif { position: relative; overflow: hidden; }
.motif.die { display: grid; place-items: center; background: var(--field); }
.motif.die img { position: absolute; inset: 11%; width: 78%; height: 78%; object-fit: contain; }
.motif.law { display: grid; place-items: center; background: var(--signal); color: #fff; }
.motif.law span { font: 400 150px/1 var(--display); }
.motif.grades { display: grid; align-content: center; background: var(--mist); padding: 14px; }
.grade-tiles { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 3px; }
.grade-map { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
.grade-key { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 16px; font-size: 14px; color: var(--ink); }
.grade-key span { display: inline-flex; align-items: center; gap: 7px; }
.grade-key span::before { content: ""; width: 14px; height: 14px; background: var(--accent); }
.grade-key .gd::before { background: #f4b9a8; }
.grade-key .gf::before { background: var(--signal); }
.grade-key .gff::before { background: #9c260d; }
.grade-tiles i, .grade-map i { display: grid; place-items: center; aspect-ratio: 1; font: 600 10px/1 var(--sans); font-style: normal; color: #fff; background: var(--accent); }
.grade-tiles .gd, .grade-map .gd { background: #f4b9a8; color: var(--ink); }
.grade-tiles .gf, .grade-map .gf { background: var(--signal); }
.grade-tiles .gff, .grade-map .gff { background: #9c260d; }

/* The briefing card runs the full width under the pair. */
.reports .report.wide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report.wide .plate img { height: 100%; aspect-ratio: 3 / 2; }
.report.wide .tag { bottom: 24px; transform: none; }
.report.wide .report-text { display: flex; flex-direction: column; justify-content: center; padding: 24px; }
.report.wide h3 { font-size: clamp(23px, 1.9vw, 27px); line-height: 1.15; }

/* A. Ruled columns */
.v-a .pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.v-a .proj { display: flex; flex-direction: column; padding: 28px clamp(20px, 2.4vw, 36px) 32px; border-left: 1px solid var(--rule); }
.v-a .proj:first-child { padding-left: 0; border-left: 0; }
.v-a .proj:last-child { padding-right: 0; }
.v-a .motif { aspect-ratio: 16 / 9; margin-bottom: 24px; }
.v-a .proj-text { display: flex; flex-direction: column; flex: 1; }
.v-a .proj-links { margin-top: auto; padding-top: 24px; }

/* B. Tiles: the Atlas large on blue, the other two stacked beside it. */
.v-b .pgrid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; }
.v-b .proj { display: flex; flex-direction: column; padding: clamp(22px, 2.6vw, 40px); }
.v-b .p-atlas { grid-row: 1 / 3; justify-content: space-between; min-height: 600px; background: var(--accent); color: #fff; }
.v-b .p-atlas .motif { align-self: flex-end; width: min(52%, 330px); aspect-ratio: 1; background: none; }
.v-b .p-atlas .motif img { position: static; width: 100%; height: auto; }
.v-b .p-atlas h3 { font-size: clamp(36px, 4.2vw, 64px); line-height: 1.02; color: #fff; }
.v-b .p-atlas .proj-text p { font-size: 19px; }
.v-b .p-atlas .proj-links { color: #fff; }
.v-b .p-card { background: var(--mist); }
.v-b .p-card .motif { padding: 0; margin-bottom: 22px; }
.v-b .p-law { position: relative; background: var(--signal); color: #fff; overflow: hidden; }
.v-b .p-law .motif { position: absolute; top: -26px; right: 14px; background: none; }
.v-b .p-law .motif span { font-size: 230px; color: #f0694b; }
.v-b .p-law .proj-text { position: relative; margin-top: auto; padding-top: 72px; }
.v-b .p-law h3, .v-b .p-law .proj-links { color: #fff; }
.v-b .p-law .proj-text p { max-width: 24em; }

/* C. Painted panels: each project gets an illustration from the series over a blue caption block. */
.v-c .pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.v-c .proj { display: flex; flex-direction: column; background: var(--accent); color: #fff; }
.v-c .motif img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.v-c .proj-text { display: flex; flex-direction: column; flex: 1; padding: 26px 24px 28px; }
.v-c .proj h3, .v-c .proj-links { color: #fff; }
.v-c .proj-text .when { color: #c9d0fb; }
.v-c .proj-links { margin-top: auto; padding-top: 22px; }

/* D. Index rows */
.v-d .pgrid { border-top: 1px solid var(--ink); }
.v-d .proj { display: grid; grid-template-columns: 132px minmax(0, 1fr); column-gap: clamp(24px, 3vw, 48px); align-items: center; padding-block: 26px; border-bottom: 1px solid var(--rule); }
.v-d .motif { width: 132px; height: 132px; }
.v-d .motif.law span { font-size: 96px; }
.v-d .motif.grades { padding: 10px; }
.v-d .grade-tiles { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; }
.v-d .grade-tiles i { font-size: 0; }
.v-d .proj-text { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(24px, 3vw, 48px); align-items: center; }
.v-d .proj h3 { grid-row: 1 / span 4; font-size: clamp(30px, 3.2vw, 48px); line-height: 1.04; }
.v-d .proj-text p { grid-column: 2; }
.v-d .proj-text p:first-of-type { margin-top: 0; }

/* E, F and G share the colored tiles: Atlas on blue, Report Card on mist, model legislation on orange. */
.tiles .pgrid { display: grid; gap: 16px; }
.tiles .proj { position: relative; display: flex; flex-direction: column; padding: clamp(22px, 2.6vw, 40px); overflow: hidden; }
.tiles .proj-text { margin-top: auto; }
.tiles .p-atlas { background: var(--accent); color: #fff; }
.tiles .p-atlas h3, .tiles .p-atlas .proj-links, .tiles .p-law h3, .tiles .p-law .proj-links { color: #fff; }
.tiles .p-atlas .motif { aspect-ratio: 1; background: none; }
.tiles .p-atlas .motif img { position: static; width: 100%; height: auto; }
.tiles .p-card { background: var(--mist); }
.tiles .p-card .motif { padding: 0; background: none; }
.tiles .p-law { background: var(--signal); color: #fff; }
.tiles .p-law .motif { position: absolute; top: -26px; right: 14px; background: none; }
.tiles .p-law .motif span { font-size: 230px; color: #f0694b; }
.tiles .p-law .proj-text { position: relative; padding-top: 72px; }

/* E. Three tiles of equal size. */
.v-e .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v-e .proj { min-height: 580px; }
.v-e .p-atlas .motif { align-self: flex-end; width: 46%; margin-bottom: 32px; }
.v-e .p-card .motif { margin-bottom: 28px; }
.v-e .grade-tiles { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.v-e .grade-tiles i { font-size: 10px; }

/* F. The Atlas as a banner across the top, the other two below it. */
.v-f .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v-f .p-atlas { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; gap: clamp(24px, 5vw, 80px); padding-block: clamp(32px, 4vw, 64px); }
.v-f .p-atlas .proj-text { margin-top: 0; }
.v-f .p-atlas .proj-text p { max-width: 38em; font-size: 19px; }
.v-f .p-atlas .motif { order: 2; flex: 0 0 min(24%, 260px); }
.v-f .p-atlas h3 { font-size: clamp(36px, 4.2vw, 64px); line-height: 1.02; }
.v-f .p-card, .v-f .p-law { min-height: 400px; }
.v-f .p-card .motif { margin-bottom: 28px; }

/* G. The Report Card leads, drawn as a tile map. */
.v-g .pgrid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.v-g .p-card { grid-column: 1; grid-row: 1 / 3; min-height: 600px; }
.v-g .p-atlas { grid-column: 2; grid-row: 1; }
.v-g .p-law { grid-column: 2; grid-row: 2; }
.v-g .p-card .motif { width: min(100%, 560px); margin-bottom: 36px; }
.v-g .p-card h3 { font-size: clamp(36px, 4.2vw, 64px); line-height: 1.02; }
.v-g .p-card .proj-text p { font-size: 19px; }
.v-g .p-card .proj-text .when { font-size: 15px; }
.v-g .p-atlas .motif { align-self: flex-end; width: 112px; margin-bottom: 20px; }

/* H. Framed grid: one ink frame divided into three cells, color only in the motifs. */
.v-h .pgrid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); border: 1px solid var(--ink); }
.v-h .proj { position: relative; display: flex; flex-direction: column; padding: clamp(22px, 2.6vw, 40px); overflow: hidden; }
.v-h .proj-text { margin-top: auto; }
.v-h .p-atlas { grid-row: 1 / 3; border-right: 1px solid var(--ink); }
.v-h .p-atlas .motif { aspect-ratio: 16 / 9; margin-bottom: 36px; }
.v-h .p-atlas .motif img { inset: 14%; width: 72%; height: 72%; }
.v-h .p-atlas h3 { font-size: clamp(36px, 4.2vw, 64px); line-height: 1.02; }
.v-h .p-atlas .proj-text p { font-size: 19px; }
.v-h .p-card { border-bottom: 1px solid var(--ink); }
.v-h .p-card .motif { padding: 0; margin-bottom: 24px; background: none; }
.v-h .p-law .motif { position: absolute; top: -18px; right: 18px; background: none; color: var(--signal); }
.v-h .p-law .motif span { font-size: 190px; }
.v-h .p-law .proj-text { position: relative; padding-top: 64px; }
.v-h .p-law .proj-text p { max-width: 24em; }

@media (max-width: 1099px) {
  .v-e .pgrid, .v-f .pgrid, .v-g .pgrid, .v-h .pgrid { grid-template-columns: minmax(0, 1fr); }
  .v-e .proj, .v-f .p-card, .v-f .p-law, .v-g .p-card { min-height: 0; }
  .v-e .p-atlas .motif { width: min(40%, 200px); }
  .v-e .p-card .motif { width: min(100%, 420px); }
  .v-g .p-card, .v-g .p-atlas, .v-g .p-law, .v-h .p-atlas { grid-column: auto; grid-row: auto; }
  .v-h .p-atlas { border-right: 0; border-bottom: 1px solid var(--ink); }
}
@media (max-width: 759px) {
  .grade-map i { font-size: 8px; }
  .grade-map { gap: 2px; }
  .v-f .p-atlas { flex-direction: column; align-items: flex-start; }
  .v-f .p-atlas .motif { order: 0; flex: none; width: 120px; }
  .tiles .p-law .motif span { font-size: 170px; }
  .v-h .p-law .motif span { font-size: 150px; }
}

@media (max-width: 1099px) {
  .v-a .pgrid, .v-c .pgrid { grid-template-columns: minmax(0, 1fr); }
  .v-a .proj, .v-a .proj:first-child, .v-a .proj:last-child { padding-inline: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .v-a .proj:first-child { border-top: 0; }
  .v-a .motif { max-width: 520px; }
  .v-b .pgrid { grid-template-columns: minmax(0, 1fr); }
  .v-b .p-atlas { grid-row: auto; min-height: 0; }
  .v-b .p-atlas .motif { width: min(44%, 240px); margin-bottom: 28px; }
  .v-c .motif img { aspect-ratio: 16 / 9; }
  .v-d .proj-text { grid-template-columns: minmax(0, 1fr); }
  .v-d .proj h3 { grid-row: auto; }
  .v-d .proj-text p { grid-column: 1; }
  .v-d .proj-text p:first-of-type { margin-top: 12px; }
  .v-d .proj { align-items: start; }
}
@media (max-width: 759px) {
  .grade-tiles i { font-size: 0; }
  .motif.grades { padding: 10px; }
  .reports .report.wide { grid-template-columns: minmax(0, 1fr); }
  .report.wide .plate img { height: auto; }
  .report.wide .tag { bottom: 0; transform: translateY(50%); }
  .report.wide .report-text { padding: 34px 16px 22px; }
  .v-d .proj { grid-template-columns: 72px minmax(0, 1fr); column-gap: 16px; }
  .v-d .motif { width: 72px; height: 72px; }
  .v-d .motif.law span { font-size: 54px; }
  .v-d .motif.grades { padding: 6px; }
  .v-b .p-law .motif span { font-size: 170px; }
}
