/* ==========================================================================
   Gemilang Engineering Sdn. Bhd.
   Homepage stylesheet
   Static preview build. Ports to a WordPress classic theme without changes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand. Sampled from the GE gear mark. */
  --red:        #BE1622;
  --red-600:    #A5121C;
  --red-700:    #8A0F17;
  --red-tint:   #FBECED;

  /* Ink and neutrals. Never pure black. */
  --ink:        #15181B;
  --ink-800:    #1D2226;
  --ink-700:    #272D32;
  --slate:      #454C52;
  --muted:      #6E7880;
  --muted-2:    #99A2AA;
  --line:       #E4E7EB;
  --line-2:     #EFF1F4;
  --bg:         #FFFFFF;
  --bg-alt:     #F6F7F9;

  /* On dark surfaces */
  --on-dark-muted:  #A7B0B8;
  --on-dark-line:   rgba(255,255,255,.12);

  /* Type */
  --font-display: "Inter Tight", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body:    "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Type scale. ONE size per level, used everywhere, no per-section
     overrides. Only the breakpoint blocks below may change these. */
  --fs-h1:    64px;   /* hero headline, once per page */
  --fs-h2:    40px;   /* every section title */
  --fs-h3:    24px;   /* reserved for sub-headings */
  --fs-label: 13px;   /* every uppercase card title and eyebrow */
  --fs-stat:  42px;   /* the four counters */
  --fs-body:  16px;
  --fs-small: 14px;

  /* Layout */
  --container: 1400px;
  /* Scrollbar width, measured by main.js. 100vw counts the scrollbar and 100%
     does not, and a full-bleed block that has to line its copy up with
     .container needs the difference. 0 is a safe default: without JS the only
     cost is being off by the width of a scrollbar. */
  --gutter: clamp(20px, 4vw, 40px);

  /* The curve the project cards move on. Gentler than the expo-out the
     reference uses: cubic-bezier(.19, 1, .22, 1) leaves at enormous speed and
     then crawls its last few percent, which on a collapsing height reads as a
     lurch followed by a drag. This decelerates evenly. */
  --ease-smooth: cubic-bezier(.33, 1, .68, 1);
  /* easeOutExpo. cpet's "Why choose rPET" accordion runs every size change on
     this curve: nearly all of the distance is covered in the first third, so a
     card that takes over a second to open still feels like it answered at
     once. --ease-smooth is gentler and, over the same duration, reads as slow
     rather than as weighty. Used by the Our Principles cards. */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  /* easeOutQuint, cpet's page-wide ease, for colour rather than size. */
  --ease-quint: cubic-bezier(0.22, 1, 0.36, 1);

  /* Shape lock: buttons 3px, cards and media 6px. Nothing else. */
  --r-btn:  3px;
  --r-card: 6px;

  /* Shadows tinted to the ink hue. No pure black. */
  --shadow-sm: 0 1px 2px rgba(21,24,27,.05), 0 1px 3px rgba(21,24,27,.05);
  --shadow-md: 0 4px 14px rgba(21,24,27,.07), 0 2px 4px rgba(21,24,27,.04);
  --shadow-lg: 0 14px 38px rgba(21,24,27,.11), 0 4px 10px rgba(21,24,27,.05);

  /* Motion */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --dur:  .5s;

  --header-h: 88px;
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: light;          /* pinned light. The design has no dark variant. */
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  letter-spacing: -0.01em;
  color: var(--slate);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
}

p { margin: 0; }

/* No word left alone on a last line. text-wrap: pretty asks the line breaker
   to avoid ending a block on a single word, pulling one back from the line
   above instead. Purely typographic: it changes where a line breaks, never how
   much room the text takes or where anything sits. */
p, li, dd, dt, figcaption, address, blockquote { text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s var(--ease);
}

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input { font: inherit; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  border-radius: var(--r-btn);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(56px, 8vw, 96px); }

/* Pinned, and competing with a sticky header for vertical room. Tighter
   padding here keeps the whole block inside the visible area without
   having to shrink the photograph. */
/* No override. About used to run tighter than everything else to buy height
   for the photograph, but 52px against 96px everywhere else reads as a
   different amount of air around the section, which it should not. The vh cap
   on the photograph column absorbs the difference instead. */
.section--alt { background: var(--bg-alt); }

/* Partners and Testimonials sit on the same white ground, so the usual
   96 + 96 between them has nothing holding it up: that much air is earned by a
   change of colour, and there is no change here. Trimmed to 60 a side, which
   is still comfortably more than the 56px either section uses between its own
   heading and its content, so the break still reads as a break.

   Keyed off the adjacency rather than set on the sections themselves, so it
   stops applying the moment either one moves or a coloured section lands
   between them. */
#partners:has(+ #testimonials) { padding-bottom: clamp(36px, 4vw, 60px); }
#partners + #testimonials { padding-top: clamp(36px, 4vw, 60px); }

/* --------------------------------------------------------------------------
   4. Section headings
   -------------------------------------------------------------------------- */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.2;
  max-width: 20ch;
}

.rule {
  width: 56px;
  height: 3px;
  background: var(--red);
  border: 0;
  margin: 18px 0 0;
  border-radius: 2px;
}

.head-center { text-align: center; }
.head-center .section-title { margin-inline: auto; max-width: 24ch; }
.head-center .rule { margin-inline: auto; }

.head-split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  /* Matches .svc__head. Without it the heading sat flush against the grid
     below, because nothing else in the section was supplying the gap. */
  margin-bottom: clamp(32px, 4vw, 52px);
}

/* --------------------------------------------------------------------------
   5. Buttons and links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--r-btn);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;              /* CTA labels never wrap */
  transition: background-color .25s var(--ease),
              color .25s var(--ease),
              border-color .25s var(--ease),
              transform .18s var(--ease),
              box-shadow .25s var(--ease);
}
.btn i { font-size: 15px; }

.btn--primary {
  background: var(--red);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--red-600); box-shadow: var(--shadow-md); }
.btn--primary:active { transform: translateY(1px); box-shadow: var(--shadow-sm); }

.btn--outline {
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: #fff;
}
.btn--outline:hover { border-color: var(--red); color: var(--red); }
.btn--outline:active { transform: translateY(1px); }

/* Inline red text link with a caret */
.link-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--red);
}
.link-more i { transition: transform .25s var(--ease); }
.link-more:hover i { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   6. Topbar
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 40px;
}
.topbar__list {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.topbar__item i { color: #fff; font-size: 15px; }
/* Dimmed, not brightened. The base is white now, so the old hover to #fff
   was no change at all and the links lost their feedback. */
.topbar a:hover { color: rgba(255, 255, 255, .72); }

.topbar__social { display: flex; align-items: center; gap: 14px; }
/* Same trick, smaller: these were a 15px target long before the border came
   off anything. */
.topbar__social a { display: grid; place-items: center; padding: 6px; margin: -6px; }

/* --------------------------------------------------------------------------
   7. Header and navigation
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line-2);
  transition: box-shadow .3s var(--ease);
}
.header.is-stuck { box-shadow: var(--shadow-md); }

.header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--header-h);      /* nav height capped well under 80px */
}

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 68px; width: auto; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 26px; }

.nav__link {
  position: relative;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--slate);
  padding-block: 6px;
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--red); }

/* --- Services dropdown ------------------------------------------------- */
/* The drawer's arrow button and logo (added by main.js); not part of the
   desktop bar. */
.nav__sub, .nav__brand { display: none; }
.nav__item { position: relative; }

.nav__caret {
  font-size: 12px;
  margin-left: 4px;
  vertical-align: middle;
  transition: transform .25s var(--ease);
}
.nav__item--dropdown:hover .nav__caret,
.nav__item--dropdown:focus-within .nav__caret,
.nav__item--dropdown.is-open .nav__caret { transform: rotate(180deg); }

/* Invisible bridge over the gap between the link and the panel, so the
   pointer can travel down without the panel closing. Only exists while
   the item is already hovered, so it never opens the menu by itself. */
