/* Pipeline service page.
   Composition follows the service: a linear route, the pipework and its care,
   a specification register and the hand-off to the other services. */

.pipeline-page {
  --pl-space: clamp(70px, 9vw, 132px);
  --pl-rule: color-mix(in srgb, var(--tank-blue) 17%, transparent);
  --pl-rule-strong: color-mix(in srgb, var(--tank-blue) 42%, transparent);
  --pl-rule-light: color-mix(in srgb, var(--surface) 27%, transparent);
  --pl-cyan-soft: color-mix(in srgb, var(--cyan) 10%, var(--surface));
  background: var(--surface);
}

.pipeline-page .desktop-nav a[aria-current="page"]::after { transform: scaleX(1); }
.pipeline-page .site-header { color: var(--tank-blue); border-bottom-color: var(--pl-rule); }
.pipeline-page .brand { background-image: var(--pkg-logo-color); }
.pipeline-page .desktop-nav a::after { background: var(--tank-blue); }
.pipeline-page .header-contact { border-color: var(--pl-rule-strong); }
.pipeline-page .header-contact:hover { background: var(--tank-blue); color: var(--surface); }
.pipeline-page.menu-open .site-header { color: var(--surface); }
.pipeline-page.menu-open .brand { background-image: var(--pkg-logo-white); }

.pl-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.pipeline-page main h1,
.pipeline-page main h2 {
  margin: 0;
  color: var(--tank-blue);
  font-family: "Biennale", "Helvetica Neue", sans-serif;
  letter-spacing: -.03em;
  line-height: 1.1;
  padding-bottom: 4px;
  text-wrap: balance;
}

.pipeline-page main h1 { max-width: 18ch; font-size: clamp(38px, 10.5vw, 58px); }
.pipeline-page main h2 { font-size: clamp(32px, 8vw, 48px); }

.pipeline-page main h3 {
  margin: 0;
  color: var(--tank-blue);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
}

.pl-eyebrow,
.pl-section-label {
  color: var(--infra-blue);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: var(--eyebrow-size);
  font-weight: var(--eyebrow-weight);
  letter-spacing: var(--eyebrow-track);
  line-height: 1.2;
  text-transform: uppercase;
}

.pl-eyebrow { margin: 0 0 16px; }
.pl-section-label { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; }
.pl-section-label > span { width: var(--label-rule); height: var(--hairline); background: currentColor; }

