/* TIG case study, part 3: plates (§ 4), brief (§ 1), pinned pipeline spacing and section rhythm. Split from case-tig-2.css. */
/* § 4 three plates: frameless renders on the section's white, captions split by hairline dividers */
.tg-plates { background: #fefefe; }
.tg-row--three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; align-items: start; }
.tg-row--three .tg-plate { margin: 0; padding: 0 clamp(16px, 2vw, 36px); border: 0; background: none; box-shadow: none; }
.tg-row--three .tg-plate + .tg-plate { border-left: 1px solid #e3eaeb; }
.tg-row--three .tg-plate:first-child { padding-left: 0; }
.tg-row--three .tg-plate:last-child { padding-right: 0; }
.tg-row--three .tg-mat { padding: 0; border: 0; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.tg-row--three .tg-mat img { display: block; width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; border-radius: 0; box-shadow: none; }
.tg-row--three figcaption { padding-top: clamp(14px, 1.4vw, 22px); }
.tg-row--three figcaption h3 { font-size: clamp(22px, 1.9vw, 30px); line-height: 1.15; margin: 6px 0 12px; }
.tg-row--three figcaption p { font-size: clamp(15px, 1.05vw, 17px); line-height: 1.6; max-width: 46ch; text-wrap: pretty; }
@media (max-width: 900px) {
  .tg-row--three { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .tg-row--three .tg-plate { padding: 0; }
  .tg-row--three .tg-plate + .tg-plate { border-left: 0; }
}

/* equal plate columns: every column padded on both sides (row pulled out to compensate), one shared art box ratio */
@media (min-width: 901px) {
  .tg-row--three { margin-inline: calc(clamp(16px, 2vw, 36px) * -1); }
  .tg-row--three .tg-plate, .tg-row--three .tg-plate:first-child, .tg-row--three .tg-plate:last-child { padding-inline: clamp(16px, 2vw, 36px); }
}
.tg-row--three .tg-mat { aspect-ratio: 624 / 600; display: flex; align-items: center; justify-content: center; }
.tg-row--three .tg-mat img { width: 100%; height: 100%; object-fit: contain; aspect-ratio: auto 624 / 600; }

/* § 4: the full three-plate showcase image, shown whole at its own ratio (no crop) */
.tg-showcase { margin: 0; }
.tg-showcase img { display: block; width: 100%; max-width: 1881px; height: auto; margin-inline: auto; }

/* § 4 lead: wider measure so it runs in fewer, longer lines */
.tg-plates .cs-head .cs-lead { max-width: 62ch; }

.tg-showcase--store { margin-top: clamp(32px, 4vw, 72px); }

/* Plate IV: art (1325x887, text cropped out) beside live caption sized to balance it */
.tg-store { margin: clamp(32px, 4vw, 72px) 0 0; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 3vw, 56px); }
.tg-store img { display: block; width: 100%; max-width: 1325px; height: auto; }
.tg-store figcaption { display: grid; gap: clamp(10px, 1vw, 16px); }
.tg-store__n { font-family: "Playfair Display", Georgia, serif; font-style: italic; font-size: clamp(22px, 1.9vw, 32px); color: #138f86; }
.tg-store h3 { margin: 0; font-size: clamp(36px, 3.6vw, 64px); line-height: 1.05; letter-spacing: -0.02em; color: #0f2f35; }
.tg-store p { margin: 0; font-size: clamp(17px, 1.35vw, 22px); line-height: 1.55; color: #5a6b6e; max-width: 30ch; text-wrap: pretty; }
@media (max-width: 900px) { .tg-store { grid-template-columns: minmax(0, 1fr); } .tg-store p { max-width: none; } }

/* § 1 brief v2: heading + 2x2 stat cards | divider | drop-cap paragraph + note card */
.tg-brief--v2 { background: #fdfefe; }
.tg-brief2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 0; align-items: start; }
.tg-brief2__left { display: grid; gap: clamp(20px, 2vw, 28px); padding-right: clamp(28px, 3.5vw, 64px); border-right: 1px solid #dfe9ea; }
.tg-brief2__left .cs-h2 { margin: 0 0 clamp(8px, 1.5vw, 24px); }
.tg-brief2__right { display: grid; gap: clamp(24px, 2.6vw, 40px); padding-left: clamp(28px, 3.5vw, 64px); padding-top: clamp(40px, 3.6vw, 60px); }
.tg-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); }
.tg-stat { display: flex; align-items: center; gap: clamp(14px, 1.3vw, 22px); padding: clamp(16px, 1.4vw, 22px); background: #fff; border: 1px solid #e2eeee; border-radius: 18px; box-shadow: 0 14px 30px -18px rgb(14 90 100 / 30%), 0 2px 6px rgb(14 90 100 / 5%); }
.tg-stat__ic { flex: none; display: grid; place-items: center; width: clamp(56px, 4.6vw, 76px); aspect-ratio: 1; border-radius: 16px; background: #e5f3f2; color: #0e6a6e; }
.tg-stat__txt { display: grid; gap: 2px; min-width: 0; }
.tg-stat__k { font-size: clamp(14px, 1.05vw, 17px); font-weight: 500; color: #0b2a30; }
.tg-stat__v { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(36px, 3.3vw, 54px); line-height: 1; color: #0e7a74; }
.tg-drop2 { margin: 0; font-size: clamp(17px, 1.35vw, 22px); line-height: 1.6; color: #0b2a30; text-wrap: pretty; }
.tg-drop2__cap { float: left; display: grid; place-items: center; width: clamp(76px, 6.2vw, 104px); aspect-ratio: 1; margin: 4px 14px 4px 0; border-radius: 16px; background: #d9efed; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(64px, 5.4vw, 92px); line-height: 1; color: #0e6a6e; }
.cs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tg-note { display: flex; align-items: center; gap: clamp(16px, 1.6vw, 26px); padding: clamp(18px, 1.6vw, 26px) clamp(20px, 2vw, 32px); border-radius: 22px; background: #e9f5f4; }
.tg-note__ic { flex: none; display: grid; place-items: center; width: clamp(60px, 4.8vw, 80px); aspect-ratio: 1; border-radius: 50%; background: #fff; color: #0e6a6e; }
.tg-note p { margin: 0; padding-left: clamp(16px, 1.6vw, 26px); border-left: 1px solid #a9d3cf; font-size: clamp(15px, 1.1vw, 18px); line-height: 1.6; color: #22434a; text-wrap: pretty; }
@media (max-width: 900px) {
  .tg-brief2 { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .tg-brief2__left { padding-right: 0; border-right: 0; }
  .tg-brief2__right { padding: 0; }
}
@media (max-width: 480px) { .tg-stats { grid-template-columns: minmax(0, 1fr); } }

/* § 2: 60px between the section head and the pinned stage (stage no longer a full-height centred box) */
@media (min-width: 1001px) {
  .tg-pipe.is-live .tg-pipe__stage { height: auto; margin-top: 60px; align-items: center; top: max(60px, calc((100svh - 440px) / 2)); }
}

.tg-stat { box-shadow: none; }

/* § 2: head and stage pinned together as one block, so they scroll as a unit */
.tg-pipe__pin { display: contents; }
@media (min-width: 1001px) {
  .tg-pipe.is-live .tg-pipe__pin { display: flex; flex-direction: column; justify-content: center; position: sticky; top: 0; height: 100vh; height: 100svh; }
  .tg-pipe.is-live .tg-pipe__stage { position: static; top: auto; height: auto; margin-top: 60px; }
  .tg-pipe.is-live .tg-pipe__pin > .cs-inner:first-child { width: 100%; }
}

/* § 2 pinned block: breathing room top and bottom inside the screen */
@media (min-width: 1001px) {
  .tg-pipe.is-live .tg-pipe__pin { box-sizing: border-box; padding-block: clamp(48px, 9vh, 110px); }
  .tg-pipe.is-live .tg-pipe__stage { margin-top: clamp(36px, 6vh, 60px); }
  .tg-pipe.is-live .tg-pipe__pin .cs-h2 { font-size: clamp(34px, min(3.4vw, 5.6vh), 56px); }
}

/* uniform 100px vertical rhythm on every content section (64px on phones) */
main .cs-s { padding-block: 100px; }
main .cs-s.tg-doors { aspect-ratio: auto; min-height: 0; padding-block: 100px; }
@media (min-width: 1001px) { main .cs-s.tg-pipe.is-live { padding-block: 100px; } }
@media (max-width: 700px) { main .cs-s, main .cs-s.tg-doors { padding-block: 64px; } }

/* § 2 pinned block fits the screen with equal space above and below: board and gaps scale with viewport height */
@media (min-width: 1001px) {
  .tg-pipe.is-live .tg-pipe__pin { padding-block: clamp(28px, 6vh, 80px); }
  .tg-pipe.is-live .tg-pipe__stage { margin-top: clamp(24px, 4.5vh, 60px); }
  .tg-pipe.is-live .tg-board { --ch: clamp(58px, 9.5vh, 92px); --rg: clamp(6px, 1vh, 10px); }
  .tg-pipe.is-live .tg-pipe__pin .cs-head { align-items: end; }
}

/* § 3: 60px between the visible podium edge and the copy (PNG keeps ~3.3% of the row as transparent glow past the podium) */
@media (min-width: 901px) { .tg-doors__grid { column-gap: max(20px, calc(80px - 3.3%)); } }
/* podium's visible right edge sits at 95.1% of the art column, so pull the art 4.9% left and keep a true 80px gap */
@media (min-width: 901px) { .tg-doors__grid { column-gap: 80px; } .tg-doors__art img { margin-left: -20.9%; } }

/* Plates I–III: one art strip (text cropped off) at a slightly smaller size, live captions on the same thirds so the image's dividers run on into the caption dividers */
.tg-trio { margin: 0 auto; max-width: min(100%, 1280px); }
.tg-trio img { display: block; width: 100%; height: auto; }
.tg-trio__caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tg-trio__cap { display: grid; align-content: start; gap: 10px; padding: clamp(14px, 1.4vw, 22px) clamp(18px, 2.8%, 40px) 8px; }
.tg-trio__cap:first-child { padding-left: 3.6%; }
.tg-trio__cap + .tg-trio__cap { border-left: 2px solid #e4eaeb; }
.tg-trio__cap h3 { margin: 0; font-size: clamp(22px, 2vw, 32px); line-height: 1.15; letter-spacing: -0.01em; color: #0f2f35; }
.tg-trio__cap p { margin: 4px 0 0; font-size: clamp(15px, 1.1vw, 18px); line-height: 1.6; color: #4d6266; text-wrap: pretty; }
.tg-trio .tg-store__n { font-size: clamp(18px, 1.5vw, 24px); }
@media (max-width: 900px) {
  .tg-trio__caps { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 20px; }
  .tg-trio__cap, .tg-trio__cap:first-child { padding: 0; }
  .tg-trio__cap + .tg-trio__cap { border-left: 0; }
}

/* Plates I–III captions: more room either side of each divider and between label, title and text */
@media (min-width: 901px) {
  .tg-trio__cap { padding: clamp(20px, 2vw, 32px) clamp(28px, 3.4vw, 56px) 8px; gap: 14px; }
  .tg-trio__cap:first-child { padding-left: 3.6%; }
  .tg-trio__cap:last-child { padding-right: 3.6%; }
  .tg-trio__cap p { margin-top: 6px; }
}

/* Plates I–III as three columns: each art keeps clear space from the divider, which runs the full column height */
.tg-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tg-trio__col { display: grid; align-content: start; padding-inline: clamp(24px, 3vw, 52px); }
.tg-trio__col:first-child { padding-left: 0; }
.tg-trio__col:last-child { padding-right: 0; }
.tg-trio__col + .tg-trio__col { border-left: 2px solid #e4eaeb; }
.tg-trio__col img { display: block; width: 100%; height: auto; aspect-ratio: 628 / 606; object-fit: contain; }
.tg-trio__col .tg-trio__cap, .tg-trio__col .tg-trio__cap:first-child, .tg-trio__col .tg-trio__cap:last-child { padding: clamp(20px, 2vw, 32px) 0 8px; border: 0; }
@media (max-width: 900px) {
  .tg-trio { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .tg-trio__col, .tg-trio__col:first-child, .tg-trio__col:last-child { padding: 0; }
  .tg-trio__col + .tg-trio__col { border-left: 0; }
}

/* equal inner width for all three plate columns */
@media (min-width: 901px) {
  .tg-trio { margin-inline: calc(clamp(24px, 3vw, 52px) * -1); }
  .tg-trio__col, .tg-trio__col:first-child, .tg-trio__col:last-child { padding-inline: clamp(24px, 3vw, 52px); }
}

/* centre the plate row (capped at 1280px) while keeping equal column widths */
@media (min-width: 901px) {
  .tg-trio { --tp: clamp(24px, 3vw, 52px); max-width: none; margin-inline: max(calc(var(--tp) * -1), calc((100% - 1280px) / 2)); }
}

/* plate row spans the same width as the section head: first column lines up with the heading, last with the body text */
@media (min-width: 901px) {
  .tg-trio { max-width: none; margin-inline: calc(var(--tp) * -1); margin-top: 60px; }
  .tg-trio__col img { object-position: left center; }
}
.tg-plates .tg-rows { margin-top: 0; }

/* Plate IV: empty white margins trimmed from the art, so section spacing is a true 100px */
.tg-store { margin-top: 100px; padding: clamp(24px, 3vw, 56px); border: 2px solid #e4eaeb; border-radius: 28px; }
@media (max-width: 700px) { .tg-store { margin-top: 64px; padding: 20px; border-radius: 20px; } }

.tg-plates .tg-rows { row-gap: 0; }
main .cs-s.tg-plates { padding-bottom: 0; }
main .cs-s.tg-colophon { padding-top: 120px; }
.tg-colophon .tg-inks { border-top: 0; }
@media (max-width: 700px) { main .cs-s.tg-colophon { padding-top: 64px; } }

/* § 2: same leaf, light and soft, growing in from the top-right corner (rides with the pinned block on desktop) */
.tg-pipe { position: relative; overflow-x: clip; }
.tg-pipe .tg-pipe__track { position: relative; }
.tg-pipe::after, .tg-pipe.is-live .tg-pipe__pin::after { content: ""; position: absolute; top: clamp(-60px, -3.5vw, -24px); right: clamp(-50px, -2.5vw, -20px); width: clamp(150px, 14vw, 230px); aspect-ratio: 405 / 435;
  background: url("../../../uploads/tig/leaf-plant-v2.webp") center / contain no-repeat; transform: rotate(-90deg); opacity: .5; filter: saturate(.85) brightness(1.15) blur(.6px); pointer-events: none; z-index: 0; }
@media (min-width: 1001px) {
  .tg-pipe.is-live::after { display: none; }
  .tg-pipe.is-live .tg-pipe__pin::after { top: clamp(-50px, -3vw, -20px); }
  .tg-pipe.is-live .tg-pipe__pin > * { position: relative; z-index: 1; }
}
@media (max-width: 700px) { .tg-pipe::after { width: 110px; opacity: .4; } }

@media (max-width: 1000px) { .tg-pipe .tg-pipe__pin::after { display: none; } }

/* § 2 leaf anchored to the section's own top-right corner, stem tucked past the edge (clipped) */
.tg-pipe { overflow: clip; }
.tg-pipe.is-live .tg-pipe__pin::after { display: none; }
.tg-pipe::after, .tg-pipe.is-live::after { display: block; top: clamp(-110px, -6vw, -50px); right: clamp(-110px, -6vw, -50px); width: clamp(180px, 16vw, 260px); opacity: .55; filter: saturate(.9) brightness(1.1); }
@media (max-width: 700px) { .tg-pipe::after { width: 130px; top: -40px; right: -44px; } }

/* § 2: blue leaf frame (2075x758, transparent) across the top of the section, replaces the green corner leaf */
.tg-pipe::after, .tg-pipe.is-live::after, .tg-pipe.is-live .tg-pipe__pin::after { display: none; }
.tg-pipe::before { content: ""; position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 2075 / 758; background: url("../../../uploads/tig/leaf-frame.webp") top center / 100% auto no-repeat; pointer-events: none; z-index: 0; }
.tg-pipe > .tg-pipe__track { position: relative; z-index: 1; }

.tg-pipe::before { opacity: .28; }

/* § 6 outcomes: same leaf frame across the top, very faint on the dark ground */
.tg-out { position: relative; isolation: isolate; overflow: clip; }
.tg-out::before { content: ""; position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 2075 / 758; background: url("../../../uploads/tig/leaf-frame.webp") top center / 100% auto no-repeat; opacity: .14; mix-blend-mode: screen; pointer-events: none; z-index: -1; }

/* § 6: white leafy border (cut to transparent) replaces the blue frame, kept light */
.tg-out::before { background-image: url("../../../uploads/tig/leaf-frame-cream.webp"); opacity: .03; mix-blend-mode: normal; }