.nav__item--dropdown::after {
  content: "";
  display: none;
  position: absolute;
  top: 100%;
  left: -16px; right: -16px;
  height: calc(var(--header-h) / 2);
}
.nav__item--dropdown:hover::after,
.nav__item--dropdown:focus-within::after { display: block; }

.dropdown {
  position: absolute;
  /* The link is centred in the header, so half the link plus half the header
     lands the panel exactly on the header's bottom edge, at any breakpoint. */
  top: calc(50% + var(--header-h) / 2 + 1px);
  left: -16px;
  min-width: 252px;
  padding: 8px 0;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .22s var(--ease),
              transform .22s var(--ease),
              visibility .22s var(--ease);
  z-index: 55;
}
.nav__item--dropdown:hover .dropdown,
.nav__item--dropdown:focus-within .dropdown,
.nav__item--dropdown.is-open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--slate);
  white-space: nowrap;
  border-left: 2px solid transparent;
  transition: background-color .2s var(--ease),
              color .2s var(--ease),
              border-color .2s var(--ease);
}
.dropdown a:hover {
  background: var(--bg-alt);
  color: var(--red);
  border-left-color: var(--red);
}

.header__cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--ink);
  border-radius: var(--r-btn);
}
.nav-toggle:hover { background: var(--bg-alt); }

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(21,24,27,.5);
  opacity: 0;
  visibility: hidden;
  z-index: 60;
  transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
.nav-backdrop.is-open { opacity: 1; visibility: visible; }

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(460px, 64vh, 640px);
  isolation: isolate;
  overflow: hidden;
  background: var(--ink);
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;   /* keeps the hard hat and blueprints in frame */
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(15,18,21,.94) 0%,
    rgba(15,18,21,.88) 24%,
    rgba(15,18,21,.62) 44%,
    rgba(15,18,21,.18) 63%,
    rgba(15,18,21,0)   80%
  );
}

.hero__inner { padding-block: clamp(56px, 8vw, 88px) clamp(84px, 10vw, 118px); }

.hero__content { max-width: 540px; }

.hero__title {
  font-size: var(--fs-h1);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: #fff;
}
.hero__title span { display: block; }
/* .is-light no longer changes anything, and that is on purpose. The two lines
   used to be set apart twice over: 500 against 700, and white at 90% against
   white at 100%. Both halves are one weight and one white now. The class is
   left on the markup so the split is still addressable if the two-tone
   treatment is ever wanted back. */

.hero__rule {
  width: 68px; height: 3px;
  background: var(--red);
  border: 0;
  margin: 22px 0 20px;
  border-radius: 2px;
}

.hero__text {
  color: rgba(255,255,255,.84);
  font-size: var(--fs-body);
  max-width: 44ch;
  margin-bottom: 30px;
}

/* --------------------------------------------------------------------------
   9. Value strip. Overlaps the hero lower edge.
   -------------------------------------------------------------------------- */
.values { position: relative; z-index: 3; margin-top: clamp(-72px, -6vw, -48px); }

.values__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.value {
  display: flex;
  gap: 14px;
  padding: 26px 24px;
  border-right: 1px solid var(--line-2);
}
.value:last-child { border-right: 0; }

.value__icon {
  flex-shrink: 0;
  font-size: 26px;
  color: var(--red);
  line-height: 1;
  margin-top: 2px;
}
/* An actual heading, not a label. This was the eyebrow treatment applied to a
   title: 13px, 700, uppercase, .1em of tracking, in the body face. Four of
   those in a row against 13.5px grey gives the block no hierarchy at all, and
   the wide-tracked caps read as a tag rather than a statement.

   Now it is set the way every other heading on the site is: the display face,
   sentence case, and --fs-h3, which is the level this actually sits at and was
   otherwise unused. The size is what creates the hierarchy, so the weight can
   come down to the 600 the section titles use. */
.value__title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 7px;
}
.value__text { font-size: var(--fs-small); line-height: 1.55; color: var(--muted); }

/* --------------------------------------------------------------------------
   10. About
   -------------------------------------------------------------------------- */
/* The photograph column is capped rather than given a share of the width. The
   two About images are square, and the only way to show a square photograph
   without cutting a third of the building away is to let it stay square, which
   means the column cannot grow to whatever is left over.

/* Three things fight over this row and all three are load-bearing.

   The photograph column is capped rather than given a share of the width,
   because the files are 4:3 and a frame that is not 4:3 crops the building.

   The cap is partly in vh because capping the width caps the height too: the
   section is pinned and has to fit under a sticky header. 85vh of width at 4:3
   is 64vh of height, which leaves room for the section's full padding. Short
   windows are the binding case, not tall ones — recompute this if the ratio,
   the container width, or the section padding changes.

   The gap is small on purpose. A wide one leaves dead space between the end of
   the text and the start of the photograph on top of the gap itself.

   What limits the photograph here is the text column, not the pin: at 1400 the
   row has 1320px to divide, so the measure, the gap and the photograph are one
   sum. The paragraph needs 550px to set in four lines instead of five, which
   is what fixes its size, and the photograph gets what is left. */
.about__grid {
  display: grid;
  grid-template-columns: 1fr minmax(0, min(720px, 85vh));
  gap: clamp(20px, 2.2vw, 32px);
  align-items: center;
}
.about__text p {
  margin-top: 22px;
  /* 56ch, measured rather than picked. This paragraph needs 550px to set in
     four lines; under that it takes five and the last one is a short widow.
     56ch comes out at about 566px, which clears it with a little to spare for
     a different font render.

     This is the other half of the photograph's size. The row has 1320px to
     divide, so the measure, the gap and the photograph are one sum: widening
     this narrowed the photograph, and the gap gave back what it could. */
  max-width: 56ch;
}
.about__actions { margin-top: 28px; }

/* One column now that mission/vision/values have their own section; this is
   just the photograph, and the frame around it. No min-height: the ratio below
   sets the size, and a floor as well would only fight it. */
.about__visual {
  display: grid;
  grid-template-columns: 1fr;
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* 4:3, which is what the files are: 1600x1200. object-fit does not stretch a
   photograph, it crops one, so matching the source ratio is the difference
   between showing the whole building and cutting part of it away. It is the
   same ratio at every breakpoint now, so nothing is ever cropped. The ratio
   still has to be written down, because nothing else constrains the height
   once the frame is in a column of its own. */
.about__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--line-2);
}
/* Absolute, or the height is circular: the box sized from the image and the
   image sized at 100% of the box. The browser resolves that by falling back to
   the file's own 1:1 and the aspect-ratio above is ignored. */
.about__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Mission, vision, values: a click accordion

   Modelled on the cpet "Drivers of rPET adoption" section and translated onto
   this site's tokens: their orange is --red, their frosted white card is this
   site's white card with a --line hairline and a soft shadow, their dark open
   card is --ink, and the radius is --r-card like everything else here.

   Heading on the left, three cards stacked on the right. A closed card is one
   row: icon and title. The open card turns dark, stands its icon above the
   title, and reveals its copy. One is open at a time, the first by default,
   and it is moved by both scroll and click, as on cpet: the section pins and
   scroll walks the cards, while a click can take over at any point. main.js
   holds the driver; the only thing the stylesheet knows is is-active.

   The copy reveals through grid-template-rows, not the height: auto
   interpolation cpet uses. Same motion, and it works outside Chrome.
   -------------------------------------------------------------------------- */
.mission {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr);
  gap: clamp(40px, 6vw, 110px);
  align-items: center;
}
/* The title sets on one line, so it is the thing that decides how narrow the
   left column may get: 20ch is roughly its own width, and the column's own
   minmax(280px, .82fr) never takes it below that at any width where the two
   columns exist. The paragraph is the narrower of the two on purpose. */
.mission__head .section-title { max-width: 20ch; text-wrap: nowrap; }
.mission__lead {
  margin: 22px 0 0;
  max-width: 44ch;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--muted);
}

