/* Technical page */

/* ------------------------------------------------------------------
   Opening: copy beside De Lank machinery. The landscape hall sits under
   the text; the portrait turbine rises alongside both, so the two
   photos overlap in height rather than lining up in rows.
   ------------------------------------------------------------------ */

.tech-intro {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-6) var(--grid-gap);
  padding-block: var(--section-s) var(--section-m);
}

.tech-intro__text {
  grid-column: 1 / -1;
}

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

.tech-intro__text .lede {
  margin-top: var(--space-6);
}

.tech-intro__wide {
  grid-column: 1 / -1;
}

.tech-intro__tall {
  grid-column: 4 / -1;
}

@media (min-width: 48rem) {
  .tech-intro {
    row-gap: var(--space-8);
  }

  .tech-intro__text {
    grid-column: 1 / span 6;
    grid-row: 1;
  }

  .tech-intro__wide {
    grid-column: 1 / span 7;
    grid-row: 2;
  }

  .tech-intro__tall {
    grid-column: 9 / span 4;
    grid-row: 1 / span 2;
    align-self: start;
    margin-top: var(--space-9);
  }
}

/* ------------------------------------------------------------------
   Statement band: the one pulled-out fact gets its own dark band, with
   the Trebartha turbine hall set off to the right beneath it.
   ------------------------------------------------------------------ */

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

.tech-statement__text,
.tech-statement__photo {
  grid-column: 1 / -1;
}

@media (min-width: 48rem) {
  .tech-statement__inner {
    row-gap: var(--space-8);
  }

  .tech-statement__text {
    grid-column: 1 / span 7;
  }

  .tech-statement__photo {
    grid-column: 5 / span 8;
  }
}

/* ------------------------------------------------------------------
   Generator replacement timeline. Each entry keeps its date and title
   on the spine; landscape photos run wide, portraits narrower, and the
   last photo is a little larger to close the sequence.
   ------------------------------------------------------------------ */

.tech-works__head {
  max-width: var(--measure);
  margin-bottom: var(--space-7);
}

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

.tech-timeline__photo {
  margin-top: var(--space-4);
}

.tech-timeline__item--narrow .tech-timeline__photo {
  max-width: 75%;
}

@media (min-width: 48rem) {
  .tech-works__head {
    margin-bottom: var(--space-8);
  }

  /* The list itself is the 12-column grid; every entry is a subgrid of
     it, so photos line up on the same columns from entry to entry. */
  .tech-timeline {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--grid-gap);
  }

  .tech-timeline__item {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    align-items: start;
    align-content: start;
    padding-bottom: var(--space-8);
  }

  .tech-timeline__item--last {
    padding-bottom: 0;
  }

  .tech-timeline__label {
    grid-column: 1 / span 3;
  }

  .tech-timeline__photo {
    grid-column: 4 / -1;
    margin-top: 0;
  }

  .tech-timeline__item--wide .tech-timeline__photo {
    grid-column: 4 / span 7;
  }

  .tech-timeline__item--narrow .tech-timeline__photo {
    grid-column: 4 / span 4;
    max-width: none;
  }

  .tech-timeline__item--last .tech-timeline__photo {
    grid-column: 4 / span 5;
  }

  /* Consecutive days share a row: the first day stays on the spine, the
     next day sits to its right with its date beneath the photo, so the
     order still reads left to right. */
  .tech-timeline__item--pair-a {
    grid-column: 1 / span 8;
  }

  .tech-timeline__item--pair-a.tech-timeline__item--short {
    grid-column: 1 / span 7;
  }

  .tech-timeline__item--pair-a .tech-timeline__photo {
    grid-column: 4 / -1;
  }

  .tech-timeline__item--pair-b {
    grid-column: 9 / -1;
    padding-left: 0;
    border-left: 0;
  }

  .tech-timeline__item--short + .tech-timeline__item--pair-b {
    grid-column: 8 / -1;
  }

  .tech-timeline__item--pair-b::before {
    display: none;
  }

  .tech-timeline__item--pair-b .tech-timeline__photo {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .tech-timeline__item--pair-b .tech-timeline__label {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: var(--space-3);
  }
}

/* ------------------------------------------------------------------
   Construction strip: three photos of unequal width sharing one height.
   On phones the dated turbine photo leads at full width and the two
   intake photos sit side by side beneath it.
   ------------------------------------------------------------------ */

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

.tech-build__strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5) var(--grid-gap);
  align-items: start;
}

.tech-build__photo img {
  object-fit: cover;
}

.tech-build__photo--turbine {
  grid-column: 1 / -1;
}

.tech-build__photo--turbine img {
  aspect-ratio: 4 / 3;
}

.tech-build__photo--intake img,
.tech-build__photo--channel img {
  aspect-ratio: 4 / 5;
}

.tech-build__photo--intake img {
  object-position: 50% 50%;
}

.tech-build__photo--channel img {
  object-position: 45% 50%;
}

@media (min-width: 48rem) {
  .tech-build__strip {
    grid-template-columns: 5fr 4fr 3fr;
  }

  .tech-build__photo--turbine {
    grid-column: auto;
  }

  /* One shared height: each crop is set from its column's share of the row. */
  .tech-build__photo--intake img {
    aspect-ratio: 16 / 15;
  }

  .tech-build__photo--channel img {
    aspect-ratio: 4 / 5;
  }
}

/* ------------------------------------------------------------------
   Onward: a short way out to the FAQ and the contact form.
   ------------------------------------------------------------------ */

.tech-next__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-5) var(--grid-gap);
}

.tech-next__heading,
.tech-next__body {
  grid-column: 1 / -1;
}

.tech-next__body {
  max-width: var(--measure);
}

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

@media (min-width: 48rem) {
  .tech-next__heading {
    grid-column: 1 / span 4;
  }

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