/* ==========================================================================
   pages.css — genuinely page-specific rules only.
   Anything reusable belongs in components.css.
   ========================================================================== */

/* --- Service pages -------------------------------------------------------- */

/* Sibling switcher under the page header: 2 x 2 on phones, one row on desktop,
   so it never needs sideways scrolling. */
.service-tabs {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.service-tabs__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .service-tabs__list { grid-template-columns: repeat(4, 1fr); }
}

.service-tabs__list a {
  display: block;
  height: 100%;
  padding: var(--space-2) var(--space-2);
  border-bottom: 3px solid transparent;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.25;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition);
}

.service-tabs__list a:hover {
  color: var(--petrol-blue);
  border-bottom-color: var(--border);
}

.service-tabs__list a[aria-current="page"] {
  color: var(--petrol-blue);
  border-bottom-color: var(--process-orange);
}

/* --- Services overview ------------------------------------------------------ */

.service-index {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .service-index { grid-template-columns: repeat(2, 1fr); }
}

.service-index__item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
}

.service-index__num {
  flex: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--process-orange);   /* large display numerals: 3:1 applies */
}

.service-index__title {
  margin-bottom: var(--space-1);
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
}

.service-index__title a { color: var(--petrol-blue); text-decoration: none; }

.service-index__item p {
  margin-bottom: var(--space-2);
}

.service-index__scope {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-index__scope li {
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* The eyebrow on service pages is a breadcrumb link back to the overview;
   it keeps the eyebrow colour rather than turning into a white body link. */
.eyebrow a,
.section--blue .eyebrow a {
  color: inherit;
  text-decoration: none;
}

.eyebrow a:hover { text-decoration: underline; }

/* --- Service page: header spec panel and block diagram --------------------- */

.svcb-hero__inner {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 1024px) {
  .svcb-hero__inner {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: var(--space-6);
    align-items: end;
  }
}

.svcb-hero h1 { margin-bottom: var(--space-1); }

.svcb-hero .lead {
  margin-bottom: var(--space-2);
  font-size: 1.25rem;
  color: var(--white);
}

.svcb-hero__intro {
  max-width: 62ch;
  margin-bottom: 0;
  opacity: 0.88;
}

/* Spec panel: a drawing title block on the dark ground. */
.svcb-spec {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.svcb-spec__row {
  display: grid;
  grid-template-columns: 110px 1fr;
}

.svcb-spec__row + .svcb-spec__row {
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.svcb-spec dt {
  padding: var(--space-2);
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-light);
}

.svcb-spec dd {
  margin: 0;
  padding: var(--space-2);
  font-size: 0.9375rem;
  color: var(--white);
}

.svcb-spec__note {
  display: block;
  margin-top: 6px;
  font-size: 0.875rem;
  opacity: 0.85;
}

.svcb-stages {
  display: flex;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.svcb-stages li {
  flex: 1;
  padding: 3px 0;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8125rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.75);
}

.svcb-stages li.is-active {
  background: var(--process-orange);
  border-color: var(--process-orange);
  color: var(--deep-ink);
}

/* Block diagram: Inputs -> Scope -> Deliverables. */
.svcb-flow-section { padding-block: var(--space-5); }

.svcb-flow {
  display: grid;
  gap: var(--space-2);
}

@media (min-width: 1024px) {
  .svcb-flow {
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 2.2fr) 28px minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
  }
}

.svcb-node {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--petrol-blue);
  box-shadow: var(--shadow-1);
}

.svcb-node--out { border-top-color: var(--process-orange); }

.svcb-node__label {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
  font-size: 1.125rem;
  font-weight: 700;
}



.svcb-list {
  margin: 0;
  padding: var(--space-1) var(--space-3) var(--space-2);
  list-style: none;
}

.svcb-list li {
  padding: 0.45rem 0;
  font-size: 0.9688rem;
  line-height: 1.4;
}

.svcb-list li + li { border-top: 1px dashed var(--border); }

.svcb-list--ticks li {
  position: relative;
  padding-left: 1.25rem;
}

.svcb-list--ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 7px;
  height: 7px;
  background: var(--process-orange);
}

.svcb-packages {
  display: grid;
}

@media (min-width: 640px) {
  .svcb-packages { grid-template-columns: repeat(2, 1fr); }
  .svcb-package:nth-child(odd):last-child { grid-column: 1 / -1; }
}

.svcb-package {
  border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
  .svcb-package:nth-child(odd):not(:last-child) { border-right: 1px solid var(--border); }
}

.svcb-package__title {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
  margin: 0;
  padding: var(--space-2) var(--space-3) 0;
  font-size: 1.0625rem;
  color: var(--petrol-blue);
}


/* Connector: a chevron between nodes; points down when stacked. */
.svcb-arrow {
  position: relative;
  height: 28px;
}

.svcb-arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-right: 3px solid var(--process-orange);
  border-bottom: 3px solid var(--process-orange);
  transform: translate(-50%, -75%) rotate(45deg);
}

