:root {
  --page-bg: #e5e4e4;
  --surface: #ffffff;
  --text: #1f1f1f;
  --text-secondary: #5f5a54;
  --accent: #d6ae72;
  --accent-hover: #c79a58;
  --accent-soft: #e9d8bf;
  --icon: #9e7b47;
  --border: #e7e0d9;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 18px 60px rgba(0, 0, 0, 0.08);
  --radius-xl: 0;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1760px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background: var(--page-bg);
  color: var(--text);
  overflow-x: hidden;
}

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

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

button,
a,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

.container {
  width: min(100% - 120px, var(--container));
  margin: 0 auto;
}

.landing-main {
  padding: 0;
}

.hero-section {
  padding-bottom: 28px;
}

.hero-frame {
  min-height: 0;
  position: relative;
  overflow: hidden;
  background-color: var(--page-bg);
}

.hero-frame::before {
  content: none;
}

.hero-frame::after {
  content: none;
}

.hero-shell {
  position: relative;
  width: auto;
  margin: 0;
  padding-left: 60px;
  padding-right: 60px;
}

.site-header {
  position: absolute;
  top: 38px;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  pointer-events: none;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.logo img {
  display: block;
  width: clamp(130px, 11vw, 172px);
  height: auto;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(520px, 700px) minmax(0, 1fr);
  align-items: center;
  min-height: 0;
  gap: 0;
  padding: 8px 0 0;
  position: relative;
  z-index: 2;
}

.hero-copy {
  position: relative;
  z-index: 4;
  max-width: 700px;
  margin-left: 92px;
  padding-top: 0;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(38px, 3.35vw, 52px);
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.05em;
}

.hero-copy h1 br {
  display: block;
}

.hero-offer {
  margin: 30px 0 0;
  max-width: 560px;
  font-size: clamp(18px, 1.35vw, 21px);
  line-height: 1.5;
  color: var(--text);
}

.hero-media {
  position: relative;
  z-index: 1;
  align-self: stretch;
  min-height: 470px;
  width: calc(100% + 320px);
  margin-left: -320px;
  margin-right: -60px;
  overflow: hidden;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: -6% 0 -28% -96%;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      126deg,
      var(--page-bg) 0%,
      var(--page-bg) 44%,
      rgba(229, 228, 228, 0.98) 52%,
      rgba(229, 228, 228, 0.88) 58%,
      rgba(229, 228, 228, 0.62) 65%,
      rgba(229, 228, 228, 0.28) 72%,
      rgba(229, 228, 228, 0.08) 79%,
      rgba(229, 228, 228, 0) 85%
    ),
    linear-gradient(
      180deg,
      var(--page-bg) 0%,
      rgba(229, 228, 228, 0.72) 8%,
      rgba(229, 228, 228, 0.28) 16%,
      rgba(229, 228, 228, 0.06) 24%,
      rgba(229, 228, 228, 0) 32%
    ),
    radial-gradient(
      circle at left bottom,
      var(--page-bg) 0%,
      rgba(229, 228, 228, 0.995) 34%,
      rgba(229, 228, 228, 0.9) 50%,
      rgba(229, 228, 228, 0.64) 64%,
      rgba(229, 228, 228, 0.32) 76%,
      rgba(229, 228, 228, 0.1) 86%,
      rgba(229, 228, 228, 0) 94%
    );
  filter: blur(16px);
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  transform: scale(1.12);
  transform-origin: right center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-weight: 500;
  transition:
    background-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.button-primary {
  margin-top: 34px;
  background: linear-gradient(135deg, #d3a35f 0%, #f2c980 100%);
  color: var(--text);
  box-shadow: 0 10px 18px rgba(198, 150, 76, 0.16);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: linear-gradient(135deg, #c89550 0%, #e7bb69 100%);
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(198, 150, 76, 0.28);
}

.advantages-section,
.works-section,
.quiz-section {
  padding: 0 0 52px;
}

.section-heading {
  margin-bottom: 32px;
}

.section-heading h2,
.quiz-card h2 {
  margin: 0;
  font-size: clamp(26px, 2.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p,
.quiz-card p,
.footer-meta,
.footer-contacts a {
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.centered {
  text-align: center;
}

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

.advantage-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 22px;
  padding: 28px;
  background: rgba(248, 247, 245, 0.82);
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(22, 22, 22, 0.045);
}

.advantage-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.96), rgba(232, 230, 227, 0.92));
  border: 1px solid rgba(31, 31, 31, 0.1);
  color: #4f4a45;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 6px 16px rgba(22, 22, 22, 0.035);
}

.advantage-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.advantage-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #1f1f1f;
}

.advantage-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #5a5753;
}

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

.work-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  text-align: left;
}

