/* ==========================================================================
   Powerline — page sections
   ========================================================================== */

/* --- Home hero ----------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(3.5rem, 2rem + 8vw, 8rem) clamp(3rem, 2rem + 5vw, 6rem);
  overflow: hidden;
  background: var(--white);
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Soft brand wash behind the headline */
.hero__bg::before {
  content: "";
  position: absolute;
  top: -22%;
  right: -12%;
  width: min(760px, 78vw);
  aspect-ratio: 1;
  background: radial-gradient(
    circle at center,
    color-mix(in srgb, var(--navy) 12%, transparent) 0%,
    transparent 68%
  );
}

.hero__bg::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -14%;
  width: min(560px, 62vw);
  aspect-ratio: 1;
  background: radial-gradient(
    circle at center,
    color-mix(in srgb, var(--red) 9%, transparent) 0%,
    transparent 66%
  );
}

.hero__grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: clamp(70px, 8vw, 118px) 100%;
  opacity: 0.5;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 1rem + 5vw, 5rem);
  align-items: center;
}

/* Grid items default to min-width:auto, so a long unbreakable heading widens
   the column past the viewport. Every grid child here must be allowed to
   shrink or the page overflows horizontally on small screens. */
.hero__inner > *,
.split > *,
.split--lead > *,
.service__body > *,
.contact-layout > *,
.cta-band__inner > * {
  min-width: 0;
}

/* Tablets keep both columns. The artwork is narrow -- a 520px-tall breaker is
   only ~182px wide -- so the text column takes the larger share here. */
@media (min-width: 760px) and (max-width: 980px) {
  .hero__inner {
    grid-template-columns: 1.2fr 0.8fr;
    gap: clamp(1.5rem, 0.5rem + 3vw, 3rem);
  }

  /* The text column is narrower here than when the hero stacks, so the three
     stats need a tighter gap to keep their labels from over-wrapping. */
  .hero__stats {
    gap: var(--sp-5);
    margin-top: var(--sp-7);
  }
}

@media (max-width: 759px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
}

.hero h1 {
  font-size: var(--fs-5xl);
  margin-bottom: var(--sp-5);
}

.hero h1 em {
  font-style: normal;
  color: var(--red);
}

.hero__lede {
  font-size: var(--fs-lg);
  max-width: 52ch;
  margin-bottom: var(--sp-7);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0.42rem 0.95rem 0.42rem 0.5rem;
  margin-bottom: var(--sp-6);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-sm);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--navy);
}

.hero__badge img {
  height: 26px;
  width: auto;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: var(--sp-7);
  justify-content: start;
  margin-top: var(--sp-9);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
}

@media (max-width: 520px) {
  .hero__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-5);
  }
}

/* --- Hero artwork -------------------------------------------------------
   The circuit-breaker illustration from the cover of the corporate profile.
   It is tall and narrow, so it is sized by height rather than width.
   ------------------------------------------------------------------------ */

.hero__art {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero__art img {
  height: min(58vh, 520px);
  width: auto;
  max-width: 100%;
  filter: drop-shadow(0 26px 50px rgb(23 26 51 / 0.13));
  flex: none;
}

/* The paired supply wires from the profile cover. They run into the breaker's
   terminals from above and below rather than across its body, as on the cover. */
.hero__wire {
  position: relative;
  flex: 1 1 auto;
  width: 28px;
  min-height: 36px;
}

.hero__wire::before,
.hero__wire::after {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 5px;
  border-radius: 3px;
}

.hero__wire::before {
  left: 5px;
  background: var(--navy);
}

.hero__wire::after {
  left: 17px;
  background: var(--red);
}

@media (max-width: 980px) {
  .hero__art img {
    height: min(52vh, 440px);
  }
}

/* Stacked on phones, this tall narrow illustration became a ~500px band of
   mostly empty width between the stats and the trust strip. It is decorative
   (alt=""), so the phone hero drops it and runs straight on. */
@media (max-width: 759px) {
  .hero__art {
    display: none;
  }
}

/* --- Map card ------------------------------------------------------------ */

.map-card {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-md);
}

.map-card__frame {
  aspect-ratio: 4 / 3;
  background: var(--mist);
}

