/* Brand tokens are sampled from the ceATec logo; the site is light-only to match the logo artwork. */
:root {
  color-scheme: light;

  --teal: #007a7a;
  --teal-dark: #005f5f;
  --teal-tint: #e6f2f2;
  --slate: #2d3a3b;
  --slate-deep: #1f2829;
  --grey: #899998;

  --bg: #ffffff;
  --surface: #f4f7f7;
  --text: #1f2a2b;
  --text-muted: #55625f;
  --border: #dbe3e2;
  --on-dark: #e9efee;
  --on-dark-muted: #a9b8b6;

  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --h3: 1.25rem;
  --h2: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  --h1: clamp(2.1rem, 1.3rem + 3.2vw, 3.6rem);

  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-section: clamp(4rem, 2.5rem + 6vw, 7rem);

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgb(31 42 43 / 0.06), 0 8px 24px rgb(31 42 43 / 0.08);
  --header-h: 4.5rem;
  --container: 72rem;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--text-base) / 1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.15; color: var(--slate-deep); letter-spacing: -0.015em; }
p { margin: 0 0 var(--space-4); }
a { color: var(--teal); text-underline-offset: 0.2em; }
a:hover { color: var(--teal-dark); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
figure { margin: 0; }
address { font-style: normal; }

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

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -3rem;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--slate-deep);
  color: #fff;
  border-radius: var(--radius);
}
.skip-link:focus { top: var(--space-4); color: #fff; }

.eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--teal);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: 0 var(--space-6);
  border: 2px solid var(--teal);
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, transform 150ms ease-out;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--teal-dark); }
.btn--ghost:hover { background: var(--teal); color: #fff; }
.btn--small { min-height: 2.5rem; padding: 0 var(--space-4); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: var(--header-h);
}
.brand { margin-right: auto; }
.brand img { width: auto; height: 2.4rem; }
.site-nav ul { display: flex; align-items: center; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 var(--space-3);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
}
.site-nav a:not(.btn):hover { color: var(--teal); background: var(--teal-tint); }

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(34rem, 82dvh, 48rem);
  overflow: hidden;
  background: #dfeef6;
}
.hero__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 25% center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(255 255 255 / 0) 30%, rgb(255 255 255 / 0.82) 58%, rgb(255 255 255 / 0.9) 100%);
}
.hero__inner { padding-block: var(--space-12); }
.hero__content { max-width: 34rem; margin-left: auto; }
.hero h1 { font-size: var(--h1); }
.lead { margin-top: var(--space-6); font-size: var(--text-lg); color: var(--text); }

/* Facts */
.facts { background: var(--slate); color: var(--on-dark); }
.facts__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding-block: var(--space-8);
}
.fact {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  text-align: center;
}
.fact + .fact { border-left: 1px solid rgb(255 255 255 / 0.14); }
.fact dd { margin: 0; color: #fff; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); font-weight: 700; line-height: 1.1; }
.fact dt { margin-top: var(--space-2); color: var(--on-dark-muted); font-size: var(--text-sm); }

/* Sections */
.section { padding-block: var(--space-section); }
.section--tinted { background: var(--surface); }
.section h2 { font-size: var(--h2); margin-bottom: var(--space-6); }
.section__head { max-width: 44rem; margin: 0 auto var(--space-12); text-align: center; }
.section__head p:last-child { margin-bottom: 0; color: var(--text-muted); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
}
.split__text > p:not(.eyebrow) { color: var(--text-muted); }
.split__media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.split--reverse .split__media { order: -1; }

.checklist { display: grid; gap: var(--space-2); margin: var(--space-6) 0 0; padding: 0; list-style: none; }
.checklist li { position: relative; padding-left: 2rem; font-weight: 500; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--teal-tint);
}
.checklist li::after {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 0.55em;
  width: 0.4rem;
  height: 0.65rem;
  border: solid var(--teal);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Service cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card__body { padding: var(--space-6); }
.card__step { display: block; margin-bottom: var(--space-2); color: var(--grey); font-weight: 700; font-size: var(--text-sm); letter-spacing: 0.1em; }
.card h3 { font-size: var(--h3); margin-bottom: var(--space-3); }
.card p { margin: 0; color: var(--text-muted); }

.systems { margin-top: var(--space-section); }
.systems h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin-bottom: var(--space-6); }
.systems__list { display: grid; gap: var(--space-4); margin: 0; }
.systems__list > div { padding-left: var(--space-4); border-left: 3px solid var(--teal); }
.systems__list dt { font-weight: 700; color: var(--slate-deep); }
.systems__list dd { margin: 0; color: var(--text-muted); }

