:root {
  --ink: #1e1e1e;
  --ink-soft: #6b7280;
  --blue: #1d4171;
  --blue-deep: #14315a;
  --warm: #e8a87c;
  --paper: #ffffff;
  --mist: #f7f6f2;
  --line: #e5e7eb;
  --hover: #f1f1f1;
  --shadow: 0 24px 70px rgba(30, 30, 30, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--mist);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

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

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 16px max(20px, calc((100vw - 1160px) / 2));
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(220, 231, 242, 0.85);
  backdrop-filter: blur(18px);
  transition: box-shadow 180ms ease, min-height 180ms ease;
}

.site-header.is-scrolled {
  min-height: 68px;
  box-shadow: 0 12px 30px rgba(30, 30, 30, 0.08);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 650;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
}

.main-nav a::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  content: "";
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

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

.menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 640px;
  padding: 138px 0 74px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(247, 246, 242, 0.98) 0%, rgba(247, 246, 242, 0.9) 36%, rgba(247, 246, 242, 0.34) 62%, rgba(247, 246, 242, 0.12) 100%),
    url("hero.png") center right / cover no-repeat;
  color: var(--ink);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.88), transparent 28%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.14), rgba(247, 246, 242, 0.18));
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(320px, 0.32fr);
  gap: 40px;
  align-items: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.section h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.08;
}

.hero h1 {
  max-width: 660px;
  color: var(--ink);
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.14;
}

.hero-text {
  max-width: 590px;
  margin: 22px 0 30px;
  color: var(--ink-soft);
  font-size: 16px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 8px;
  font-weight: 760;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 14px 30px rgba(29, 65, 113, 0.18);
}

.button.primary:hover {
  background: var(--blue-deep);
}

.button.secondary {
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--paper);
}

.section .button.secondary {
  color: var(--ink);
  border-color: var(--line);
  background: #fff;
}

.section {
  padding: 78px 0;
}

.intro {
  background: var(--paper);
}

.intro-grid,
.process-grid,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 60px;
  align-items: start;
}

.section h2 {
  color: var(--ink);
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.16;
}

.intro p,
.section-heading p,
.contact p,
.reference p,
.step p,
.service-card p {
  color: var(--ink-soft);
}

.intro-grid > p {
  margin: 26px 0 0;
  font-size: 16px;
}

.services,
.process {
  background: var(--mist);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 36px;
}

.section-heading.compact {
  margin-bottom: 0;
}

.section-heading.compact p:last-child {
  font-size: 16px;
}

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

.service-card {
  min-height: 240px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(30, 30, 30, 0.04);
}

.service-card-action {
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.service-card-action:hover,
.service-card-action:focus-visible {
  border-color: rgba(29, 65, 113, 0.3);
  background: #fbfbfb;
  box-shadow: 0 18px 38px rgba(30, 30, 30, 0.08);
  outline: none;
  transform: translateY(-3px);
}

.service-number {
  display: inline-flex;
  margin-bottom: 26px;
  color: var(--blue);
  font-weight: 850;
}

.service-card h3,
.step h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.service-card p,
.step p {
  margin: 0;
}

.steps {
  display: grid;
  gap: 16px;
}

.step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: #fff;
  border-radius: 8px;
  background: var(--blue);
  font-weight: 850;
}

.reference {
  background: var(--paper);
}

.reference-link {
  display: grid;
  place-items: center;
  width: fit-content;
  min-width: 220px;
  margin-top: 18px;
  padding: 18px;
  color: var(--blue-deep);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.reference-link:hover {
  transform: translateY(-2px);
  border-color: rgba(29, 65, 113, 0.28);
  background: var(--hover);
}

.reference-link img {
  width: 118px;
  height: auto;
  border-radius: 6px;
}

.contact {
  color: #fff;
  background: linear-gradient(135deg, #1e1e1e, #2a3545);
}

.contact h2 {
  color: #fff;
}

.contact p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
}

.contact-actions {
  justify-content: flex-end;
  align-self: center;
}

.site-footer {
  padding: 30px 0;
  background: #1e1e1e;
  color: rgba(255, 255, 255, 0.72);
}

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

.footer-inner img {
  width: 132px;
  filter: brightness(0) invert(1);
}

.footer-inner p {
  margin: 0;
  font-size: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 30, 30, 0.46);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(30, 30, 30, 0.22);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.modal-close:hover {
  background: var(--hover);
}

.modal-panel h2 {
  max-width: 620px;
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.18;
}

.modal-intro {
  max-width: 650px;
  margin: 16px 0 24px;
  color: var(--ink-soft);
}

.app-list {
  display: grid;
  gap: 14px;
}

.app-list.single {
  max-width: 540px;
}

.app-item {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mist);
}

.app-item img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.app-item h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 19px;
}

.app-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.modal-image {
  margin: 24px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mist);
}

.modal-image img {
  width: 100%;
  height: auto;
}

@media (max-width: 920px) {
  .site-header {
    padding-inline: 20px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  box-shadow: 0 18px 34px rgba(30, 30, 30, 0.12);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 12px;
  }

  .main-nav a::after {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 120px;
    background:
      linear-gradient(90deg, rgba(247, 246, 242, 0.99) 0%, rgba(247, 246, 242, 0.92) 48%, rgba(247, 246, 242, 0.5) 100%),
      url("hero.png") 68% center / cover no-repeat;
  }

  .hero-grid,
  .intro-grid,
  .process-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

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

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, 1160px);
  }

  .brand img {
    width: 142px;
  }

  .hero {
    padding-bottom: 62px;
  }

  .hero h1 {
    font-size: 31px;
  }

  .hero-text,
  .intro-grid > p,
  .contact p {
    font-size: 16px;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .section {
    padding: 58px 0;
  }

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

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .reference-link {
    width: fit-content;
    text-align: center;
  }

  .modal {
    padding: 14px;
  }

  .modal-panel {
    padding: 28px 18px 20px;
  }

  .modal-panel h2 {
    padding-right: 38px;
    font-size: 24px;
  }

  .app-item {
    grid-template-columns: 64px 1fr;
    gap: 14px;
    padding: 14px;
  }

  .app-item img {
    width: 64px;
    height: 64px;
  }
}
