/* V2 Technical page
   ------------------------------------------------------------------
   Order of the page: a black split with the De Lank pipework; the
   two facts on open white; the statement set very large on concrete
   over both turbine halls; the 2025 generator log laid out in ruled
   rows; a full-bleed strip of the construction photos; a machine-blue
   closing band. Only one split is used. */

/* ------------------------------------------------------------------
   Opening split: black block, portrait of the De Lank pipework
   ------------------------------------------------------------------ */

.tech-open .split__block .lede {
  max-width: 34rem;
}

.tech-open__media img {
  object-position: 50% 30%;
}

@media (max-width: 47.99rem) {
  .tech-open__media img {
    aspect-ratio: 4 / 5;
  }
}

@media (min-width: 48rem) and (max-width: 55.99rem) {
  .tech-open__media img {
    aspect-ratio: 4 / 3;
    object-position: 50% 32%;
  }
}

@media (min-width: 56rem) {
  .tech-open {
    min-height: clamp(30rem, 48vw, 46rem);
  }
}

/* ------------------------------------------------------------------
   The two facts: open white, set at lede size in the right columns
   ------------------------------------------------------------------ */

.tech-facts {
  padding-block: var(--section-m);
}

.tech-facts__body > * + * {
  margin-top: var(--space-5);
}

.tech-facts__body p {
  max-width: 34rem;
  font-size: var(--text-lede);
  line-height: 1.4;
}

/* ------------------------------------------------------------------
   Statement on concrete, over the two turbine halls
   ------------------------------------------------------------------ */

.tech-statement {
  /* The statement is the biggest type on the page, above --text-h1 */
  --tech-statement-size: clamp(2.5rem, 0.5rem + 8.6vw, 8.75rem);
  padding-block: var(--section-m);
}

.tech-statement__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  row-gap: var(--space-7);
}

.tech-statement__text {
  grid-column: 1 / -1;
  max-width: 20ch;
  font-size: var(--tech-statement-size);
  font-weight: var(--weight-bold);
  line-height: var(--leading-display);
}

/* Phone and tablet: Trebartha runs to both window edges, De Lank sits
   under it to the right */
.tech-statement__photo--trebartha {
  grid-column: 1 / -1;
  margin-inline: calc(var(--page-gutter) * -1);
}

.tech-statement__photo--delank {
  grid-column: 4 / -1;
  margin-top: calc(var(--space-5) * -1);
}

@media (min-width: 56rem) {
  .tech-statement {
    padding-block: var(--section-l) var(--section-m);
  }

  .tech-statement__inner {
    row-gap: var(--space-8);
    align-items: end;
  }

  /* Runs out to the left edge of the window */
  .tech-statement__photo--trebartha {
    grid-column: 1 / span 8;
    margin-inline: calc(var(--edge) * -1) 0;
  }

  /* Smaller, standing on the same line as the big photo */
  .tech-statement__photo--delank {
    grid-column: 9 / span 4;
    margin-top: 0;
  }
}

/* ------------------------------------------------------------------
   Generator replacement log
   ------------------------------------------------------------------ */

.tech-works__head {
  display: grid;
  gap: var(--space-4) var(--grid-gap);
  margin-bottom: var(--space-8);
}

.tech-works__head h2 {
  max-width: 20ch;
}

.tech-works__head p {
  max-width: 24rem;
  font-size: var(--text-lede);
  line-height: 1.4;
}

@media (min-width: 56rem) {
  .tech-works__head {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
  }

  .tech-works__head h2 { grid-column: 1 / span 8; }
  .tech-works__head p { grid-column: 9 / span 4; }
}

/* Ruled rows of entries. Each entry spans three rows of a subgrid
   (date, title, photo), so across a row the plates, titles and photos
   line up like the columns of a log book. Date order runs left to
   right, then down. Phones: one entry per row, except the last two
   (both portraits), which stand side by side. */

.tech-log {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  row-gap: 0;
}

.tech-log__entry {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  grid-column: 1 / -1;
  align-content: start;
  margin-bottom: var(--space-7);
}

.log__entry + .tech-log__entry {
  margin-top: 0;
}