.pl-lede {
  max-width: 60ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.pipeline-page .button-link--ghost { color: var(--tank-blue); border-color: var(--pl-rule-strong); }
.pipeline-page .button-link--ghost:hover { color: var(--surface); border-color: var(--tank-blue); background: var(--tank-blue); }

/* --- 6.1 Hero --------------------------------------------------------- */
.pl-hero { min-height: 100dvh; padding-block: calc(var(--header-height) + 36px) 46px; display: grid; align-items: center; }
.pl-hero__grid { display: grid; gap: 34px; }
.pl-hero__lead { max-width: 46ch; margin: 22px 0 0; color: var(--muted); font-size: 17px; line-height: 1.58; }
.pl-hero__actions { display: grid; gap: 10px; margin-top: 28px; }
.pl-hero__actions .button-link { width: 100%; min-width: 0; }

.pl-hero__visual {
  position: relative;
  isolation: isolate;
  min-height: 300px;
  overflow: hidden;
  border: var(--hairline) solid var(--pl-rule-strong);
  background: var(--placeholder);
  color: var(--tank-blue);
}

.pl-hero__visual img,
.pl-principle__media img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.pl-hero__visual img { object-position: 52% center; }

/* --- 6.2 Route off the road: origin, buffer, destination ----------------- */
.pl-intro { padding-block: var(--pl-space); border-top: var(--hairline) solid var(--pl-rule); }
.pl-intro__grid { display: grid; gap: 48px; }
.pl-intro__copy { max-width: 900px; }
.pl-intro__copy p { max-width: 62ch; margin: 22px 0 0; color: var(--muted); }
.pl-intro__route { display: grid; }
.pl-intro__route div { min-width: 0; padding: 20px 0; border-top: var(--hairline) solid var(--pl-rule-strong); }
.pl-route__label { display: block; margin-bottom: 6px; color: var(--infra-blue); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pl-intro__route strong { display: block; color: var(--tank-blue); font-size: 18px; line-height: 1.3; }
.pl-intro__route i { width: var(--hairline); height: 34px; margin-left: 10px; background: var(--infra-blue); }

/* --- 6.3 Pipework and its care: one connected grid ----------------------- */
.pl-principles { padding-block: var(--pl-space); }
.pl-principles__grid { display: grid; margin-top: 44px; border-top: var(--hairline) solid var(--pl-rule-strong); }
.pl-principles article { display: grid; grid-template-columns: 30px 1fr; gap: 10px 14px; min-width: 0; padding-block: 24px; border-bottom: var(--hairline) solid var(--pl-rule); }
.pl-principles article > span { grid-column: 1; grid-row: 2 / span 2; color: var(--infra-blue); font-size: 12px; font-weight: 800; }
.pl-principles article h3 { grid-column: 2; grid-row: 2; margin: 0; }
.pl-principles article p { grid-column: 2; grid-row: 3; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.pl-principle__media { position: relative; grid-column: 1 / -1; grid-row: 1; min-height: 190px; overflow: hidden; margin-bottom: 10px; border: var(--hairline) solid var(--placeholder-deep); background: var(--placeholder); }
.pl-principle__media img { object-position: center; }
.pl-principles article:nth-child(2) .pl-principle__media img { object-position: 50% 30%; }
.pl-principles article:nth-child(3) .pl-principle__media img { object-position: 57% center; }
.pl-principles article:nth-child(4) .pl-principle__media img { object-position: 50% 40%; }

/* --- 6.4 Specification register (values pending) ------------------------ */
.pl-technical { padding-block: var(--pl-space); background: var(--soft-blue); }
.pl-specs { display: grid; margin: 40px 0 0; border-top: var(--hairline) solid var(--pl-rule-strong); }
.pl-specs > div { display: grid; gap: 4px; min-width: 0; padding-block: 18px; border-bottom: var(--hairline) solid var(--pl-rule); }
.pl-specs dt { color: var(--muted); font-size: 14px; line-height: 1.4; }
.pl-specs dd { margin: 0; color: var(--tank-blue); font-size: 18px; font-weight: 800; line-height: 1.35; }

/* --- 6.5 Hand-off to the other services ---------------------------------- */
.pl-handoff { padding-block: var(--pl-space); background: var(--pl-cyan-soft); }
.pl-handoff__map { display: grid; margin-top: 42px; border-top: var(--hairline) solid var(--pl-rule-strong); }
.pl-handoff__map a { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0; border-bottom: var(--hairline) solid var(--pl-rule); color: var(--tank-blue); }
.pl-handoff__map strong { font-size: 21px; line-height: 1.25; }
.pl-handoff__map a > span { color: var(--infra-blue); font-size: 22px; }
.pl-handoff__map a:hover strong { color: var(--infra-blue); }

/* --- 6.6 Enquiry closes the page with one deliberate theme switch ------- */
.pl-close { padding-block: 72px; background: var(--tank-blue); color: var(--surface); }
.pl-close__grid { display: grid; gap: 30px; align-items: end; }
.pipeline-page .pl-close h2 { color: var(--surface); }
.pl-enquiry > p { max-width: 60ch; margin: 22px 0 0; color: color-mix(in srgb, var(--surface) 78%, transparent); }
.pl-close .button-link { justify-self: start; width: 100%; min-width: 0; }

/* --- Thai ----------------------------------------------------------------- */
html[data-language="th"] .pipeline-page main h1,
html[data-language="th"] .pipeline-page main h2,
html[data-language="th"] .pipeline-page main h3 {
  font-family: "DB Helvethaica X", "Noto Sans Thai", Tahoma, sans-serif;
  font-style: normal;
  font-weight: 700;
  letter-spacing: -.015em;
}
html[data-language="th"] .pipeline-page main h1 { font-size: var(--th-h1); line-height: .98; }
html[data-language="th"] .pipeline-page main h2 { font-size: var(--th-h2); line-height: 1.04; }
html[data-language="th"] .pipeline-page main h3 { font-size: var(--th-title); line-height: 1.08; }
html[data-language="th"] .pl-eyebrow,
html[data-language="th"] .pl-route__label {
  font-family: "DB Helvethaica X", sans-serif;
  font-size: var(--eyebrow-size-th);
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}
html[data-language="th"] .pl-intro__route strong,
html[data-language="th"] .pl-handoff__map strong { font-family: "DB Helvethaica X", sans-serif; font-size: var(--th-title-sm); line-height: 1.15; }
html[data-language="th"] .pl-hero__lead,
html[data-language="th"] .pl-intro__copy p,
html[data-language="th"] .pl-lede,
html[data-language="th"] .pl-principles article p,
html[data-language="th"] .pl-enquiry > p { font-size: var(--th-body); line-height: var(--th-lh); }
html[data-language="th"] .pl-specs dt { font-size: var(--th-body-sm); line-height: 1.35; }
html[data-language="th"] .pl-specs dd { font-size: var(--th-body); line-height: 1.35; }

@media (min-width: 720px) {
  .pl-hero { padding-block: calc(var(--header-height) + 40px) 56px; }
  .pl-hero__actions { display: flex; flex-wrap: wrap; }
  .pl-hero__actions .button-link { width: auto; }
  .pl-hero__visual { min-height: 390px; padding: 34px; }
  .pl-intro__route { grid-template-columns: 1fr 44px 1fr 44px 1fr; align-items: stretch; }
  .pl-intro__route div { display: flex; flex-direction: column; justify-content: center; min-height: 148px; padding: 20px; border-block: var(--hairline) solid var(--pl-rule-strong); }
  .pl-intro__route i { align-self: center; width: 100%; height: var(--hairline); margin: 0; }
  .pl-principles__grid { grid-template-columns: repeat(2, 1fr); }
  .pl-principles article:nth-child(odd) { padding-right: 28px; border-right: var(--hairline) solid var(--pl-rule); }
  .pl-principles article:nth-child(even) { padding-left: 28px; }
  .pl-principle__media { min-height: 220px; }
  .pl-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 6vw; }
  .pl-handoff__map { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .pl-close__grid { grid-template-columns: 1fr auto; gap: 8vw; }
  .pl-close .button-link { width: auto; min-width: 240px; }
}

@media (min-width: 720px) and (max-width: 1023px) {
  html[data-language="th"] .pipeline-page main h2 { font-size: 5.6vw; }
  html[data-language="th"] .pl-intro__route strong { font-size: 22px; }
}

@media (min-width: 1024px) {
  .pl-hero { padding-block: calc(var(--header-height) + 30px) 46px; }
  .pl-hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(430px, .95fr); align-items: center; gap: 6vw; }
  .pl-hero__visual { min-height: min(62vh, 610px); }
  .pipeline-page main h1 { font-size: clamp(52px, 5vw, 76px); }
  html[data-language="th"] .pipeline-page main h1 { font-size: clamp(56px, 5.6vw, 88px); }
  .pl-specs { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 0; }
  .pl-specs > div { padding: 22px 20px 22px 0; }
  .pl-specs > div + div { padding-left: 20px; border-left: var(--hairline) solid var(--pl-rule); }
  .pl-specs > div:nth-child(4n + 1) { padding-left: 0; border-left: 0; }
}

/* Four columns only once the Thai item titles fit side by side. */
@media (min-width: 1280px) {
  .pl-principles__grid { grid-template-columns: repeat(4, 1fr); }
  html[data-language="th"] .pipeline-page .pl-principles h3 { font-size: clamp(24px, 1.95vw, 28px); }
  .pl-principles article,
  .pl-principles article:nth-child(odd),
  .pl-principles article:nth-child(even) { display: block; min-height: 470px; padding: 28px 24px; border-right: var(--hairline) solid var(--pl-rule); }
  .pl-principles article:first-child { padding-left: 0; }
  .pl-principles article:last-child { border-right: 0; padding-right: 0; }
  .pl-principles article > span { display: block; margin-bottom: 18px; }
  .pl-principle__media { min-height: 170px; margin-bottom: 24px; }
  .pl-principles article p { margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .pipeline-page *, .pipeline-page *::before, .pipeline-page *::after { transition-duration: .01ms !important; }
}