.work-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.work-card__overlay {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 6px;
  padding: 24px 26px 22px;
  background: linear-gradient(180deg, rgba(14, 14, 14, 0) 0%, rgba(14, 14, 14, 0.68) 100%);
  color: #ffffff;
}

.work-card__overlay strong {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.work-card__overlay span {
  font-size: 14px;
  line-height: 1.45;
}

.work-card:hover img,
.work-card:focus-visible img {
  transform: scale(1.04);
}

.quiz-card {
  padding: 40px 36px;
  text-align: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(231, 224, 217, 0.86);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.marquiz-placeholder {
  margin-top: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1.6;
  color: inherit;
}

.marquiz-placeholder .matomba_iframe {
  background: #ffffff;
}

.site-footer {
  padding: 0 0 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 30px 0 0;
  border-top: 1px solid rgba(31, 31, 31, 0.08);
}

.footer-logo {
  font-size: 26px;
}

.footer-logo img {
  width: 148px;
  height: auto;
}

.footer-contacts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-contacts a {
  margin: 0;
}

.footer-meta-group {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.footer-meta {
  margin: 0;
}

.footer-privacy {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-secondary);
  transition: color 0.25s ease;
}

.footer-privacy:hover,
.footer-privacy:focus-visible {
  color: var(--text);
}

.policy-page {
  background: var(--page-bg);
}

.policy-main {
  padding: 0 0 56px;
}

.policy-header {
  padding: 28px 0 24px;
}

.policy-header__inner {
  display: flex;
  justify-content: center;
}

.policy-logo img {
  width: clamp(150px, 16vw, 190px);
  height: auto;
}

.policy-section {
  padding: 0 0 52px;
}

.policy-card {
  padding: 36px 40px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.policy-card__intro {
  margin-bottom: 28px;
}

.policy-card__intro h1 {
  margin: 0;
  font-size: clamp(34px, 3.2vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.policy-card__intro p {
  margin: 14px 0 0;
  max-width: 880px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.policy-document {
  font-size: 15px;
  line-height: 1.7;
  color: #35312d;
}

.policy-document p {
  margin: 0 0 14px;
}

.policy-document p:last-child {
  margin-bottom: 0;
}

.policy-document a {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.policy-document strong {
  color: var(--text);
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  padding: 0;
}

.gallery-modal.is-open {
  display: block;
}

.gallery-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.82);
  backdrop-filter: blur(4px);
}

.gallery-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100% - 48px, 1480px);
  height: 100vh;
  margin: 0 auto;
  padding: 24px 0;
  display: grid;
  align-items: center;
}

.gallery-modal__close {
  position: absolute;
  top: 28px;
  right: 0;
  z-index: 3;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
  backdrop-filter: blur(10px);
  transition:
    background-color 0.25s ease,
    transform 0.25s ease;
}

.gallery-modal__close:hover,
.gallery-modal__close:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.04);
}

.gallery-modal__main {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  gap: 24px;
  align-items: center;
  position: relative;
}

.gallery-modal__nav {
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font-size: 42px;
  line-height: 1;
  backdrop-filter: blur(10px);
  transition:
    background-color 0.25s ease,
    transform 0.25s ease;
}

.gallery-modal__nav:hover,
.gallery-modal__nav:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.04);
}

.gallery-modal__nav span {
  display: block;
  transform: translateY(-2px);
}

.gallery-modal__figure {
  margin: 0;
  position: relative;
  min-width: 0;
}

.gallery-modal__figure img {
  display: block;
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y;
}

.gallery-modal__caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 120px 24px 20px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.58) 100%);
  pointer-events: none;
}

.gallery-modal__caption h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  color: #fff;
}

.gallery-modal__caption p {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.78);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 1400px) {
  .container {
    width: min(100% - 72px, var(--container));
  }

  .hero-shell {
    width: auto;
    margin: 0;
    padding-left: 36px;
    padding-right: 36px;
  }

  .site-header {
    top: 30px;
    padding: 0;
  }

  .hero-content {
    padding: 8px 0 0;
  }

  .hero-copy {
    max-width: 520px;
  }

  .hero-copy h1 {
    font-size: clamp(26px, 2.5vw, 38px);
  }

  .hero-offer {
    font-size: clamp(13px, 0.95vw, 16px);
  }

  .hero-media {
    min-height: 430px;
    width: calc(100% + 240px);
    margin-left: -240px;
    margin-right: -36px;
  }

  .hero-media img {
    transform: scale(1.14);
  }
}

