/* v16-knock — «Стук в дверь» */
:root {
  --hall: #4a5663;        /* cool dim wall */
  --hall-floor: #3b4651;
  --frame: #2d353d;
  --panel: #56636f;
  --panel-edge: #4d5a68;
  --brass: #c89b4a;
  --brass-ink: #6e4a0f;
  --brass-deep: #7a5212;
  --plate-ink: #3a2808;
  --room: #f1f0ec;        /* warm light grey, not cream */
  --room-deep: #e6e4de;
  --ink: #2b2521;
  --ink-soft: #655c53;
  --line: #d1cec6;
  --wall-ink: #eef1f4;
  --wall-soft: #c9d1d9;
  --focus: #b8782a;
  --display: 'Vollkorn', Georgia, serif;
  --text: 'Manrope', system-ui, sans-serif;
  --measure: 68ch;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--room);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
}
::selection { background: var(--brass); color: #fff; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
a { color: var(--brass-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; max-width: var(--measure); }
.support { color: var(--ink-soft); }
.wrap { width: 100%; max-width: 44rem; margin-inline: auto; }

/* ---------- the hall: wall text, the door, and the room ---------- */
.hall {
  min-height: 100svh;
  background: linear-gradient(var(--hall) 0 82%, var(--hall-floor) 82% 100%);
  display: grid;
  place-items: center;
  padding: 2.5rem 1rem 2rem;
  transition: background-color 0.6s ease-out;
}
.stage {
  width: 100%; max-width: 72rem;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.25rem;
  align-items: center;
}

/* wall text */
.wall { color: var(--wall-ink); max-width: 34rem; }
.wall__lead {
  font-family: var(--display); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em;
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.9rem); margin: 0 0 1rem; max-width: 18ch;
}
.wall__text { font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.25rem); line-height: 1.5; margin: 0 0 1.25rem; max-width: 36ch; }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.92rem; font-weight: 500; }
.facts li { padding-left: 0.9rem; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 0.35rem; height: 0.35rem; border-radius: 50%; background: var(--brass); }
.facts--wall { color: var(--wall-soft); max-width: 30rem; }
.wall__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; }
.btn--open { width: auto; background: var(--brass); color: var(--plate-ink); box-shadow: 0 6px 16px -8px rgba(0,0,0,0.6); padding-inline: 2rem; }
.btn--open:hover { background: #d4a955; }
.btn--open:disabled { opacity: 0.5; cursor: default; }

/* the door */
.door { width: min(100%, 24rem); justify-self: center; perspective: 1400px; display: flex; flex-direction: column; height: 60svh; min-height: 22rem; max-height: 40rem; }
.frame {
  position: relative; flex: 1 1 auto; min-height: 0;
  border: 0.7rem solid var(--frame);
  border-bottom: 0;
  background: var(--room);
  overflow: visible;
}
.behind { position: absolute; inset: 0; background: var(--room); }
.sill { height: 0.8rem; background: var(--frame); margin: 0 -0.5rem; flex: none; }

/* the room: takes the stage once the door is open */
.room { grid-column: 1 / -1; background: var(--room); padding: 2rem 1.5rem; max-width: 64rem; width: 100%; margin-inline: auto; animation: room-in 0.5s ease-out; }
.room[hidden] { display: none; }
.room:focus { outline: none; }
.room__title { font-size: clamp(2.2rem, 1.6rem + 3vw, 4rem); margin: 0 0 0.4rem; max-width: 14ch; }
.room__lede { font-family: var(--display); font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem); line-height: 1.4; margin: 0 0 0.5rem; max-width: 34ch; }
.room__support { color: var(--ink-soft); margin: 0 0 1.25rem; max-width: 52ch; }
.facts--room { font-size: 0.95rem; margin-bottom: 1.25rem; }
.room__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.room__actions .textlink { margin-top: 0; }
@keyframes room-in { from { opacity: 0; transform: translateY(0.5rem); } to { opacity: 1; transform: none; } }
.hall.is-open { background: var(--frame); }
.hall.is-open .wall, .hall.is-open .door { display: none; }
.hall.is-open .stage { align-items: start; }

