/* v18-fork — «Развилка»: one deep teal owns the first viewport; the page below is light and still. */
:root {
  --teal: #12474a;
  --teal-deep: #0d3537;
  --teal-tint: #1f6164;
  --teal-tint-hover: #27787b;
  --teal-lit: #1b5d60;
  --on-teal: #e8f2f1;
  --on-teal-soft: #b9d4d2;
  --paper: #f4f6f5;
  --paper-tint: #e7eeec;
  --ink: #16292a;
  --ink-soft: #4f6364;
  --line: #cfdbd9;
  --display: 'Vollkorn', Georgia, serif;
  --text: 'Manrope', system-ui, sans-serif;
  --measure: 68ch;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--teal); color: var(--on-teal); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.hero :focus-visible { outline-color: var(--on-teal); }

a { color: var(--teal); text-underline-offset: 0.18em; }
p { margin: 0 0 1rem; max-width: var(--measure); }
.muted { color: var(--ink-soft); }
.small { font-size: 0.9375rem; }
.lede { font-size: 1.25rem; line-height: 1.45; font-family: var(--display); }

.wrap { width: 100%; max-width: 48rem; margin-inline: auto; }
.section { padding: 3.5rem 1rem; }
.section--tint { background: var(--paper-tint); }
.h2 { font-family: var(--display); font-weight: 600; font-size: 1.9rem; line-height: 1.3; margin: 0 0 1rem; }
.h3 { font-family: var(--display); font-weight: 600; font-size: 1.4rem; line-height: 1.3; margin: 0 0 0.75rem; }
@media (min-width: 48rem) {
  .section { padding: 5rem 1.5rem; }
  .h2 { font-size: 2.4rem; }
}

/* ---------- hero: the screen is the choice ---------- */
.hero {
  background: var(--teal);
  color: var(--on-teal);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem 1.25rem;
  text-align: center;
}
@media (min-width: 47.5rem) { .hero { padding: 2.25rem 2rem 1.5rem; } }
.hero__top { width: 100%; max-width: 70rem; margin: 0 auto 1.25rem; }
.hero__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.5rem, 7.2vw, 5.4rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}
.hero__facts { font-size: 1rem; color: var(--on-teal-soft); margin: 0; max-width: none; line-height: 1.5; }
.sep { display: inline-block; width: 1px; height: 0.9em; background: var(--on-teal-soft); margin: 0 0.7em; vertical-align: -0.1em; opacity: 0.7; }
@media (min-width: 47.5rem) { .hero__top { margin-bottom: 1.75rem; } .hero__facts { font-size: 1.0625rem; } }

/* the two halves */
.halves {
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  min-height: 0;
  transition: grid-template-columns 0.75s cubic-bezier(0.16, 1, 0.3, 1), grid-template-rows 0.75s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease-out;
}
.half {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--teal);
  color: var(--on-teal);
  font: inherit;
  cursor: pointer;
  display: block;
  transition: background-color 0.25s ease-out, opacity 0.5s ease-out;
}
.half:hover, .half:focus-visible { background: var(--teal-tint); }
.half:focus-visible { outline: none; }
.half:focus-visible .door { outline: 3px solid var(--on-teal); outline-offset: -8px; }
.half:disabled { cursor: default; }
.door {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
  width: min(100% - 2.5rem, 30rem);
  height: calc(100% - 2.5rem);
  min-height: 15rem;
  margin: 1.25rem auto;
  padding: 1.25rem 1rem 2.25rem;
  border: 1px solid rgba(232, 242, 241, 0.55);
  border-radius: 999px 999px var(--radius) var(--radius);
  transition: border-color 0.25s ease-out, opacity 0.35s ease-out;
}
.half:hover .door { border-color: var(--on-teal); }
.door__label { font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; }
.door__hint { color: var(--on-teal-soft); font-size: 1rem; line-height: 1.4; }
.door__count { color: var(--on-teal); font-size: 1rem; line-height: 1.4; margin-bottom: 0.5rem; }
.door__count[hidden] { display: none; }
@media (min-width: 47.5rem) {
  .door { margin: 1.5rem auto; height: calc(100% - 3rem); min-height: 22rem; padding-bottom: 3rem; width: min(100% - 3rem, 32rem); }
  .half--usual .door { margin-right: 0.75rem; }
  .half--other .door { margin-left: 0.75rem; }
}
/* phones: the halves stack */
@media (max-width: 47.49rem) {
  .halves { grid-template-columns: 1fr; grid-template-rows: 44svh 44svh; }
  .door { min-height: 0; }
}

