/* Blue Sapphire site styles. One rule per component: change a value where it is defined, do not append overrides. */
:root {
  --vimg-opacity: 0.40; /* strength of the Business Verticals illustrations: 0.10 faint, 0.30 clearly visible */
  --blue: #0a55c8;
  --cyan: #18b4e8;
  --navy: #071b3f;
  --ink: #12213d;
  --mute: #56647d;
  --ice: #e3ecfa;
  --line: #d6e0f0;
  --gray: #dadde2;
  --graphite: #8e949e;
  --w: 1160px;
  --cut: 34px; /* slant of the angled section edges */
  --bcut: 12px; /* cut corner on every button */
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
  margin: 0;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}
body {
  font: 400 1.0625rem/1.65 "Public Sans", system-ui, sans-serif;
  color: var(--ink);
  background: #f3f6fb
      linear-gradient(rgba(10, 85, 200, 0.055) 1px, transparent 1px) 0 0/44px 44px,
    linear-gradient(90deg, rgba(10, 85, 200, 0.055) 1px, transparent 1px) 0 0/44px 44px;
  -webkit-font-smoothing: antialiased;
}
body.modal-open {
  overflow: hidden;
}
h1,
h2,
h3 {
  font-family: Archivo, "Arial Black", sans-serif;
  line-height: 1.1;
  color: var(--navy);
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(2.3rem, 5.5vw, 4.2rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 800;
}
h3 {
  font-size: 1.2rem;
  font-weight: 700;
}
p {
  max-width: 68ch;
}
a {
  color: var(--blue);
}
img {
  max-width: 100%;
  display: block;
}
:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.wrap {
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
/* skip link: off screen until focused with the keyboard */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: #fff;
  color: var(--navy);
  padding: 0.8rem 1.2rem;
  font-weight: 700;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
}
/* visually hidden, still read by screen readers */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* spam trap field in the enquiry form */
.hp {
  position: absolute;
  left: -9999px;
}

/* ---------- Header and menu ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  gap: 1rem;
}
.nav img {
  height: 54px;
  width: auto;
}
.menu {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  list-style: none;
  padding: 0;
}
.menu a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.menu a:hover,
.menu a[aria-current] {
  border-color: var(--cyan);
}
.burger {
  display: none;
  background: none;
  border: 0;
  font-size: 1.7rem;
  color: var(--navy);
  cursor: pointer;
}

/* ---------- Buttons: every button has the same cut corner ---------- */
.btn,
.filters button,
.cbtn,
.modal-back {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--bcut)), calc(100% - var(--bcut)) 100%, 0 100%);
}
.btn:focus-visible,
.filters button:focus-visible,
.cbtn:focus-visible,
.modal-back:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: -6px;
}
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  padding: 0.85rem 1.5rem;
  border: 2px solid var(--blue);
  transition: background 0.2s, transform 0.2s;
}
.btn:hover {
  background: var(--navy);
  border-color: var(--navy);
}
/* white button, used on dark backgrounds */
.btn.alt {
  background: #fff;
  border-color: #fff;
  color: var(--navy) !important;
}
.btn.alt:hover {
  background: var(--ice);
  border-color: var(--ice);
}
.btn.sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
}
.acts {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.more {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--cyan);
  display: inline-block;
  margin-top: 1.2rem;
}
.morerow {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
}

/* ---------- Home: "Why Blue Sapphire" (smaller gap before Business Verticals) ---------- */
.why {
  padding-bottom: 2.5rem;
}
.why + .vsec {
  padding-top: 2.5rem;
}
/* counting numbers under the heading */
.nums {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-top: 2rem;
}
.nums div {
  border-top: 3px solid var(--cyan);
  padding-top: 0.9rem;
}
.nums b {
  display: block;
  font: 800 clamp(2.2rem, 4vw, 3.2rem) / 1 Archivo, sans-serif;
  color: var(--blue);
}
.nums span {
  display: block;
  color: var(--mute);
  font-size: 0.92rem;
  line-height: 1.35;
  margin-top: 0.4rem;
}

