:root {
  --brand: #328d8a;
  --brand-light: #52a4ad;
  --brand-deep: #1c4e4c;
  --ink: #132524;
  --mist: #eef4f3;
  --line: #d6e3e1;
}

html { -webkit-text-size-adjust: 100%; }

/* Page background: technical grid (major 160px / minor 32px) + catalog diagonals */
:root {
  --paper: #fbfcfc;
  --grid-major: rgba(50, 141, 138, .085);
  --grid-minor: rgba(50, 141, 138, .04);
  --diag-fill: rgba(214, 233, 230, .5);
}
.page-bg, .grid-mist, .grid-dark {
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  background-position: -1px -1px;
}
.page-bg { background-color: var(--paper); }
.grid-mist { background-color: #f1f6f5; --grid-major: rgba(50, 141, 138, .1); --grid-minor: rgba(50, 141, 138, .05); }
.grid-dark { --grid-major: rgba(255, 255, 255, .06); --grid-minor: rgba(255, 255, 255, .025); }

.diag { position: relative; isolation: isolate; }
.diag::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--diag-fill);
}
.diag-r::before { clip-path: polygon(80% 0, 100% 0, 100% 100%, 66% 100%); }
.diag-l::before { clip-path: polygon(0 0, 22% 0, 8% 100%, 0 100%); }
@media (min-width: 1024px) {
  .diag-r::before { clip-path: polygon(64% 0, 100% 0, 100% 100%, 48% 100%); }
  .diag-l::before { clip-path: polygon(0 0, 30% 0, 14% 100%, 0 100%); }
}
.grid-mist.diag::before { background: rgba(255, 255, 255, .55); }
body { overflow-x: hidden; }
img { max-width: 100%; }

/* Catalog page band: thick teal bar with a lighter hairline */
.band {
  height: 10px;
  background: linear-gradient(var(--brand) 0 6px, transparent 6px 8px, var(--brand-light) 8px 10px);
}

.section { padding-block: 4rem; }
@media (min-width: 640px) { .section { padding-block: 5.5rem; } }
@media (min-width: 1024px) { .section { padding-block: 8rem; } }

.eyebrow {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: currentColor;
}
.eyebrow-light { color: var(--brand-light); }

.h2 {
  font-family: "Barlow Semi Condensed", Barlow, sans-serif;
  font-weight: 500;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -.01em;
}
.h3 {
  font-family: "Barlow Semi Condensed", Barlow, sans-serif;
  font-weight: 600;
  font-size: .875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.nav-link { position: relative; color: var(--ink); }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -6px;
  height: 2px;
  background: var(--brand);
  transition: right .2s ease;
}
.nav-link:hover::after, .nav-link[aria-current="true"]::after { right: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  height: 3.25rem;
  padding: 0 1.6rem;
  font-weight: 600;
  font-size: 15px;
  border: 1.5px solid var(--brand);
  transition: background-color .2s, color .2s;
}
.btn::after { content: "→"; font-weight: 400; transition: transform .2s; }
.btn:hover::after { transform: translateX(3px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn-ghost { color: var(--brand); }
.btn-ghost:hover { background: var(--mist); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 3px; }

/* Language switch */
.lang-switch button {
  min-width: 2.5rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  color: var(--ink);
}
.lang-switch button + button { border-left: 0; }
.lang-switch button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Mobile menu icon */
.menu-btn { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; }
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 22px; height: 2px; background: var(--ink); transition: transform .2s, background .2s;
}
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -7px; }
.menu-icon::after { top: 7px; }
[aria-expanded="true"] .menu-icon { background: transparent; }
[aria-expanded="true"] .menu-icon::before { transform: translateY(7px) rotate(45deg); }
[aria-expanded="true"] .menu-icon::after { transform: translateY(-7px) rotate(-45deg); }

