:root {
  --blue: #0b1f3a;
  --blue-2: #102c52;
  --graphite: #20242a;
  --muted: #6b7280;
  --green: #2f8f6b;
  --green-dark: #1f6f52;
  --bg: #f6f8fb;
  --white: #ffffff;
  --border: #dce3ec;
  --shadow: 0 18px 45px rgba(11, 31, 58, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 248, 251, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(220, 227, 236, 0.75);
}

.nav {
  height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--blue);
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 15px;
  color: var(--muted);
}

.nav-links a:hover { color: var(--blue); }

.hero {
  padding: 72px 0 64px;
  background:
    radial-gradient(circle at 85% 15%, rgba(47, 143, 107, 0.22), transparent 34%),
    linear-gradient(135deg, #f7fbff 0%, #edf3fa 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 54px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-dark);
}

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

h1 {
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  color: var(--blue);
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: var(--blue);
  margin-bottom: 18px;
}

h3 {
  color: var(--blue);
  font-size: 20px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero-text {
  font-size: 21px;
  color: #425066;
  max-width: 720px;
  margin-bottom: 30px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

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

.btn.primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(47, 143, 107, 0.28);
}

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

.btn.secondary {
  background: var(--white);
  color: var(--blue);
  border: 1px solid var(--border);
}

.hero-stats {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 560px;
  gap: 14px;
}

.hero-stats div, .metrics div {
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(220, 227, 236, 0.86);
  border-radius: 18px;
  padding: 18px;
}

.hero-stats strong, .metrics strong {
  display: block;
  color: var(--blue);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-stats span, .metrics span {
  display: block;
  color: var(--muted);
  margin-top: 8px;
  font-size: 14px;
}

.hero-photo {
  min-height: 520px;
  border-radius: 34px;
  padding: 16px;
  background: linear-gradient(160deg, var(--blue), var(--blue-2));
  box-shadow: var(--shadow);
}

.photo-placeholder {
  height: 100%;
  min-height: 488px;
  border-radius: 24px;
  border: 1px dashed rgba(255,255,255,0.45);
  background: url("assets/photo.png");
  background-size: cover;
  background-position: center;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
}

.photo-placeholder span { display: none; }

.photo-placeholder small { display: none; }

.section {
  padding: 88px 0;
}

.section.compact { padding: 70px 0; }

.section.alt {
  background: var(--white);
}

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

.section-heading.narrow {
  max-width: 690px;
}

.two-column {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 56px;
  align-items: start;
}

.sticky-heading {
  position: sticky;
  top: 110px;
}

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

.problem-grid article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  min-height: 116px;
  font-weight: 650;
  color: var(--blue);
}

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

.card, .case-card, .steps article, .contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 10px 25px rgba(11, 31, 58, 0.06);
}

.alt .card, .alt .case-card {
  background: #f8fafc;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}

.about-grid p {
  font-size: 18px;
  color: #4b5563;
}

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

.metrics div {
  background: var(--white);
}

.metrics strong { font-size: 36px; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tags span {
  background: var(--blue);
  color: var(--white);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 650;
}

.tools {
  color: var(--muted);
  margin: 26px 0 0;
}

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

.case-card {
  display: flex;
  flex-direction: column;
}

.case-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.case-tag {
  background: rgba(47, 143, 107, 0.12);
  color: var(--green-dark);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.case-top strong {
  font-size: 30px;
  color: var(--green-dark);
  letter-spacing: -0.04em;
}

.case-card p {
  color: #4b5563;
}

.case-card ul {
  padding-left: 20px;
  margin: 0 0 16px;
  color: #4b5563;
}

.result {
  margin-top: auto;
  color: var(--blue) !important;
  font-weight: 800;
}

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

.steps span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: var(--white);
  border-radius: 14px;
  font-weight: 800;
  margin-bottom: 18px;
}

.contact-section {
  background: linear-gradient(135deg, var(--blue), #123866);
  color: var(--white);
}

.contact-section h2, .contact-section .eyebrow {
  color: var(--white);
}

.contact-section p {
  color: rgba(255,255,255,.82);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 52px;
  align-items: start;
}

.contact-links {
  flex-direction: column;
  margin-top: 24px;
}

.contact-links a {
  color: var(--white);
  font-weight: 700;
}

.contact-form {
  background: rgba(255,255,255,0.96);
  color: var(--graphite);
}

.contact-form label {
  display: block;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 14px;
}

.contact-form input, .contact-form textarea {
  width: 100%;
  margin-top: 7px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
}

.contact-form button {
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: var(--green);
  color: var(--white);
  padding: 15px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.contact-form button:hover { background: var(--green-dark); }

.contact-form small {
  display: block;
  color: var(--muted);
  margin-top: 12px;
}

.footer {
  background: #071526;
  color: rgba(255,255,255,.8);
}

.footer .container {
  height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 980px) {
  .nav-links { display: none; }
  .hero-grid, .two-column, .about-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-photo { min-height: 420px; }
  .photo-placeholder { min-height: 388px; }
  .problem-grid { grid-template-columns: repeat(2, 1fr); }
  .case-grid, .steps { grid-template-columns: 1fr; }
  .sticky-heading { position: static; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1160px); }
  .hero { padding-top: 44px; }
  .section, .section.compact { padding: 52px 0; }
  .hero-actions, .hero-stats, .service-grid, .metrics, .problem-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats { display: grid; }
  .btn { width: 100%; }
  h1 { font-size: 38px; }
  .hero-text { font-size: 18px; }
  .hero-photo { min-height: 360px; border-radius: 26px; }
  .photo-placeholder { min-height: 328px; }
}


/* ===== HERO FIX v6: вариант как на финальном эскизе ===== */

.hero {
  padding: 72px 0 56px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 54px;
  align-items: center;
}

h1 {
  font-size: clamp(36px, 3.75vw, 54px);
  line-height: 1.18;
  letter-spacing: -0.045em;
  max-width: 720px;
}

.hero-text {
  font-size: 19px;
  max-width: 620px;
}

.hero-photo {
  width: 460px;
  height: 400px;
  min-height: 0;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: 0 18px 42px rgba(11, 31, 58, 0.12);
  overflow: hidden;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: url("assets/photo.png");
  background-size: cover;
  background-position: center center;
  display: block;
}

.photo-placeholder span,
.photo-placeholder small {
  display: none !important;
}

.hero-stats {
  margin-top: 36px;
  max-width: 650px;
}

.hero-stats div {
  min-height: 82px;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    width: min(100%, 460px);
    height: 400px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 44px;
  }

  h1 {
    font-size: 36px;
  }

  .hero-photo {
    width: 100%;
    height: 360px;
  }
}


/* v7 photo alignment */
.hero-grid{
  align-items:start;
}
.hero-photo{
  width:430px;
  height:520px;
  margin-top:-38px;
}
.photo-placeholder{
  background-size: contain !important;
  background-repeat:no-repeat;
  background-position:center top !important;
}
@media (max-width:980px){
 .hero-photo{width:min(100%,430px);height:520px;margin-top:0;}
}


/* ===== Legal pages and final photo cleanup ===== */

.hero-photo {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  overflow: hidden !important;
}

.photo-placeholder {
  background-image: url("assets/photo.png") !important;
  background-color: transparent !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: center top !important;
  border: none !important;
  outline: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.photo-placeholder span,
.photo-placeholder small {
  display: none !important;
}

.legal-page {
  padding: 64px 0 80px;
  background: var(--bg);
}

.legal-container {
  max-width: 900px;
}

.back-link {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--green-dark);
  font-weight: 700;
}

.legal-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(24px, 4vw, 48px);
  box-shadow: 0 10px 25px rgba(11, 31, 58, 0.06);
}

.legal-card h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  margin-bottom: 28px;
}

.legal-card h2 {
  font-size: 22px;
  margin-top: 30px;
  margin-bottom: 12px;
}

.legal-card p,
.legal-card li {
  font-size: 17px;
  color: #374151;
}

.legal-card ul {
  margin-top: 8px;
  margin-bottom: 18px;
}

.legal-card a {
  color: var(--green-dark);
  font-weight: 700;
}

.checkbox-line {
  display: flex !important;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 400 !important;
  color: #4b5563 !important;
}

.checkbox-line input {
  width: auto !important;
  margin-top: 3px !important;
}

.checkbox-line a {
  color: var(--green-dark);
  font-weight: 700;
}

.footer-legal {
  min-height: 92px;
  height: auto !important;
  gap: 18px;
}

.footer-legal div {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
}

.footer-legal a {
  color: rgba(255,255,255,.8);
}

.footer-legal a:hover {
  color: #fff;
}

@media (max-width: 640px) {
  .footer-legal {
    flex-direction: column;
    align-items: flex-start !important;
    padding: 22px 0;
  }

  .footer-legal div {
    justify-content: flex-start;
  }
}

/* ===== Legal heading final adjustments v9 ===== */
.legal-card h2 {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--blue);
  margin-top: 30px;
  margin-bottom: 12px;
}

