:root {
  --font-title: "Outfit", sans-serif;
  --font-text: "Source Sans 3", "Source Sans Pro", sans-serif;
  --primary: #006262;
  --primary-400: #008282;
  --primary-300: #339b9b;
  --navy: #072534;
  --navy-2: #0f3549;
  --yellow: #ffcd18;
  --bg: #fdfdfd;
  --bg-2: #f3f7fc;
  --header-h: 4.35rem;
  --max: 1200px;
  --radius: 14px;
  --shadow: 0 8px 24px #091e4214;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-text);
  color: var(--navy);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-title);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.bar {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.38);
  border-bottom: 1px solid rgba(7, 37, 52, 0.08);
  box-shadow: 0 4px 18px #091e420a;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.header.is-scrolled,
.header.is-open {
  background: #fff;
  border-bottom-color: #edf2f8;
  box-shadow: 0 8px 20px #091e4210;
}

.header-inner {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: block;
  flex-shrink: 0;
}

.brand-box {
  width: 148px;
  height: 54px;
  border: 0;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  display: flex;
  align-items: center;
  padding-left: 12px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--navy);
  position: relative;
}

.brand-box::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: 72%;
  height: 2px;
  background: currentColor;
}

.brand-box small {
  position: absolute;
  right: 9px;
  bottom: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.nav {
  display: flex;
  gap: 28px;
  font-family: var(--font-title);
  font-weight: 500;
}

.nav a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

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

.lang {
  position: relative;
}

.lang-btn,
.menu-toggle {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--navy);
  padding: 8px 10px;
  border-radius: 999px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-flag {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(7, 37, 52, 0.18);
  flex-shrink: 0;
  display: block;
}

.lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 168px;
  overflow: hidden;
  z-index: 20;
}

.lang-menu.open {
  display: block;
}

.lang-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  padding: 10px 14px;
  cursor: pointer;
}

.lang-menu button:hover,
.lang-menu button.is-active {
  background: #d9ecec;
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--font-title);
  font-weight: 600;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-400);
}

.btn-dark {
  background: var(--navy);
  color: #fff;
}

.menu-toggle {
  display: none;
  font-size: 1.4rem;
  min-width: 44px;
  min-height: 44px;
}

.hero {
  --hero-wash: linear-gradient(90deg, rgba(253, 253, 253, 0.88) 0%, rgba(253, 253, 253, 0.42) 42%, rgba(7, 37, 52, 0.12) 100%);
  min-height: 0;
  display: flex;
  align-items: flex-start;
  padding: calc(var(--header-h) + 48px) 0 48px;
  background-color: var(--navy);
  background-image: var(--hero-wash), url("../assets/todex2-hero.jpg?v=opt1");
  background-position: 0 0, center 42%;
  background-size: cover;
  background-repeat: no-repeat;
}

@supports (background-image: image-set(url("x.webp") type("image/webp"))) {
  .hero {
    background-image:
      var(--hero-wash),
      image-set(
        url("../assets/todex2-hero.webp?v=opt1") type("image/webp"),
        url("../assets/todex2-hero.jpg?v=opt1") type("image/jpeg")
      );
  }
}

.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  display: block;
  max-width: none;
}

.title-line {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  max-width: 100%;
}

.hero h1 > span:last-child {
  display: block;
  margin-top: 6px;
}

.hero h1 > .pill {
  display: inline-block;
  white-space: nowrap;
  margin-bottom: 8px;
}

.hero h1 > span:last-child {
  overflow-wrap: break-word;
  max-width: min(28ch, 100%);
}

.pill {
  background: var(--yellow);
  color: var(--navy);
  border-radius: 999px;
  padding: 0.08em 0.5em 0.14em;
  display: inline-block;
  white-space: nowrap;
}

.hero-lead {
  max-width: min(80ch, 100%);
  font-size: 1.12rem;
  color: var(--navy-2);
}

.hero-lead span {
  display: block;
  overflow-wrap: break-word;
}