@media (min-width: 1024px) {
  .svcb-arrow { height: auto; }
  .svcb-arrow::before { transform: translate(-75%, -50%) rotate(-45deg); }
}


/* --- Industry pages --------------------------------------------------------- */

.indp-hero__inner {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}

@media (min-width: 1024px) {
  .indp-hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: var(--space-6); }
}

.indp-hero .lead {
  margin-bottom: var(--space-2);
  font-size: 1.1875rem;
  color: var(--white);
}

.indp-hero__intro {
  max-width: 62ch;
  margin-bottom: 0;
  opacity: 0.88;
}

/* The sketch sits on its own white ground, framed like a drawing sheet. */
.indp-hero__figure {
  margin: 0;
  padding: var(--space-2);
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
}

.indp-hero__figure img {
  display: block;
  width: 100%;
  height: auto;
}

/* Four numbered considerations, two by two. */
.indp-shapes {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

@media (min-width: 768px) {
  .indp-shapes { grid-template-columns: repeat(2, 1fr); }
}

.indp-shape {
  position: relative;
  padding: var(--space-4) var(--space-4) var(--space-4) calc(var(--space-4) + 3.25rem);
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--process-orange);
}

.indp-shape__num {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--process-orange);   /* large display numerals: 3:1 applies */
}

.indp-shape__title {
  margin-bottom: var(--space-1);
  font-size: 1.125rem;
}

.indp-shape p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9688rem;
}

/* Systems / deliverables / related services. */
.indp-panels {
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 900px) {
  .indp-panels { grid-template-columns: repeat(3, 1fr); }
}

.indp-links {
  margin: 0;
  padding: var(--space-1) var(--space-3) var(--space-2);
  list-style: none;
}

.indp-links li + li { border-top: 1px dashed var(--border); }

.indp-links a {
  display: block;
  padding: 0.6rem 0;
  text-decoration: none;
}

.indp-links strong {
  display: block;
  font-size: 0.9688rem;
  color: var(--petrol-blue);
}

.indp-links span {
  display: block;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.indp-links a:hover strong { text-decoration: underline; }

/* On phones the numeral moves above the title, so the paragraph keeps the
   full card width instead of a squeezed column. */
@media (max-width: 767px) {
  .indp-shape { padding: var(--space-3); }
  .indp-shape__num { position: static; display: block; margin-bottom: var(--space-1); font-size: 1.5rem; }
}

/* --- About ---------------------------------------------------------------- */

.ab-statement h1 { font-size: clamp(2rem, 5vw, 3.5rem); }

/* Key figures on the dark band. */
.ab-stats { background: var(--deep-ink); color: var(--white); }
.ab-stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 900px) { .ab-stats__grid { grid-template-columns: repeat(4, 1fr); } }
.ab-stats__grid > div {
  padding: var(--space-4) var(--space-3);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}
.ab-stats strong { display: block; font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; line-height: 1; color: var(--orange-light); }
.ab-stats span { display: block; margin-top: 6px; font-size: 0.875rem; opacity: 0.85; }

/* Story text beside a milestones panel. */
.ab-story { display: grid; gap: var(--space-5); align-items: start; }
@media (min-width: 900px) { .ab-story { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-6); } }
.ab-story__text p { max-width: 64ch; }

/* Milestones as a vertical timeline: a petrol rule with orange nodes. */
.ab-milestones {
  margin: 0;
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5);
  list-style: none;
  border: 1px solid var(--border);
  border-top: 3px solid var(--petrol-blue);
  background: var(--white);
}
.ab-milestones li {
  position: relative;
  padding: 0 0 var(--space-3);
}
.ab-milestones li:last-child { padding-bottom: 0; }
/* The connecting line, drawn on every node but the last. */
.ab-milestones li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-3) + 5px);
  top: 14px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.ab-milestones li::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-3));
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--process-orange);
}
.ab-milestones li:last-child::before { background: var(--process-orange); }
.ab-milestones strong { display: block; font-size: 1.25rem; font-weight: 700; color: var(--petrol-blue); line-height: 1.2; }
.ab-milestones span { display: block; margin-top: 4px; font-size: 0.9375rem; line-height: 1.5; color: var(--text-muted); }

/* Six-step approach as a row of cards. */
.ab-approach {
  display: grid;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) { .ab-approach { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .ab-approach { grid-template-columns: repeat(6, 1fr); } }

.ab-approach li {
  padding: var(--space-3);
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--petrol-blue);
}
.ab-approach li:last-child { border-top-color: var(--process-orange); }
.ab-approach__num {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--orange-text);
}
.ab-approach strong { display: block; color: var(--petrol-blue); font-size: 1.0625rem; }
.ab-approach li > span:last-child { display: block; margin-top: 4px; font-size: 0.875rem; line-height: 1.45; color: var(--text-muted); }