.legal-card h2:first-child {
  margin-top: 0;
}


/* ===== Final publish fixes ===== */

.hero-photo {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  overflow: hidden !important;
}

.photo-placeholder {
  background-image: url("assets/photo.png") !important;
  background-color: transparent !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: center top !important;
  border: none !important;
  outline: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.photo-placeholder span,
.photo-placeholder small {
  display: none !important;
}

.contact-messenger-card {
  background: rgba(255,255,255,0.96);
  color: var(--graphite);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 10px 25px rgba(11, 31, 58, 0.12);
}

.contact-messenger-card h3 {
  margin-bottom: 12px;
}

.contact-messenger-card p {
  color: #4b5563;
}

.messenger-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.legal-page {
  padding: 64px 0 80px;
  background: var(--bg);
}

.legal-container {
  max-width: 900px;
}

.back-link {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--green-dark);
  font-weight: 700;
}

.legal-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(24px, 4vw, 48px);
  box-shadow: 0 10px 25px rgba(11, 31, 58, 0.06);
}

.legal-card h2 {
  font-size: 22px !important;
  line-height: 1.25;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--blue);
  margin-top: 30px;
  margin-bottom: 12px;
}

.legal-card h2:first-child {
  margin-top: 0;
}

.legal-card p,
.legal-card li {
  font-size: 17px;
  color: #374151;
}

.legal-card a {
  color: var(--green-dark);
  font-weight: 700;
}

.footer-legal {
  min-height: 92px;
  height: auto !important;
  gap: 18px;
}

.footer-legal div {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
}

.footer-legal a {
  color: rgba(255,255,255,.8);
}

.footer-legal a:hover {
  color: #fff;
}

@media (max-width: 640px) {
  .messenger-buttons .btn {
    width: 100%;
  }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start !important;
    padding: 22px 0;
  }

  .footer-legal div {
    justify-content: flex-start;
  }
}