.map-card__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  /* The embed is a colour map; calm it down to sit with the rest of the page. */
  filter: saturate(0.72) contrast(1.02);
}

.map-card figcaption {
  padding: var(--sp-5) var(--sp-6) var(--sp-6);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.map-card__tag {
  display: inline-block;
  margin-bottom: var(--sp-3);
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-sm);
  background: var(--navy-100);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--navy);
}

.map-card figcaption strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: var(--sp-2);
}

.map-card figcaption .link-arrow {
  /* Break out of the address paragraph onto its own line. */
  display: flex;
  width: fit-content;
  margin-top: var(--sp-4);
}

/* --- Inner page hero ----------------------------------------------------- */

.page-hero {
  position: relative;
  padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(2.5rem, 2rem + 3vw, 4rem);
  background: var(--mist);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -8%;
  width: min(560px, 60vw);
  aspect-ratio: 1;
  background: radial-gradient(
    circle at center,
    color-mix(in srgb, var(--navy) 10%, transparent) 0%,
    transparent 68%
  );
  pointer-events: none;
}

/* This element also carries .wrap, whose `margin-inline: auto` would centre it
   against the viewport if it had its own max-width. Constrain the children
   instead so the hero stays flush with the content below it. */
.page-hero__inner {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: var(--fs-4xl);
  max-width: 20ch;
}

.page-hero p {
  margin-top: var(--sp-4);
  font-size: var(--fs-lg);
  line-height: 1.6;
  max-width: var(--maxw-prose);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--slate-light);
}

.breadcrumb a {
  color: var(--slate);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--red-ink);
}

/* --- Capability grid ----------------------------------------------------- */

.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-5);
}

/* --- Split feature rows -------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    gap: var(--sp-7);
  }
}

.split--lead {
  grid-template-columns: 1fr 1.05fr;
  align-items: start;
}

@media (max-width: 900px) {
  .split--lead {
    grid-template-columns: 1fr;
  }
}

.split--reverse > :first-child {
  order: 2;
}

@media (max-width: 900px) {
  .split--reverse > :first-child {
    order: 0;
  }
}

.tick-list li {
  position: relative;
  padding-left: 1.9rem;
  line-height: 1.6;
}

.tick-list li + li {
  margin-top: var(--sp-3);
}

.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--red);
}

.section--navy .tick-list li::before {
  background: var(--red);
}

/* --- Service detail blocks ----------------------------------------------- */

.service {
  scroll-margin-top: calc(var(--header-h) + var(--sp-6));
  padding-block: clamp(2.75rem, 2rem + 3vw, 4.5rem);
  border-top: 1px solid var(--line);
}

.service:first-of-type {
  border-top: 0;
}

.service__head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

.service__index {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1;
  color: var(--line-strong);
  flex: none;
}

.service__body {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  align-items: start;
}

@media (max-width: 860px) {
  .service__body {
    grid-template-columns: 1fr;
  }
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}

.chip {
  padding: 0.38rem 0.8rem;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--slate);
}

.section--mist .chip {
  background: var(--white);
}

/* --- Values -------------------------------------------------------------- */

.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-5);
}

.value {
  position: relative;
  padding: var(--sp-6);
  padding-top: var(--sp-8);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.value__key {
  position: absolute;
  top: var(--sp-5);
  left: var(--sp-6);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  color: var(--red-ink);
}

.value h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-3);
}

.value p {
  font-size: var(--fs-sm);
  line-height: 1.6;
}

/* --- Quote --------------------------------------------------------------- */

.quote {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  align-items: center;
}

@media (max-width: 760px) {
  .quote {
    grid-template-columns: 1fr;
  }
}

.quote__portrait {
  --slot-ratio: 1 / 1;
  border-radius: var(--r-lg);
}

.quote blockquote {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 600;
  line-height: 1.28;
  color: var(--navy);
  text-transform: none;
  letter-spacing: 0;
}

.section--navy .quote blockquote {
  color: var(--white);
}

.quote blockquote::before {
  content: "\201C";
  display: block;
  font-size: 3.4em;
  line-height: 0.6;
  color: var(--red);
  margin-bottom: 0.16em;
}