@media (min-width: 981px) {
  .hero-lead span,
  .about-lead,
  .services-intro,
  .process h2,
  .contact-lead span {
    white-space: nowrap;
  }
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.band {
  background: var(--navy);
  padding: 48px 0;
}

.band-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 20px;
  align-items: start;
}

.band-item {
  --d: 0ms;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 0 12px;
}

.js .band-item {
  opacity: 0;
  transform: translateY(18px);
}

.band-item:nth-child(1) { --d: 0ms; }
.band-item:nth-child(2) { --d: 90ms; }
.band-item:nth-child(3) { --d: 180ms; }
.band-item:nth-child(4) { --d: 270ms; }

.band-item.is-in {
  animation: band-rise 0.7s cubic-bezier(0.22, 0.8, 0.32, 1) both;
  animation-delay: var(--d);
}

.band h3 {
  color: var(--primary-300);
  font-size: 1.02rem;
  line-height: 1.35;
  margin: 0;
  max-width: 26ch;
  min-height: 2.7em;
}

.band h3 span {
  display: block;
}

.icon-circle {
  position: relative;
  width: 52px;
  height: 52px;
  border: 1.5px solid var(--primary-400);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--primary-300);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
  pointer-events: none;
}

.icon-circle.is-stat {
  width: 68px;
  height: 68px;
  font-size: 0.92rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.band-item.is-in .icon-circle {
  animation: icon-pop 0.55s cubic-bezier(0.22, 0.8, 0.32, 1);
  animation-delay: var(--d);
}

.icon-circle svg {
  width: 24px;
  height: 24px;
  display: block;
}

.section,
.process,
.band {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.section {
  padding: 64px 0 72px;
}

.thanks {
  min-height: 58vh;
  display: flex;
  align-items: center;
}

.thanks-copy {
  max-width: 38rem;
}

.thanks h1 {
  margin: 0 0 12px;
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
}

.thanks p {
  margin: 0 0 18px;
  color: #3d4f58;
}

.about-section {
  background: var(--bg);
}

#services {
  background: var(--bg-2);
}

.about-intro {
  margin-bottom: 36px;
}

.about-lead {
  font-family: var(--font-title);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  color: var(--navy);
  line-height: 1.35;
  margin: 8px 0 22px;
  overflow-wrap: break-word;
}

.about-intro .kicker {
  color: var(--primary);
}

.about-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 48px;
}

.about-copy p {
  margin: 0;
  color: var(--navy-2);
}

.about-means {
  margin: 0 0 18px;
}

.about-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.about-point {
  background: var(--bg-2);
  padding: 22px 20px;
  border-radius: 14px;
}

.about-point h3 {
  font-size: 1.02rem;
  color: var(--navy);
  margin: 0 0 8px;
  line-height: 1.3;
}

.about-point p {
  margin: 0;
  color: #3f5d6d;
  font-size: 0.95rem;
  line-height: 1.45;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 28px;
}

.section-head-center {
  justify-content: center;
  text-align: center;
  margin-bottom: 12px;
}

.kicker {
  color: var(--primary);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.section h2,
.process h2 {
  font-size: 1.7rem;
  color: var(--primary);
  line-height: 1.25;
  text-wrap: balance;
}

.services-intro {
  color: var(--navy-2);
  margin: 8px 0 32px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.service-card {
  --d: 0ms;
  background: #fff;
  padding: 26px 24px;
  border-radius: 14px;
}

.service-card:nth-child(1) { --d: 0ms; }
.service-card:nth-child(2) { --d: 80ms; }
.service-card:nth-child(3) { --d: 160ms; }
.service-card:nth-child(4) { --d: 240ms; }

.js .service-card {
  opacity: 0;
  transform: translateY(18px);
}

.service-card.is-in {
  animation: band-rise 0.7s cubic-bezier(0.22, 0.8, 0.32, 1) both;
  animation-delay: var(--d);
}

.service-card .icon-circle {
  margin-bottom: 14px;
}

.service-card h3 {
  font-size: 1.08rem;
  color: var(--navy);
  margin: 0 0 10px;
  line-height: 1.3;
}

.service-card p {
  margin: 0;
  color: #3f5d6d;
  font-size: 0.95rem;
  line-height: 1.5;
}

.process {
  background: var(--navy);
  color: #c5d0de;
  padding: 64px 0;
}

.process h2 {
  color: #fff;
  display: block;
  margin: 0 0 32px;
}

.process .kicker {
  color: var(--yellow);
  margin-bottom: 22px;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.process-step {
  margin: 0;
}

.process-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.05rem;
}

.process-step h3 {
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0 0 8px;
}

.process-step p {
  margin: 0;
  line-height: 1.5;
  font-size: 0.95rem;
}

.contact-section {
  background: var(--bg-2);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 26rem) minmax(0, 1fr);
  gap: 40px 56px;
  align-items: start;
}

#contact h2 {
  max-width: 16ch;
}