/* Pinned. The frame is the visible area below the header -- not the whole
   window -- and the content centres inside it. That is the whole trick: the
   header is sticky, so a section pinned to the top of the window has its first
   88px covered, and centring in the window puts the eyebrow and half the title
   behind it. Sized and pinned to the area under the header instead, the block
   is centred in what the reader can actually see.

   The section keeps no padding of its own here; the centring is the spacing.

   Two floors, paired with the pin queries in main.js -- change one, change the
   other.

   580px from 1025px wide. That number is the point of the vh clamps on the
   cards: at full fixed spacing the block needed 660px here, which meant the
   section quietly stopped pinning on an ordinary laptop, since a 768px-tall
   screen leaves a browser about 620px of viewport once its chrome is out.

   660px between 861px and 1024px, where the heading stacks above the cards
   instead of sitting beside them. That costs around 80px, and at 580px of
   window the stack then fits with 1px to spare -- true, and no use to anyone.
   Cards with room to breathe are worth more than pinning inside a hand-shrunk
   window, which is the only thing in that range: no screen is 900px wide.

   Both measured, at every width where the behaviour changes. If the card copy
   grows again, measure them again. */
@media (min-width: 1025px) and (min-height: 580px),
       (min-width: 861px) and (max-width: 1024px) and (min-height: 660px) {
  #mission {
    display: grid;
    align-content: center;
    /* The token is the header's min-height; its 1px bottom border sits on top
       of that, and the pin measures the real box. Subtract both or the section
       ends 1px past the fold. */
    min-height: calc(100svh - var(--header-h) - 1px);
    padding-block: 0;
  }
}

/* Below the two-column layout the title has the full width, so it does not
   need the cap -- and it must be allowed to wrap again, since on a phone one
   line of 40px type does not fit. */
@media (max-width: 1024px) {
  .mission__head .section-title { text-wrap: balance; }
}

.pillars { display: grid; gap: clamp(8px, 1.6vh, 14px); }

.pillar {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* vh, not a breakpoint step. The pinned section has to hold a whole viewport
     minus the header, so how much room a card may take is a function of the
     window's height -- and saying it that way is what let two blocks of
     compaction overrides, which guessed at the same thing in steps, come out.
     A tall window gets the full 32px; a 580px one, the shortest that still
     pins, gets 23px. min-height went with them: the padding sets the row's
     height now, so there is nothing holding it taller than its own type. */
  padding: clamp(20px, 4vh, 32px) clamp(30px, 3vw, 42px);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: 0 10px 30px rgba(15, 17, 21, .05);
  color: var(--ink);
  /* cpet's timings, not round numbers of my own: size on the expo curve and
     over a second (padding 1050ms, the copy row 1150ms below), colour on the
     quint curve at 850ms. Everything used to run together at 600ms, which is
     what made this feel quicker and flatter than the section it is modelled
     on -- the whole card arrived at once and was over before it registered.
     Split across two clocks, the panel darkens while it is still growing. */
  transition: background-color .85s var(--ease-quint),
              border-color .85s var(--ease-quint),
              box-shadow .85s var(--ease-quint),
              color .85s var(--ease-quint),
              min-height 1.05s var(--ease-expo),
              padding 1.05s var(--ease-expo);
}
.pillars.is-accordion .pillar { cursor: pointer; }
.pillars.is-accordion .pillar.is-active { cursor: default; }
.pillar:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* Closed: icon and title share one row. Open: the icon stands above. */
.pillar__row { display: flex; align-items: center; gap: clamp(24px, 3.4vh, 40px); }
/* Vertical in the open card, so it scales with the window like the padding. */
.pillar.is-active .pillar__row { flex-direction: column; align-items: flex-start; gap: clamp(16px, 3.4vh, 40px); }

.pillar__icon {
  flex: none;
  font-size: 28px;
  line-height: 1;
  color: var(--red);
  transition: color .85s var(--ease-quint);   /* with the panel, not the size */
}
.pillar__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.1;
  color: inherit;
}

/* The copy. Open is the default state so that, with JS off or below the
   breakpoint, all three cards simply show in full; only under is-accordion do
   the closed cards collapse. Row-sized, so nothing is ever clipped early. */
.pillar__reveal {
  display: grid;
  grid-template-rows: 1fr;
  margin-top: clamp(14px, 3vh, 40px);
  opacity: 1;
  transition: grid-template-rows 1.15s var(--ease-expo),
              margin-top 1.05s var(--ease-expo),
              opacity .65s var(--ease-quint) .12s;
  /* No will-change. grid-template-rows and margin animate layout, which
     will-change cannot hand to the compositor, so all it did here was ask for
     a layer the browser then has to keep in sync -- work, during exactly the
     frames where the pin is being handed over. */
}
.pillar__text {
  margin: 0;
  min-height: 0;
  overflow: hidden;
  max-width: 56ch;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--muted);
  /* The copy is the slowest thing in the card and starts a beat late, so it
     reads as arriving into a panel that is already opening rather than with
     it. cpet staggers several paragraphs this way; there is one here. */
  transition: opacity .65s var(--ease-quint),
              transform .9s var(--ease-expo),
              color .85s var(--ease-quint);
}
.pillars.is-accordion .pillar:not(.is-active) .pillar__reveal {
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  /* Closing keeps the same clocks as opening so the row never outruns its own
     copy, but with no delay on the fade -- a delay on the way out is what
     turns a collapse into two separate moves. */
  transition: grid-template-rows 1.15s var(--ease-expo),
              margin-top 1.05s var(--ease-expo),
              opacity .5s var(--ease-quint);
}
.pillars.is-accordion .pillar:not(.is-active) .pillar__text { transform: translateY(14px); }

/* The card being closed, for as long as its collapse runs. Opening and closing
   are deliberately not mirror images, which is the other half of why cpet's
   version feels the way it does: the copy comes in slowly from below and
   leaves quickly upwards, so a swap reads as one card handing over to the next
   rather than as the same animation played backwards. */
.pillars.is-accordion .pillar.is-closing .pillar__text {
  transform: translateY(-8px) scale(.96);
  transition-duration: .22s;
  transition-delay: 0ms;
}

/* The open card. */
.pillar.is-active {
  /* More than a closed row, and on the same vh footing. */
  padding: clamp(24px, 5.2vh, 44px) clamp(30px, 3vw, 42px);
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 22px 50px rgba(15, 17, 21, .18);
  color: #fff;
}
.pillar.is-active .pillar__icon { color: #fff; }
.pillar.is-active .pillar__text { color: rgba(255, 255, 255, .78); }

@media (max-width: 1024px) {
  .mission { grid-template-columns: 1fr; gap: 36px; }
  .mission__head .section-title { max-width: none; }
  .mission__lead { max-width: 60ch; }
}

/* One column, and still pinned, so the whole stack has to fit a window that is
   no longer sharing its height with a second column. What is left here is only
   what is genuinely about being one column: the row gap that now exists
   between the heading and the cards, slightly tighter side padding at this
   width, and the copy let off its 56ch measure because a full-width card needs
   fewer lines for it. The vertical spacing that used to be overridden here
   rides the vh clamps in the base rules instead. */
@media (min-width: 861px) and (max-width: 1024px) {
  .mission { row-gap: clamp(14px, 2.6vh, 22px); }
  .mission__lead { margin-top: clamp(10px, 2.2vh, 22px); max-width: none; }
  /* The same padding, capped lower. One column puts the heading above the
     cards rather than beside them, so the stack is about 80px taller before
     any padding is counted, and the wide range's ceiling overflows a window
     this shape: at 861x660 it wanted 599px of the 571px on offer. The floor is
     the same 20px/24px, so a short window here looks like a short window
     anywhere; only the growth is held back. */
  .pillar { padding: clamp(20px, 3vh, 24px) clamp(26px, 2.6vw, 34px); }
  .pillar.is-active { padding: clamp(24px, 3.6vh, 30px) clamp(26px, 2.6vw, 34px); }
  .pillar__text { max-width: none; }
}

/* Phones and small tablets: the tap accordion (main.js). The open card keeps
   the closed row's padding so a tap does not shove the cards below it about,
   and it stays tappable, because a second tap closes it here. */
@media (max-width: 860px) {
  .pillars.is-accordion .pillar.is-active { cursor: pointer; padding: 22px 24px; }
  .pillar__text { max-width: none; }
}

/* --- Under construction to completed -------------------------------------
   Two photographs of the same building from the same camera. The
   under-construction one sits on top and wipes away as the section scrolls,
   so the building genuinely finishes rather than changing colour.
   One custom property drives the clip and the edge together, which keeps
   them locked to the same position.
   Default is fully wiped: with JS off, or if GSAP fails to load, the
   finished photograph is simply what shows.
   ---------------------------------------------------------------------- */
.about__photo { --wipe: 100%; overflow: hidden; }

.about__draft {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--wipe));
  pointer-events: none;
}
.about__draft img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The wipe edge, read as a drafting rule crossing the sheet. */
.about__seam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--wipe);
  width: 1px;
  background: var(--red);
  box-shadow: 0 0 10px rgba(190, 22, 34, .45);
  opacity: 0;
  pointer-events: none;
}