/* Values. */
.ab-values { margin: 0; padding: 0; list-style: none; }
.ab-values strong { display: block; color: var(--petrol-blue); font-size: 0.9688rem; }
.ab-values span { display: block; font-size: 0.875rem; color: var(--text-muted); }

.ab-values--grid { display: grid; gap: var(--space-2); }
@media (min-width: 640px) { .ab-values--grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ab-values--grid { grid-template-columns: repeat(3, 1fr); } }
.ab-values--grid li { padding: var(--space-3); background: var(--white); border: 1px solid var(--border); border-left: 3px solid var(--process-orange); }

/* Industry hero: the sector sketch as a tinted backdrop. The tint is nearly
   solid where the text sits and lighter towards the right, so the white
   lines of the drawing read as texture without costing text contrast. */
.indp-hero {
  background-color: var(--petrol-blue);
  background-image:
    linear-gradient(rgba(11, 79, 108, 0.9), rgba(11, 79, 108, 0.9)),
    var(--hero-img);
  background-size: cover;
  background-position: center;
}

@media (min-width: 1024px) {
  .indp-hero {
    background-image:
      linear-gradient(90deg, rgba(11, 79, 108, 0.96) 0%, rgba(11, 79, 108, 0.92) 45%, rgba(11, 79, 108, 0.8) 100%),
      var(--hero-img);
    background-position: right center;
  }
}

/* Service intro: moved out of the hero so every service hero is the same
   height; it now introduces the block diagram. */
.svcb-intro {
  max-width: 78ch;
  margin: 0 0 var(--space-4);
  font-size: 1.0625rem;
  color: var(--deep-ink);
}

/* Constant hero height across the four service pages: a wider spec panel
   keeps its rows on one line, a slightly smaller title keeps the longest
   name ("3D Plant Modeling & Coordination") on one line at desktop width,
   and a min-height covers the in-between widths where it still wraps. */
@media (min-width: 1024px) {
  .svcb-hero__inner {
    grid-template-columns: minmax(0, 1fr) 430px;
    align-items: center;
    min-height: 248px;   /* just above the tallest spec panel (software on two lines) */
  }
  .svcb-hero h1 { font-size: clamp(2rem, 3.2vw, 2.625rem); }
}

/* --- Projects ---------------------------------------------------------------- */

.proj-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}
.proj-filter[hidden] { display: none; }

.proj-filter button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--deep-ink);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.proj-filter button:hover { border-color: var(--petrol-blue); }
.proj-filter button[aria-pressed="true"] {
  background: var(--petrol-blue);
  border-color: var(--petrol-blue);
  color: var(--white);
}

.proj-grid {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 768px) { .proj-grid { grid-template-columns: repeat(2, 1fr); } }

/* One project as a datasheet: title block, three data cells, scope. */
.proj {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--petrol-blue);
  box-shadow: var(--shadow-1);
}
.proj[hidden] { display: none; }

.proj__head {
  padding: var(--space-3) var(--space-3) var(--space-2);
}
.proj__sector {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-text);
}
.proj__title {
  margin: 0;
  font-size: 1.25rem;
}

.proj__data {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));   /* cells may shrink below their longest word */
  margin: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.proj__data > div { padding: var(--space-2) var(--space-3); }
.proj__data > div + div { border-left: 1px solid var(--border); }
.proj__data dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.proj__data dd {
  margin: 2px 0 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--petrol-blue);
}

.proj__scope { padding: var(--space-2) var(--space-3) var(--space-3); }
.proj__scope h3 {
  margin: var(--space-2) 0 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--deep-ink);
}
.proj__scope ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.proj__scope li {
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--mist);
  font-size: 0.8125rem;
  color: var(--deep-ink);
}

.proj__data dt,
.proj__data dd { overflow-wrap: anywhere; }

@media (max-width: 400px) {
  .proj__data > div { padding: var(--space-2) var(--space-1) var(--space-2) var(--space-2); }
  .proj__data dd { font-size: 0.9375rem; }
}

/* Closing tile on the projects grid. */
.proj-more {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--petrol-blue);
  color: var(--white);
  border-top: 3px solid var(--process-orange);
}
.proj-more__num {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--orange-light);
}
.proj-more p { margin: 0; max-width: 44ch; color: var(--white); }

/* --- 404 -------------------------------------------------------------------- */

.nf-hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
.nf-hero .btn-group { margin-top: var(--space-3); }

.nf-links {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 768px) { .nf-links { grid-template-columns: repeat(3, 1fr); } }

.nf-links h2 {
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 3px solid var(--process-orange);
  font-size: 1.125rem;
}
.nf-links ul { margin: 0; padding: 0; list-style: none; }
.nf-links li + li { border-top: 1px dashed var(--border); }
.nf-links a {
  display: block;
  padding: 0.6rem 0;
  color: var(--petrol-blue);
  font-weight: 600;
  text-decoration: none;
}
.nf-links a:hover { text-decoration: underline; }