.contact-lead {
  color: var(--navy-2);
  margin: 8px 0 28px;
  line-height: 1.5;
}

.contact-lead span {
  display: block;
  overflow-wrap: break-word;
}

.contact-details {
  display: grid;
  gap: 18px;
  margin: 0;
}

.contact-details > div {
  margin: 0;
}

.contact-details dt {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 6px;
}

.contact-details dd {
  margin: 0;
  color: var(--navy);
}

.contact-details a {
  color: inherit;
}

.contact-details a:hover {
  color: var(--primary);
}

.contact-place {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid #d4dde4;
}

.contact-place .kicker {
  margin-bottom: 14px;
}

.contact-address {
  display: block;
  color: inherit;
  line-height: 1.4;
}

.contact-address strong {
  display: block;
  font-weight: 600;
}

.contact-address span {
  display: block;
}

.contact-form {
  position: relative;
  display: grid;
  gap: 14px;
}

.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.field label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #d4dde4;
  background: #fff;
  padding: 13px;
  font: 0.95rem/1.4 var(--font-text);
  color: var(--navy);
  border-radius: 0;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--primary);
  border-color: var(--primary);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-submit {
  justify-self: start;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  padding: 12px 22px;
  border-radius: 4px;
}

.form-note,
.form-success {
  margin: 0;
  font-size: 0.82rem;
  color: #66757d;
}

.form-success {
  color: var(--primary);
}

.footer {
  background: var(--navy);
  color: #dbe1e4;
  padding: 48px 0 24px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 64px;
  flex-wrap: wrap;
}

.footer-copy {
  min-width: 0;
  flex: 1 1 20rem;
}

.footer-lead {
  margin: 0;
}

.footer-lead span {
  display: block;
  overflow-wrap: break-word;
}

.footer-contacts {
  flex: 0 0 auto;
  min-width: 240px;
}

.footer .brand-box {
  border-color: #fff;
  color: #fff;
  margin-bottom: 16px;
}

.footer h4 {
  color: #fff;
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.footer a {
  color: #c5d0de;
}

.footer a:hover {
  color: var(--yellow);
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 5px 0;
  line-height: 1.3;
}

.footer-contact img {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  object-fit: contain;
}

.footer-contact:hover img {
  filter: brightness(1.12);
}

.legal {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #3f5d6d;
  font-size: 0.88rem;
  text-align: right;
}

@media (max-width: 1100px) {
  .band-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-points {
    grid-template-columns: 1fr;
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .footer-copy,
  .footer-contacts {
    flex: none;
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 980px) {
  .services-grid,
  .about-copy {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 4.15rem;
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 12px 20px 20px;
    gap: 8px;
    border-bottom: 1px solid #edf2f8;
  }

  .nav.open {
    display: flex;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-actions .btn {
    display: none;
  }

  .brand-box {
    width: 124px;
    height: 46px;
    font-size: 18px;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--header-h) + 24px) 0 24px;
    background-position: 0 0, center 42%;
  }

  .band-grid,
  .contact-layout,
  .process-steps {
    grid-template-columns: 1fr;
  }

  .header-inner,
  .bar {
    width: calc(100% - 32px);
  }

  .band-item {
    padding: 0;
  }

  .process h2,
  #contact h2 {
    max-width: none;
  }
}

@keyframes band-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes icon-pop {
  0% {
    transform: scale(0.72);
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .band-item,
  .service-card {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}