/* Line masks for the headline reveal. Built by JS; harmless if it never runs. */
/* Every headline the splitter touches, not just About's. Two things were
   wrong while this was scoped there.

   The splitter emits one <span class="line"> per line with nothing between
   them, so with the spans left inline the lines run together as one string
   and the space at each break disappears: the Projects headline rendered as
   "Excellence,Delivering Results" and then wrapped in the wrong place because
   there was no longer a space to break at.

   The mask was missing too. The entrance sets yPercent: 115 and slides each
   line up, which is only a reveal if something is clipping it; without
   overflow: hidden the line was simply visible the whole way. The class is
   put on by the splitter, so this cannot apply to markup it did not build. */
.is-split .line { display: block; overflow: hidden; }
.is-split .line > span { display: block; will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  /* No wipe, no seam. The finished photograph, immediately. */
  .about__photo { --wipe: 100% !important; }
  .about__seam { display: none; }
}

/* --------------------------------------------------------------------------
   11. Services: index with a live preview

   Six identical icon cards is the pattern this replaces. A vertical index in
   large type scans faster, and the preview gives the section the imagery a
   card grid never had room for.
   -------------------------------------------------------------------------- */
.svc__head {
  margin-bottom: clamp(32px, 4vw, 52px);
  text-align: center;
}
/* Centred, so the headline needs its own centring rather than the left
   aligned max-width it inherits from .section-title. The measure goes with
   it: this one reads as a single line, and the inherited 20ch was the only
   thing breaking it. Narrow windows still wrap it, and balance is there for
   when they do. */
.svc__head .section-title {
  margin-inline: auto;
  max-width: none;
  text-wrap: balance;
}
/* .rule is left aligned by default, which is right everywhere else on the
   page. This head is the one that is centred. */
.svc__head .rule { margin-inline: auto; }

/* Cards, not a pinned index. Every service is on screen at once and the
   reader picks one, rather than the scroll position deciding which of the six
   they are allowed to read. Six of them go three up, which fills two even
   rows; a four column grid would leave the second row half empty. */
.svc__grid {
  display: grid;
  /* Four services, so four across: three left the last card alone on a row. */
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 2vw, 30px);
}

.svc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              border-color .3s var(--ease);
}
.svc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

/* The photography is square. Landscape here keeps the card from towering,
   and object-fit takes the crop off the top and bottom rather than squashing. */
.svc-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-alt);
}
/* Absolute, so the frame's height comes from its aspect-ratio alone. Left in
   flow, the height would be circular (the box sized by the image, the image
   sized at 100% of the box), and the browser resolves that by falling back to
   the file's own 1:1, which makes every card 170px taller than it should be
   and undoes the crop entirely. */
.svc-card__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.svc-card:hover .svc-card__media img { transform: scale(1.04); }

/* Straddling the bottom edge is what ties the icon to the photograph rather
   than letting it read as the first line of the text block. */
.svc-card__badge {
  position: absolute;
  left: 22px;
  bottom: -26px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--shadow-md);
  color: var(--red);
  font-size: 24px;
}

.svc-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 42px 24px 26px;   /* the top clears the badge */
  flex: 1;
}

.svc-card__name {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.25;
}

.svc-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 0;
  padding: 0;
  list-style: none;
}
.svc-card__tags li {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1;
}

.svc-card__text { margin: 0; color: var(--muted); }

/* Pushed to the foot so the links line up across a row however long the copy
   above them runs. */
.svc-card__more { margin-top: auto; padding-top: 6px; }
/* The whole card is clickable, but there is still only one link in the
   accessibility tree rather than a card full of them. */
.svc-card__more::after { content: ""; position: absolute; inset: 0; }

.svc__footer { margin-top: clamp(32px, 4vw, 48px); text-align: center; }

/* Kept with the component rather than in the shared breakpoint blocks, so the
   whole of Services is readable in one place. */
@media (max-width: 1100px) {
  .svc__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .svc__grid { grid-template-columns: 1fr; }
  .svc-card__body { padding: 38px 20px 22px; }
}

/* --------------------------------------------------------------------------
   12. Projects: photographic cards that open on hover

   Built to match the Ingenious Corporate projects section, translated onto
   this site's tokens rather than pasted: their navy and gold become --ink and
   --red, Gotham becomes Inter Tight, and the sizes come from the type scale so
   the block cannot drift off it.

   The whole card is one photograph under a scrim. The title sits at the foot
   and is always readable; the three detail pairs are collapsed to zero height
   and only open on hover, which is what keeps four cards this size from being
   a wall of small print.

   One deliberate difference: 6px corners, because everything else on this page
   is 6px. Theirs are square.
   -------------------------------------------------------------------------- */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 3.4vw, 50px) clamp(18px, 2vw, 30px);
}

.project {
  position: relative;
  display: block;
  aspect-ratio: 645 / 540;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--r-card);
  background: var(--ink);
  color: #fff;
}

.project img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  /* Not scale(1): a transform of exactly none can leave the browser
     rasterising the image again on hover instead of promoting it once. */
  transform: scale(1.001);
  /* Slower than everything else on purpose: a photograph that scales at the
     same rate as the text reads as the whole card zooming, where a slower one
     reads as depth behind it. */
  transition: transform .8s var(--ease-smooth), filter .8s var(--ease-smooth);
}

/* Two gradients: one up the frame to seat the copy, one across it so the
   left-hand text has a darker ground than the right. */
.project::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(rgba(0,0,0,.06) 0%, rgba(0,0,0,.16) 44%, rgba(0,0,0,.78) 100%),
    linear-gradient(90deg, rgba(0,0,0,.2), rgba(0,0,0,0));
  transition: background .5s var(--ease-smooth);
}
/* The accent bar along the foot of the card. */
.project::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9px;
  background: var(--red);
  z-index: 5;
}

.project__loc {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 13px 8px;
  background: rgba(21, 24, 27, .86);
  color: #fff;
  font-size: var(--fs-small);
  line-height: 1.4;
}

.project__copy {
  position: absolute;
  left: clamp(20px, 2.2vw, 30px);
  right: clamp(20px, 2.2vw, 30px);
  bottom: clamp(26px, 2.6vw, 36px);
  z-index: 4;
  transition: transform .5s var(--ease-smooth);
}

.project__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  text-wrap: balance;
  color: #fff;
}

/* The collapsing row animates grid-template-rows, not max-height, and that
   is the whole fix for the hitch on the way out.

   max-height has to be given a number, and any number big enough to hold the
   content at every breakpoint is far bigger than the content actually is:
   three columns of one label and one value come to 43px, against a 190px cap.
   So 77% of the animation ran through a range where the box was already
   shorter than the cap and nothing moved at all — about 160ms of the text
   simply fading with the height stock still, and then the last 43px snapping
   shut. Two movements, which is exactly what it looked like.

   0fr to 1fr interpolates the row against the content's real height, so every
   millisecond of the transition is visible movement and there is no dead
   range to sit through. The child needs min-height: 0 and overflow: hidden or
   the row cannot be squeezed below its content. */
