/* v4-clocks — One time, four clocks */
:root {
  --wall: #e8ecef;
  --wall-deep: #dde3e8;
  --face: #ffffff;
  --ink: #141a24;
  --ink-soft: #4a5260;
  --rule: #c5ccd3;
  --accent: #1d3fb5;
  --accent-ink: #ffffff;
  --accent-soft: #d6ddf5;
  --display: 'Piazzolla', Georgia, 'Times New Roman', serif;
  --text: 'Golos Text', 'Helvetica Neue', Arial, sans-serif;
  --gutter: 16px;
  --measure: 68ch;
}

* { 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(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { display: block; }
[hidden] { display: none !important; }

.wrap {
  width: min(100% - 2 * var(--gutter), 72rem);
  margin-inline: auto;
}

/* ---------- type ---------- */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
  font-variation-settings: 'opsz' 30;
}
h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); margin: 0 0 1rem; }
h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); margin: 2.5rem 0 0.75rem; }
.prose { max-width: var(--measure); margin: 0 0 1rem; }
.muted { color: var(--ink-soft); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(2rem, 6vw, 5rem); }
.title {
  font-size: clamp(2.75rem, 11.5vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-weight: 500;
  max-width: 100%;
}
.lede {
  font-family: var(--display);
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  line-height: 1.35;
  max-width: 34ch;
  margin: 1.5rem 0 0.5rem;
  font-variation-settings: 'opsz' 20;
}
.lede-support { color: var(--ink-soft); max-width: 48ch; margin: 0 0 2.5rem; }

/* clock wall */
.wall {
  background: var(--wall-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.75rem var(--gutter) 2rem;
}
@media (min-width: 60rem) { .wall { padding: 3.5rem var(--gutter); } }
.wall .wrap, .section .wrap, .footer .wrap { width: min(100%, 72rem); }
.date {
  margin: 0 0 1.5rem;
  font-size: clamp(1.1rem, 0.9rem + 1vw, 1.5rem);
  font-weight: 500;
}
.clocks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem var(--gutter);
}
@media (min-width: 46rem) {
  .clocks { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
}
.clock { text-align: center; }
.clock svg {
  width: min(100%, 11rem);
  margin: 0 auto 0.6rem;
  overflow: visible;
}
.clock .hand { stroke: var(--ink); stroke-linecap: round; transform-box: view-box; transform-origin: center; transform: rotate(0deg); }
.clock .hour { stroke-width: 4; }
.clock .minute { stroke-width: 2.6; }
.clock .second { stroke-width: 1; stroke: var(--accent); opacity: 0; }
.clock .pin { fill: var(--ink); }
.hands-set .clock .hand { transform: rotate(var(--to)); }
@media (prefers-reduced-motion: no-preference) {
  .clock .hand { transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1); }
  .clock .hour { transition-delay: 0.1s; }
}
.clock-city { display: block; font-weight: 600; font-size: 1.05rem; }
.clock-time { display: block; font-size: 1.6rem; font-family: var(--display); font-variation-settings: 'opsz' 20; line-height: 1.1; }

/* "your clock" */
[data-city="riga"] [data-clock="riga"],
[data-city="kyiv"] [data-clock="kyiv"],
[data-city="online"] .clock { --rim-stroke: var(--accent); --rim-w: 3; }
[data-city="riga"] [data-clock="riga"] .second,
[data-city="kyiv"] [data-clock="kyiv"] .second,
[data-city="online"] .clock .second { opacity: 1; }
[data-city="riga"] [data-clock="riga"] .clock-time,
[data-city="kyiv"] [data-clock="kyiv"] .clock-time,
[data-city="online"] .clock .clock-time { color: var(--accent); }
.clock .second, .clock-time { transition: stroke 0.35s ease-out, stroke-width 0.35s ease-out, opacity 0.35s ease-out, color 0.35s ease-out; }

/* destinations */
.destinations { margin-top: 2rem; }
.destinations-label { display: block; color: var(--ink-soft); margin-bottom: 0.5rem; }
.destinations-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dest {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: var(--face);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease-out, color 0.2s ease-out, border-color 0.2s ease-out;
}
.dest:hover { border-color: var(--accent); color: var(--accent); }
.dest[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.destinations-note { max-width: var(--measure); color: var(--ink-soft); margin: 0.75rem 0 0; }

.hero-actions {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 56rem) {
  .hero-actions { grid-template-columns: 1fr auto; gap: 3rem; }
}
.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.25rem;
  row-gap: 0.35rem;
  max-width: 44rem;
}
.facts li { position: relative; padding-left: 1.25rem; }
.facts li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 0.5rem; height: 1px;
  background: var(--ink);
}
.cta-group { display: grid; gap: 0.75rem; justify-items: start; }