/* ---------- Home hero ---------- */
.hero {
  background: var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 6rem 0 7rem;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}
.hero:after {
  content: "";
  position: absolute;
  right: -6%;
  top: -10%;
  width: 52%;
  height: 130%;
  background: url(favicon.png) center/contain no-repeat;
  opacity: 0.09;
}
.hero:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 34%;
  height: 8px;
  background: var(--cyan);
  animation: draw 1s 0.1s ease-out both;
}
.hero h1 {
  color: #fff;
  margin-bottom: 1.4rem;
}
.hero p {
  color: #cbd8ee;
  font-size: 1.2rem;
}
.hero .eyebrow {
  color: var(--cyan);
  font-weight: 700;
  margin-bottom: 1rem;
}
.herogrid {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.herogrid > div > * {
  animation: rise 0.7s ease-out both;
}
.herogrid > div > *:nth-child(2) {
  animation-delay: 0.12s;
}
.herogrid > div > *:nth-child(3) {
  animation-delay: 0.24s;
}
.herogrid > div > *:nth-child(4) {
  animation-delay: 0.36s;
}
.stats {
  border-left: 4px solid var(--cyan);
  padding: 0.4rem 0 0.4rem 1.8rem;
  display: grid;
  gap: 1.6rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.07), transparent);
}
.stat {
  animation: rise 0.7s 0.5s ease-out both;
}
.stat:nth-child(2) {
  animation-delay: 0.65s;
}
.stat:nth-child(3) {
  animation-delay: 0.8s;
}
.stat b {
  display: block;
  font: 800 clamp(2.2rem, 4vw, 3.2rem) / 1 Archivo, sans-serif;
  color: #fff;
}
.stat span {
  color: #cbd8ee;
  font-size: 0.95rem;
  display: block;
  max-width: 26ch;
  margin-top: 0.3rem;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes draw {
  from {
    width: 0;
  }
  to {
    width: 34%;
  }
}
/* strip of four points overlapping the bottom of the hero */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  margin-top: -3rem;
  position: relative;
  z-index: 2;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(7, 27, 63, 0.12);
}
.facts div {
  padding: 1.4rem 1.2rem;
  border-right: 1px solid var(--line);
  font-weight: 600;
  color: var(--navy);
}
.facts div:last-child {
  border: 0;
}

/* ---------- Page title banner (inner pages) ---------- */
.page-hero {
  background: var(--navy);
  color: #fff;
  padding: 4rem 0 5rem;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
  border-top: 8px solid var(--cyan);
}
.page-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
}
.page-hero p {
  color: #cbd8ee;
  margin-top: 1rem;
  font-size: 1.15rem;
}

