/* v20-noise — Шум → тишина */
:root {
  --bg: #eef0f2;
  --bg-tint: #e4e8ec;
  --ink: #171a1e;
  --ink-soft: #4f5862;
  --noise: #a9b0b8;
  --line: #cfd5db;
  --accent: #2f5d7c;
  --accent-deep: #244a63;
  --paper: #fafbfc;
  --text: "Onest", system-ui, sans-serif;
  --display: "Oranienbaum", Georgia, serif;
  --measure: 68ch;
  --gutter: 1rem;
}
@media (min-width: 48rem) { :root { --gutter: 2rem; } }

* { box-sizing: border-box; }
html { color-scheme: light; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-deep); }
p { margin: 0 0 1rem; max-width: var(--measure); }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }
.wrap { max-width: 46rem; margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.3; margin: 0 0 .6rem; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 8.5vw, 5.2rem); line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.4rem; }

/* ---------- the hero: a field of the day's words, the quiet forming around the headline ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}
.hero__field {
  position: absolute; inset: 0;
  padding: .5rem var(--gutter);
  overflow: hidden;
}
.hero__words {
  display: flex; flex-wrap: wrap;
  gap: .3rem 1.25rem;
  align-content: flex-start;
  color: var(--noise);
  line-height: 1.5;
  will-change: transform;
}
.hero__words span { white-space: nowrap; opacity: 0; }
.hero__words span.s1 { font-size: .95rem; }
.hero__words span.s2 { font-size: 1.15rem; padding-inline-start: .5rem; }
.hero__words span.s3 { font-size: 1.35rem; padding-inline-end: .7rem; }
.hero__words span.keep { opacity: .35; }
html.js .hero__words span { opacity: 1; }          /* with JS the field is full until the sequence thins it */

.hero__content { position: relative; z-index: 1; text-align: center; width: 100%; }
.hero__title {
  display: inline-block;
  padding: .5rem 1.25rem;
  background: var(--bg);
  box-shadow: 0 0 60px 44px var(--bg);          /* the soft knockout: the ground colour, feathered */
  border-radius: 1rem;
}
.hero__title h1 { margin: 0; }
.hero__line {
  margin: .75rem auto 0;
  max-width: none;
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.6vw, 2.25rem);
  line-height: 1.3;
  color: var(--ink);
}
.hero__offer {
  margin: 2rem auto 0;
  max-width: 44rem;
  padding: 1rem 1.25rem 0;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  box-shadow: 0 0 40px 28px color-mix(in srgb, var(--bg) 84%, transparent);
  border-radius: 1rem;
}
.hero__offer .lede { font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.4; color: var(--ink); max-width: 36ch; margin: 0 auto .75rem; }
.hero__offer .support { color: var(--ink-soft); max-width: 44ch; margin: 0 auto 1.5rem; }
.hero__skip {
  position: absolute; z-index: 2; top: 1rem; right: var(--gutter);
  background: none; border: 0; padding: .35rem .25rem;
  font: inherit; font-size: .9rem;
  color: var(--ink-soft); text-decoration: underline; text-underline-offset: .18em;
  cursor: pointer;
}
.hero__skip:hover { color: var(--ink); }
html:not(.js) .hero__skip { display: none; }

/* live: the one motion moment, ≤9 s, once — delays per word are set by the script from distance to the centre */
.hero.is-live .hero__words { animation: drift 9s linear forwards; }
.hero.is-live .hero__words span { animation: thin 1.6s ease-out forwards; }
.hero.is-live .hero__words span.keep { animation-name: thin-keep; }
.hero.is-live .hero__line { opacity: 0; animation: settle 1s ease-out 6.6s forwards; }
.hero.is-live .hero__offer { opacity: .72; animation: emphasise .9s ease-out 7.4s forwards; }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-3%); } }
@keyframes thin { to { opacity: 0; } }
@keyframes thin-keep { to { opacity: .35; } }
@keyframes settle { from { opacity: 0; transform: translateY(.5rem); } to { opacity: 1; transform: none; } }
@keyframes emphasise { to { opacity: 1; } }

/* quiet: the end state (after the sequence, after skip, reduced motion, no JS) */
.hero.is-quiet .hero__words { transform: translateY(-3%); }
.hero.is-quiet .hero__words span, html.js .hero.is-quiet .hero__words span { opacity: 0; }
.hero.is-quiet .hero__words span.keep, html.js .hero.is-quiet .hero__words span.keep { opacity: .35; }
.hero.is-quiet .hero__line, .hero.is-quiet .hero__offer { opacity: 1; animation: none; }
.hero.is-quiet .hero__title, .hero.is-quiet .hero__offer, html:not(.js) .hero__title, html:not(.js) .hero__offer { background: none; box-shadow: none; } /* nothing left to knock out */
@media (prefers-reduced-motion: reduce) {
  .hero .hero__words, .hero .hero__words span, .hero .hero__line, .hero .hero__offer { animation: none !important; }
  html.js .hero .hero__words span { opacity: 0; }
  html.js .hero .hero__words span.keep { opacity: .35; }
  .hero .hero__line, .hero .hero__offer { opacity: 1; }
}

/* ---------- the invitation block inside the hero ---------- */
.facts { list-style: none; padding: 0; margin: 0 auto 1.25rem; max-width: 44rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem 0; }
.facts li { padding-inline: .75rem; border-right: 1px solid var(--line); line-height: 1.5; }
.facts li:last-child { border-right: 0; }
.picker { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; margin-bottom: 1.5rem; }
.picker__label { color: var(--ink-soft); margin-right: .25rem; }
.picker button {
  font: inherit; font-weight: 500;
  padding: .55rem 1rem; border-radius: 999px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  cursor: pointer; transition: background .2s ease-out, color .2s ease-out;
}
.picker button:hover { background: var(--bg-tint); }
.picker button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.actions { max-width: none; margin: 0 0 .5rem; }