/* ---------- buttons ---------- */
.button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.95rem 1.6rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 18px -8px rgba(20, 26, 36, 0.35);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease-out, background 0.2s ease-out;
}
.button:hover { background: #1733a0; box-shadow: 0 10px 24px -8px rgba(20, 26, 36, 0.4); transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled, .button[data-loading] { opacity: 0.6; cursor: progress; transform: none; }
.button[data-loading]::after { content: "…"; }
.button.secondary { background: transparent; color: var(--accent); box-shadow: none; }
.button.secondary:hover { background: var(--accent-soft); }
.text-link { font-weight: 500; }

/* ---------- sections ---------- */
.section { padding: 3rem var(--gutter); border-bottom: 1px solid var(--rule); }
@media (min-width: 60rem) { .section { padding: 6rem var(--gutter); } }
.section:last-of-type { border-bottom: 0; }

.concepts { margin: 2rem 0 0; display: grid; gap: 1.5rem; max-width: 56rem; }
@media (min-width: 46rem) { .concepts { grid-template-columns: 1fr 1fr 1fr; gap: 2.5rem; } }
.concept dt {
  font-family: var(--display);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  font-variation-settings: 'opsz' 24;
  line-height: 1.3;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ink);
}
.concept dd { margin: 0.35rem 0 0; color: var(--ink-soft); max-width: 28ch; }

.steps {
  margin: 1.5rem 0 1.5rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
  max-width: var(--measure);
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
}
.steps li::before {
  content: counter(step);
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent);
}
.reassure { font-weight: 500; }

.person { display: grid; gap: 1.5rem; max-width: 56rem; }
@media (min-width: 46rem) { .person { grid-template-columns: 14rem 1fr; gap: 2.5rem; } }
.photo-frame {
  aspect-ratio: 4 / 5;
  width: min(100%, 14rem);
  background: var(--face);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  padding: 1rem;
  color: var(--ink-soft);
}
.person-name { font-family: var(--display); font-size: 1.5rem; margin: 0 0 0.5rem; font-variation-settings: 'opsz' 24; }

/* ---------- form ---------- */
.preview-note {
  display: inline-block;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  border: 1px dashed var(--ink-soft);
  padding: 0.35rem 0.7rem;
  margin: 0 0 1.5rem;
}
.form { max-width: 36rem; display: grid; gap: 1.5rem; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend, .field label { display: block; font-weight: 600; margin-bottom: 0.5rem; padding: 0; }
.optional { font-weight: 400; color: var(--ink-soft); }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  background: var(--face);
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin: 0; accent-color: var(--accent); }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--face);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
  caret-color: var(--accent);
}
.field input::placeholder, .field textarea::placeholder { color: #6b7380; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.field input:user-invalid { border-color: #a3261d; }
.hint { margin: 0.4rem 0 0; font-size: 0.9375rem; color: var(--ink-soft); }
.consent { display: flex; gap: 0.6rem; align-items: flex-start; max-width: var(--measure); }
.consent input { margin: 0.3rem 0 0; accent-color: var(--accent); flex: 0 0 auto; }
.form .button { justify-self: start; }
.microcopy { font-size: 0.9375rem; color: var(--ink-soft); margin: 0; max-width: var(--measure); }

.done {
  max-width: 36rem;
  padding: 1.5rem;
  background: var(--face);
  border: 1px solid var(--accent);
}
.done h3 { margin-top: 0; }

/* ---------- where / countdown / faq ---------- */
.logistics { max-width: var(--measure); }

.countdown {
  margin: 2.5rem 0 0;
  padding: 1.5rem;
  background: var(--face);
  border: 1px solid var(--ink);
  max-width: 44rem;
}
.countdown-label { margin: 0 0 0.75rem; font-weight: 600; }
.when-before, .when-live, .when-ended { display: none; }
.countdown[data-state="before"] .when-before { display: block; }
.countdown[data-state="live"] .when-live { display: block; color: var(--accent); }
.countdown[data-state="ended"] .when-ended { display: block; color: var(--ink-soft); }
.countdown-board { display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem; }
.countdown[data-state="before"] .countdown-board { display: flex; }
.unit { display: grid; }
.unit .num {
  font-family: var(--display);
  font-variation-settings: 'opsz' 30;
  font-size: clamp(2.75rem, 2rem + 3vw, 4.5rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
}
.unit .word { color: var(--ink-soft); }
.countdown-date { margin: 1rem 0 0; color: var(--ink-soft); font-size: 0.9375rem; }

.faq { max-width: var(--measure); border-top: 1px solid var(--rule); padding-top: 0.5rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  padding: 0.9rem 0;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: 0 0 auto;
  width: 0.6rem; height: 0.6rem;
  margin-top: 0.5rem;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 0.75rem; }
.faq p { margin: 0 0 1rem; color: var(--ink-soft); }

/* ---------- footer ---------- */
.footer { padding: 2.5rem var(--gutter) 3rem; border-top: 1px solid var(--rule); background: var(--wall-deep); font-size: 0.9375rem; color: var(--ink-soft); }
.footer p { margin: 0 0 0.4rem; }