/* Branch tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tile {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  background: var(--slate);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease-out; }
.tile:hover img { transform: scale(1.05); }
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(31 40 41 / 0) 45%, rgb(31 40 41 / 0.85) 100%);
}
.tile span {
  position: absolute;
  inset: auto var(--space-4) var(--space-4);
  z-index: 1;
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
}

/* Timeline */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8) var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline li { position: relative; padding-top: var(--space-6); border-top: 2px solid var(--border); }
.timeline li::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--surface);
}
.timeline__year { display: block; margin-bottom: var(--space-2); color: var(--teal); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.timeline p { margin: 0; color: var(--text-muted); }

/* Contact */
.contact__list { display: grid; gap: var(--space-3); margin-top: var(--space-6); }
.contact__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-height: 2.75rem;
  color: var(--text);
  text-decoration: none;
}
a.contact__item:hover span { color: var(--teal); text-decoration: underline; }
.contact__item svg {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.45rem;
  border-radius: 50%;
  background: var(--teal-tint);
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact__item span { padding-top: 0.3rem; }

/* Footer */
.site-footer { background: var(--slate-deep); color: var(--on-dark-muted); font-size: var(--text-sm); }
.site-footer__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-8);
  padding-block: var(--space-12) var(--space-8);
}
.site-footer__inner img { width: auto; height: 2rem; }
.site-footer__inner p { margin: 0; max-width: 32rem; }
.site-footer a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--on-dark); }
.site-footer a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }
.site-footer__bottom { padding-block: var(--space-4); border-top: 1px solid rgb(255 255 255 / 0.1); }

/* Legal page */
.legal { padding-block: var(--space-12) var(--space-section); }
.legal__inner { max-width: 44rem; }
.legal h1 { font-size: var(--h2); margin-bottom: var(--space-8); }
.legal h2 { font-size: var(--h3); margin: var(--space-8) 0 var(--space-2); }
.legal p { color: var(--text-muted); }

/* Tablet */
@media (max-width: 1024px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr 1fr; }
  .cards .card:last-child { grid-column: 1 / -1; }
  .cards .card:last-child img { aspect-ratio: 21 / 9; }
}

/* Phone */
@media (max-width: 760px) {
  :root { --header-h: 6.5rem; }
  .site-header__inner { flex-wrap: wrap; gap: 0 var(--space-4); padding-top: var(--space-3); }
  .brand img { height: 2rem; }
  .site-nav { order: 3; flex-basis: 100%; overflow-x: auto; margin-inline: -1rem; padding-inline: 0.5rem; scrollbar-width: none; }
  .site-nav ul { justify-content: space-between; gap: 0; padding-block: var(--space-2) var(--space-2); }
  .site-nav a:not(.btn) { white-space: nowrap; padding: 0 var(--space-2); font-size: 0.9375rem; }

  .hero { align-items: end; min-height: 44rem; }
  .hero__img { object-position: 30% top; height: 60%; }
  .hero::after { background: linear-gradient(180deg, rgb(255 255 255 / 0) 22%, rgb(255 255 255 / 0.85) 42%, rgb(255 255 255) 60%); }
  .hero__inner { padding-block: var(--space-8); }
  .hero__content { margin-left: 0; }

  .facts__grid { grid-template-columns: 1fr 1fr; row-gap: var(--space-6); }
  .fact:nth-child(3) { border-left: 0; }

  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .section__head { text-align: left; }

  .cards { grid-template-columns: 1fr; }
  .cards .card:last-child img { aspect-ratio: 3 / 2; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile { aspect-ratio: 4 / 5; }
  .tile:last-child { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline li { padding: 0 0 var(--space-6) var(--space-6); border-top: 0; border-left: 2px solid var(--border); }
  .timeline li::before { top: 0.35rem; left: -7px; }

  .site-footer__inner { grid-template-columns: 1fr; gap: var(--space-4); }
}
