@import url("tokens.css");

/* ============================================================ reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-body);
  color: var(--body);
  background: var(--light);
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; height: auto; display: block; }
/* <picture> is inline by default, which collapses the height:100% / width:100%
   rules on the <img> inside full-bleed media wrappers. */
picture { display: block; }
a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-dark-10); }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4, h5, h6 { margin: 0 0 .6em; color: var(--dark); font-weight: var(--fw-bold); }
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); }
h5 { font-size: var(--fs-h5); line-height: var(--lh-h5); }
h6 { font-size: var(--fs-h6); line-height: var(--lh-h6); }
p { margin: 0 0 1.2em; }

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

/* ============================================================ layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--res-spacing);
}
.section { padding-block: clamp(48px, 7vw, 96px); }
.section--tint { background: var(--grey-f7); }
.grid { display: grid; gap: var(--gutter); }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brand); color: #fff; padding: 10px 18px;
}
.skip-link:focus { left: 0; color: #fff; }

/* ============================================================ buttons */
.btn {
  display: inline-block;
  padding: 13px 32px;
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: var(--fw-bold);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.btn:hover { background: var(--brand-dark-10); border-color: var(--brand-dark-10); color: #fff; }
.btn--ghost { background: transparent; color: var(--brand); }
.btn--ghost:hover { background: var(--brand); color: #fff; }
.btn--light { background: #fff; border-color: #fff; color: var(--brand); }
.btn--light:hover { background: transparent; color: #fff; border-color: #fff; }

/* ============================================================ header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--grey-e1);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--gutter);
  min-height: var(--header-h);
}
.logo { margin: 0; font-size: 0; line-height: 0; }
.logo img { max-width: var(--logo-mw); width: 100%; }

.main-menu { display: flex; align-items: center; gap: 4px; }
.main-menu > li { position: relative; }
.main-menu > li > a {
  display: block; padding: 12px 14px;
  color: var(--dark); font-weight: var(--fw-bold);
  font-size: 13px; letter-spacing: .03em; text-transform: uppercase;
}
.main-menu > li > a:hover,
.main-menu > li.is-current > a { color: var(--brand); }
.main-menu > li.has-children > a::after {
  content: ""; display: inline-block; margin-left: 7px;
  border: 4px solid transparent; border-top-color: currentColor;
  transform: translateY(2px);
}
.submenu {
  position: absolute; top: 100%; left: 0; min-width: 300px;
  background: #fff; border-top: 3px solid var(--brand);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  padding: 10px 0;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all var(--transition);
}
.main-menu > li:hover > .submenu,
.main-menu > li:focus-within > .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu a { display: block; padding: 9px 22px; color: var(--body); font-size: 13px; }
.submenu a:hover { color: var(--brand); background: var(--grey-f7); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--dark); margin: 5px 0; transition: var(--transition); }

@media (max-width: 991px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 auto; width: min(340px, 85vw);
    background: #fff; padding: 20px; overflow-y: auto;
    transform: translateX(100%); transition: transform var(--transition);
    box-shadow: -8px 0 24px rgba(0,0,0,.12);
  }
  .site-nav.is-open { transform: none; }
  .main-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border-top: 0; border-left: 2px solid var(--grey-e1);
    margin-left: 14px; padding: 0; display: none;
  }
  .main-menu > li.is-expanded > .submenu { display: block; }
}

/* ============================================================ hero slider */
.hero { position: relative; min-height: clamp(420px, 62vh, 640px); background: var(--dark); overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0;
  display: grid; align-items: center;
  opacity: 0; visibility: hidden; transition: opacity .7s ease;
}
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide__media { position: absolute; inset: 0; }
.hero-slide__media picture { width: 100%; height: 100%; }
.hero-slide__media img, .hero-slide__media video { width: 100%; height: 100%; object-fit: cover; }
.hero-slide__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.35)); }
.hero-slide__inner { position: relative; max-width: 660px; color: #fff; padding-block: 60px; }
.hero-slide__eyebrow { color: var(--brand-light-5); font-weight: var(--fw-bold); letter-spacing: .18em; text-transform: uppercase; margin-bottom: 14px; }
.hero-slide__heading { color: #fff; font-size: clamp(28px, 4vw, 46px); line-height: 1.18; }
.hero-slide__body { font-size: 17px; line-height: 1.65; margin-bottom: 28px; color: rgba(255,255,255,.9); }
.hero-dots { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; gap: 10px; z-index: 2; }
.hero-dots button {
  width: 12px; height: 12px; border: 0; border-radius: 50%; padding: 0;
  background: linear-gradient(to bottom, var(--grey-99), var(--grey-e1));
}
.hero-dots button[aria-current="true"] { background: #666; }

/* ============================================================ page hero (inner pages) */
.page-hero {
  position: relative;
  display: grid; align-items: center;
  min-height: clamp(300px, 42vh, 460px);
  background: var(--dark); color: #fff; overflow: hidden;
}
.page-hero__media { position: absolute; inset: 0; }
.page-hero__media picture { width: 100%; height: 100%; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.78), rgba(0,0,0,.42)); }
.page-hero__inner { position: relative; padding-block: 60px; }
.page-hero__eyebrow { color: rgba(255,255,255,.78); font-weight: var(--fw-bold); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 10px; }
.page-hero h1 { color: #fff; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.12; max-width: 900px; }

/* word rotator (replaces Porto porto_fancytext)
   The active word must be visible from first paint — never gated behind an
   animation completing. JS adds .is-cycling only when it actually starts
   rotating, so no-JS / reduced-motion / slow paints still show the word. */
.rotator { display: inline-block; position: relative; color: var(--brand-light-5); }
.rotator > span { display: none; }
.rotator > span.is-active { display: inline; opacity: 1; }
.rotator.is-cycling > span.is-active { animation: rotator-in .45s ease; }
/* Animate transform only — never opacity. A word must never be mid-fade-invisible;
   if the animation stalls or is interrupted the text is still fully legible. */
@keyframes rotator-in { from { transform: translateY(.3em); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .rotator.is-cycling > span.is-active { animation: none; }
  .hero-slide { transition: none; }
}

/* ============================================================ approach */
.approach__grid { grid-template-columns: 1fr; align-items: center; }
@media (min-width: 992px) { .approach__grid { grid-template-columns: 1.05fr .95fr; gap: 60px; } }
.approach__glyph { color: var(--brand); font-size: 30px; line-height: 1; margin-bottom: 12px; }
.bullet-list li { position: relative; padding-left: 30px; margin-bottom: 14px; }
.bullet-list li::before {
  content: "⬢"; position: absolute; left: 0; top: -1px;
  color: var(--brand); font-size: 13px;
}

/* ============================================================ info boxes */
.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(32px, 5vw, 56px); }
.section-head h2 { margin-bottom: .35em; }
.section-head p { font-size: 16px; }

.info-grid { grid-template-columns: 1fr; }
@media (min-width: 576px) { .info-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .info-grid { grid-template-columns: repeat(3, 1fr); } }
.info-box {
  background: #fff; padding: 34px 30px;
  border: 1px solid var(--grey-e1); border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.info-box:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0,0,0,.08); border-color: var(--brand); }
/* The source icons are all pure white (#fff) — they were designed to sit inside a
   coloured shape. Reproducing that with a brand-coloured disc. */
.info-box__icon-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--brand); margin-bottom: 22px;
  transition: background var(--transition);
}
.info-box:hover .info-box__icon-wrap { background: var(--brand-dark-10); }
.info-box__icon { width: 38px; height: 38px; object-fit: contain; }
.info-box h3 { font-size: 19px; line-height: 1.35; }
.info-box p { margin: 0; }

/* ============================================================ service tiles */
.tile-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.service-tile {
  display: flex; align-items: flex-end;
  min-height: 190px; padding: 28px;
  background: var(--dark); color: #fff;
  border-radius: var(--radius); position: relative; overflow: hidden;
  transition: background var(--transition);
}
.service-tile::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4px; background: var(--brand);
  transform: scaleX(0); transform-origin: left; transition: transform var(--transition);
}
.service-tile:hover { background: var(--brand); color: #fff; }
.service-tile:hover::before { transform: scaleX(1); }
.service-tile h3 { color: #fff; margin: 0; font-size: 22px; line-height: 1.25; }

/* ============================================================ feature rows */
.feature-row { display: grid; gap: clamp(28px, 5vw, 60px); align-items: center; }
@media (min-width: 992px) {
  .feature-row { grid-template-columns: 1fr 1fr; }
  .feature-row--image-left .feature-row__media { order: -1; }
}
.feature-row + .feature-row { margin-top: clamp(48px, 7vw, 88px); }
/* Never upscale — several source images are only ~217px wide and turn to mush
   if stretched across a 590px column. */
.feature-row__media picture { margin-inline: auto; }
.feature-row__media img {
  width: auto; max-width: 100%; margin-inline: auto;
  border-radius: var(--radius);
}
/* Consecutive feature rows are each their own <section>; without this they
   stack 96px + 96px of padding and the page reads as mostly whitespace. */
.section--feature { padding-block: clamp(28px, 3.5vw, 52px); }
/* Intro sits directly above the first feature row — trim its bottom so the two
   paddings don't add up to ~150px of dead space. */
.section--intro { padding-block: clamp(40px, 5vw, 72px) clamp(14px, 2vw, 26px); }
.feature-row h2, .feature-row h3 { margin-bottom: .5em; }

/* ============================================================ steps */
.step-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); counter-reset: step; }
.step { padding: 32px 28px; background: #fff; border: 1px solid var(--grey-e1); border-radius: var(--radius); counter-increment: step; }
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block; color: var(--brand); font-weight: var(--fw-bold); font-size: 34px; line-height: 1; margin-bottom: 14px;
}