.project__reveal {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  transition: grid-template-rows .5s var(--ease-smooth),
              margin-top .5s var(--ease-smooth),
              opacity .5s var(--ease-smooth);
}
/* min-height and overflow are what let the 0fr row squeeze below the
   paragraph's own height; without them the row cannot collapse at all. */
.project__text {
  margin: 0;
  min-height: 0;
  overflow: hidden;
  max-width: 52ch;
  color: rgba(255, 255, 255, .88);
  font-size: var(--fs-small);
  line-height: 1.5;
}
/* Opening. The mismatch here is deliberate: a short fade behind the slower
   opening row, so the text arrives into a space already making room for it
   rather than being dragged open with it. Declared on the hover state, so it
   governs only the way in — the way out is the even one above. */
.project:hover .project__reveal,
.project:focus-visible .project__reveal {
  transition: grid-template-rows .5s var(--ease-smooth),
              margin-top .5s var(--ease-smooth),
              opacity .3s var(--ease-smooth) .06s;
}
.project__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-top: 24px;
  color: #fff;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.project__cta::after {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--red);
  transform-origin: left center;
  transition: transform .45s var(--ease-smooth);
}

.project:hover img,
.project:focus-visible img { transform: scale(1.055); filter: saturate(.96) contrast(1.04); }
.project:hover::before,
.project:focus-visible::before {
  background:
    linear-gradient(rgba(0,0,0,.12) 0%, rgba(0,0,0,.28) 36%, rgba(0,0,0,.9) 100%),
    linear-gradient(90deg, rgba(0,0,0,.24), rgba(0,0,0,0));
}
.project:hover .project__copy,
.project:focus-visible .project__copy { transform: translateY(-8px); }
.project:hover .project__reveal,
.project:focus-visible .project__reveal { grid-template-rows: 1fr; margin-top: 22px; opacity: 1; }
.project:hover .project__cta::after,
.project:focus-visible .project__cta::after { transform: scaleX(1.45); }
.project:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }


@media (max-width: 1024px) {
  /* Six logos do not stay legible across a tablet. */
  .partners__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* No hover to open them with, so they are simply open. Keyed off the pointer
   rather than a width: a large tablet has room for two columns and still no
   way to reach anything behind a hover. */
@media (hover: none) {
  .project { aspect-ratio: auto; min-height: 440px; }
  .project__copy { transform: none; }
  .project__reveal {
    grid-template-rows: 1fr;
    margin-top: 18px;
    opacity: 1;
    transition: none;
  }
  .project__text { overflow: visible; }
}

@media (max-width: 700px) {
  .projects__grid { grid-template-columns: 1fr; }
  .project { aspect-ratio: auto; min-height: 430px; }
}

/* --------------------------------------------------------------------------
   13. Why choose us: proof panels on a dark band

   Modelled on the Ingenious Corporate "at a glance" section, translated onto
   this site's tokens: their navy becomes --ink and the figures come off the
   type scale. The panels are the design — a translucent white fill with a
   hairline border, on a dark ground — and they read as a set of measurements
   rather than as decoration.

   The section element itself carries the dark ground, so the band runs the
   full width of the window while the content sits in .container and lines up
   with every other section. That is what replaced the old arrangement, where
   two coloured panels were bled to the edges and padded back in with a
   --bleed value computed from the scrollbar width.

   Deliberate differences from the reference: 6px corners, because everything
   else on this page is 6px, and the panels lift on hover.
   -------------------------------------------------------------------------- */
.why {
  background: var(--ink);
  color: #fff;
}
.why .section-title {
  color: #fff;
  /* Balanced, or it breaks as "Your Trusted Engineering" / "Partner" and
     leaves the last word stranded. Balance minimises the longest line, which
     for this heading is the "Your Trusted" / "Engineering Partner" split, and
     it recalculates at every width instead of being pinned by a <br>. */
  text-wrap: balance;
}
/* Not the usual red. --red measures 2.9:1 on ink and this is 13px uppercase
   text, which needs 4.5:1. */
.why .eyebrow { color: rgba(255, 255, 255, .72); }

/* Title on the left, the claims beside it. Give the title a real minimum width
   so the list cannot squeeze it into four short lines. The list wraps inside
   its share instead of insisting on its max-content width. The eyebrow keeps
   its own row, with the title and list aligned in the next row. */
.why__head {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(0, 2fr);
  column-gap: clamp(28px, 4vw, 72px);
  align-items: start;
}
.why__head > .eyebrow      { grid-area: 1 / 1; }
.why__head > .section-title { grid-area: 2 / 1; }
.why__head > .why__list     { grid-area: 2 / 2; }

/* Two columns of its own, so five short lines fill the space they are given
   instead of trailing off to the right of it.

   The margin is an optical correction, not spacing. Aligning the grid rows
   lines up the boxes, but a 40px heading carries its letters about 12px below
   the top of its line box — half the leading, plus the gap from the font's
   ascender down to its cap height — while an 18px icon glyph starts about 1px
   below its own. Left alone the check marks stand 10px clear above the top of
   the title. Derived from --fs-h2 rather than written as 11px, so it follows
   the heading when the scale steps down. */
.why__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px clamp(24px, 3vw, 56px);
  align-content: start;
  justify-content: stretch;
  margin-top: calc(var(--fs-h2) * 0.28);
}
.why__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: rgba(255, 255, 255, .82);
}
.why__item i { color: #fff; font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.why__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(40px, 4.5vw, 64px);
}

.stat {
  padding: 26px 18px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: var(--r-card);
  transition: transform .35s var(--ease-smooth),
              box-shadow .35s var(--ease-smooth),
              background-color .35s var(--ease-smooth),
              border-color .35s var(--ease-smooth);
}
/* The fill lifts with the card. A translucent white can do that where the
   solid red it briefly was could not: the palette has no red lighter than
   --red, so that version could only move and not brighten. */
.stat:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .42);
  background: rgba(255, 255, 255, .11);
  border-color: rgba(255, 255, 255, .2);
}
.stat__num {
  font-family: var(--font-display);
  font-size: var(--fs-stat);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  /* White, not the accent. --red on this panel measures 2.35:1: the fill is
     7% white over ink, which blends to rgb(37,40,43), and 42px bold still
     needs 3:1. White gets 14.8:1 on the same ground. */
  color: #fff;
  font-variant-numeric: tabular-nums;   /* digits stay put while counting */
}
.stat__label {
  margin-top: 10px;
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1.3;
  color: #fff;
}

@media (max-width: 1024px) {
  /* Stacked, so the row placement is dropped and the three simply follow one
     another. The list keeps its own two columns. */
  .why__head { grid-template-columns: 1fr; }
  .why__head > .eyebrow,
  .why__head > .section-title,
  .why__head > .why__list { grid-area: auto; }
  /* Stacked, so the list spreads across the full width again instead of
     hugging a right edge it no longer has a title beside. */
  .why__head > .why__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    margin-top: 28px;
  }
  .why__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  /* Same selector shape as the 1024 rule above, or that one keeps winning:
     .why__head > .why__list outranks a bare .why__list no matter which media
     query it sits in. */
  .why__head > .why__list { grid-template-columns: 1fr; }
  /* Two by two, as on a tablet: four full-width cards read as a long list.
     Tighter padding and a smaller label so "Management & Key Personnel"
     still sits comfortably in half the width. */
  .why__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 20px 14px; }
  .stat__label { font-size: 13px; letter-spacing: .04em; }
  .partners__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   14. Testimonials: editorial row

   No cards. Three quotes separated by hairlines, set larger, so the words
   carry it instead of three grey boxes.
   -------------------------------------------------------------------------- */
/* A carousel at every width, not only on a phone. One row of six, three in
   view on a desktop, and the dots step through them. It used to break into two
   static rows above 860px, which left a row of dots sitting under a block that
   could not move.

   The container width decides how many are in view, so the columns are a
   fraction of it rather than a fixed measure: three fit exactly and the rest
   queue up past the right edge. No column gap; the hairlines do that job. */
