:root {
  --ink: #13202b;
  --muted: #5c6975;
  --line: #dfe6ec;
  --paper: #ffffff;
  --soft: #f5f8fa;
  --lead: #1b6f8f;
  --lead-dark: #104a61;
  --accent: #d9a441;
  --accent-dark: #9c6e1e;
  --success: #2e7d62;
  --shadow: 0 22px 60px rgba(18, 32, 43, .12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1rem; color: var(--muted); }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: 0; }
h1 { font-size: clamp(2.55rem, 7vw, 5.7rem); max-width: 980px; overflow-wrap: break-word; hyphens: auto; }
h2 { font-size: clamp(2rem, 4.2vw, 3.75rem); }
h3 { font-size: clamp(1.16rem, 1.8vw, 1.42rem); }

.container {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 0;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  border-radius: var(--radius);
  transform: translateY(-140%);
  transition: transform .16s ease;
}
.skip-link:focus { transform: translateY(12px); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid rgba(223,230,236,.88);
  backdrop-filter: blur(18px);
}

.nav {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}
.brand img { width: 54px; height: 54px; object-fit: contain; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #283744;
  font-size: .95rem;
  font-weight: 650;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--soft);
  color: var(--lead-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--lead), var(--lead-dark));
  box-shadow: 0 13px 26px rgba(27,111,143,.24);
}
.btn-primary:hover { box-shadow: 0 16px 30px rgba(27,111,143,.3); }
.btn-secondary {
  color: var(--lead-dark);
  border-color: rgba(27,111,143,.22);
  background: white;
}
.btn-ghost {
  color: white;
  border-color: rgba(255,255,255,.42);
  background: rgba(255,255,255,.12);
}
.btn-small { min-height: 38px; padding: 9px 13px; font-size: .9rem; }

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}
.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: calc(100vh - 74px);
  display: grid;
  align-items: end;
  color: white;
  background: #14222c;
  overflow: hidden;
}
.hero.compact { min-height: 68vh; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,22,30,.86), rgba(10,22,30,.58) 48%, rgba(10,22,30,.18));
  z-index: 1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(0deg, rgba(10,22,30,.68), transparent);
  z-index: 1;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero img[src$="thomag-logo.png"] {
  width: min(62vw, 720px);
  height: auto;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  opacity: .14;
  filter: brightness(0) invert(1);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 9vh 0 12vh;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.eyebrow::before {
  content: "";
  width: 38px;
  height: 2px;
  background: var(--accent);
}
.hero p {
  max-width: 720px;
  margin: 22px 0 28px;
  color: rgba(255,255,255,.82);
  font-size: clamp(1.04rem, 2vw, 1.28rem);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.section { padding: 92px 0; }
.section.soft { background: var(--soft); }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(280px, .55fr);
  gap: 44px;
  align-items: end;
  margin-bottom: 42px;
}
.section-head p { font-size: 1.08rem; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 54px;
  align-items: center;
}
.split img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
}
.stat {
  padding: 25px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat strong {
  display: block;
  font-size: 2rem;
  color: var(--lead-dark);
  line-height: 1;
}
.stat span { color: var(--muted); font-size: .92rem; }

.service-grid,
.job-grid,
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(18,32,43,.06);
}
.card img,
.placeholder-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.placeholder-media {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef5f7, #f8f5eb);
  color: var(--lead-dark);
  font-weight: 900;
  text-align: center;
  padding: 22px;
}
.card-body { padding: 24px; }
.card-body p { margin-top: 12px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.benefit {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}
.benefit strong { display: block; margin-bottom: 6px; color: var(--lead-dark); }

.cta-band {
  padding: 54px 0;
  color: white;
  background: linear-gradient(135deg, var(--lead-dark), #13313f);
}
.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, .8fr) auto;
  gap: 24px;
  align-items: center;
}
.cta-inner p { color: rgba(255,255,255,.78); margin-bottom: 0; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  counter-reset: steps;
}
.step {
  counter-increment: steps;
  padding: 26px;
  border-left: 3px solid var(--accent);
  background: var(--soft);
}
.step::before {
  content: "0" counter(steps);
  display: block;
  margin-bottom: 14px;
  color: var(--accent-dark);
  font-weight: 900;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, .55fr);
  gap: 34px;
  align-items: start;
}
.form {
  display: grid;
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}
label { display: grid; gap: 7px; font-weight: 800; color: #263542; }
input, textarea, select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #cad5dc;
  border-radius: var(--radius);
  font: inherit;
  color: var(--ink);
  background: white;
}
textarea { min-height: 132px; resize: vertical; }
.form-note { font-size: .87rem; color: var(--muted); }

.info-list {
  display: grid;
  gap: 14px;
}
.info-item {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}
.info-item strong { display: block; color: var(--lead-dark); }

.legal article {
  max-width: 900px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
}
.legal h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 18px; }
.legal h3 { margin: 24px 0 10px; }

.site-footer {
  color: rgba(255,255,255,.82);
  background: #111c24;
}
.footer-main {
  display: grid;
  grid-template-columns: 1.05fr .7fr .95fr;
  gap: 34px;
  padding: 58px 0;
}
.footer-main p { color: rgba(255,255,255,.72); }
.footer-main h3 { color: white; font-size: 1.05rem; margin-bottom: 14px; }
.footer-logo { width: 142px; filter: brightness(0) invert(1); margin-bottom: 18px; }
.footer-links { display: grid; gap: 9px; }
.footer-links a:hover { color: white; }
.map {
  width: 100%;
  height: 230px;
  border: 0;
  border-radius: var(--radius);
  filter: grayscale(.2);
}
.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,.11);
  font-size: .88rem;
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.cookie-banner,
.install-banner {
  position: fixed;
  z-index: 60;
  left: 18px;
  right: 18px;
  bottom: 18px;
  max-width: 760px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}
.cookie-banner[hidden],
.install-banner[hidden] { display: none; }
.cookie-actions,
.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.floating-apply {
  position: fixed;
  z-index: 35;
  right: 18px;
  bottom: 18px;
  display: none;
}

@media (max-width: 920px) {
  .menu-button { display: block; }
  .nav-links {
    position: fixed;
    top: 74px;
    left: 0;
    right: 0;
    display: none;
    padding: 14px 18px 18px;
    border-bottom: 1px solid var(--line);
    background: white;
    box-shadow: var(--shadow);
  }
  .nav-links.is-open { display: grid; }
  .header-actions .btn-secondary { display: none; }
  .section-head,
  .split,
  .cta-inner,
  .contact-layout,
  .footer-main {
    grid-template-columns: 1fr;
  }
  .service-grid,
  .job-grid,
  .benefit-grid,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1180px); }
  .brand img { width: 50px; height: 50px; }
  .hero { min-height: 78vh; }
  .hero.compact { min-height: 58vh; }
  .section { padding: 68px 0; }
  .service-grid,
  .job-grid,
  .benefit-grid,
  .steps,
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .footer-bottom .container { display: grid; }
  .floating-apply { display: inline-flex; }
  .cookie-banner { bottom: 80px; }
}
  h1 { font-size: clamp(2.08rem, 10vw, 3.15rem); }
  .hero p { font-size: 1rem; }