.quote figcaption {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.section--navy .quote figcaption {
  border-top-color: rgb(255 255 255 / 0.16);
}

.quote figcaption strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--navy);
}

.section--navy .quote figcaption strong {
  color: var(--white);
}

/* --- Infrastructure ------------------------------------------------------ */

.infra {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--sp-5);
}

.infra__item {
  padding: var(--sp-6);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  border-top: 3px solid var(--navy);
}

.infra__item:nth-child(even) {
  border-top-color: var(--red);
}

.infra__figure {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1;
  color: var(--navy);
}

.infra__figure span {
  font-size: 0.45em;
  color: var(--slate);
  letter-spacing: var(--ls-wide);
}

.infra__item h3 {
  font-size: var(--fs-base);
  letter-spacing: var(--ls-eyebrow);
  margin: var(--sp-3) 0 var(--sp-2);
}

.infra__item p {
  font-size: var(--fs-sm);
  line-height: 1.6;
}

/* --- Applications -------------------------------------------------------- */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.app-grid li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--white);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
  transition: background-color var(--dur-mid) var(--ease-out);
}

.app-grid li:hover {
  background: var(--mist);
}

.app-grid svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--red);
}

/* --- CTA band ------------------------------------------------------------ */

.cta-band {
  position: relative;
  background: var(--navy-900);
  color: var(--on-navy-dim);
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgb(255 255 255 / 0.06) 1px, transparent 1px);
  background-size: clamp(70px, 8vw, 118px) 100%;
  pointer-events: none;
}

.cta-band::after {
  content: "";
  position: absolute;
  top: -55%;
  right: -6%;
  width: min(620px, 66vw);
  aspect-ratio: 1;
  background: radial-gradient(
    circle at center,
    color-mix(in srgb, var(--red) 26%, transparent) 0%,
    transparent 66%
  );
  pointer-events: none;
}

.cta-band__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.35fr auto;
  gap: var(--sp-7);
  align-items: center;
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
}

@media (max-width: 860px) {
  .cta-band__inner {
    grid-template-columns: 1fr;
  }
}

.cta-band h2 {
  color: var(--white);
  font-size: var(--fs-3xl);
}

.cta-band p {
  margin-top: var(--sp-4);
  max-width: 54ch;
}

/* --- Contact page -------------------------------------------------------- */

.contact-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: start;
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.form-card {
  padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
}

.office {
  padding: var(--sp-6);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.office + .office {
  margin-top: var(--sp-4);
}

.office h3 {
  font-size: var(--fs-base);
  letter-spacing: var(--ls-eyebrow);
  margin-bottom: var(--sp-3);
}

.office__tag {
  display: inline-block;
  margin-bottom: var(--sp-3);
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-sm);
  background: var(--navy-100);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--navy);
}

.office address {
  font-style: normal;
  font-size: var(--fs-sm);
  line-height: 1.65;
}

.contact-methods {
  display: grid;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.contact-method {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition:
    border-color var(--dur-mid) var(--ease-out),
    box-shadow var(--dur-mid) var(--ease-out),
    transform var(--dur-mid) var(--ease-out);
}

.contact-method:hover {
  transform: translateY(-2px);
  border-color: transparent;
  box-shadow: var(--sh-md);
}

.contact-method__icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy-100);
  color: var(--navy);
}

.contact-method--wa .contact-method__icon {
  background: #e4f6ea;
  color: #18923f;
}

.contact-method__icon svg {
  width: 20px;
  height: 20px;
}

.contact-method__text {
  min-width: 0;
  /* The email address is one long unbreakable token; without this the card
     refuses to shrink below its width and pushes the page sideways on 320px
     screens. */
  overflow-wrap: anywhere;
}

.contact-method__text span {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--slate-light);
}

.contact-method__text strong {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: var(--ls-display);
}

/* --- Sector list --------------------------------------------------------- */

.sector-list {
  columns: 2;
  column-gap: var(--sp-7);
}

@media (max-width: 640px) {
  .sector-list {
    columns: 1;
  }
}

.sector-list li {
  break-inside: avoid;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--ink);
}

/* --- Partner countries --------------------------------------------------- */

.partners {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.partners li {
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--navy);
  background: var(--white);
}