@media (max-width: 1024px) {
  .landing-main {
    padding-top: 0;
  }

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

  .hero-shell {
    width: auto;
    margin: 0;
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-frame {
    min-height: auto;
  }

  .site-header {
    top: 18px;
  }

  .hero-content {
    display: block;
    min-height: auto;
    padding: 96px 0 0;
  }

  .hero-copy {
    max-width: 100%;
    margin-left: 0;
    padding: 0;
  }

  .hero-copy h1 {
    font-size: clamp(32px, 5vw, 42px);
  }

  .hero-offer {
    margin-top: 24px;
    font-size: 18px;
  }

  .button {
    min-height: 56px;
    font-size: 18px;
  }

  .hero-media {
    margin-top: 24px;
    min-height: 340px;
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
  }

  .hero-media::before {
    inset: -4% 0 -4% -20%;
    background:
      linear-gradient(
        136deg,
        var(--page-bg) 0%,
        var(--page-bg) 26%,
        rgba(229, 228, 228, 0.9) 38%,
        rgba(229, 228, 228, 0.5) 52%,
        rgba(229, 228, 228, 0.14) 64%,
        rgba(229, 228, 228, 0) 74%
      ),
      linear-gradient(
        180deg,
        var(--page-bg) 0%,
        rgba(229, 228, 228, 0.88) 12%,
        rgba(229, 228, 228, 0.48) 24%,
        rgba(229, 228, 228, 0.12) 34%,
        rgba(229, 228, 228, 0) 42%
      );
    filter: blur(6px);
  }

  .hero-media img {
    transform: scale(1.08);
  }

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

  .work-card img {
    height: 320px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .footer-contacts {
    justify-content: center;
  }

  .footer-meta-group {
    justify-items: center;
  }
}

@media (max-width: 720px) {
  .hero-section,
  .advantages-section,
  .works-section,
  .quiz-section,
  .policy-section {
    padding-bottom: 32px;
  }

  .hero-section {
    min-height: 100svh;
  }

  .hero-frame,
  .hero-shell {
    min-height: 100svh;
  }

  .container {
    width: min(100% - 24px, var(--container));
  }

  .hero-shell {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .site-header {
    top: 18px;
  }

  .logo img {
    width: 176px;
  }

  .hero-content {
    position: relative;
    min-height: 100svh;
    padding-top: 0;
  }

  .hero-copy {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: 3;
    display: grid;
    justify-items: center;
    text-align: center;
    margin-left: 0;
    max-width: none;
    padding: 224px 24px 0;
  }

  .hero-copy h1 {
    font-size: 32px;
    line-height: 1.18;
  }

  .hero-copy h1 br,
  .hero-offer br {
    display: none;
  }

  .hero-offer,
  .section-heading p,
  .quiz-card p,
  .advantage-card p,
  .footer-contacts a,
  .footer-meta {
    font-size: 16px;
  }

  .hero-offer {
    margin-top: 18px;
  }

  .button {
    width: auto;
    min-width: min(100%, 280px);
    margin-top: 98px;
    padding: 18px 24px;
    font-size: 20px;
  }

  .hero-media {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 0;
    right: auto;
    width: 100%;
    min-width: 100%;
    max-width: none;
    height: 52svh;
    min-height: 420px;
    max-height: 560px;
    margin: 0;
    transform: none;
  }

  .hero-media::before {
    inset: 0;
    background: linear-gradient(
      180deg,
      var(--page-bg) 0%,
      rgba(229, 228, 228, 0.98) 14%,
      rgba(229, 228, 228, 0.84) 28%,
      rgba(229, 228, 228, 0.48) 42%,
      rgba(229, 228, 228, 0.14) 54%,
      rgba(229, 228, 228, 0) 64%
    );
    filter: none;
  }

  .hero-media img {
    width: 100%;
    max-width: none;
    height: 100%;
    object-position: center top;
    transform: scale(1.01);
  }

  .advantages-grid,
  .works-grid {
    grid-template-columns: 1fr;
  }

  .advantage-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .work-card img {
    height: 280px;
  }

  .work-card__overlay strong {
    font-size: 24px;
  }

  .quiz-card {
    padding: 36px 22px;
  }

  .policy-header {
    padding: 20px 0 18px;
  }

  .policy-card {
    padding: 26px 20px;
    border-radius: 18px;
  }

  .policy-card__intro h1 {
    font-size: 28px;
    line-height: 1.08;
  }

  .policy-document {
    font-size: 14px;
    line-height: 1.65;
  }

  .gallery-modal__dialog {
    width: min(100% - 20px, 1320px);
    padding: 14px 0;
  }

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

  .gallery-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 52px;
    height: 52px;
    font-size: 34px;
  }

  .gallery-modal__nav--prev {
    left: 10px;
  }

  .gallery-modal__nav--next {
    right: 10px;
  }

  .gallery-modal__caption {
    inset: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    justify-content: flex-end;
    padding: 96px 16px 14px;
  }

  .gallery-modal__caption h3 {
    font-size: 18px;
  }

  .gallery-modal__caption p {
    font-size: 14px;
  }

  .gallery-modal__close {
    top: 12px;
    width: 44px;
    height: 44px;
    font-size: 28px;
  }
}
