:root {
  --paper: #eee9f7;
  --paper-light: #fbf9ff;
  --ink: #241d3a;
  --red: #7650d4;
  --wine: #40275f;
  --coral: #c1adff;
  --line: rgba(36, 29, 58, 0.22);
  --display: "Unbounded", sans-serif;
  --body: "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #6d42a7;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a,
label,
input[type="range"] {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  color: inherit;
}

.page-shell {
  width: min(100%, 1600px);
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(rgba(36, 29, 58, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 29, 58, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 26px 26px;
  box-shadow: 0 0 80px rgba(45, 22, 71, 0.28);
}

.site-header {
  min-height: 102px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px clamp(24px, 5vw, 78px);
  border-bottom: 1px solid var(--ink);
  background: rgba(242, 234, 220, 0.92);
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  width: 49px;
  height: 49px;
  display: grid;
  place-items: center;
  border: 2px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 800;
  transform: rotate(-9deg);
  position: relative;
}

.brand-mark::after {
  content: "";
  width: 57px;
  border-top: 2px solid var(--red);
  position: absolute;
  transform: rotate(-38deg);
}

.brand-name {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: 0.02em;
}

.header-note {
  margin: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.header-link {
  justify-self: end;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 5px;
}

.header-link span {
  margin-left: 7px;
  color: var(--red);
}

.hero {
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(460px, 0.9fr) minmax(500px, 1.1fr);
  padding: 64px clamp(24px, 5vw, 78px) 46px;
  position: relative;
  isolation: isolate;
}

.hero::before {
  content: "";
  width: 54vw;
  height: 54vw;
  max-width: 770px;
  max-height: 770px;
  position: absolute;
  top: 12px;
  right: -6vw;
  z-index: -2;
  border-radius: 50%;
  background: var(--coral);
}

.hero-copy {
  align-self: center;
  z-index: 2;
  padding-bottom: 20px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.17em;
}

.eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(118, 80, 212, 0.18);
}

h1,
h2 {
  margin: 0;
  font-family: var(--display);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

h1 {
  font-size: clamp(62px, 6.4vw, 105px);
}

h1 em,
h2 em {
  color: var(--red);
  font-style: normal;
}

.hero-lead {
  margin: 31px 0 30px;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.45;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.08em;
}

.primary-link span {
  color: var(--red);
  font-size: 20px;
  transition: transform 180ms ease;
}

.primary-link:hover span {
  transform: translate(3px, 3px);
}

.hero-art {
  min-height: 640px;
  align-self: center;
  position: relative;
  display: grid;
  place-items: center;
}

.hero-art::after {
  content: "";
  width: 77%;
  height: 12%;
  position: absolute;
  left: 15%;
  bottom: 4%;
  z-index: -1;
  border-radius: 50%;
  background: rgba(64, 39, 95, 0.3);
  filter: blur(18px);
}

.hero-art img {
  width: min(92%, 700px);
  aspect-ratio: 1;
  object-fit: cover;
  mix-blend-mode: multiply;
  filter: saturate(0.93) contrast(1.03);
  clip-path: circle(48% at 50% 50%);
}

.orbit {
  position: absolute;
  inset: 6% 1% 5% 10%;
  z-index: -1;
  border: 1px solid rgba(64, 39, 95, 0.45);
  border-radius: 50%;
  transform: rotate(-14deg);
}

.orbit-two {
  inset: 15% 8% 8% 2%;
  border-color: rgba(242, 234, 220, 0.68);
  transform: rotate(18deg);
}

.art-caption {
  position: absolute;
  z-index: 2;
  color: var(--wine);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.art-caption b {
  font-family: var(--display);
  font-size: 13px;
}

.caption-top {
  top: 9%;
  right: 4%;
  transform: rotate(7deg);
}

.caption-bottom {
  top: 63%;
  left: -22%;
  bottom: auto;
  padding: 7px 11px 8px 14px;
  background: var(--paper);
  box-shadow: 5px 5px 0 rgba(64, 39, 95, 0.13);
  transform: rotate(-6deg);
}

.certified-stamp {
  width: 134px;
  height: 134px;
  position: absolute;
  right: 0;
  bottom: 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 3px double var(--wine);
  border-radius: 50%;
  color: var(--wine);
  text-align: center;
  text-transform: uppercase;
  transform: rotate(10deg);
}

.certified-stamp::before,
.certified-stamp::after {
  content: "★";
  font-size: 10px;
}

.certified-stamp span,
.certified-stamp small {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.certified-stamp strong {
  margin: 3px 0;
  font-family: var(--display);
  font-size: 12px;
}

.generator-section {
  padding: 88px clamp(24px, 5vw, 78px) 100px;
  color: var(--paper-light);
  background:
    radial-gradient(circle at 85% 12%, rgba(193, 173, 255, 0.16), transparent 25%),
    var(--wine);
  position: relative;
}

.generator-section::after {
  content: "НЕ ПРИДУ";
  position: absolute;
  right: -48px;
  bottom: 16px;
  color: rgba(242, 234, 220, 0.035);
  font-family: var(--display);
  font-size: 90px;
  font-weight: 800;
  pointer-events: none;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 52px;
}

.section-number {
  display: block;
  margin-bottom: 17px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.section-heading h2,
.manifesto h2 {
  font-size: clamp(43px, 5vw, 76px);
}

.section-heading p {
  margin: 0 0 7px;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.72;
}

.generator-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 4vw, 62px);
  align-items: stretch;
}

.controls-panel {
  padding-right: clamp(0px, 2vw, 30px);
}

fieldset {
  margin: 0 0 40px;
  padding: 0;
  border: 0;
}

legend {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

legend span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(250, 246, 236, 0.5);
  border-radius: 50%;
  color: var(--coral);
  font-size: 10px;
}

.occasion-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(250, 246, 236, 0.25);
}

.choice-card {
  min-height: 139px;
  padding: 19px 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(250, 246, 236, 0.25);
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: background-color 180ms ease, color 180ms ease;
}

.choice-card:last-child {
  border-right: 0;
}

.choice-card:has(input:checked) {
  color: var(--wine);
  background: var(--paper-light);
}

.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card:focus-within {
  outline: 2px solid var(--coral);
  outline-offset: -3px;
}

.choice-icon {
  min-height: 43px;
  margin-bottom: 8px;
  color: var(--coral);
  font-family: Georgia, serif;
  font-size: 34px;
  line-height: 1;
}

.choice-card > span:nth-of-type(2) {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.choice-card small {
  margin-top: 6px;
  font-size: 9px;
  opacity: 0.62;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin: 0 1px 6px;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.58;
}

input[type="range"] {
  width: 100%;
  height: 20px;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(90deg, var(--coral) 0 50%, rgba(250, 246, 236, 0.35) 50%);
}

input[type="range"]::-webkit-slider-thumb {
  width: 19px;
  height: 19px;
  margin-top: -8px;
  appearance: none;
  border: 4px solid var(--wine);
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 2px var(--coral);
}

input[type="range"]::-moz-range-track {
  height: 2px;
  background: rgba(250, 246, 236, 0.35);
}

input[type="range"]::-moz-range-progress {
  height: 2px;
  background: var(--coral);
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 4px solid var(--wine);
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 2px var(--coral);
}

.audacity-reading {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 8px;
}

.audacity-reading > span {
  color: var(--coral);
  font-family: var(--display);
  font-size: 35px;
  font-weight: 700;
  line-height: 1;
}

.audacity-reading div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.audacity-reading strong {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.audacity-reading small {
  font-size: 10px;
  opacity: 0.62;
}

.generate-button {
  width: 100%;
  min-height: 73px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border: 0;
  color: var(--wine);
  background: var(--coral);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 8px 8px 0 rgba(34, 20, 54, 0.3);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.generate-button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 11px 11px 0 rgba(34, 20, 54, 0.3);
}

.generate-button:active {
  transform: translate(3px, 3px);
  box-shadow: 4px 4px 0 rgba(34, 20, 54, 0.3);
}

.generate-button b {
  font-family: var(--body);
  font-size: 26px;
}

.generate-button.is-spinning b {
  animation: spin 420ms ease;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.fine-print {
  margin: 12px 0 0;
  font-size: 8px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  opacity: 0.45;
}

.result-panel {
  min-height: 555px;
  padding: 27px clamp(24px, 3vw, 42px) 34px;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    linear-gradient(rgba(36, 29, 58, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 29, 58, 0.04) 1px, transparent 1px),
    var(--paper-light);
  background-size: 19px 19px;
  position: relative;
  box-shadow: 14px 14px 0 rgba(34, 20, 54, 0.25);
}

.result-topline {
  display: flex;
  justify-content: space-between;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--ink);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.status-dot {
  opacity: 0.55;
}

.status-dot::before {
  content: "";
  width: 5px;
  height: 5px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--red);
  vertical-align: 1px;
}

.message-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 50px 0 35px;
}

.message-avatar {
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--paper-light);
  background: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.message-bubble {
  max-width: 93%;
  padding: 22px 23px 16px;
  border-radius: 18px 18px 18px 3px;
  color: var(--paper-light);
  background: var(--ink);
  position: relative;
  box-shadow: 6px 7px 0 rgba(118, 80, 212, 0.24);
}

.message-bubble p {
  min-height: 125px;
  margin: 0 0 10px;
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 500;
  line-height: 1.55;
}

.message-bubble time {
  display: block;
  color: rgba(250, 246, 236, 0.55);
  font-size: 9px;
  text-align: right;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: auto;
}

.copy-button,
.another-button {
  min-height: 55px;
  border: 1px solid var(--ink);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.copy-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--paper-light);
  background: var(--red);
  border-color: var(--red);
}

.copy-button:hover,
.copy-button.copied {
  color: var(--paper-light);
  background: var(--ink);
  border-color: var(--ink);
}

.another-button {
  padding: 0 17px;
}

.another-button:hover {
  color: var(--paper-light);
  background: var(--ink);
}

.result-seal {
  width: 145px;
  height: 85px;
  position: absolute;
  right: 34px;
  top: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 3px double rgba(118, 80, 212, 0.42);
  color: rgba(118, 80, 212, 0.53);
  text-align: center;
  text-transform: uppercase;
  transform: rotate(7deg);
  pointer-events: none;
}

.result-seal span,
.result-seal small {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.result-seal strong {
  margin: 4px 0;
  font-family: var(--display);
  font-size: 10px;
}

.manifesto {
  padding: 95px clamp(24px, 5vw, 78px) 105px;
  border-bottom: 1px solid var(--ink);
}

.manifesto-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(40px, 7vw, 110px);
}

.manifesto-copy {
  padding-top: 6px;
}

.manifesto-copy > p {
  max-width: 570px;
  font-size: 14px;
  line-height: 1.75;
}

.manifesto-copy .large-copy {
  margin-top: 0;
  font-size: clamp(20px, 2vw, 29px);
  font-weight: 600;
  line-height: 1.45;
}

.promise {
  width: fit-content;
  margin-top: 38px;
  padding: 17px 52px 17px 19px;
  border-left: 5px solid var(--red);
  background: rgba(118, 80, 212, 0.08);
}

.promise span {
  display: block;
  margin-bottom: 6px;
  color: var(--red);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.promise strong {
  font-family: var(--display);
  font-size: 14px;
  line-height: 1.5;
}

footer {
  min-height: 132px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 24px clamp(24px, 5vw, 78px);
  background: var(--paper-light);
}

footer p,
footer > a:last-child {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

footer p {
  opacity: 0.55;
}

footer > a:last-child {
  justify-self: end;
  text-underline-offset: 5px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  z-index: 20;
  padding: 13px 20px;
  color: var(--paper-light);
  background: var(--ink);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transform: translate(-50%, 25px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1050px) {
  .hero {
    min-height: auto;
    grid-template-columns: 0.95fr 1.05fr;
  }

  h1 {
    font-size: clamp(56px, 7vw, 76px);
  }

  .hero-art {
    min-height: 520px;
  }

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

  .choice-card:nth-child(2) {
    border-right: 0;
  }

  .choice-card:nth-child(-n+2) {
    border-bottom: 1px solid rgba(250, 246, 236, 0.25);
  }
}

@media (max-width: 780px) {
  .site-header {
    min-height: 82px;
    grid-template-columns: 1fr auto;
  }

  .header-note {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

  .hero::before {
    width: 110vw;
    height: 110vw;
    top: 45%;
    right: -27vw;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  .hero-lead br {
    display: none;
  }

  .hero-art {
    min-height: 540px;
    margin-top: -20px;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 24px;
  }

  .generator-grid,
  .manifesto-grid {
    grid-template-columns: 1fr;
  }

  .controls-panel {
    padding-right: 0;
  }

  .result-panel {
    min-height: 510px;
  }

  footer {
    grid-template-columns: 1fr auto;
  }

  footer p {
    display: none;
  }
}

@media (max-width: 520px) {
  .site-header,
  .hero,
  .generator-section,
  .manifesto,
  footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-mark::after {
    width: 49px;
  }

  .brand-name {
    font-size: 10px;
  }

  .header-link {
    font-size: 9px;
  }

  h1 {
    font-size: clamp(49px, 15.3vw, 66px);
  }

  .hero {
    padding-top: 42px;
    padding-bottom: 16px;
  }

  .hero-lead {
    max-width: 350px;
  }

  .hero-art {
    min-height: 430px;
    margin: -10px -32px 0;
  }

  .certified-stamp {
    width: 105px;
    height: 105px;
    right: 8%;
  }

  .caption-top {
    right: 9%;
  }

  .caption-bottom {
    top: 68%;
    left: 3%;
  }

  .generator-section,
  .manifesto {
    padding-top: 69px;
    padding-bottom: 76px;
  }

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

  .section-heading h2,
  .manifesto h2 {
    font-size: 39px;
  }

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

  .choice-card {
    min-height: 125px;
  }

  .range-labels {
    font-size: 7px;
  }

  .audacity-reading small {
    max-width: 240px;
  }

  .result-panel {
    min-height: 560px;
    padding: 23px 18px 25px;
  box-shadow: 7px 8px 0 rgba(34, 20, 54, 0.25);
  }

  .status-dot {
    max-width: 125px;
    text-align: right;
  }

  .message-wrap {
    margin-top: 72px;
  }

  .message-bubble {
    padding: 19px 17px 14px;
  }

  .message-bubble p {
    min-height: 155px;
    font-size: 15px;
  }

  .result-seal {
    width: 122px;
    height: 72px;
    right: 18px;
    top: 65px;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  .manifesto-grid {
    gap: 32px;
  }

  footer > a:last-child {
    max-width: 120px;
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
