:root {
  --bg: #f7f3ec;
  --paper: #fffdf8;
  --ink: #1e2521;
  --muted: #55615a;
  --line: rgba(48, 58, 52, 0.14);
  --green: #2f6f57;
  --green-dark: #214f3f;
  --coral: #c8644f;
  --gold: #d8b45d;
  --shadow: 0 24px 70px rgba(44, 54, 48, 0.14);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  overflow-x: hidden;
  background:
    linear-gradient(120deg, rgba(47, 111, 87, 0.12), transparent 34%),
    linear-gradient(245deg, rgba(200, 100, 79, 0.12), transparent 38%),
    linear-gradient(180deg, #fffaf3 0%, var(--bg) 100%);
}

a {
  color: inherit;
}

.page {
  width: 100%;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) 16px max(24px, calc(18px + env(safe-area-inset-bottom)));
}

.hero {
  width: min(100%, 980px);
  max-width: 100%;
  min-height: min(720px, calc(100dvh - 44px));
  padding: clamp(24px, 6vw, 72px);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  grid-template-areas:
    "copy copy"
    "buttons buttons"
    "telegram-note telegram-note"
    "after after";
  align-content: center;
  gap: clamp(22px, 4vw, 46px);
}

.hero-copy {
  grid-area: copy;
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

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

h1,
h2 {
  font-family: "Lora", Georgia, serif;
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

h1 {
  max-width: 760px;
  font-size: 3.55rem;
}

.lead {
  max-width: 720px;
  color: #313b35;
  font-size: 1.15rem;
  line-height: 1.55;
}

.after-card {
  grid-area: after;
  min-width: 0;
  align-self: center;
  padding: clamp(20px, 3vw, 30px);
  border-radius: var(--radius-md);
  background: #f4f8f3;
  border: 1px solid rgba(47, 111, 87, 0.18);
  display: grid;
  gap: 16px;
}

.after-card h2 {
  font-size: 1.62rem;
}

.after-card ol {
  margin: 0;
  padding-left: 1.35rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.62;
}

.after-card li + li {
  margin-top: 8px;
}

.after-card li {
  overflow-wrap: anywhere;
}

.messenger-grid {
  grid-area: buttons;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.messenger-button {
  min-height: 72px;
  padding: 16px 18px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(47, 111, 87, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.messenger-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.messenger-button--max {
  background: var(--green);
}

.messenger-button--max .messenger-icon {
  background-image: url("./assets/icon-max.svg");
}

.messenger-button--telegram {
  background: #2a8fc9;
}

.messenger-button--telegram .messenger-icon {
  background-image: url("./assets/icon-telegram.svg");
}

.messenger-button--vk {
  background: #356fa8;
}

.messenger-button--vk .messenger-icon {
  background-image: url("./assets/icon-vk.svg");
}

.messenger-button:focus-visible {
  outline: 3px solid rgba(31, 38, 34, 0.38);
  outline-offset: 4px;
}

.messenger-button:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 8px 18px rgba(47, 111, 87, 0.16);
}

@media (hover: hover) {
  .messenger-button:hover {
    transform: translateY(-2px);
    filter: saturate(1.04);
    box-shadow: 0 18px 34px rgba(47, 111, 87, 0.22);
  }
}

.telegram-note {
  grid-area: telegram-note;
  justify-self: center;
  width: min(100%, 680px);
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(200, 100, 79, 0.28);
  background: rgba(255, 251, 244, 0.92);
  color: #76675c;
  text-align: center;
  display: grid;
}

.telegram-note strong {
  padding: 14px 18px;
  background: #c47b5a;
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.25;
}

.telegram-note span {
  padding: 16px 18px;
  font-size: 1rem;
  line-height: 1.45;
}

@media (max-width: 920px) {
  .page {
    display: block;
    padding: 12px 12px max(18px, calc(12px + env(safe-area-inset-bottom)));
  }

  .hero {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    min-height: calc(100dvh - 30px);
    padding: 30px 24px;
    border-radius: 24px;
    overflow: hidden;
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "buttons"
      "telegram-note"
      "after";
    align-content: center;
    gap: 18px;
  }

  h1 {
    max-width: 11.5ch;
    font-size: 3.05rem;
  }

  .lead {
    max-width: 34ch;
    font-size: 1.08rem;
  }

  .eyebrow {
    max-width: 36ch;
  }

  .after-card {
    width: 100%;
    max-width: 100%;
    padding: 16px;
  }

  .after-card h2 {
    font-size: 1.58rem;
  }

  .after-card ol {
    font-size: 1rem;
  }

  .messenger-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .messenger-button {
    min-height: 58px;
  }

  .telegram-note {
    border-radius: 16px;
  }

  .telegram-note strong {
    font-size: 1rem;
  }

  .telegram-note span {
    font-size: 0.95rem;
  }
}

@media (max-width: 760px) {
  .hero {
    max-width: 335px;
    padding: 24px 16px;
  }

  h1 {
    max-width: 10.5ch;
    font-size: 2.2rem;
  }

  .lead {
    max-width: 30ch;
    font-size: 1rem;
  }

  .eyebrow {
    max-width: 31ch;
  }

  .after-card {
    padding: 16px;
  }

  .after-card h2 {
    font-size: 1.58rem;
  }

  .after-card ol {
    font-size: 0.96rem;
  }
}

@media (max-width: 380px) {
  .hero {
    padding: 20px 14px;
  }

  h1 {
    font-size: 1.95rem;
  }

  .after-card ol {
    padding-left: 1.1rem;
  }
}