.quotes {
  --quote-gap: clamp(16px, 1.6vw, 24px);
  display: grid;
  grid-auto-flow: column;
  /* The gaps come out of the width before it is divided, or three cards plus
     the two gaps between them would be wider than the track and the third
     would never sit flush with the right edge. */
  grid-auto-columns: calc((100% - var(--quote-gap) * 2) / 3);
  column-gap: var(--quote-gap);
  overflow-x: auto;
  /* Explicit. Setting overflow-x alone computes overflow-y from visible to
     auto, which quietly made the row scrollable up and down as well. */
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* The cards sit on a border, and a scroll container clips at its padding
     edge; without this their top and bottom hairlines are shaved off. */
  padding-block: 2px;
  margin-top: clamp(36px, 4vw, 56px);
  cursor: grab;
}
/* Set by main.js for the length of a drag. */
.quotes.is-grabbing { cursor: grabbing; user-select: none; }
.quotes::-webkit-scrollbar { display: none; }

/* Cards, not hairline-separated columns. Same shape language as the service
   cards above: 6px, one hairline border, white on white.

   margin: 0 earns its place. <figure> carries margin: 1em 40px from the
   browser's own stylesheet and nothing here was clearing it. */
.quote {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(24px, 2.2vw, 34px);
}
/* Nothing here is interactive, so nothing here reacts to the pointer. */
.quote:hover { transform: none; box-shadow: none; }

/* Snap a page at a time, not a card: only the card that begins a page is a
   snap point, so a scroll or a drag past halfway lands on the next three
   rather than nudging along by one. The counts below have to match the
   grid-auto-columns at each breakpoint, and the specificity has to match too,
   or the base rule wins inside the media query and nothing changes. */
.quote { scroll-snap-align: none; }
.quote:nth-child(3n+1) { scroll-snap-align: start; }

/* A real left double quotation mark, set in Playfair Display. Inter Tight
   draws it as two thin geometric wedges; this one is the solid round pair the
   mark is supposed to be, and being the opening quote already it needs none of
   the rotating the icon version did.

   Georgia first in the fallback for the same reason: if the webfont never
   arrives, the substitute still has a heavy round quote rather than a hairline.

   The height is set and the line box ignored because the glyph paints only in
   the top of its em box. Left to size itself it reserves 72px of space to draw
   about 24px of ink, and the gap beneath it cannot then be tuned. */
.quote__mark {
  align-self: flex-start;
  display: block;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 76px;
  font-weight: 700;
  line-height: 1;
  height: 40px;
  color: var(--red);
  margin-bottom: 10px;
}
.quote__text {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.015em;
  color: var(--ink);
  flex: 1;
  /* All four sides. <blockquote> carries margin: 1em 40px from the browser's
     own stylesheet, and only the bottom was being overridden. The other three
     were live: every quote was indented 40px while the mark above it and the
     name below it sat flush, and the text was giving up a fifth of its column
     to do it. Same trap as the <figure> the quote itself sits in. */
  margin: 0 0 24px;
}
.quote__name {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}
.quote__role { font-size: 13.5px; color: var(--muted); margin-top: 3px; }

.dots { display: flex; justify-content: center; gap: 9px; margin-top: 34px; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.dot[aria-selected="true"] { background: var(--red); transform: scale(1.2); }
.dot:hover { background: var(--muted-2); }
.dot[aria-selected="true"]:hover { background: var(--red); }

@media (max-width: 1024px) {

  /* Two in view rather than three, so a page is two. */
  .quotes { grid-auto-columns: calc((100% - var(--quote-gap)) / 2); }
  .quote:nth-child(3n+1) { scroll-snap-align: none; }
  .quote:nth-child(2n+1) { scroll-snap-align: start; }
}

@media (max-width: 860px) {

  /* One at a time, bled to the screen edges so the next one peeks in. A plain
     track width, never minmax(0, x): a zero minimum lets the tracks shrink to
     fit instead of overflowing, and then there is nothing to scroll at all. */
  /* One at a time, bled to the screen edges so the next card peeks in. The
     column-gap already spaces them, so no margin here. */
  .quotes {
    grid-auto-columns: 82%;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
  }
  /* One in view, so every card is a page. */
  .quote:nth-child(n) { scroll-snap-align: start; }
}

/* --------------------------------------------------------------------------
   15. Partners
   -------------------------------------------------------------------------- */
/* A static row, not a loop. Six logos and one set of them, so no duplicates
   in the accessibility tree and no animation to pause. */
.partners__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
  margin-top: clamp(36px, 4vw, 56px);
}
/* No min-width any more: the grid column sets the slot, and a min-width wide
   enough for the old loop would overflow six of them across the container. */
.partner {
  display: grid;
  place-items: center;
  padding-block: 14px;
  min-height: 84px;    /* matches the tallest mark, so the row sits level */
}
.partner img {
  height: 46px;              /* fixed, so the row reserves space before load */
  width: auto;
  max-width: 100%;
  object-fit: contain;
  opacity: .84;
}

/* Optical sizing. These logos range from 3.5:1 wordmarks to 1:1 marks.
   Matching them on height alone makes the square ones look half the size,
   so each family gets the height that reads as equal weight. */
.partner--wide img { height: 38px; }   /* CIDB, Gamuda */
.partner--mark img { height: 56px; }   /* IJM, PETRONAS */

/* Clients: nine of them, so a centred wrap rather than the six-track grid.
   Five over four reads as one block where six over three leaves a gap. Each
   cell is a mark of fixed height with the project under it, so a logo and a
   name set as a wordmark sit on the same lines. */
.partners__grid--clients {
  --cols: 5;
  --gap: clamp(16px, 2vw, 32px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  /* .partners__grid centres its items vertically; here the cells in a row
     should be one height, so the borders line up. */
  align-items: stretch;
  gap: var(--gap);
}
.partners__grid--clients .partner {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding: 18px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  text-align: center;
}
.partner__mark {
  display: grid;
  place-items: center;
  height: 56px;
  width: 100%;
}
/* Logos run a little larger here than in a logo-only row, to hold their own
   against a wordmark beside them. */
.partners__grid--clients .partner img { height: 50px; opacity: 1; }
.partners__grid--clients .partner--wide img { height: 44px; }
.partners__grid--clients .partner--mark img { height: 56px; }
/* Heng Lee Group's emblem is drawn light for a dark ground, so it is darkened
   to sit on white. */
.partners__grid--clients .partner img.partner__emblem { height: 56px; width: auto; filter: brightness(.5); }
.partners__grid--clients .partner--wide img { max-width: 92%; object-fit: contain; }
.partner__name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--slate);
  text-wrap: balance;
}
.partner__project {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red);
}
@media (max-width: 1024px) { .partners__grid--clients { --cols: 3; } }
@media (max-width: 640px)  { .partners__grid--clients { --cols: 2; } }

/* Tablet and mobile: one sliding strip of logos instead of the cards.
   js/partners-marquee.js adds .is-marquee and the track only at 1024px and
   below, so nothing here can reach the desktop layout. Items are spaced with
   padding rather than gap, so the two copies are exactly half the track each
   and the -50% loop has no seam. */
@media (max-width: 1024px) {
  /* Edge to edge: out past the page gutters on both sides, no fade, so a
     logo runs right off the left of the screen and enters from the right. */
  .partners__grid--clients.is-marquee {
    display: block;
    overflow: hidden;
    padding-block: 8px;
    margin-inline: calc(var(--gutter) * -1);
    border: 0;
    border-radius: 0;
    background: none;
  }
  .partners__track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: partners-marquee var(--marquee-duration, 30s) linear infinite;
  }
  .is-marquee:hover .partners__track,
  .is-marquee:active .partners__track { animation-play-state: paused; }
  .partners__grid--clients.is-marquee .partner {
    flex: 0 0 auto;
    display: block;
    padding: 0 clamp(22px, 4vw, 36px);
    border: 0;
    border-radius: 0;
    background: none;
  }
  .is-marquee .partner__project { display: none; }
  .is-marquee .partner__mark { height: 56px; width: auto; }
  .partners__grid--clients.is-marquee .partner img { height: 44px; width: auto; max-width: none; }
  .partners__grid--clients.is-marquee .partner--mark img,
  .partners__grid--clients.is-marquee .partner img.partner__emblem { height: 52px; }
  .partners__grid--clients.is-marquee .partner--wide img { height: 36px; }
  .is-marquee .partner__name { font-size: 14px; white-space: nowrap; }
}
@keyframes partners-marquee { to { transform: translateX(-50%); } }
/* No motion: the strip stands still and scrolls sideways by hand. */
@media (max-width: 1024px) and (prefers-reduced-motion: reduce) {
  .partners__grid--clients.is-marquee { overflow-x: auto; }
  .partners__track { animation: none; }
  .is-marquee .partner--copy { display: none; }
}

