/* v2-chairs — a circle of chairs in a bright room */

:root {
  --ground: #f4f5f2;
  --surface: #ffffff;
  --ink: #1b211f;
  --muted: #566361;
  --accent: #1f5b52;
  --accent-deep: #173f3a;
  --tint: #e3ece8;
  --line: #d3dad6;
  --gutter: max(16px, 5vw);
  --font: "Alegreya Sans", "Trebuchet MS", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.5;
  overflow-x: hidden;
}

::selection { background: var(--tint); color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-deep); }

h1, h2, h3 { font-weight: 500; line-height: 1.08; margin: 0 0 0.5em; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.75rem, 2rem + 4.5vw, 5.25rem); margin-bottom: 0.35em; }
h2 { font-size: clamp(1.85rem, 1.4rem + 2vw, 2.6rem); margin-top: 0; }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
.measure { max-width: 36em; }
.muted { color: var(--muted); }

.wrap { width: 100%; max-width: 70rem; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- hero ---------- */

.hero { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(2.5rem, 6vw, 5rem); }
.hero__grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 4vw, 4rem); align-items: center; }
@media (min-width: 60rem) {
  .hero__grid {
    grid-template-columns: 1.05fr 1fr;
    grid-template-areas: "top room" "bottom room";
    align-items: start; row-gap: 0;
  }
  .hero__top { grid-area: top; }
  .hero__bottom { grid-area: bottom; }
  .hero__grid .room { grid-area: room; align-self: center; }
}

.lead { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); line-height: 1.3; max-width: 24em; margin-bottom: 0.6em; }
.support { color: var(--muted); max-width: 30em; margin-bottom: 1.75rem; }

