:root {
  --navy: #12344f;
  --blue: #2d6f98;
  --text: #1d2d38;
  --muted: #61727e;
  --line: #d8e0e5;
  --light: #f3f5f6;
  --white: #ffffff;
  --container: 1120px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 74px;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.nav-open,
body.dialog-open {
  overflow: hidden;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  transform: translateY(-150%);
  background: var(--white);
  color: var(--navy);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.nav-wrap {
  position: relative;
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
}

.brand img {
  width: 178px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--blue);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--navy);
  transition:
    transform 150ms ease,
    opacity 150ms ease;
}

.hero {
  position: relative;
  display: flex;
  min-height: 560px;
  align-items: center;
  background-image: url("../../images/banner1.jpg");
  background-position: center;
  background-size: cover;
  color: var(--white);
}

.hero::before {
  position: absolute;
  inset: 0;
  background: rgba(8, 31, 48, 0.8);
  content: "";
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 720px;
  margin-bottom: 22px;
  font-size: clamp(2.6rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 590px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.1rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 21px;
  border: 1px solid var(--blue);
  border-radius: 4px;
  background: var(--blue);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
}

.button:hover,
.button:focus-visible {
  border-color: var(--navy);
  background: var(--navy);
}

.section {
  padding: 96px 0;
}

.section-header {
  max-width: 640px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-header h2,
.about-grid h2 {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section-header p {
  margin-bottom: 0;
  color: var(--muted);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.service-card {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.service-card:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 24px rgba(18, 52, 79, 0.08);
}

.service-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 25px;
  place-items: center;
  border-radius: 4px;
  background: #e8eff3;
  color: var(--navy);
}

.service-icon svg {
  width: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.service-card h3 {
  margin-bottom: 12px;
  color: var(--navy);
  font-size: 1.17rem;
  font-weight: 600;
}

.service-card p {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.service-card button {
  width: fit-content;
  margin-top: auto;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid var(--blue);
  background: transparent;
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 600;
}

.service-card button:hover,
.service-card button:focus-visible {
  color: var(--navy);
}

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

.about-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 80px;
}

.about-grid h2 {
  margin: 0;
}

.about-grid p {
  max-width: 700px;
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 1.05rem;
}

.about-grid p:last-child {
  margin-bottom: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 48px;
  align-items: stretch;
}

.contact-form {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

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

.contact-form label {
  display: block;
  margin-bottom: 20px;
}

.contact-form label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #cbd5db;
  border-radius: 4px;
  outline: none;
  background: var(--white);
}

.contact-form input {
  height: 48px;
  padding: 0 13px;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
  padding: 12px 13px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45, 111, 152, 0.1);
}

.contact-details {
  padding: 32px;
  border-radius: 6px;
  background: var(--navy);
  color: var(--white);
}

.contact-details > div {
  padding: 0 0 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 25px;
}

.contact-details > div:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.contact-details h3 {
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-details a,
.contact-details p {
  margin: 0;
  color: var(--white);
  font-size: 0.94rem;
}

.contact-details a:hover,
.contact-details a:focus-visible {
  text-decoration: underline;
}

.site-footer {
  padding: 28px 0;
  background: #0b283e;
  color: var(--white);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-content strong {
  font-size: 0.94rem;
  letter-spacing: 0.12em;
}

.footer-content span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.78rem;
}

.service-dialog {
  width: min(calc(100% - 36px), 720px);
  max-height: 85vh;
  padding: 32px;
  overflow: auto;
  border: 0;
  border-radius: 6px;
  background: var(--white);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(7, 28, 43, 0.25);
}

.service-dialog::backdrop {
  background: rgba(6, 25, 39, 0.72);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.dialog-header h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 650;
}

.dialog-header button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--navy);
  font-size: 1.6rem;
  line-height: 1;
}

.dialog-header button:hover,
.dialog-header button:focus-visible {
  border-color: var(--navy);
}

.service-dialog ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-dialog li {
  padding: 14px 18px 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 0.92rem;
}

.service-dialog li:nth-child(odd) {
  margin-right: 18px;
}

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-grid {
    gap: 50px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(calc(100% - 32px), var(--container));
  }

  .nav-wrap {
    min-height: 68px;
  }

  .brand img {
    width: 158px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-open .nav-toggle span:first-child {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav-open .nav-toggle span:last-child {
    transform: translateY(-6px) rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: -16px;
    left: -16px;
    display: none;
    align-items: stretch;
    gap: 0;
    flex-direction: column;
    padding: 8px 16px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--white);
  }

  .nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .hero {
    min-height: 500px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 11vw, 3.2rem);
  }

  .hero p {
    font-size: 1rem;
  }

  .section {
    padding: 72px 0;
  }

  .services-grid,
  .about-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .about-grid {
    gap: 24px;
  }

  .service-card {
    min-height: 290px;
  }

  .contact-form,
  .contact-details {
    padding: 24px;
  }

  .footer-content {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}

@media (max-width: 520px) {
  .hero {
    min-height: 470px;
  }

  .hero .button {
    width: 100%;
  }

  .service-dialog {
    padding: 23px;
  }

  .service-dialog ul {
    grid-template-columns: 1fr;
  }

  .service-dialog li:nth-child(odd) {
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
