:root {
  --bg: #f5f5f2;
  --paper: #ffffff;
  --ink: #121212;
  --muted: #666a70;
  --line: #deded8;
  --graphite: #1e252d;
  --blue: #1f5f93;
  --blue-dark: #123b5f;
  --radius: 8px;
  --shadow: 0 24px 70px rgba(18, 18, 18, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

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

button {
  font: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 32px;
  color: #fff;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.site-nav {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 14px;
}

.site-nav a {
  opacity: 0.82;
}

.site-nav a:hover {
  opacity: 1;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  margin: 5px auto;
  background: currentColor;
}

.section {
  padding: 108px 0;
}

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

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

.section-dark {
  color: #fff;
  background: var(--graphite);
}

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

.section-heading.wide {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  max-width: none;
  align-items: end;
}

.section-heading.wide .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -18px;
}

.section-intro {
  max-width: 520px;
}

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

.section-dark .eyebrow,
.hero .eyebrow {
  color: #9dccf1;
}

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

h1 {
  max-width: 900px;
  margin-bottom: 24px;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.2;
}

p {
  color: var(--muted);
}

.section-dark p {
  color: rgba(255, 255, 255, 0.76);
}

.hero {
  position: relative;
  min-height: 94vh;
  padding: 156px 0 72px;
  overflow: hidden;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img {
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.7) contrast(1.08);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(5, 8, 10, 0.9), rgba(5, 8, 10, 0.62) 48%, rgba(5, 8, 10, 0.2)),
    linear-gradient(0deg, rgba(5, 8, 10, 0.64), rgba(5, 8, 10, 0.06));
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 48px;
  align-items: end;
  min-height: calc(94vh - 228px);
}

.hero-lead {
  max-width: 680px;
  margin-bottom: 34px;
  font-size: 22px;
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 800;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

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

.button-light {
  color: var(--ink);
  background: #fff;
}

.button-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
}

.hero-proof {
  display: grid;
  gap: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}

.hero-proof div {
  padding: 22px;
  background: rgba(9, 13, 17, 0.42);
}

.hero-proof strong {
  display: block;
  margin-bottom: 8px;
  font-size: 30px;
  line-height: 1;
}

.hero-proof span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.split,
.solution-grid,
.economics-grid,
.control-grid,
.final-grid,
.audience-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 72px;
  align-items: start;
}

.problem-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.problem-list article {
  min-height: 220px;
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.problem-list span,
.steps span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  margin-bottom: 42px;
  color: var(--blue);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-weight: 800;
}

.section-solution {
  color: #fff;
  background: linear-gradient(120deg, var(--graphite), var(--blue-dark));
}

.solution-text {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 24px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.steps article {
  min-height: 270px;
  padding: 26px 20px 0 0;
  border-right: 1px solid var(--line);
}

.steps article + article {
  padding-left: 20px;
}

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

.gallery:not(.is-expanded) .case-card:nth-child(n + 9) {
  display: none;
}

.case-card {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
  background: #fff;
  border: 0;
  border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(18, 18, 18, 0.08);
  cursor: zoom-in;
}

.case-card img {
  aspect-ratio: 1 / 1.14;
  object-fit: cover;
  transition: transform 240ms ease;
}

.case-card:hover img {
  transform: scale(1.025);
}

.gallery-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.button-dark {
  color: #fff;
  background: var(--graphite);
}

.calc-card {
  padding: 34px;
  background: var(--graphite);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.calc-card p {
  color: rgba(255, 255, 255, 0.7);
}

.calc-card strong {
  display: block;
  margin-bottom: 32px;
  color: #fff;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.calc-row.accent b {
  color: #9dccf1;
}

.calc-note {
  margin-top: 24px;
  padding-top: 22px;
  color: rgba(255, 255, 255, 0.76);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.compact {
  padding: 82px 0;
}

.audience-list,
.benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.audience-list span,
.benefits span {
  padding: 12px 14px;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  font-weight: 800;
}

.audience-list span {
  color: rgba(255, 255, 255, 0.86);
}

.benefits span {
  color: var(--graphite);
  background: #f8f8f6;
  border-color: var(--line);
}

.control-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.control-images img {
  aspect-ratio: 1 / 1.14;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(18, 18, 18, 0.12);
}

.check-list {
  display: grid;
  gap: 16px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.check-list li {
  padding-left: 26px;
  color: var(--muted);
  background: linear-gradient(var(--blue), var(--blue)) 0 0.7em / 10px 2px no-repeat;
}

.final-cta {
  padding: 118px 0;
}

.final-grid {
  align-items: center;
}

.final-grid h2 {
  max-width: 760px;
}

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

.site-footer {
  padding: 28px 0;
  color: rgba(255, 255, 255, 0.62);
  background: #111;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.86);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  width: auto;
  max-width: min(92vw, 1120px);
  max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

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

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 70px;
    right: 20px;
    display: none;
    width: min(300px, calc(100vw - 40px));
    padding: 18px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .site-header.is-open .site-nav {
    display: grid;
  }

  .hero-grid,
  .split,
  .solution-grid,
  .economics-grid,
  .control-grid,
  .final-grid,
  .audience-grid,
  .section-heading.wide {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .hero {
    min-height: auto;
    padding: 132px 0 56px;
  }

  .hero-grid {
    min-height: 0;
  }

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

  .steps article {
    min-height: 220px;
    padding-left: 0;
  }

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

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

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

  .section {
    padding: 72px 0;
  }

  .hero {
    padding-top: 112px;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(5, 8, 10, 0.9), rgba(5, 8, 10, 0.38)),
      linear-gradient(90deg, rgba(5, 8, 10, 0.76), rgba(5, 8, 10, 0.18));
  }

  .hero-lead,
  .solution-text {
    font-size: 18px;
  }

  h1 {
    font-size: 39px;
    line-height: 1.06;
  }

  .hero-actions .button,
  .contact-actions .button {
    width: 100%;
  }

  .problem-list,
  .steps,
  .gallery,
  .control-images {
    grid-template-columns: 1fr;
  }

  .gallery:not(.is-expanded) .case-card:nth-child(n + 5) {
    display: none;
  }

  .problem-list article,
  .steps article {
    min-height: auto;
    padding: 22px 0;
    border-right: 0;
  }

  .problem-list {
    border-left: 0;
  }

  .problem-list span,
  .steps span {
    margin-bottom: 24px;
  }

  .calc-card {
    padding: 24px;
  }

  .footer-grid {
    display: grid;
  }
}