/* ============================================================ icon list */
.icon-list li { position: relative; padding-left: 32px; margin-bottom: 12px; }
.icon-list li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--brand);
}

/* ============================================================ address cards */
.address-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.address-card { padding: 32px 28px; background: var(--grey-f7); border-left: 3px solid var(--brand); border-radius: var(--radius); }
.address-card h3 { font-size: 18px; }
.address-card p { margin-bottom: .5em; }

/* ============================================================ form */
.contact-form { display: grid; gap: 18px; max-width: 720px; }
@media (min-width: 768px) { .contact-form { grid-template-columns: 1fr 1fr; } .contact-form .field--full { grid-column: 1 / -1; } }
.field label { display: block; margin-bottom: 6px; font-weight: var(--fw-bold); color: var(--dark); font-size: 13px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--grey-cc); border-radius: var(--radius);
  font: inherit; color: var(--dark); background: #fff;
}
.field input:focus, .field textarea:focus { border-color: var(--brand); outline: none; }
.field textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { grid-column: 1 / -1; padding: 14px 18px; border-radius: var(--radius); margin-bottom: 4px; font-weight: var(--fw-bold); }
.form-status--ok { background: #e6f6ec; color: #1b7a3d; border: 1px solid #b6e2c4; }
.form-status--err { background: #fdeaee; color: var(--brand-dark-10); border: 1px solid #f4c2ce; }

/* ============================================================ CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-light-5) 100%);
  color: #fff; padding-block: clamp(44px, 6vw, 72px);
}
.cta-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.cta-band__eyebrow { font-size: 15px; font-weight: var(--fw-bold); letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.85); margin-bottom: 8px; }
.cta-band h3 { color: #fff; margin: 0; font-size: clamp(22px, 3vw, 32px); line-height: 1.3; }

/* ============================================================ footer */
.site-footer { background: var(--footer-bg); color: rgba(255,255,255,.72); padding-top: clamp(48px, 6vw, 76px); }
.site-footer h4 { color: #fff; font-size: 16px; letter-spacing: .04em; margin-bottom: 20px; }
.site-footer a { color: rgba(255,255,255,.72); }
.site-footer a:hover { color: var(--brand-light-5); }
.footer-grid { grid-template-columns: 1fr; padding-bottom: 48px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1.2fr; gap: 48px; } }
.footer-logo { max-width: 200px; margin-bottom: 22px; }
.footer-contact li { margin-bottom: 10px; }
.footer-links li { margin-bottom: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-block: 22px;
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-size: 13px;
}

/* ============================================================ gap placeholder (build-time only) */
.gap-note {
  border: 2px dashed var(--brand);
  background: #fff5f7;
  color: var(--dark);
  padding: 24px 28px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.7;
}
.gap-note strong { color: var(--brand); display: block; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.gap-note ul { list-style: disc; padding-left: 20px; margin-top: 10px; }
.gap-note li { margin-bottom: 5px; }
body.is-clean .gap-note { display: none; }

/* ============================================================ 404 */
.error-page { text-align: center; padding-block: clamp(80px, 14vw, 160px); }
.error-page__code { font-size: clamp(72px, 16vw, 160px); font-weight: var(--fw-bold); color: var(--brand); line-height: 1; }
