/* v8-signage — «Тихая комната»: quiet-room wayfinding */
:root {
  --wall: #f2c12e;
  --wall-deep: #e3b11f;
  --plate: #ffffff;
  --ink: #141414;
  --ink-soft: #4d4d4d;
  --line: #d9d9d9;
  --radius: 10px;
  --gutter: 1rem;
  --measure: 68ch;
  --font: "Commissioner", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ink); color: var(--wall); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; margin: 0; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); margin-bottom: 1.1rem; text-wrap: balance; }
h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
p { margin: 0 0 1rem; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--wall-deep); }
.muted { color: var(--ink-soft); }
strong { font-weight: 700; }

/* plates on the wall */
.plate {
  background: var(--plate);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(60, 40, 0, 0.16);
  padding: 1.5rem var(--gutter);
  margin: 0 var(--gutter) 1.25rem;
}
.hero, main, .foot { max-width: 76rem; margin-inline: auto; }
.hero { padding-top: 1.25rem; }
main { padding-top: 0.5rem; }

/* hero sign */
.plate--main { padding-top: 1.25rem; }
.sign-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 3px solid var(--ink);
}
.picto, .arrow { display: block; }
.picto { width: 4.5rem; height: 4.5rem; stroke: var(--ink); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.picto circle { fill: var(--ink); stroke: none; }
.arrow { width: 4.5rem; height: 4.5rem; stroke: var(--ink); stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; fill: none; transform: rotate(0deg); transform-origin: 50% 50%; }
[data-city="riga"] .arrow { transform: rotate(-90deg); }
[data-city="kyiv"] .arrow { transform: rotate(90deg); }
[data-city="online"] .arrow { transform: rotate(0deg); }
.sign-room { margin: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sign-room__name { font-weight: 700; font-size: 1.15rem; }
.sign-room__time { font-weight: 800; font-size: 1.9rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

h1 { font-size: clamp(2.6rem, 11vw, 7rem); line-height: 0.98; letter-spacing: -0.035em; margin-bottom: 1rem; }
.lede { font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem); font-weight: 500; line-height: 1.35; max-width: 30ch; margin-bottom: 0.75rem; }
.support { color: var(--ink-soft); max-width: 42ch; margin-bottom: 1.25rem; }

.facts { list-style: none; margin: 0; padding: 0.9rem 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; font-weight: 500; }
.facts li { position: relative; padding-left: 0.95rem; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 0.45rem; height: 0.45rem; background: var(--ink); border-radius: 50%; }
.facts li[hidden] { display: none; }

/* destinations sign */
.plate--dest { padding: 1rem var(--gutter); }
.dest-label { margin: 0 0 0.6rem; color: var(--ink-soft); font-weight: 500; }
.dest-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.dest {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.1rem; padding: 0.5rem 0.6rem;
  background: var(--plate); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 8px;
  font: inherit; font-weight: 700; cursor: pointer;
  transition: background 0.2s ease-out, color 0.2s ease-out;
}
.dest svg { width: 1.25rem; height: 1.25rem; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; fill: none; flex: none; }
.dest:hover { background: #f3f3f3; }
.dest[aria-pressed="true"] { background: var(--ink); color: var(--plate); }

/* door sign (primary action) */
.door {
  display: flex; align-items: center; justify-content: center; text-align: center;
  margin: 0 var(--gutter) 0.9rem;
  min-height: 4.25rem; padding: 0.9rem 1.5rem;
  background: var(--ink); color: var(--plate);
  border: 0; border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(60, 40, 0, 0.18);
  font: inherit; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer;
  transition: background 0.2s ease-out, transform 0.2s ease-out;
}
.door:hover { background: #2a2a2a; }
.door:active { transform: translateY(2px); }
.door:focus-visible { outline-color: var(--ink); }
.door[disabled], .door[data-loading] { background: #5c5c5c; cursor: progress; }
.door[data-loading]::after { content: "…"; margin-left: 0.25em; }
.door--small { display: inline-flex; margin: 1.25rem 0 0; min-height: 3.4rem; font-size: 1.05rem; box-shadow: none; }
.door--submit { margin: 1.5rem 0 1rem; width: 100%; box-shadow: none; }
.hero__link { display: block; text-align: center; margin: 0 var(--gutter) 1.75rem; font-weight: 500; }

/* concept blocks */
.concepts { margin: 1.25rem 0 0; display: grid; gap: 0; max-width: var(--measure); }
.concepts div { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: 0.5rem 1rem; padding: 0.85rem 0; border-top: 2px solid var(--ink); }
.concepts div:last-child { border-bottom: 2px solid var(--ink); }
.concepts dt { font-weight: 800; }
.concepts dd { margin: 0; }

/* steps along the route */
.steps { counter-reset: step; list-style: none; margin: 1rem 0 1.25rem; padding: 0; max-width: var(--measure); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.9rem; align-items: start; padding: 0.6rem 0; }
.steps li::before { content: counter(step); display: flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 8px; background: var(--ink); color: var(--wall); font-weight: 800; font-variant-numeric: tabular-nums; }

/* people */
.people { display: grid; gap: 1.25rem; }
.photo { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; max-width: 16rem; border: 2px dashed var(--ink-soft); border-radius: 8px; color: var(--ink-soft); font-weight: 500; }
.person-name { font-weight: 800; font-size: 1.25rem; margin-bottom: 0.4rem; }

/* sign-in sheet */
.plate--sheet { border-top: 12px solid var(--ink); }
.preview-note { display: inline-block; padding: 0.35rem 0.7rem; border: 1px solid var(--ink); border-radius: 6px; font-size: 0.9rem; font-weight: 500; margin-bottom: 1.25rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; min-width: 0; }
legend, .field label { display: block; font-weight: 700; margin-bottom: 0.5rem; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.6rem 0.9rem; border: 2px solid var(--ink); border-radius: 8px; cursor: pointer; font-weight: 500; }
.choice input { margin: 0; width: 1.1rem; height: 1.1rem; accent-color: var(--ink); }
.choice:has(input:checked) { background: var(--ink); color: var(--plate); }
.choice:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.field { margin-bottom: 1.25rem; max-width: 34rem; }
.field[hidden] { display: none; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 0.75rem 0.85rem; background: #fafafa;
  border: 2px solid var(--ink); border-radius: 8px;
}
input::placeholder, textarea::placeholder { color: #6a6a6a; }
input:focus-visible, textarea:focus-visible { outline-offset: 2px; background: var(--plate); }
textarea { resize: vertical; min-height: 5.5rem; }
.hint { color: var(--ink-soft); font-size: 0.92rem; margin: 0.4rem 0 0; }
.consent { display: grid; grid-template-columns: 1.25rem 1fr; gap: 0.7rem; align-items: start; max-width: var(--measure); font-size: 0.98rem; }
.consent input { width: 1.25rem; height: 1.25rem; margin: 0.2rem 0 0; accent-color: var(--ink); }
.micro { color: var(--ink-soft); font-size: 0.92rem; }
.done { border: 2px solid var(--ink); border-radius: 8px; padding: 1.25rem var(--gutter); }
.done[hidden] { display: none; }

/* where + faq */
#where > div[hidden] { display: none; }
.faq { margin: 1.5rem 0 0; max-width: var(--measure); }
.faq div { padding: 0.8rem 0; border-top: 1px solid var(--line); }
.faq dt { font-weight: 700; }
.faq dd { margin: 0.15rem 0 0; color: var(--ink-soft); }

/* departures board (countdown) */
.plate--board { background: var(--ink); color: var(--plate); text-align: center; padding: 2rem var(--gutter); }
.plate--board p { max-width: none; margin: 0; }
.board-label { color: var(--wall); font-weight: 700; margin-bottom: 0.5rem; }
.board-before, .board-live, .board-ended { display: none; font-size: clamp(1.9rem, 1rem + 4vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.board-word { font-size: 1.05rem; font-weight: 500; margin-right: 0.5em; }
[data-state="before"] .board-before { display: block; }
[data-state="live"] .board-live { display: block; }
[data-state="ended"] .board-ended { display: block; }
[data-state="live"] .board-label, [data-state="ended"] .board-label { display: none; }
.board-date { margin-top: 0.75rem; color: #cfcfcf; }

/* footer */
.foot { padding: 1rem var(--gutter) 2.5rem; color: var(--ink); }
.foot p { margin-bottom: 0.4rem; max-width: none; }

/* motion: one moment — the arrow turning to the chosen destination */
@media (prefers-reduced-motion: no-preference) {
  .arrow { transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
}

/* wider screens */
@media (min-width: 48rem) {
  :root { --gutter: 2rem; }
  .plate { padding: 2.25rem 2.5rem; margin-inline: var(--gutter); }
  .plate--main { padding-top: 1.75rem; }
  .picto, .arrow { width: 6rem; height: 6rem; }
  .sign-room__name { font-size: 1.4rem; }
  .sign-room__time { font-size: 2.6rem; }
  .plate--dest { padding: 1.25rem 2.5rem; }
  .door { margin-inline: var(--gutter); }
  .people { grid-template-columns: 14rem 1fr; gap: 2rem; }
  .door--submit { width: auto; min-width: 20rem; }
}
@media (min-width: 64rem) {
  .hero { display: grid; grid-template-columns: 1fr 22rem; grid-template-areas: "main dest" "main door" "main link" "main ."; column-gap: 0; align-items: start; }
  .plate--main { grid-area: main; margin-right: 0; }
  .plate--dest { grid-area: dest; margin-left: 1.25rem; }
  .door { grid-area: door; margin-left: 1.25rem; }
  .hero__link { grid-area: link; margin-left: 1.25rem; text-align: left; }
  .dest-row { grid-template-columns: 1fr; }
  .dest { justify-content: flex-start; }
  h1 { font-size: clamp(4rem, 7.5vw, 7rem); }
}