.tech-log__entry:nth-last-child(-n + 2) {
  margin-bottom: 0;
}

.tech-log .log__date {
  justify-self: start;
  align-self: start;
}

.tech-log .log__title {
  align-self: start;
}

.tech-log__entry--pallet,
.tech-log__entry--installed {
  grid-column: span 1;
}

/* Crops */
.tech-log .log__photo img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.tech-log__entry--pelton .log__photo img {
  aspect-ratio: 4 / 5;
}

.tech-log__entry--pallet .log__photo img,
.tech-log__entry--installed .log__photo img {
  aspect-ratio: 3 / 4;
}

.tech-log__entry--pelton .log__photo img { object-position: 50% 55%; }
.tech-log__entry--pallet .log__photo img { object-position: 50% 70%; }
.tech-log__entry--installed .log__photo img { object-position: 50% 30%; }
.tech-log__entry--kiosk .log__photo img { object-position: 45% 60%; }
.tech-log__entry--hall .log__photo img { object-position: 50% 65%; }

/* Tablet: two per row, the generator in the hall across the full width */

@media (min-width: 48rem) {
  .tech-log {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .tech-log__entry {
    grid-column: span 6;
    margin-bottom: var(--space-8);
  }

  .tech-log__entry--pallet,
  .tech-log__entry--installed {
    grid-column: span 6;
  }

  .tech-log__entry--hall {
    grid-column: 1 / -1;
  }

  .tech-log__entry--hall .log__photo img {
    aspect-ratio: 16 / 9;
  }

  .tech-log__entry--pelton .log__photo img {
    aspect-ratio: 3 / 4;
  }
}

/* Desktop: three rows. March and July; October's delivery and the
   generator in the hall; the runner and the finished installation. */

@media (min-width: 64rem) {
  .tech-log__entry--kiosk { grid-column: 1 / span 4; }
  .tech-log__entry--stands { grid-column: 5 / span 5; }
  .tech-log__entry--pelton { grid-column: 10 / span 3; }
  .tech-log__entry--crane { grid-column: 1 / span 5; }
  .tech-log__entry--hall { grid-column: 6 / span 7; }
  .tech-log__entry--pallet { grid-column: 1 / span 7; }
  .tech-log__entry--installed { grid-column: 8 / span 5; }

  .tech-log__entry--hall .log__photo img {
    aspect-ratio: 3 / 2;
  }

  /* The runner lies in the lower half of a portrait frame: crop wide */
  .tech-log__entry--pallet .log__photo img {
    aspect-ratio: 4 / 3;
    object-position: 50% 88%;
  }
}

/* ------------------------------------------------------------------
   Construction strip: full bleed, white surface
   ------------------------------------------------------------------ */

.tech-build {
  padding-bottom: var(--section-m);
}

.tech-build__heading {
  margin-bottom: var(--space-6);
}

.tech-build__photo--turbine { --ar: 1.2; }
.tech-build__photo--intake { --ar: 1.45; }
.tech-build__photo--channel { --ar: 0.85; }

.tech-build__photo--turbine img { object-position: 62% 50%; }
.tech-build__photo--intake img { object-position: 45% 50%; }
.tech-build__photo--channel img { object-position: 48% 50%; }

@media (max-width: 47.99rem) {
  .tech-build__photo--turbine { --ar: 4 / 3; }
  .tech-build__photo--intake,
  .tech-build__photo--channel { --ar: 1; }
}

/* ------------------------------------------------------------------
   Closing band: machine blue
   ------------------------------------------------------------------ */

.tech-next {
  padding-block: var(--section-m);
}

.tech-next__inner {
  display: grid;
  gap: var(--space-5) var(--grid-gap);
}

.tech-next__heading {
  max-width: 12ch;
}

.tech-next__body {
  max-width: 36rem;
}

.tech-next__body > * + * {
  margin-top: var(--space-5);
}

.tech-next__body p {
  font-size: var(--text-lede);
  line-height: 1.4;
}

.tech-next__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
}

@media (min-width: 56rem) {
  .tech-next__inner {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
  }

  .tech-next__heading { grid-column: 1 / span 5; }
  .tech-next__body { grid-column: 7 / span 6; }
}