/* ---------- Sections ---------- */
section.s {
  padding: 5rem 0;
}
/* light blue section with angled top and bottom edges */
section.tint {
  background: var(--ice);
  position: relative;
  padding: calc(5rem + var(--cut)) 0;
  clip-path: polygon(0 var(--cut), 100% 0, 100% calc(100% - var(--cut)), 0 100%);
}
section.tint > .wrap {
  position: relative;
}
.lead {
  color: var(--mute);
  margin: 1rem 0 2rem;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
/* faint decorative shapes behind a section */
.illus {
  position: relative;
  overflow: hidden;
}
.illus > .wrap {
  position: relative;
  z-index: 1;
}
.illus:before,
.illus:after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.illus:before {
  width: 42vw;
  max-width: 560px;
  aspect-ratio: 1/1;
  right: -13vw;
  top: -14vw;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  opacity: 0.06;
  clip-path: polygon(28% 0, 100% 0, 100% 68%, 68% 100%, 0 100%, 0 28%);
}
.illus:after {
  width: 22vw;
  max-width: 300px;
  aspect-ratio: 1/1;
  left: -9vw;
  bottom: -9vw;
  background: var(--navy);
  opacity: 0.05;
  clip-path: polygon(0 0, 100% 18%, 82% 100%, 0 82%);
}

/* ---------- Cards, lists, tags ---------- */
.grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 2rem;
}
.grid3 {
  grid-template-columns: repeat(3, 1fr);
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.6rem;
  border-left: 5px solid var(--blue);
}
.card p {
  color: var(--mute);
  margin-top: 0.6rem;
  font-size: 1rem;
}
/* "Have a requirement?" card, in the theme blue */
.cta-card {
  background: var(--blue);
  border-color: var(--blue);
  border-left-color: var(--cyan);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.cta-card h3 {
  color: #fff;
}
.cta-card p {
  color: #dce8fb;
}
.cta-card .more {
  color: #fff;
  align-self: flex-start;
}
ul.tick {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}
ul.tick li {
  padding: 0.7rem 0 0.7rem 1.8rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
ul.tick li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.1rem;
  width: 0.8rem;
  height: 0.8rem;
  background: var(--cyan);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.timeline {
  border-left: 3px solid var(--blue);
  margin-top: 2rem;
  padding-left: 1.6rem;
}
.timeline div {
  margin-bottom: 1.5rem;
}
.timeline b {
  font-family: Archivo;
  color: var(--blue);
  font-size: 1.3rem;
  display: block;
}
.tag {
  display: inline-block;
  background: var(--ice);
  color: var(--blue);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.6rem;
}

/* ---------- Business Verticals (home) ---------- */
.vrow {
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
  min-height: 480px;
  display: flex;
  align-items: center;
}
.vrow > .wrap {
  position: relative;
  z-index: 1;
  width: 100%;
}
/* the illustration: faint, grayscale, fading out towards the text and at the top and bottom edges */
.vimg {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 72%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  opacity: var(--vimg-opacity);
  pointer-events: none;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
/* odd rows (.l): text left, illustration right. Even rows (.r): text right, illustration left */
.vrow.l .vimg {
  right: 0;
  left: auto;
  -webkit-mask-image: linear-gradient(270deg, #000 40%, transparent),
    linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(270deg, #000 40%, transparent),
    linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.vrow.r .vimg {
  left: 0;
  right: auto;
  -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent),
    linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(90deg, #000 40%, transparent),
    linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.vtext {
  max-width: 560px;
  position: relative;
}
.vrow.r .vtext {
  margin-left: auto;
}
.vtext,
.vtext p,
.vtext h3,
.vtext li {
  color: var(--navy);
}
.vtext h3 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
}
.vtext .vsub {
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 0.5rem 0 1rem;
}
.vtext .vclose {
  margin-top: 1.2rem;
  color: var(--ink);
}
.vtext ul.tick li {
  border-color: rgba(7, 27, 63, 0.14);
}
.vnum {
  position: absolute;
  top: -3.6rem;
  left: -0.2rem;
  font: 800 5rem/1 Archivo, sans-serif;
  color: var(--blue);
  opacity: 0.09;
  pointer-events: none;
}
.vrow.r .vnum {
  left: auto;
  right: -0.2rem;
}
/* rows slide in from their own side on scroll, and back out when scrolled away (main.js toggles .in) */
.js .vrow.vr .vimg,
.js .vrow.vr .vtext {
  opacity: 0;
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}
.js .vrow.vr.l .vimg,
.js .vrow.vr.r .vtext {
  transform: translateX(70px);
}
.js .vrow.vr.r .vimg,
.js .vrow.vr.l .vtext {
  transform: translateX(-70px);
}
.js .vrow.vr.in .vtext {
  opacity: 1;
  transform: none;
}
.js .vrow.vr.in .vimg {
  opacity: var(--vimg-opacity);
  transform: none;
}

/* ---------- Where we work (map) ---------- */
.mapsec {
  background: var(--navy);
  color: #fff;
}
.mapsec h2 {
  color: #fff;
}
.mapsec .lead {
  color: #cbd8ee;
}
.mapsec .tick li {
  border-color: #1d3765;
}
.mapsec .more {
  color: #fff;
}
.mapsec .split {
  align-items: center;
}
.mapbox {
  max-width: 520px;
  width: 100%;
  justify-self: center;
}
.pkmap {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.pkmap .land {
  fill: #0e2a5c;
  stroke: #3c7be8;
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.pkmap text {
  font: 800 16px Archivo, sans-serif;
  fill: #fff;
  paint-order: stroke;
  stroke: #071b3f;
  stroke-width: 4px;
}
.pkmap .halo {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 3s ease-in-out infinite;
}
.pkmap .pt:nth-child(3n) .halo {
  animation-delay: 0.8s;
}
.pkmap .pt:nth-child(3n + 1) .halo {
  animation-delay: 1.6s;
}
/* a city is highlighted (main.js adds .hot to its pin and list line, and .has-hot to the map) */
.pkmap .pt {
  transition: opacity 0.25s;
  cursor: pointer;
}
.pkmap .pt > circle:not(.halo) {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.25s;
}
.pkmap text {
  transition: fill 0.25s;
}
.pkmap.has-hot .pt {
  opacity: 0.3;
}
.pkmap .pt.hot {
  opacity: 1;
}
.pkmap .pt.hot > circle:not(.halo) {
  transform: scale(1.6);
}
.pkmap .pt.hot .halo {
  animation-duration: 1.2s;
}
.pkmap .pt.hot text {
  fill: var(--cyan);
}
/* a dozen cities: slightly tighter lines than the standard tick list */
.mapsec .tick li {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  transition: background 0.25s, color 0.25s;
  cursor: pointer;
}
.mapsec .tick li:before {
  top: 0.9rem;
}
.mapsec .tick li.hot {
  background: rgba(24, 180, 232, 0.14);
  color: var(--cyan);
}
@keyframes pulse {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
}

/* ---------- People ---------- */
.person {
  border-width: 0 0 0 5px;
  border-left-color: var(--graphite);
  padding-bottom: 1.4rem;
}
/* every board photo uses the same portrait shape (510 x 726) */
.person .ph {
  aspect-ratio: 510/726;
  margin: -1.6rem -1.6rem 1.2rem;
  background: linear-gradient(160deg, #d3d6db, var(--graphite));
  display: grid;
  place-items: center;
  overflow: hidden;
}
.person .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.person .tag {
  background: none;
  padding: 0;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}
.tgroup h3 {
  margin-bottom: 0.8rem;
}
.tlist {
  list-style: none;
  padding: 0;
}
.tlist li {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.tlist li:last-child {
  border: 0;
}
.tlist span {
  color: var(--mute);
  font-size: 0.95rem;
}

/* home page only: board cards lift slightly and the photo zooms a little on hover */
.lift .person.card {
  transition: opacity 0.6s ease-out, transform 0.3s ease-out, box-shadow 0.3s ease-out;
}
.lift .person.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(7, 27, 63, 0.16);
}
.lift .person .ph img {
  transition: transform 0.5s ease-out;
}
.lift .person:hover .ph img {
  transform: scale(1.04);
}

/* ---------- Tables ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  background: #fff;
}
th,
td {
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: var(--gray);
  color: var(--navy);
}
.tablewrap {
  overflow-x: auto;
}

/* ---------- Projects page: photo gallery ---------- */
.gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 2rem;
}
.gitem {
  display: block;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--navy);
}
.gitem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s, opacity 0.3s;
}
.gitem:focus-visible {
  outline-offset: -3px;
}
.gitem:hover img,
.gitem:focus-visible img {
  transform: scale(1.04);
  opacity: 0.9;
}

/* ---------- Projects page: register cards ---------- */
.filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 2rem 0 0;
}
.filters button {
  font: 600 0.95rem "Public Sans";
  padding: 0.55rem 1.1rem;
  border: 0;
  background: var(--ice);
  color: var(--blue);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.filters button:hover {
  background: var(--line);
}
.filters button[aria-pressed="true"] {
  background: var(--blue);
  color: #fff;
}
/* the scale or value is the large figure on each card */
.pcard .tag {
  margin-bottom: 0.4rem;
}
.pcard .pfig {
  font: 800 1.9rem/1.15 Archivo, sans-serif;
  color: var(--blue);
  margin: 0 0 0.5rem;
}
.pcard .pmeta {
  font-size: 0.9rem;
  margin-top: 0.3rem;
}
.pcard .loc {
  font-size: 0.9rem;
}

/* ---------- Photo viewer ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(7, 27, 63, 0.9);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  padding: 2.4rem 1.2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.lb-panel {
  position: relative;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* main.js sets the width and height so the photo fits the screen */
#lb-img {
  max-width: 100%;
  background: var(--navy);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}
.modal-back {
  --bcut: 9px;
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.85);
  color: var(--navy);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-back:hover {
  background: #fff;
}
.cnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1rem;
}
.cbtn {
  --bcut: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--blue);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s;
}
.cbtn:hover {
  background: var(--cyan);
}
.cbtn:disabled,
.cbtn:disabled:hover {
  opacity: 0.35;
  cursor: not-allowed;
  background: var(--blue);
}
#lb-count {
  font-weight: 700;
  color: #fff;
  min-width: 4.5rem;
  text-align: center;
}

/* ---------- Carousel (project cards and gallery): arrows at the sides, pages slide sideways ---------- */
.carousel {
  margin-top: 2rem;
}
.carousel.on {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "prev view next" ". count .";
  align-items: center;
  gap: 0.8rem 1rem;
}
/* with a single page there is nothing to move to */
.carousel.single {
  display: block;
}
.carousel.single .cbtn,
.carousel.single .pg-count {
  display: none;
}
.car-prev {
  grid-area: prev;
}
.car-next {
  grid-area: next;
}
.car-view {
  grid-area: view;
  margin-top: 0;
}
.pg-count {
  grid-area: count;
  justify-self: center;
  font-weight: 700;
  color: var(--navy);
}
.carousel .cbtn:hover {
  background: var(--navy);
}
.car-view.on {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
  transition: height 0.3s;
}
.car-view.on::-webkit-scrollbar {
  display: none;
}
.car-view.drag,
.car-view.moving {
  scroll-snap-type: none;
}
.car-view.drag {
  cursor: grabbing;
  user-select: none;
}
.car-page {
  flex: 0 0 100%;
  scroll-snap-align: start;
  margin-top: 0;
}
/* wide screens: the arrows sit outside the content width, so the cards keep their full size */
@media (min-width: 1320px) {
  .carousel.on:not(.single) {
    margin-left: -60px;
    margin-right: -60px;
  }
}

/* ---------- Enquiry form ---------- */
.cta {
  background: var(--blue);
  color: #fff;
  padding: 4.5rem 0;
  clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
}
.cta h2 {
  color: #fff;
}
.cta p {
  color: #dce8fb;
  margin: 1rem 0;
}
form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}
form .full {
  grid-column: 1/-1;
}
label {
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.3rem;
}
input,
select,
textarea {
  width: 100%;
  padding: 0.8rem;
  font: inherit;
  border: 2px solid transparent;
  background: #fff;
  color: var(--ink);
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
  outline: 0;
}
/* white submit button so it stands out on the blue section */
.cta form .btn {
  background: #fff;
  border: 2px solid #fff;
  color: var(--navy) !important;
  padding: 0.85rem 1.8rem;
  font: 700 1rem "Public Sans";
  cursor: pointer;
}
.cta form .btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff !important;
}
.cta form .btn:disabled {
  opacity: 0.6;
  cursor: default;
}
/* message shown after sending */
.cta .form-status {
  color: #fff;
  font-weight: 600;
  min-height: 1.6em;
}
.cta .form-status.bad {
  color: #ffe1a8;
}