/* states */
.hero.is-dim .halves { opacity: 0.35; }
.hero.is-folding .halves { grid-template-columns: 0fr 1fr; }
@media (max-width: 47.49rem) { .hero.is-folding .halves { grid-template-rows: 0svh 88svh; } }
.hero.is-folding .half { pointer-events: none; }
.hero.is-folding .half--usual { opacity: 0; }
.hero.is-folding .half--other { background: var(--teal-lit); }
.hero.is-folding .half--other .door { opacity: 0; }
.hero.is-open .half { display: none; }

/* the lit room (the open state; the default without JS) */
.room {
  display: none;
  grid-column: 1 / -1;
  grid-row: 1;
  background: var(--teal-lit);
  border-radius: var(--radius);
  outline: none;
  padding: 2.5rem 1rem;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero.is-open .halves { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.hero.is-open .room { display: flex; animation: offer-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes offer-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.room__inner { width: 100%; max-width: 40rem; margin: 0 auto; }
.room__note { font-family: var(--display); font-size: 1.2rem; color: var(--on-teal); margin: 0 auto 1rem; max-width: none; }
.room__note[hidden] { display: none; }
.offer__lede { font-family: var(--display); font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.4; margin: 0 auto 0.75rem; max-width: 30ch; }
.offer__support { color: var(--on-teal-soft); margin: 0 auto 1.5rem; max-width: 48ch; }
.room .facts { justify-content: center; max-width: none; }
.room .picker { justify-content: center; }
@media (min-width: 47.5rem) { .room { padding: 3rem 2rem; } }

.fork__skip { display: block; width: max-content; margin: 1rem auto 0; color: var(--on-teal-soft); font-size: 0.9375rem; line-height: 1.5; }
.fork__skip:hover { color: var(--on-teal); }

@media (prefers-reduced-motion: reduce) {
  .halves, .half, .door { transition: none; }
  .hero.is-open .room { animation: none; }
}

/* facts */
.facts { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.4rem 0; max-width: 60ch; font-size: 0.9375rem; line-height: 1.5; }
.facts li { padding-right: 0.8em; margin-right: 0.8em; border-right: 1px solid var(--on-teal-soft); }
.facts li:last-child { border-right: 0; }
.facts--ink li { border-right-color: var(--line); }

/* city picker */
.picker { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 1.5rem; }
.picker__label { color: var(--on-teal-soft); margin-right: 0.25rem; font-size: 0.9375rem; }
.picker--ink .picker__label { color: var(--ink-soft); }
.chip {
  appearance: none; font: inherit; font-weight: 600; font-size: 0.9375rem; line-height: 1.3;
  padding: 0.5rem 0.95rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--on-teal-soft); background: transparent; color: var(--on-teal);
  transition: background-color 0.2s ease-out, color 0.2s ease-out;
}
.chip:hover { background: rgba(232, 242, 241, 0.12); }
.chip[aria-pressed="true"] { background: var(--on-teal); color: var(--teal); border-color: var(--on-teal); }
.picker--ink .chip { border-color: var(--teal); color: var(--teal); }
.picker--ink .chip:hover { background: var(--paper-tint); }
.picker--ink .chip[aria-pressed="true"] { background: var(--teal); color: var(--on-teal); }

/* buttons */
.btn {
  display: inline-block; font: inherit; font-weight: 700; font-size: 1.05rem; line-height: 1.3;
  padding: 0.95rem 1.5rem; border-radius: var(--radius); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background-color 0.2s ease-out, transform 0.2s ease-out, color 0.2s ease-out;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--on-teal); color: var(--teal); border-color: var(--on-teal); }
.btn--primary:hover { background: #fff; }
main .btn--primary { background: var(--teal); color: var(--on-teal); border-color: var(--teal); }
main .btn--primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); }
.btn--secondary { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn--secondary:hover { background: var(--teal); color: var(--on-teal); }
.btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.btn[data-loading]::after { content: "…"; }
.textlink { display: block; margin-top: 1rem; color: var(--on-teal); font-size: 0.9375rem; }

/* ---------- content ---------- */
.offer-section .btn--primary { margin-top: 0.25rem; }

.concepts { margin: 1.5rem 0 0; max-width: var(--measure); border-top: 1px solid var(--line); }
.concepts__row { display: grid; grid-template-columns: 1fr; gap: 0.2rem 1.5rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.concepts dt { font-family: var(--display); font-weight: 600; font-size: 1.2rem; line-height: 1.3; }
.concepts dd { margin: 0; color: var(--ink-soft); }
@media (min-width: 40rem) { .concepts__row { grid-template-columns: 13rem 1fr; } }

.steps { padding-left: 1.4rem; margin: 0 0 1.25rem; max-width: var(--measure); }
.steps li { padding: 0.35rem 0 0.35rem 0.4rem; }
.steps li::marker { color: var(--teal); font-weight: 700; }

.people { display: grid; gap: 1.5rem; }
@media (min-width: 40rem) { .people { grid-template-columns: 14rem 1fr; align-items: start; } }
.photo {
  aspect-ratio: 4 / 5; max-width: 14rem; border: 1px dashed var(--line); border-radius: var(--radius);
  background: #fff; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); padding: 1rem; text-align: center;
}
.people__name { font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.3; margin: 0 0 0.5rem; }

/* form */
.note { font-size: 0.9375rem; color: var(--ink-soft); border-left: 1px solid var(--line); padding-left: 0.75rem; margin-bottom: 1.5rem; }
.form { max-width: 36rem; }
.field { margin: 0 0 1.25rem; padding: 0; border: 0; min-width: 0; }
.field legend, .field > label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.9rem; border: 1.5px solid var(--line);
  border-radius: 999px; background: #fff; cursor: pointer; line-height: 1.3;
}
.choice:has(input:checked) { border-color: var(--teal); background: var(--paper-tint); }
.choice input { accent-color: var(--teal); margin: 0; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; font: inherit; padding: 0.8rem 0.9rem; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink);
}
input::placeholder, textarea::placeholder { color: #66747a; }
input:focus-visible, textarea:focus-visible { border-color: var(--teal); outline-offset: 0; }
textarea { resize: vertical; min-height: 5rem; }
.field--check .check { display: flex; gap: 0.6rem; align-items: flex-start; cursor: pointer; }
.check input { accent-color: var(--teal); margin-top: 0.3rem; flex: none; }
.form .btn--primary { margin: 0.5rem 0 1rem; }

.done { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 1.5rem; max-width: 36rem; }

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

/* countdown */
.countdown { text-align: center; }
.countdown__label { margin: 0 0 0.75rem; color: var(--ink-soft); max-width: none; }
.countdown__label--live, .countdown__label--ended { display: none; }
.countdown[data-state="live"] .countdown__label--before, .countdown[data-state="ended"] .countdown__label--before { display: none; }
.countdown[data-state="live"] .countdown__label--live, .countdown[data-state="ended"] .countdown__label--ended { display: block; }
.countdown[data-state="live"] .countdown__nums, .countdown[data-state="ended"] .countdown__nums { display: none; }
.countdown__nums { display: flex; justify-content: center; gap: 1.25rem; margin: 0 0 0.75rem; max-width: none; }
.countdown__unit { display: flex; flex-direction: column; align-items: center; min-width: 3.5rem; }
.countdown__n { font-family: var(--display); font-weight: 600; font-size: clamp(2.2rem, 7vw, 3.4rem); line-height: 1.3; font-variant-numeric: tabular-nums; }
.countdown__w { font-size: 0.875rem; color: var(--ink-soft); line-height: 1.4; }
.countdown__date { max-width: none; font-weight: 600; }

.footer { border-top: 1px solid var(--line); padding: 2rem 1rem 3rem; font-size: 0.9375rem; }
.footer p { margin-bottom: 0.5rem; }