/* door panel */
.panel {
  position: absolute; inset: 0;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--panel-edge), inset 1.6rem 0 0 -1.2rem var(--panel-edge);
  transform-origin: left center;
  transform: rotateY(0deg);
  transition: transform 0.85s cubic-bezier(0.2, 0.7, 0.2, 1);
  backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 2.5rem 1.5rem;
  will-change: transform;
}
/* inner recessed field, flat */
.panel::before {
  content: ""; position: absolute; inset: 1.4rem; border: 2px solid var(--panel-edge); pointer-events: none;
}
.plate {
  position: relative;
  background: var(--brass);
  color: var(--plate-ink);
  padding: 0.9rem 1.1rem;
  width: min(100%, 17rem);
  margin-top: 1.5rem;
  text-align: center;
  display: flex; flex-direction: column; gap: 0.2rem;
  box-shadow: 0 2px 0 rgba(0,0,0,0.25);
}
.plate__small { font-size: 0.8rem; font-weight: 700; line-height: 1.35; }
.plate__title { font-family: var(--display); font-size: 1.45rem; line-height: 1.2; font-weight: 600; }

.handle-wrap {
  position: absolute; right: 1.6rem; top: 50%; transform: translateY(-20%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.handle {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 0.45rem;
  padding: 0.4rem; color: #ffffff; font-family: var(--text); font-weight: 700; font-size: 0.95rem;
  border-radius: 0.6rem;
}
.handle__knob {
  display: block; width: 3.2rem; height: 1rem; border-radius: 0.5rem;
  background: var(--brass);
  box-shadow: -0.9rem 0 0 -0.1rem var(--brass), 0 2px 0 rgba(0,0,0,0.3);
  transition: transform 0.25s ease-out;
}
.handle:hover .handle__knob, .handle:focus-visible .handle__knob { transform: rotate(-12deg); }
.handle:disabled { cursor: default; opacity: 0; transition: opacity 0.3s; }
.handle__label { opacity: 0; transform: translateY(0.3rem); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.door.is-asked .handle__label { opacity: 1; transform: none; }
.knock {
  font-family: var(--display); font-size: 1.3rem; color: #ffffff;
  opacity: 0; transform: translateY(0.3rem);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.door.is-knocked .knock { opacity: 1; transform: none; }
@keyframes knock { 0% { transform: rotateY(0deg); } 35% { transform: rotateY(-2.2deg); } 70% { transform: rotateY(0.8deg); } 100% { transform: rotateY(0deg); } }
.door.is-knocked:not(.is-opening) .panel { animation: knock 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) 1; }
.door.is-opening .panel { transform: rotateY(-108deg); pointer-events: none; }
.door.is-opening .knock, .door.is-opening .handle__label { opacity: 0; }

/* no JS: the room stands open, the hall is the frame */
html:not(.js) .wall, html:not(.js) .door { display: none; }
html:not(.js) .room[hidden] { display: block; }
html:not(.js) .hall { background: var(--frame); }

@media (prefers-reduced-motion: reduce) {
  .panel { transition: none; animation: none !important; }
  .room { animation: none; }
  .hall { transition: none; }
}

.pass { color: var(--wall-ink); font-size: 0.95rem; }
.pass:focus-visible { outline-color: #fff; }

/* ---------- the room (content) ---------- */
.offer { padding: 3.5rem 1rem 2.5rem; background: var(--room); }
.offer__title { font-size: clamp(2.4rem, 1.6rem + 4vw, 4rem); margin: 0 0 0.5rem; }
.lede { font-family: var(--display); font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem); line-height: 1.4; }
.offer .facts { margin: 1.25rem 0; }
.picker { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 1.25rem; }
.picker button, .picker [data-pick-city] {
  appearance: none; font: inherit; font-weight: 700; font-size: 0.95rem;
  padding: 0.55rem 1rem; border-radius: 2rem; cursor: pointer;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  transition: background 0.2s, color 0.2s;
}
.picker [aria-pressed="true"] { background: var(--ink); color: var(--room); }
.picker [data-pick-city]:hover { background: var(--room-deep); }
.picker [aria-pressed="true"]:hover { background: var(--ink); }

.btn {
  display: inline-block; font: inherit; font-weight: 700; font-size: 1.05rem;
  padding: 0.95rem 1.5rem; border-radius: 0.6rem; border: 0; cursor: pointer;
  background: var(--brass-deep); color: #fff; text-decoration: none;
  box-shadow: 0 6px 16px -8px rgba(90, 63, 16, 0.6);
  transition: background 0.2s, transform 0.2s;
  width: 100%; text-align: center;
}
.btn:hover { background: #654310; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[data-loading] { opacity: 0.6; cursor: progress; }
.btn[data-loading]::after { content: " …"; }
.btn--ghost { background: transparent; color: var(--brass-ink); border: 1.5px solid var(--brass-ink); box-shadow: none; width: auto; }
.btn--ghost:hover { background: var(--room-deep); }
.textlink { display: inline-block; margin-top: 1rem; }

.section { padding: 3.5rem 1rem; }
.section--tint { background: var(--room-deep); }
.concepts { margin: 1.5rem 0 0; padding: 0; max-width: var(--measure); }
.concepts div { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: 0.5rem 1.25rem; padding: 0.9rem 0; border-top: 1px solid var(--line); }
.concepts div:last-child { border-bottom: 1px solid var(--line); }
.concepts dt { font-family: var(--display); font-weight: 600; font-size: 1.15rem; line-height: 1.3; }
.concepts dd { margin: 0; }
@media (max-width: 30rem) { .concepts div { grid-template-columns: 1fr; gap: 0.15rem; } }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.25rem 0 1.5rem; max-width: var(--measure); }
.steps li { counter-increment: step; position: relative; padding: 0.55rem 0 0.55rem 2.6rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0.5rem;
  width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 1.5px solid var(--ink);
  display: grid; place-items: center; font-size: 0.85rem; font-weight: 700; line-height: 1.3;
}

.people { display: grid; gap: 1.5rem; max-width: var(--measure); }
@media (min-width: 40rem) { .people { grid-template-columns: 12rem 1fr; align-items: start; } }
.photo {
  aspect-ratio: 3 / 4; border: 1.5px dashed var(--line); background: var(--room);
  display: grid; place-items: center; color: var(--ink-soft); font-size: 0.9rem; padding: 1rem; text-align: center;
}
.people__name { font-family: var(--display); font-weight: 600; font-size: 1.2rem; margin-bottom: 0.3rem; }

/* form */
.note { font-size: 0.9rem; color: var(--ink-soft); border: 1px solid var(--line); padding: 0.6rem 0.8rem; display: inline-block; border-radius: 0.4rem; }
.form { max-width: 36rem; margin-top: 1.5rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
legend, .field label { display: block; font-weight: 700; 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.55rem 0.9rem; border: 1.5px solid var(--line); border-radius: 2rem; background: var(--room); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--ink); background: var(--room-deep); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice input { margin: 0; accent-color: var(--brass-ink); }
.field { margin-bottom: 1.25rem; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; font: inherit; padding: 0.7rem 0.85rem; border: 1.5px solid var(--line); border-radius: 0.5rem;
  background: #fff; color: var(--ink); caret-color: var(--brass-ink);
}
input::placeholder, textarea::placeholder { color: #6f6458; }
input:focus-visible, textarea:focus-visible { border-color: var(--ink); outline-offset: 1px; }
.hint { font-size: 0.88rem; color: var(--ink-soft); margin: 0.5rem 0 0; }
.consent { display: flex; gap: 0.7rem; align-items: flex-start; margin: 0 0 1.25rem; }
.consent input { margin-top: 0.35rem; accent-color: var(--brass-ink); }
.form .btn { width: auto; }
.done { margin-top: 1.5rem; padding: 1.25rem 1.4rem; border: 1.5px solid var(--brass); border-radius: 0.6rem; background: #fff; max-width: 36rem; }
.done h3 { margin-bottom: 0.4rem; }

/* faq */
.faq { margin: 2rem 0 0; padding: 0; max-width: var(--measure); }
.faq div { padding: 0.8rem 0; border-top: 1px solid var(--line); }
.faq div:last-child { border-bottom: 1px solid var(--line); }
.faq dt { font-weight: 700; }
.faq dd { margin: 0.15rem 0 0; }

/* countdown */
.countdown { text-align: center; padding: 3rem 1rem; }
.countdown__label { color: var(--ink-soft); margin-bottom: 0.5rem; }
.countdown__numbers { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0 0 0.75rem; max-width: none; }
.countdown__numbers b { font-family: var(--display); font-size: clamp(2.2rem, 1.6rem + 3vw, 3.5rem); font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; }
.countdown__numbers small { display: block; font-size: 0.85rem; color: var(--ink-soft); line-height: 1.3; }
.countdown__status { font-family: var(--display); font-size: 1.8rem; margin: 0 0 0.5rem; max-width: none; }
.countdown__date { max-width: none; margin: 0; font-weight: 500; }
.countdown .countdown__label--live, .countdown .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 { display: block; }
.countdown[data-state="ended"] .countdown__label--ended { display: block; }

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

@media (min-width: 56.25rem) {
  .hall { padding: 3rem 2rem; }
  .stage { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem 4rem; }
  .wall { max-width: 38rem; }
  .door { width: min(100%, 26rem); height: 75vh; min-height: 30rem; max-height: 46rem; justify-self: center; }
  .room { padding: 4rem 4.5rem; }
  .offer { padding-top: 5rem; }
  .btn { width: auto; }
}