.picker { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-bottom: 1.25rem; }
.picker__label { color: var(--muted); }
.picker__options { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 3px; }
.picker__options button {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: transparent; border: 0; border-radius: 999px;
  padding: 0.45em 1.1em; cursor: pointer;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.picker__options button:hover { background: var(--tint); }
.picker__options button[aria-pressed="true"] { background: var(--accent); color: #fff; }

.facts { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 0; max-width: 34em; }
.facts li { padding-right: 0.75em; margin-right: 0.75em; border-right: 1px solid var(--line); line-height: 1.35; }
.facts li:last-child { border-right: 0; }
.facts__free { font-weight: 700; color: var(--accent); }
.facts__tz { color: var(--muted); }
.hero__more { margin: 0; }

/* the room */
.room { position: relative; width: 100%; max-width: 34rem; margin-inline: auto; aspect-ratio: 480 / 520; }
.room__svg { position: absolute; top: 0; left: 0; width: 100%; height: auto; overflow: visible; }
.win { display: none; }
html:not([data-city]) .win--riga,
html[data-city="riga"] .win--riga,
html[data-city="kyiv"] .win--kyiv,
html[data-city="online"] .win--online { display: block; }
.line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.line--thin { stroke-width: 1.5; }
.line--wall { stroke: var(--line); }
.line--ring { stroke: var(--line); stroke-dasharray: 2 7; }
.chair__seat { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.chair__back { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }

.seat {
  position: absolute; left: 50%; top: 85%;
  transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 0.9rem;
  padding: 0.55rem 1.25rem 0.55rem 0.65rem;
  background: var(--accent); color: #fff; text-decoration: none;
  border-radius: 999px; white-space: nowrap;
  box-shadow: 0 10px 24px -12px rgba(23, 63, 58, 0.55);
  transition: background-color 160ms ease-out, transform 220ms cubic-bezier(.2,.8,.2,1);
}
.seat:hover { background: var(--accent-deep); color: #fff; transform: translate(-50%, -50%) translateY(3px); }
.seat:focus-visible { outline-color: var(--accent-deep); outline-offset: 4px; }
.seat__chair { width: 2.5rem; height: 2.5rem; flex: none; overflow: visible; }
.seat__chair .chair__seat { stroke: var(--surface); }
.seat__chair .chair__back { stroke: #fff; }
.seat__text { display: flex; flex-direction: column; line-height: 1.3; font-weight: 700; font-size: 1.05rem; }
.seat__text small { font-weight: 400; font-size: 0.85rem; opacity: 0.85; }

@keyframes pull-out {
  from { transform: translate(-50%, -50%) translateY(-14px); }
  to   { transform: translate(-50%, -50%) translateY(0); }
}
.seat { animation: pull-out 900ms cubic-bezier(.16,1,.3,1) 250ms both; }
@media (prefers-reduced-motion: reduce) { .seat { animation: none; } }

@media (max-width: 26rem) {
  .seat { white-space: normal; padding-right: 1rem; }
  .seat__text { font-size: 0.95rem; }
}

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

.section { padding: clamp(3rem, 8vw, 6rem) var(--gutter); }
.section > .wrap { padding-inline: 0; }
.section--tint { background: var(--tint); }
.section .wrap > :last-child { margin-bottom: 0; }

.concepts { margin: 2rem 0 0; display: grid; gap: 0; max-width: 42em; }
.concepts > div { display: grid; gap: 0.15rem 1.5rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.concepts > div:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 40rem) { .concepts > div { grid-template-columns: 12em 1fr; align-items: baseline; } }
.concepts dt { font-weight: 700; font-size: 1.3rem; color: var(--accent); }
.concepts dd { margin: 0; }

.steps { counter-reset: step; list-style: none; margin: 0 0 1.5rem; padding: 0; max-width: 36em; }
.steps li { counter-increment: step; position: relative; padding: 0.55rem 0 0.55rem 3rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0.45rem;
  width: 2rem; height: 2rem; border-radius: 50%;
  border: 2px solid var(--accent); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 1rem; line-height: 1;
  background: var(--surface);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: calc(1rem - 1px); top: 2.6rem; bottom: -0.4rem;
  border-left: 2px dashed var(--line);
}

.people { display: grid; gap: 1.5rem 3rem; align-items: start; }
@media (min-width: 48rem) { .people { grid-template-columns: 16rem 1fr; } }
.people__photo {
  aspect-ratio: 4 / 5; max-width: 16rem; border-radius: 14px;
  border: 2px dashed var(--line); background: var(--surface);
  display: grid; place-items: center; color: var(--muted); padding: 1rem; text-align: center;
}
.people__name { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.25em; }

/* ---------- buttons ---------- */

.button {
  font: inherit; font-weight: 700; font-size: 1.05rem;
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.8em 1.6em; border-radius: 10px; border: 2px solid var(--accent);
  background: var(--accent); color: #fff; text-decoration: none; cursor: pointer;
  transition: background-color 160ms ease-out, border-color 160ms ease-out;
}
.button:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.button:disabled { opacity: 0.6; cursor: default; }
.button[data-loading]::after {
  content: ""; width: 1em; height: 1em; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.45); border-top-color: #fff;
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.button--secondary { background: transparent; color: var(--accent); }
.button--secondary:hover { background: var(--accent); color: #fff; }

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

.preview-note {
  display: inline-block; font-size: 0.95rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 8px; padding: 0.4em 0.8em; margin-bottom: 1.5rem;
  background: var(--surface);
}
.form { max-width: 34em; }
.form fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
.form legend, .field > label { display: block; font-weight: 700; margin-bottom: 0.5rem; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choices label {
  display: inline-flex; align-items: center; gap: 0.5em; cursor: pointer;
  padding: 0.55em 0.9em; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  transition: border-color 160ms ease-out, background-color 160ms ease-out;
}
.choices label:hover { border-color: var(--accent); }
.choices label:has(input:checked) { border-color: var(--accent); background: var(--tint); }
.choices label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.choices input { margin: 0; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--accent); width: 1.1em; height: 1.1em; }

.field { margin-bottom: 1.5rem; }
.field input[type="text"], .field input[type="email"], .field textarea {
  font: inherit; width: 100%; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 0.7em 0.9em;
  transition: border-color 160ms ease-out;
}
.field input:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field input:user-invalid { border-color: #9b3b2e; }
.field textarea { resize: vertical; min-height: 5.5em; }
.field input::placeholder { color: var(--muted); opacity: 1; }
.hint { font-size: 0.95rem; color: var(--muted); margin: 0.4rem 0 0; }
.field--check label { display: grid; grid-template-columns: auto 1fr; gap: 0.6em; align-items: start; font-weight: 400; }
.field--check input { margin-top: 0.3em; }
.microcopy { font-size: 0.95rem; color: var(--muted); margin: 1rem 0 0; max-width: 34em; }

.done { max-width: 34em; padding: 1.5rem; border-radius: 14px; background: var(--tint); border: 1px solid var(--line); }
.done h3 { margin-bottom: 0.4em; }
.done > :last-child { margin-bottom: 0; }

/* ---------- FAQ ---------- */

.faq { margin-top: 2.5rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 0.9rem 2.5rem 0.9rem 0; font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 0.5rem; top: 50%; width: 14px; height: 2px;
  background: var(--accent); transform: translateY(-50%);
  transition: transform 200ms cubic-bezier(.2,.8,.2,1);
}
.faq summary::after { transform: translateY(-50%) rotate(90deg); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(0deg); }
.faq details p { margin: 0 0 1rem; }

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

.countdown { text-align: center; }
.countdown__label { font-size: 1.1rem; color: var(--muted); margin-bottom: 0.75rem; }
.countdown__clock { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem 2rem; margin-bottom: 1rem; }
.countdown__clock span { display: flex; flex-direction: column; align-items: center; min-width: 4.5rem; }
.countdown__clock b { font-size: clamp(2.5rem, 2rem + 3vw, 4.5rem); line-height: 1; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.countdown__clock i { font-style: normal; color: var(--muted); font-size: 1rem; }
.countdown__date { font-size: 1.15rem; margin: 0; }
.countdown .countdown__live, .countdown .countdown__ended { display: none; }
.countdown[data-state="live"] .countdown__before, .countdown[data-state="ended"] .countdown__before { display: none; }
.countdown[data-state="live"] .countdown__live { display: block; color: var(--accent); font-size: 1.6rem; font-weight: 700; }
.countdown[data-state="ended"] .countdown__ended { display: block; }
.countdown[data-state="ended"] .countdown__label.countdown__ended { font-size: 1.6rem; font-weight: 700; color: var(--ink); }

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

.footer { padding: 2.5rem var(--gutter) 3rem; border-top: 1px solid var(--line); font-size: 1rem; }
.footer > .wrap { padding-inline: 0; }
.footer p { margin-bottom: 0.4em; }