.btn {
  display: inline-block;
  font: inherit; font-weight: 600;
  padding: .95rem 1.6rem; border-radius: .5rem;
  background: var(--accent); color: #fff; text-decoration: none;
  border: 1px solid var(--accent); cursor: pointer;
  box-shadow: 0 6px 18px -8px rgba(23, 26, 30, .4);
  transition: background .2s ease-out, transform .2s ease-out;
}
.btn:hover { background: var(--accent-deep); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[data-loading] { opacity: .65; cursor: progress; }
.btn[data-loading]::after { content: "…"; }
.btn--secondary { background: transparent; color: var(--accent); box-shadow: none; }
.btn--secondary:hover { background: var(--accent); color: #fff; }
.textlink { display: inline-block; margin-left: 1.25rem; }
@media (max-width: 30rem) { .textlink { display: block; margin: 1rem 0 0; } }

/* ---------- sections ---------- */
.section { position: relative; padding: 3.5rem 0; }
.remnant { display: none; }
@media (min-width: 72rem) {
  .remnant {
    display: block; position: absolute; top: 3.9rem;
    left: calc(50% - 23rem - 9rem);
    color: var(--noise); opacity: .5; font-size: 1.05rem; line-height: 1.5;
    pointer-events: none; user-select: none;
  }
  .section:nth-of-type(even) .remnant { left: auto; right: calc(50% - 23rem - 9rem); }
}
.section--tint { background: var(--bg-tint); padding-left: 1rem; padding-right: 1rem; }
.section--tint .wrap { padding-inline: 0; max-width: calc(46rem - 2 * var(--gutter)); } /* same text edge as the plain sections */
@media (min-width: 48rem) { .section--tint { padding-left: 2rem; padding-right: 2rem; } }
.concepts, .faq { margin: 1.5rem 0 0; max-width: var(--measure); }
.concepts div, .faq div { display: grid; gap: .25rem 1.5rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.concepts div:last-child, .faq div:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 40rem) { .concepts div, .faq div { grid-template-columns: 14rem 1fr; } }
dt { font-family: var(--display); font-size: 1.3rem; line-height: 1.3; }
dd { margin: 0; }
.steps { padding-left: 1.4rem; margin: 1rem 0 1.5rem; max-width: var(--measure); }
.steps li { padding-left: .4rem; margin-bottom: .5rem; }
.steps li::marker { color: var(--accent); font-weight: 600; }

.people { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .people { grid-template-columns: 16rem 1fr; gap: 2.5rem; } }
.photo {
  aspect-ratio: 4 / 5; max-width: 16rem;
  display: grid; place-items: center; padding: 1rem;
  background: var(--paper); border: 1px dashed var(--noise); border-radius: .5rem;
  color: var(--ink-soft);
}
.name { font-weight: 600; margin-bottom: .25rem; }

/* ---------- form ---------- */
.note { font-size: .9rem; color: var(--ink-soft); border-left: 1px solid var(--line); padding-left: .75rem; }
.form { max-width: 34rem; margin-top: 1.5rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
legend, .field label { display: block; font-weight: 500; margin-bottom: .5rem; }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--ink); }
.choice input { accent-color: var(--accent); margin: 0; }
.field { margin-bottom: 1.25rem; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; font: inherit; padding: .7rem .85rem;
  border: 1px solid var(--line); border-radius: .5rem; background: var(--paper); color: var(--ink);
  caret-color: var(--accent);
}
input::placeholder, textarea::placeholder { color: #66747a; }
input:focus, textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.hint { font-size: .9rem; color: var(--ink-soft); margin: .5rem 0 0; }
.consent { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: 1.5rem; max-width: var(--measure); }
.consent input { accent-color: var(--accent); margin-top: .3rem; }
.done { max-width: 34rem; margin-top: 1.5rem; padding: 1.5rem; background: var(--paper); border: 1px solid var(--line); border-radius: .5rem; }
.done h3 { margin-bottom: .75rem; }

/* ---------- countdown ---------- */
.countdown { text-align: center; }
.countdown p { margin-inline: auto; }
.countdown__label, .countdown__live, .countdown__ended { color: var(--ink-soft); margin-bottom: 1rem; }
.countdown__live, .countdown__ended { display: none; font-family: var(--display); font-size: 1.8rem; color: var(--ink); }
.countdown[data-state="live"] .countdown__label, .countdown[data-state="live"] .countdown__grid,
.countdown[data-state="ended"] .countdown__label, .countdown[data-state="ended"] .countdown__grid { display: none; }
.countdown[data-state="live"] .countdown__live, .countdown[data-state="ended"] .countdown__ended { display: block; }
.countdown__grid { display: flex; justify-content: center; gap: 1.5rem 2rem; flex-wrap: wrap; margin-bottom: 1rem; }
.countdown__grid b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(2.5rem, 7vw, 4rem); line-height: 1.3; font-variant-numeric: tabular-nums; }
.countdown__grid span { font-size: .9rem; color: var(--ink-soft); }
.countdown__date { font-weight: 500; }

/* ---------- footer ---------- */
.footer { padding: 2.5rem 0 3rem; border-top: 1px solid var(--line); font-size: .95rem; }
.footer p { margin-bottom: .5rem; }