/* Header over the hero: transparent at the top of the home page */
.logo-light { display: none; }
.site-header { transition: background-color .3s, border-color .3s, color .3s; }
.site-header.is-overlay { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.is-overlay .logo-dark { display: none; }
.is-overlay .logo-light { display: block; }
.is-overlay .nav-link { color: #fff; }
.is-overlay .nav-link::after { background: #fff; }
.is-overlay .lang-switch button { border-color: rgba(255,255,255,.4); color: #fff; }
.is-overlay .lang-switch button[aria-pressed="true"] { background: #fff; border-color: #fff; color: var(--brand-deep); }
.is-overlay .menu-icon, .is-overlay .menu-icon::before, .is-overlay .menu-icon::after { background: #fff; }

/* Hero slider */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: -4rem;
  min-height: max(36rem, min(calc(100svh - 10px), 56rem));
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}
@media (min-width: 1024px) { .hero { margin-top: -5rem; } }
.hero-slides { position: absolute; inset: 0; }
.hero-slides img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.1s ease, transform 7s ease-out;
}
.hero-slides img.is-active { opacity: 1; transform: scale(1); }
.hero-slides::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(19,37,36,.9) 0%, rgba(19,37,36,.62) 45%, rgba(19,37,36,.2) 100%),
    linear-gradient(180deg, rgba(19,37,36,.45) 0%, transparent 25%, transparent 70%, rgba(19,37,36,.55) 100%);
}
.hero-body { position: relative; z-index: 2; flex: 1; display: flex; align-items: center; width: 100%; padding-top: 7rem; padding-bottom: 8.5rem; }
@media (min-width: 1024px) { .hero-body { padding-top: 9rem; padding-bottom: 10rem; } }
.hero-tag { font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.hero-tag a { color: var(--brand-light); transition: color .2s, opacity .35s; }
.hero-tag a:hover { color: #fff; }
.hero-title { font-size: clamp(2.9rem, 1.4rem + 6.2vw, 6.25rem); line-height: .95; letter-spacing: -.01em; }
.hero-fixed, .hero-word { display: block; }
.hero-fixed:empty { display: none; }
.hero-word { transition: opacity .4s ease, transform .4s ease; }
.hero-word.is-out, .hero-tag.is-out a { opacity: 0; }
.hero-word.is-out { transform: translateY(.25em); }

.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.6); }
.btn-outline-light:hover { background: rgba(255,255,255,.1); border-color: #fff; }

.hero-controls { position: absolute; z-index: 3; left: 0; right: 0; bottom: 1.75rem; display: flex; align-items: flex-end; gap: 1rem; }
@media (min-width: 1024px) { .hero-controls { bottom: 2.5rem; } }
.hero-progress { flex: 1; display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: .6rem; }
@media (min-width: 1024px) { .hero-progress { gap: 1rem; } }
.hero-progress button { display: grid; gap: .65rem; min-width: 0; padding-top: .75rem; text-align: left; font-size: .8125rem; color: rgba(255,255,255,.6); cursor: pointer; }
.hero-progress button:hover, .hero-progress button[aria-selected="true"] { color: #fff; }
.hero-progress .bar { position: relative; display: block; height: 3px; background: rgba(255,255,255,.25); overflow: hidden; }
.hero-progress .bar i { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.hero-progress .is-done .bar i { transform: scaleX(1); }
.hero-progress [aria-selected="true"] .bar i { animation: hero-fill var(--dur, 5s) linear forwards; }
.hero.is-paused .hero-progress [aria-selected="true"] .bar i { animation: none; transform: scaleX(1); }
.hero-progress .label { display: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 768px) { .hero-progress .label { display: block; } }
@keyframes hero-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-pause {
  position: relative; flex-shrink: 0;
  width: 2.25rem; height: 2.25rem;
  border: 1px solid rgba(255,255,255,.45);
  transition: background-color .2s;
}
.hero-pause:hover { background: rgba(255,255,255,.12); }
.hero-pause::before, .hero-pause::after { content: ""; position: absolute; top: 50%; width: 3px; height: 12px; margin-top: -6px; background: #fff; }
.hero-pause::before { left: calc(50% - 5px); }
.hero-pause::after { left: calc(50% + 2px); }
.hero-pause[aria-pressed="true"]::after { display: none; }
.hero-pause[aria-pressed="true"]::before {
  left: calc(50% - 3px); width: 0; height: 0; margin-top: -7px; background: none;
  border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent #fff;
}

/* Facts strip */
.fact { padding: 1.75rem 1rem; border-color: var(--line); }
@media (min-width: 640px) { .fact { padding: 2rem 1.5rem; } }
@media (min-width: 1024px) { .fact { padding: 2.25rem 2.5rem; } }

/* Service cards (bento) */
.bento { display: grid; gap: .75rem; }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 15rem; }
  .bento .is-big { grid-column: span 2; grid-row: span 2; }
  .bento .bento-cta { grid-column: span 2; }
  .bento-small { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 14rem; }
}
.bento-card {
  position: relative; display: flex; min-height: 15rem; overflow: hidden;
  background: var(--ink); color: #fff; isolation: isolate;
}
.bento-card img:not(.bento-mark) { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.bento-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(19,37,36,.05) 15%, rgba(19,37,36,.88) 100%); }
.bento-card:hover img:not(.bento-mark) { transform: scale(1.05); }
.bento-card:focus-visible { outline-offset: -3px; outline-color: #fff; }
.bento-body { margin-top: auto; display: grid; gap: .35rem; width: 100%; padding: 1.25rem; }
.is-big .bento-body { padding: 1.75rem; }
.bento-body .num { font-size: 1rem; }
.bento-title { font-family: "Barlow Semi Condensed", Barlow, sans-serif; font-weight: 500; font-size: 1.5rem; line-height: 1.1; }
.is-big .bento-title { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); }
.bento-text { font-size: .875rem; line-height: 1.5; color: rgba(255,255,255,.85); }
.bento-title::after { content: " →"; font-family: Barlow, sans-serif; font-weight: 400; opacity: 0; transition: opacity .2s; }
.bento-card:hover .bento-title::after { opacity: 1; }
@media (min-width: 1024px) and (hover: hover) {
  .bento-card:not(.is-big) .bento-text { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .35s ease, opacity .3s ease; }
  .bento-card:not(.is-big):hover .bento-text, .bento-card:not(.is-big):focus-visible .bento-text { max-height: 6em; opacity: 1; }
}
.bento-cta { background: var(--brand); min-height: 12rem; }
.bento-cta::after { display: none; }
.bento-cta:hover { background: var(--brand-deep); }
.bento-mark { position: absolute; right: -2.5rem; top: -2rem; width: 13rem; opacity: .14; filter: brightness(0) invert(1); pointer-events: none; }
.bento-cta-text { color: rgba(255,255,255,.85); }

/* Service detail page */
@media (min-width: 1024px) {
  .service-hero { clip-path: polygon(0 0, 100% 0, 100% 86%, 88% 100%, 0 100%); }
}
.service-aside { padding: 1.75rem; background: var(--brand-deep); color: #fff; }
.service-aside a:not(.btn):hover { color: #fff; text-decoration: underline; }
.service-gallery { display: grid; gap: .75rem; }
@media (min-width: 640px) { .service-gallery { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); } }
.service-list { list-style: none; padding: 0; margin: 0; }
.service-list li {
  position: relative;
  padding: .7rem 0 .7rem 1.5rem;
  border-top: 1px solid var(--line);
}
.service-list li::before {
  content: "";
  position: absolute; left: 0; top: 1.25rem;
  width: .55rem; height: .55rem;
  background: var(--brand-light);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.tagline {
  border-left: 3px solid var(--brand);
  padding-left: 1rem;
  font-style: italic;
  color: var(--brand-deep);
}

/* Principles */
.principle { border-top: 1px solid rgba(255,255,255,.18); padding: 1.5rem 0 2.5rem; }

/* Quality process: survey timeline + improvement cycle */
.qp { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 1024px) { .qp { grid-template-columns: 7fr 5fr; } }
.qp-timeline { background: #fff; padding: 1.75rem 1.25rem 2rem; }
.qp-cycle { position: relative; background: var(--brand-deep); color: #fff; padding: 1.75rem 1.25rem 2rem; }
@media (min-width: 640px) { .qp-timeline, .qp-cycle { padding: 2.5rem; } }

.hex-badge {
  display: grid; place-items: center; flex-shrink: 0;
  width: 2.5rem; height: 2.8rem;
  background: var(--brand); color: #fff;
  font-weight: 600; font-size: .95rem;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.ruler { position: relative; height: 6.5rem; margin: 2rem .75rem 0 .5rem; }
.ruler-track { position: absolute; left: 0; right: 0; top: 2.75rem; height: 6px; background: var(--mist); }
.ruler-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brand-light); opacity: .45; }
.ruler-fill + .ruler-fill { opacity: .35; }
.ruler-tick { position: absolute; top: 3.15rem; width: 1px; height: .5rem; background: var(--line); transform: translateX(-.5px); }
.ruler-tick.is-major { height: .85rem; background: rgba(19,37,36,.35); }
.ruler-tick b { position: absolute; top: 1.15rem; left: 50%; transform: translateX(-50%); font-weight: 500; font-size: .8125rem; color: rgba(19,37,36,.6); font-variant-numeric: tabular-nums; }
.ruler-marker { position: absolute; top: 0; transform: translateX(-50%); display: grid; justify-items: center; }
.ruler-marker::after { content: ""; width: 2px; height: .35rem; background: var(--brand); }
.ruler-unit { position: absolute; right: -.25rem; bottom: 0; transform: translateX(100%); padding-left: .4rem; font-size: .8125rem; color: rgba(19,37,36,.5); }
@media (max-width: 479px) { .ruler-unit { display: none; } }

.qp-surveys { display: grid; gap: 1.25rem; margin-top: 1.5rem; padding: 1.5rem 0 0; list-style: none; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .qp-surveys { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.qp-surveys li { display: flex; gap: 1rem; align-items: flex-start; }

.cycle { position: relative; margin: 1.75rem 0 0; padding: 0 2.75rem 0 0; list-style: none; display: grid; gap: 1.5rem; }
.cycle li { position: relative; padding-left: 2.25rem; }
.cycle li::before { content: ""; position: absolute; left: .55rem; top: 1.6rem; bottom: -1.5rem; width: 1px; background: rgba(255,255,255,.25); }
.cycle li:last-child::before { display: none; }
.cycle-dot {
  position: absolute; left: 0; top: .2rem;
  width: 1.15rem; height: 1.3rem; background: var(--brand-light);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
/* return arrow: from the last step back up to the first */
.cycle::after {
  content: ""; position: absolute; right: .5rem; top: .85rem; bottom: 2.1rem; width: 1.5rem;
  border: 1.5px solid var(--brand-light); border-left: 0;
}
.cycle::before {
  content: ""; position: absolute; right: 1.85rem; top: calc(.85rem - 5px);
  border-style: solid; border-width: 5.5px 8px 5.5px 0; border-color: transparent var(--brand-light) transparent transparent;
}
.cycle-loop { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .9375rem; font-style: italic; color: rgba(255,255,255,.75); }

/* Contact */
.contact-list > div {
  display: grid; gap: .25rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 640px) { .contact-list > div { grid-template-columns: 9rem 1fr; gap: 1.5rem; } }
.contact-list dt { font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); padding-top: .2rem; }
.contact-list dd { font-size: 1.25rem; white-space: pre-line; }
.contact-list a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.contact-list a:hover { text-decoration-color: var(--brand); }

/* Footer */
.footer-mark {
  position: absolute;
  width: 34rem; aspect-ratio: 61 / 54;
  left: -12rem; bottom: -6rem;
  background: var(--brand);
  opacity: .07;
  -webkit-mask: url(../img/mark.svg) no-repeat center / contain;
          mask: url(../img/mark.svg) no-repeat center / contain;
  pointer-events: none;
}
@media (min-width: 1024px) {
  .footer-mark { width: 30rem; left: -9rem; top: 5rem; bottom: auto; opacity: .1; }
}
@media (min-width: 1440px) { .footer-mark { left: -5rem; } }
.footer-title { font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.footer-heading {
  font-family: "Barlow Semi Condensed", Barlow, sans-serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem);
  line-height: 1.1;
  color: var(--brand);
}
footer a { transition: color .2s; }
footer a:hover { color: var(--brand); }
.footer-contact li { display: grid; grid-template-columns: 1.25rem 1fr; gap: .75rem; align-items: start; }
.footer-contact svg { width: 1.25rem; height: 1.25rem; margin-top: .15rem; color: var(--brand); }
.footer-contact span { white-space: pre-line; overflow-wrap: anywhere; }
.footer-links { column-gap: 1.25rem; }
@media (min-width: 640px) {
  .footer-links { column-gap: 0; }
  .footer-links a + a::before { content: "•"; margin: 0 .6rem; color: var(--brand-light); }
}

/* Read-more clamp (mobile only) */
@media (max-width: 767px) {
  .clamp-wrap:not(.is-open) .clamp {
    display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
  }
}

/* Mobile refinements */
@media (max-width: 639px) {
  .contact-list dd { font-size: 1.125rem; overflow-wrap: anywhere; }
  .principle { padding: 1.25rem 0 1.75rem; }
  .principle p { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Blog */
.btn-light { background: #fff; color: var(--brand-deep); border-color: #fff; }
.btn-light:hover { background: var(--mist); border-color: var(--mist); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: .875rem; color: rgba(19, 37, 36, .6); }
.post-meta-dot { width: 4px; height: 4px; background: var(--brand-light); }
.read-link { display: inline-flex; gap: .5rem; font-size: 15px; font-weight: 600; color: var(--brand); }
.read-link::after { content: "→"; font-weight: 400; transition: transform .2s; }
.group:hover .read-link::after { transform: translateX(3px); }
.back-link { display: inline-flex; gap: .5rem; font-size: .9375rem; font-weight: 600; color: var(--brand); }
.back-link::before { content: "←"; font-weight: 400; transition: transform .2s; }
.back-link:hover::before { transform: translateX(-3px); }
@media (min-width: 1024px) {
  .featured-media, .post-hero { clip-path: polygon(0 0, 100% 0, 100% 88%, 92% 100%, 0 100%); }
}

.prose-pgs { font-size: 1.125rem; line-height: 1.8; color: rgba(19, 37, 36, .85); }
.prose-pgs > * + * { margin-top: 1.25rem; }
.prose-pgs h2 {
  margin-top: 2.75rem;
  font-family: "Barlow Semi Condensed", Barlow, sans-serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem);
  line-height: 1.2;
  color: var(--ink);
}
.prose-pgs ul { padding: 0; list-style: none; }
.prose-pgs li { position: relative; padding: .55rem 0 .55rem 1.6rem; border-top: 1px solid var(--line); }
.prose-pgs li:last-child { border-bottom: 1px solid var(--line); }
.prose-pgs li::before {
  content: ""; position: absolute; left: 0; top: 1.2rem;
  width: .55rem; height: .55rem; background: var(--brand-light);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.prose-pgs blockquote {
  margin-top: 2.5rem;
  padding: 1.5rem 0 1.5rem 1.5rem;
  border-left: 3px solid var(--brand);
  font-family: "Barlow Semi Condensed", Barlow, sans-serif;
  font-size: clamp(1.35rem, 1.15rem + .8vw, 1.75rem);
  line-height: 1.35;
  color: var(--brand-deep);
}
@media (max-width: 639px) { .prose-pgs { font-size: 1.0625rem; } }