/* Fallback wordmark shown when a partner logo file is not in place yet */
.partner__wordmark {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--muted-2);
  padding: 9px 16px;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-btn);
}

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--ink);
  /* Everything on this ground is white, headings included. */
  color: #fff;
  padding-top: clamp(48px, 6vw, 72px);
  font-size: 14px;
}
.footer__grid {
  display: grid;
  /* brand | quick links | services | contact | newsletter. The newsletter
     used to lead; it sits last now, so its share moved to the end with it. */
  grid-template-columns: 1.15fr .8fr .95fr 1.25fr 1.15fr;
  gap: clamp(26px, 3vw, 40px);
  padding-bottom: clamp(40px, 5vw, 56px);
}

.footer__title {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
}

.footer p { line-height: 1.65; }
.footer a:hover { color: rgba(255, 255, 255, .72); }

.footer__links { display: grid; gap: 11px; }
.footer__links a { display: inline-block; }

/* Newsletter */
.subscribe {
  display: flex;
  margin-top: 18px;
  border-radius: var(--r-btn);
  overflow: hidden;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--on-dark-line);
  transition: border-color .25s var(--ease);
}
.subscribe:focus-within { border-color: var(--red); }
.subscribe input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 13.5px;
}
.subscribe input::placeholder { color: #949DA5; }   /* AA against the dark panel */
.subscribe input:focus { outline: none; }
.subscribe button {
  flex-shrink: 0;
  width: 44px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-size: 16px;
  transition: background-color .25s var(--ease);
}
.subscribe button:hover { background: var(--red-600); }
.form-note { font-size: 12.5px; margin-top: 9px; min-height: 18px; }
.form-note.is-error { color: #FF9A9A; }
.form-note.is-ok    { color: #8ADCAD; }

/* Footer brand block */
.footer__brand img {
  /* 88px is the tallest this mark goes without max-width:100% squeezing it
     against the footer column. object-fit guards it if the column narrows. */
  height: 88px;
  width: auto;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 20px;
  /* Interim treatment, and all three lines go when a real asset arrives.

     The supplied logo is a JPEG on white, so it is inverted: the dark mark
     becomes light and the white paper becomes black, and screen then drops the
     black. Inverting alone only takes the mark to 223/255 though — 87% white,
     which reads as light grey next to the white type beside it. brightness
     finishes the job: 223 x 1.2 clips to 255 while the near-black paper stays
     near-black, so screen still removes it.

     grayscale is what costs something here: the source has the red gear mark
     in it (most saturated pixel is 179,19,29) and this throws it away. A real
     transparent asset could keep the red gear against a white wordmark. */
  filter: grayscale(1) invert(1) brightness(1.2);
  mix-blend-mode: screen;
}
/* No boxes. Just the marks, spaced widely enough to stay separate tap targets
   without a border drawing the line for them. */
.footer__social { display: flex; gap: 18px; margin-top: 18px; }
/* Padded out to a 36px target and pulled back by the same amount, so the mark
   still measures 20px and the row still spaces on 18px, but the thing you have
   to hit is the size it was when it had a box around it. Dropping the border
   took the target from 36px to 20px, which is under the 24px minimum. */
.footer__social a {
  display: grid;
  place-items: center;
  padding: 8px;
  margin: -8px;
  transition: color .25s var(--ease);
}
/* The hover used to fill the box red. With the box gone that would be a red
   swatch behind a logo, so the mark itself brightens instead. */
.footer__social a:hover { color: rgba(255, 255, 255, .72); }

/* The official brand marks, from Simple Icons, inlined. Phosphor draws its own
   interpretation of these three so they match the rest of its family, which is
   right for a map pin and wrong for a logo: a brand mark is either the one
   people recognise or it is not. Simple Icons is CC0 and ships the real thing.

   currentColor, so each takes the colour of the bar it sits in and follows the
   hover without needing a second rule. */
.social__icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}
.topbar__social .social__icon { width: 17px; height: 17px; }

/* Contact list */
.contact-list { display: grid; gap: 15px; }
.contact-list li { display: flex; gap: 11px; align-items: flex-start; }
.contact-list__icon {
  width: 17px;
  height: 17px;
  /* currentColor, not the colour written out: the icon then tracks whatever
     the line it sits on is set to, including any later change to the footer
     text colour, instead of quietly drifting away from it. */
  fill: currentColor;
  flex-shrink: 0;
  margin-top: 3px;   /* sits the icon on the first line of its text */
}

.footer__bottom {
  border-top: 1px solid var(--on-dark-line);
  padding-block: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}
.footer__legal { display: flex; gap: 22px; flex-wrap: wrap; }

.credit-link {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(255,255,255,.35);
  transition: color .2s var(--ease), text-decoration-color .2s var(--ease);
}
.credit-link:hover { color: #fff; text-decoration-color: #fff; }

/* --------------------------------------------------------------------------
   17. Scroll reveal
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   18. Responsive
   -------------------------------------------------------------------------- */
/* The type scale steps down here and nowhere else. */
@media (max-width: 1024px) {
  :root { --fs-h1: 48px; --fs-h2: 32px; --fs-h3: 21px; --fs-stat: 36px; }
}
@media (max-width: 560px) {
  :root { --fs-h1: 36px; --fs-h2: 27px; --fs-h3: 20px; --fs-stat: 32px; }
}

@media (max-width: 1140px) {
  .nav__list { gap: 18px; }
  .nav__link { font-size: 12px; }
}

@media (min-width: 1101px) {
  .nav__cta, .nav-close { display: none; }
}

@media (max-width: 1100px) {
  /* The 72px mark plus seven items plus the CTA stop fitting here. Collapse. */
  .nav-toggle { display: flex; }
  .header__cta { display: none; }

  /* The drawer lives inside the header, and the header's z-index makes it a
     stacking context: the drawer's own z-index (70) only counts inside it, so
     the whole header -- drawer included -- sat at 50, under the backdrop at
     60. The backdrop then covered the open menu and took every tap, which
     closed it. Lifting the header over the backdrop puts the drawer on top. */
  .header { z-index: 65; }

  .nav {
    position: fixed;
    top: 0; left: 0;
    z-index: 70;
    width: min(340px, 86vw);
    height: 100%;
    background: #fff;
    padding: 84px 28px 32px;
    box-shadow: 12px 0 40px rgba(21,24,27,.16);
    transform: translateX(-100%);
    transition: transform .38s var(--ease);
    overflow-y: auto;
    margin-left: 0;
  }
  .nav.is-open { transform: translateX(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link {
    display: block;
    padding: 15px 2px;
    font-size: 14px;
  }
  /* The company logo at the top of the drawer, level with the close button
     (main.js copies it in from the header). */
  .nav__brand { position: absolute; top: 16px; left: 28px; display: block; }
  .nav__brand img { display: block; height: 50px; width: auto; }
  .nav__link::after { display: none; }

  /* In the drawer the dropdown is an inline accordion, not a floating panel. */
  .nav__item--dropdown::after { display: none !important; }
  .nav__item--dropdown .nav__link { display: flex; align-items: center; justify-content: space-between; }
  .nav__caret { font-size: 15px; }

  .dropdown {
    position: static;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height .32s var(--ease);
  }
  .nav__item--dropdown.is-open .dropdown { max-height: 400px; }
  .dropdown a {
    padding: 12px 0 12px 16px;
    border-left: 2px solid var(--line-2);
    white-space: normal;
  }
  .dropdown a:hover { background: none; border-left-color: var(--red); }
  .dropdown li:last-child a { margin-bottom: 8px; }
  /* "Services" goes to its page; the arrow button beside it opens the list.
     The caret inside the link is replaced by that button. */
  .nav__item--dropdown { position: relative; }
  .nav__item--dropdown > .nav__link .nav__caret { display: none; }
  .nav__sub {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    place-items: center;
    width: 48px;
    height: 50px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font-size: 15px;
    cursor: pointer;
  }
  .nav__sub i { transition: transform .25s var(--ease); }
  .nav__item--dropdown.is-open .nav__sub i { transform: rotate(180deg); }
  .nav__sub:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }

  /* The list: plain links, no rule down the side; the page being read in red. */
  .dropdown a { padding-left: 14px; border-left: 0; }
  .dropdown a:hover { color: var(--red); }
  .dropdown a[aria-current="page"] { color: var(--red); font-weight: 600; }

  .nav__cta { margin-top: 26px; display: block; }
  .nav__cta .btn { width: 100%; justify-content: center; }

  .nav-close {
    position: absolute;
    top: 20px; right: 20px;
    width: 42px; height: 42px;
    display: grid; place-items: center;
    font-size: 24px;
    border-radius: var(--r-btn);
  }
  .nav-close:hover { background: var(--bg-alt); }

  /* Stacked. No ratio override: the source is landscape now, so 4:3 works full
     width too and the photograph stays uncropped here as well. */
  .about__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: repeat(3, 1fr); }

  /* Two up from here, not from 860. Four columns of this container are about
     220px wide at 1024, and the value titles are real headings now: they wrap
     to two lines at that width, where the old 13px labels did not. */
  .values__grid { grid-template-columns: repeat(2, 1fr); }
  .value:nth-child(2n) { border-right: 0; }
  .value:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
}

@media (max-width: 860px) {



  /* The carousel is set up in the base rule and overridden once above. This
     block used to declare the whole thing again at 84%, silently winning over
     the 82% next to it purely by coming later. */
}

@media (max-width: 720px) {
  .topbar__item--email, .topbar__item--loc { display: none; }

  .head-split { align-items: flex-start; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__bottom { justify-content: center; text-align: center; }
}

@media (max-width: 560px) {
  :root { --header-h: 76px; }
  .brand img { height: 56px; }

  .hero { min-height: 0; }
  .hero__inner { padding-block: 56px 96px; }
  .btn { padding: 12px 20px; font-size: 12px; }

  .values { margin-top: -56px; }
  /* Two by two, as on a tablet. In a half-width cell the icon sits above the
     title and the text is centred, so "Collaboration" still fits on a line. */
  .values__grid { grid-template-columns: repeat(2, 1fr); }
  .value {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 14px;
    text-align: center;
    border-right: 1px solid var(--line-2);
    border-bottom: 0;
  }
  .value:nth-child(2n) { border-right: 0; }
  .value:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
  .value__icon { margin-top: 0; }

  .quotes { grid-auto-columns: 90%; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__brand { order: -1; }
}

/* --------------------------------------------------------------------------
   18b. Homepage, tablet and mobile: centred headings, vertical hero shade
   Everything here sits under max-width: 1024px, so the desktop homepage is
   untouched.
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  /* Hero: the copy is centred and runs the full width, so the shade comes
     down from the top instead of in from the left. Darkest behind the
     heading, easing off towards the bottom so the photograph still shows. */
  .hero::before {
    background: linear-gradient(
      180deg,
      rgba(15,18,21,.92) 0%,
      rgba(15,18,21,.82) 38%,
      rgba(15,18,21,.6)  68%,
      rgba(15,18,21,.38) 100%
    );
  }
  .hero__content { margin-inline: auto; text-align: center; }
  .hero__rule { margin-inline: auto; }
  .hero__text { margin-inline: auto; }

  /* About Us: photograph first, then the copy. */
  #about .about__visual { order: -1; }
  #about .about__text { text-align: center; }
  #about .about__text .section-title { margin-inline: auto; }
  #about .about__text .rule { margin-inline: auto; }
  #about .about__text p { margin-inline: auto; }
  #about .about__actions { display: flex; justify-content: center; }

  /* How We Work */
  .mission__head { text-align: center; }
  .mission__head .section-title { margin-inline: auto; }
  .mission__lead { margin-inline: auto; }

  /* Why Choose Us: the heading centred; the checklist stays left-aligned
     line by line, but sits centred as a block. */
  .why__head > .eyebrow,
  .why__head > .section-title { text-align: center; justify-self: center; }
  .why__head > .section-title { margin-inline: auto; }

  /* Our Projects: heading over its link, both centred. */
  #projects .head-split { flex-direction: column; align-items: center; text-align: center; }
  #projects .head-split .section-title { margin-inline: auto; }
  #projects .head-split .rule { margin-inline: auto; }
}
/* Tablet and phone: the five points as one list, a point to a row, icon over
   centred white text, no boxes. */
@media (max-width: 1024px) {
  .why__head > .why__list {
    grid-template-columns: 1fr;
    gap: 22px;
    width: 100%;
    max-width: 520px;
    margin-inline: auto;
  }
  .why__item {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    font-size: 13px;
    line-height: 1.45;
    color: #fff;
  }
  .why__item i { font-size: 20px; margin-top: 0; }
}

/* --------------------------------------------------------------------------
   18c. Homepage type scale, tablet and mobile
   One size per role on the homepage at 1024px and below, scoped to the
   homepage's own sections so no other page and no desktop width is touched:
     labels, buttons, links, tags   13px
     small card text, names         14px
     paragraphs                     16px (already)
     card titles                    --fs-h3, weight 600
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero .btn,
  #about .btn,
  #services .btn,
  #services .link-more,
  #projects .link-more,
  #projects .project__cta,
  .why .stat__label { font-size: 13px; }

  #projects .project__loc { font-size: 13px; font-weight: 500; }
  #projects .project__title { font-weight: 600; }

  .values .value__text,
  #projects .project__text,
  .why .why__item { font-size: 14px; }

  #testimonials .quote__name { font-size: 14px; }
  #testimonials .quote__role { font-size: 13px; }
}

/* --------------------------------------------------------------------------
   18d. Footer, tablet and mobile
   Desktop (above 1024px) is untouched. Tablet and phone share one centred
   layout: brand, then quick links beside services, then contact, then the
   newsletter, then the bottom bar.
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 16px;
    text-align: center;
  }
  .footer__brand,
  .footer__grid > :nth-child(4),
  .footer__grid > :nth-child(5) { grid-column: 1 / -1; }
  .footer__brand img { display: block; margin-inline: auto; object-position: center; }
  .footer__brand p { max-width: 36ch; margin-inline: auto; }
  .footer__social { justify-content: center; }
  .footer__links { justify-items: center; }
  .contact-list { justify-items: center; }
  .contact-list li { flex-direction: column; align-items: center; gap: 6px; text-align: center; }
  .contact-list__icon { margin-top: 0; }
  .subscribe { max-width: 340px; margin-inline: auto; }
  .footer__bottom { flex-direction: column; justify-content: center; gap: 10px; text-align: center; }
  .footer__legal { justify-content: center; }
}
/* Tablet: the same layout, held to a centred column of comfortable width so
   it does not spread thin across the wider screen. The two link lists get a
   fixed column each with a clear gutter between them, and the blocks get a
   little more air than on a phone. */
@media (min-width: 561px) and (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: repeat(2, 240px);
    justify-content: center;
    gap: 44px 48px;
  }
  .footer__brand p { max-width: 46ch; }
  .footer__bottom { padding-block: 24px; }
}

/* --------------------------------------------------------------------------
   19. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   20. Print
   -------------------------------------------------------------------------- */
@media print {
  .topbar, .nav, .nav-toggle, .header__cta, .subscribe, .dots { display: none; }
  .header { position: static; }
  .hero::before { background: none; }
  body { color: #000; }
}
