:root {
  --color-text: #161852;
  --color-muted: rgba(22, 24, 82, 0.55);
  --color-bg: #ffffff;
  --color-primary: #161852;
  --color-primary-text: #ffffff;
  --radius-btn: 12px;
  --font: -apple-system, Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* === Mobile-first layout: блочно, content → phone → footer === */
.page {
  display: flex;
  flex-direction: column;
}

.content {
  padding: 32px 24px 0 24px;
}

.logo {
  width: 120px;
  height: auto;
  margin-bottom: 32px;
}

.title {
  font-family: var(--font);
  font-size: 36px;
  line-height: 40px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-weight: 400;
  margin: 0 0 16px;
  color: var(--color-text);
}

/* Рукописный «-50%» с росчерком-подчеркиванием */
.discount {
  position: relative;
  display: inline-block;
  font-family: 'Cedarville Cursive', cursive;
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.03em;
  margin-left: 0.18em;
  vertical-align: baseline;
  white-space: nowrap;
}

/* Своей строкой под заголовком — как на печатной листовке */
.discount-block {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-left: 0;
  margin-top: 0.12em;
}

.discount-text {
  font-size: 1.5em;
  line-height: 0.9;
}

.discount-mark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.18em;
  width: 100%;
  height: 0.35em;
  pointer-events: none;
  overflow: visible;
}

.discount-mark path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: discount-draw 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.45s forwards;
}

@keyframes discount-draw {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .discount-mark path {
    animation: none;
    stroke-dashoffset: 0;
  }
}

.lead {
  font-size: 15px;
  line-height: 1.45;
  color: var(--color-text);
  margin: 0 0 32px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-primary-text);
}

.btn-primary:hover,
.btn-primary:active {
  opacity: 0.9;
}

/* Условия программы лояльности — мелким, как низ листовки */
.bonus {
  margin: 24px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-muted);
}

.bonus strong {
  font-weight: 600;
  color: var(--color-text);
}

.phone-wrap {
  padding: 32px 24px 0 24px;
}

.phone {
  display: block;
  width: 100%;
  height: auto;
}

.footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.5;
  padding: 24px;
}

.footer-line {
  margin: 0;
}

.footer-link {
  color: var(--color-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-link:hover {
  color: var(--color-text);
}

/* === Desktop (>=901px): 2 колонки, картинка прижата к низу-правому === */
@media (min-width: 901px) {
  .page {
    max-width: 1440px;
    margin: 0 auto;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    grid-template-areas:
      'content phone'
      'footer  phone';
    gap: 0 48px;
    align-items: stretch;
  }

  .content {
    grid-area: content;
    display: flex;
    flex-direction: column;
    padding: 64px 0 24px 64px;
    min-width: 0;
  }

  .logo {
    width: 148px;
    margin-bottom: 56px;
  }

  .title {
    font-size: 56px;
    line-height: 62px;
    margin: 0 0 24px;
  }

  .lead {
    font-size: 16px;
    margin: 0 0 48px;
    max-width: 380px;
  }

  .actions {
    max-width: 480px;
  }

  .bonus {
    margin-top: 32px;
    font-size: 14px;
    max-width: 480px;
  }

  .btn {
    height: 64px;
    font-size: 18px;
  }

  .phone-wrap {
    grid-area: phone;
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: visible;
    padding: 0;
  }

  .phone {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100vh;
    width: auto;
    max-width: none;
  }

  .footer {
    grid-area: footer;
    padding: 0 0 48px 64px;
  }
}