/* ---------- Footer ---------- */
footer {
  background: var(--gray);
  color: #33415c;
  padding: 3.5rem 0 2rem;
  font-size: 0.95rem;
  border-top: 6px solid var(--graphite);
}
footer img {
  height: 58px;
  width: auto;
  margin-bottom: 1rem;
}
footer .cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
footer h3 {
  color: var(--navy);
}
footer a {
  color: var(--blue);
  font-weight: 600;
}
footer ul {
  list-style: none;
  padding: 0;
}
footer li {
  margin: 0.4rem 0;
}
footer .copy {
  border-top: 1px solid #b9bec7;
  color: #4a566e;
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
}

/* ---------- Scroll reveal (main.js adds .js, .rv and .in) ---------- */
.js .rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.js .rv.in {
  opacity: 1;
  transform: none;
}

/* ---------- Tablet and phone ---------- */
@media (max-width: 900px) {
  :root {
    --cut: 18px;
  }
  .burger {
    display: block;
  }
  .menu {
    display: none;
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.2rem;
    border-bottom: 1px solid var(--line);
  }
  .menu.open {
    display: flex;
  }
  .hero {
    padding: 4rem 0 6rem;
  }
  .herogrid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-left: 1rem;
  }
  .stat span {
    font-size: 0.8rem;
  }
  .facts {
    grid-template-columns: 1fr 1fr;
  }
  section.s:not(.tint) {
    padding: 3.5rem 0;
  }
  .split,
  footer .cols,
  form {
    grid-template-columns: 1fr;
  }
  .grid3,
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .cta {
    clip-path: none;
    padding: 3rem 0;
  }
  /* verticals: illustration spans the full width behind the text, and the slide is shorter */
  .vrow {
    min-height: 0;
    padding: 3rem 0;
  }
  .vrow.l .vimg,
  .vrow.r .vimg {
    width: 100%;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
    -webkit-mask-composite: source-over;
    mask-composite: add;
  }
  .vrow.r .vtext {
    margin-left: 0;
  }
  .vrow.r .vnum {
    right: auto;
    left: -0.2rem;
  }
  .js .vrow.vr.l .vimg,
  .js .vrow.vr.r .vtext {
    transform: translateX(24px);
  }
  .js .vrow.vr.r .vimg,
  .js .vrow.vr.l .vtext {
    transform: translateX(-24px);
  }
  .js .vrow.vr.in .vimg,
  .js .vrow.vr.in .vtext {
    transform: none;
  }
}
@media (max-width: 700px) {
  /* carousel on phones: full-width pages, arrows and counter underneath */
  .carousel.on {
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "view view view" "prev count next";
  }
  .car-prev {
    justify-self: end;
  }
  .car-next {
    justify-self: start;
  }
  .illus:before,
  .illus:after {
    opacity: 0.045;
  }
  /* tables marked .stack show each row as a labelled block */
  table.stack thead {
    display: none;
  }
  table.stack tr {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid var(--line);
  }
  table.stack td {
    display: block;
    border: 0;
    padding: 0;
  }
  table.stack td + td {
    margin-top: 0.6rem;
  }
  table.stack td:before {
    content: attr(data-l);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mute);
  }
}
@media (max-width: 560px) {
  .stats,
  .grid3 {
    grid-template-columns: 1fr;
  }
  .gallery {
    gap: 0.6rem;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .hero:before,
  .herogrid > div > *,
  .stat,
  .pkmap .halo {
    animation: none !important;
  }
  .js .rv {
    opacity: 1;
    transform: none;
  }
}
