:root {
  --ink: #1f2528;
  --muted: #687174;
  --paper: #f7f3ed;
  --panel: #fffdf8;
  --line: rgba(31, 37, 40, 0.13);
  --gold: #a9793b;
  --sage: #6d7f73;
  --teal: #315d62;
  --rose: #b07168;
  --shadow: 0 24px 70px rgba(54, 49, 39, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(247, 243, 237, 0.92), rgba(241, 237, 229, 0.96)),
    radial-gradient(circle at 18% 0%, rgba(169, 121, 59, 0.1), transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(49, 93, 98, 0.12), transparent 36%);
  font-family:
    Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial,
    sans-serif;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  padding: 18px clamp(16px, 4vw, 48px);
  backdrop-filter: none;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    padding 240ms ease,
    background 240ms ease,
    backdrop-filter 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease;
}

.site-header:hover,
.site-header:focus-within {
  padding-block: 12px;
  backdrop-filter: blur(18px);
  background: rgba(255, 253, 248, 0.9);
  border-color: var(--line);
  box-shadow: 0 12px 34px rgba(38, 39, 35, 0.08);
}

.header-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  gap: 16px;
}

.brand {
  grid-column: 2;
  justify-self: center;
  color: #fffdf8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(16px, 2vw, 23px);
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
  transition:
    color 220ms ease,
    text-shadow 220ms ease;
}

.site-header:hover .brand,
.site-header:focus-within .brand {
  color: var(--ink);
  text-shadow: none;
}

.contact-button {
  grid-column: 3;
  justify-self: end;
  min-height: 44px;
  padding: 11px 18px;
  color: #fffdf8;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--teal), #24484c);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(49, 93, 98, 0.25);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.contact-button:hover,
.contact-button:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #3d6c70, var(--teal));
  box-shadow: 0 18px 34px rgba(49, 93, 98, 0.28);
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(760px, 88vh);
  padding: clamp(96px, 14vw, 158px) clamp(18px, 5vw, 72px) clamp(70px, 10vw, 112px);
  color: #fffdf8;
  overflow: hidden;
  background-image: url("разработка по.png");
  background-position: center;
  background-size: cover;
  place-items: center;
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(19, 31, 33, 0.72), rgba(19, 31, 33, 0.36) 55%, rgba(19, 31, 33, 0.56)),
    linear-gradient(0deg, rgba(19, 31, 33, 0.64), rgba(19, 31, 33, 0.18) 48%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(950px, 100%);
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(42px, 8vw, 92px);
}

h2 {
  max-width: 820px;
  font-size: clamp(30px, 4.6vw, 62px);
}

.hero-text {
  max-width: 720px;
  margin: 24px auto 0;
  color: rgba(255, 253, 248, 0.82);
  font-size: clamp(17px, 2vw, 22px);
}

.service-section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto clamp(72px, 10vw, 130px);
}

.hero + .service-section {
  margin-top: clamp(34px, 6vw, 76px);
}

.section-heading {
  margin-bottom: clamp(22px, 4vw, 38px);
}

.section-heading .eyebrow {
  margin-bottom: 10px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 6vw, 76px);
  font-weight: 500;
  line-height: 1.05;
  text-transform: none;
}

.section-heading h2 {
  max-width: 720px;
  color: var(--muted);
  font-family:
    Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial,
    sans-serif;
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 500;
  line-height: 1.35;
}

.service-visual {
  position: relative;
  margin: 0 0 18px;
  overflow: hidden;
  aspect-ratio: 16 / 8.2;
  background: #e7dfd2;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.service-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(31, 37, 40, 0.16), transparent 34%),
    linear-gradient(0deg, rgba(31, 37, 40, 0.16), transparent 40%);
  pointer-events: none;
}

.service-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.service-section:hover .service-visual img {
  transform: scale(1.06);
}

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

.order-row {
  display: flex;
  justify-content: center;
  margin-top: clamp(18px, 3vw, 30px);
}

.order-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  color: var(--teal);
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
  background: rgba(255, 253, 248, 0.32);
  border: 1px solid rgba(49, 93, 98, 0.42);
  border-radius: 999px;
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.order-button:hover,
.order-button:focus-visible {
  color: #fffdf8;
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 16px 34px rgba(49, 93, 98, 0.2);
  transform: translateY(-2px);
}

.service-card {
  min-height: 228px;
  padding: clamp(20px, 3vw, 28px);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(255, 253, 248, 0.86)),
    linear-gradient(135deg, rgba(169, 121, 59, 0.1), transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(54, 49, 39, 0.08);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.service-card:nth-child(2) {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(255, 253, 248, 0.86)),
    linear-gradient(135deg, rgba(109, 127, 115, 0.12), transparent);
}

.service-card:nth-child(3) {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(255, 253, 248, 0.86)),
    linear-gradient(135deg, rgba(176, 113, 104, 0.1), transparent);
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(169, 121, 59, 0.36);
  box-shadow: 0 24px 62px rgba(54, 49, 39, 0.13);
}

.service-card h3 {
  margin: 0 0 12px;
  font-size: clamp(19px, 2.2vw, 25px);
  line-height: 1.18;
  letter-spacing: 0;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.footer {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 44px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
}

.footer p {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 800ms ease,
    transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .header-inner {
    grid-template-columns: 1fr;
  }

  .brand,
  .contact-button {
    grid-column: 1;
  }

  .contact-button {
    justify-self: center;
  }

  .site-header {
    padding-block: 14px;
  }

  .hero {
    min-height: auto;
    padding-top: 128px;
  }

  .section-heading,
  .service-cards {
    grid-template-columns: 1fr;
  }

  .service-visual {
    aspect-ratio: 4 / 3;
  }

  .service-card {
    min-height: auto;
  }

  .footer {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .site-header {
    position: absolute;
  }

  .contact-button {
    width: min(100%, 320px);
    text-align: center;
  }

  .hero {
    padding-inline: 18px;
  }

  h1 {
    font-size: 38px;
  }

  .service-section {
    width: calc(100% - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
