/* v7-breath — «Страница дышит». One moss-green owns the page; the headline breathes twice, then rests. */

:root {
  --ground: #4a5d4f;        /* moss */
  --ground-deep: #41534a;   /* same hue, a step deeper, for alternate sections */
  --ground-field: #e9eee6;  /* light fill for inputs and primary button */
  --ink: #f2f4ee;           /* text on ground */
  --ink-soft: #d6dfd2;      /* secondary text, tinted from the hue (≥4.5:1 on ground) */
  --ink-on-light: #22302a;  /* text on light fills */
  --line: rgba(242, 244, 238, 0.28);
  --focus: #f6e7a8;         /* warm focus ring, readable on moss */
  --display: 'Noto Serif', 'Times New Roman', serif;
  --text: 'Commissioner', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --measure: 66ch;
  --gutter: 1rem;
  --radius: 0.4rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ink); color: var(--ground); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; }
h2 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); line-height: 1.3; text-wrap: balance; margin-bottom: 1.25rem; }
h3 { font-size: 1.4rem; line-height: 1.3; margin-bottom: 0.75rem; }
p { margin: 0 0 1rem; max-width: var(--measure); }
.muted { color: var(--ink-soft); }

.wrap { width: 100%; max-width: 64rem; margin-inline: auto; }
.hero, .section, .footer { padding-inline: var(--gutter); }
@media (min-width: 40em) { :root { --gutter: 2rem; } }

/* ---------- hero: the breath ---------- */

.hero { padding-block: clamp(3rem, 10vh, 6rem) clamp(3rem, 8vh, 5rem); }

.title {
  font-size: clamp(2.75rem, 11vw, 7.5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  font-stretch: 92%;
  white-space: nowrap;           /* two fixed lines: width changes never reflow */
  margin: 0;
}
.title__line { display: inline-block; }

.breath {
  display: grid;                 /* the two words share one cell */
  height: 1.6em;
  margin: 1rem 0 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
}
.breath > span { grid-area: 1 / 1; opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .title {
    animation: breathe 10s cubic-bezier(0.45, 0, 0.55, 1) 0.6s 2 both;
  }
  .breath__in  { animation: breath-in  10s linear 0.6s 2 both; }
  .breath__out { animation: breath-out 10s linear 0.6s 2 both; }
}
@keyframes breathe {
  0%   { font-stretch: 92%;  letter-spacing: -0.01em; }
  40%  { font-stretch: 100%; letter-spacing: 0.012em; }  /* 4 s in */
  100% { font-stretch: 92%;  letter-spacing: -0.01em; }  /* 6 s out */
}
@keyframes breath-in  { 0% { opacity: 0; } 6% { opacity: 1; } 34% { opacity: 1; } 42% { opacity: 0; } 100% { opacity: 0; } }
@keyframes breath-out { 0% { opacity: 0; } 40% { opacity: 0; } 48% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .breath { display: none; } }

/* the stable block never moves */
.stable { margin-top: clamp(1.5rem, 4vh, 2.5rem); max-width: 40rem; }
.lede { font-family: var(--display); font-size: clamp(1.25rem, 1rem + 1.2vw, 1.6rem); line-height: 1.35; margin-bottom: 0.75rem; }
.support { color: var(--ink-soft); margin-bottom: 1.5rem; }

.facts {
  list-style: none; padding: 0; margin: 0 0 1.5rem;
  display: flex; flex-wrap: wrap; gap: 0.35rem 0;
  font-size: 0.95rem;
}
.facts li { padding-right: 0.8rem; margin-right: 0.8rem; border-right: 1px solid var(--line); line-height: 1.4; }
.facts li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }

.picker { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.picker button {
  font: inherit; font-weight: 500;
  color: var(--ink); background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.5rem 1.1rem; cursor: pointer;
  transition: background 0.2s ease-out, color 0.2s ease-out, border-color 0.2s ease-out;
}
.picker button:hover { border-color: var(--ink); }
.picker button[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }

.button {
  display: inline-block; font: inherit; font-weight: 600;
  padding: 0.95rem 1.6rem; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background 0.2s ease-out, color 0.2s ease-out, transform 0.2s ease-out;
}
.button--primary { background: var(--ground-field); color: var(--ink-on-light); }
.button--primary:hover { background: #fff; }
.button--primary:active { transform: translateY(1px); }
.button--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.button--secondary:hover { background: var(--ink); color: var(--ground); }
.button:disabled, .button[data-loading] { opacity: 0.6; cursor: progress; }
.textlink { display: inline-block; margin-left: 1rem; color: var(--ink-soft); }
@media (max-width: 30em) { .button--primary { display: block; text-align: center; } .textlink { margin: 0.9rem 0 0; } }

/* ---------- sections ---------- */

.section { padding-block: clamp(3rem, 8vh, 5.5rem); }
.section--deep { background: var(--ground-deep); }

.concepts { margin: 1.5rem 0 0; max-width: var(--measure); border-top: 1px solid var(--line); }
.concepts > div { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: 0.5rem 1.5rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.concepts dt { font-family: var(--display); font-size: 1.15rem; }
.concepts dd { margin: 0; }
@media (max-width: 30em) { .concepts > div { grid-template-columns: 1fr; gap: 0.2rem; } }

.steps { margin: 0 0 1.5rem; padding-left: 1.6rem; max-width: var(--measure); }
.steps li { padding-left: 0.4rem; margin-bottom: 0.6rem; }
.steps li::marker { font-family: var(--display); color: var(--ink-soft); }

.people { display: grid; gap: 1.5rem 2.5rem; }
@media (min-width: 46em) { .people { grid-template-columns: 16rem 1fr; align-items: start; } }
.people__photo {
  aspect-ratio: 4 / 5; max-width: 16rem;
  border: 1px dashed var(--line); border-radius: var(--radius); padding: 1rem;
  display: grid; place-items: center; color: var(--ink-soft);
}
.people__name { font-family: var(--display); font-size: 1.25rem; margin-bottom: 0.5rem; }

/* ---------- form ---------- */

.wrap--form { max-width: 44rem; margin-inline: 0; }
@media (min-width: 64rem) { .wrap--form { margin-inline: auto; max-width: 64rem; } .wrap--form > * { max-width: 44rem; } }

.note {
  display: inline-block; font-size: 0.9rem; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0.35rem 0.7rem;
  margin-bottom: 1.5rem;
}

.form { display: grid; gap: 1.25rem; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend, .field > label { display: block; font-weight: 600; margin-bottom: 0.5rem; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choices legend { width: 100%; }
.choices label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--line); border-radius: 999px; padding: 0.5rem 1rem; cursor: pointer;
}
.choices label:has(input:checked) { background: var(--ground-field); color: var(--ink-on-light); border-color: var(--ground-field); }
.choices input { margin: 0; accent-color: var(--ground); }
.field { max-width: 30rem; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; font: inherit; color: var(--ink-on-light);
  background: var(--ground-field); border: 1px solid transparent; border-radius: var(--radius);
  padding: 0.75rem 0.9rem; caret-color: var(--ground);
}
input::placeholder, textarea::placeholder { color: #5f6e65; }
input:focus-visible, textarea:focus-visible { outline-offset: 2px; }
textarea { resize: vertical; min-height: 5.5rem; }
.hint { font-size: 0.9rem; color: var(--ink-soft); margin: 0.5rem 0 0; }
.check { display: flex; gap: 0.7rem; align-items: flex-start; max-width: var(--measure); cursor: pointer; }
.check input { margin: 0.3rem 0 0; accent-color: var(--ink-on-light); flex: none; width: 1.1rem; height: 1.1rem; }
.form .button { justify-self: start; }
.micro { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

.done { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; max-width: 44rem; }
.done p:last-child { margin-bottom: 0; }

/* ---------- logistics, faq ---------- */

.logistics { margin-bottom: 2rem; }
.faq { margin: 0; max-width: var(--measure); border-top: 1px solid var(--line); }
.faq > div { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.faq dt { font-weight: 600; }
.faq dd { margin: 0.2rem 0 0; color: var(--ink-soft); }

/* ---------- countdown ---------- */

.countdown { text-align: center; }
.countdown__label, .countdown__status { font-family: var(--display); font-size: 1.25rem; margin: 0 auto 0.75rem; }
.countdown__nums { display: flex; justify-content: center; gap: 1.5rem; margin: 0 auto 0.75rem; max-width: none; }
.countdown__unit { display: grid; gap: 0.1rem; }
.countdown__unit b { font-family: var(--display); font-weight: 400; font-size: clamp(2.25rem, 7vw, 3.5rem); line-height: 1.3; font-variant-numeric: tabular-nums; }
.countdown__unit small { font-size: 0.85rem; color: var(--ink-soft); }
.countdown__date { color: var(--ink-soft); margin: 0 auto; }
.countdown__live, .countdown__ended { display: none; }
[data-countdown][data-state="live"] .countdown__before,
[data-countdown][data-state="ended"] .countdown__before { display: none; }
[data-countdown][data-state="live"] .countdown__live { display: block; }
[data-countdown][data-state="ended"] .countdown__ended { display: block; }

/* ---------- footer ---------- */

.footer { padding-block: 2.5rem 3.5rem; border-top: 1px solid var(--line); font-size: 0.95rem; }
.footer p { margin-bottom: 0.4rem; }
