/* v6-timetable — "Один вечер в вашем дне": one day, written out hour by hour, one row filled */

:root {
  --desk: #e6eaf0;
  --paper: #f7f8fa;
  --ink: #1c2230;
  --ink-soft: #5b6577;
  --rule: #cbd2dc;
  --rule-strong: #9aa4b2;
  --mark: #ffe566;
  --mark-deep: #f2d234;
  --focus: #2b4c9b;
  --text: 'Commissioner', 'Helvetica Neue', Arial, sans-serif;
  --display: 'Literata', Georgia, 'Times New Roman', serif;
  --measure: 68ch;
  --gutter: 1rem;
  --sheet-w: 60rem;
}

*, *::before, *::after { 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(--desk);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
::selection { background: var(--mark); color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0 0 1rem; }
.muted { color: var(--ink-soft); }
.text { max-width: var(--measure); }

/* desk and sheets */
.desk {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem var(--gutter) 3rem;
  max-width: calc(var(--sheet-w) + 2 * var(--gutter));
  margin-inline: auto;
}
.sheet {
  background: var(--paper);
  padding: 1.75rem 1.1rem 2rem;
  box-shadow: 0 1px 0 rgba(28, 34, 48, 0.08), 0 10px 24px -18px rgba(28, 34, 48, 0.35);
}
@media (min-width: 48rem) {
  .desk { gap: 1.5rem; padding: 2rem 2rem 4rem; }
  .sheet { padding: 2.5rem 3rem 2.75rem; }
}

/* headings */
.h2, .h3 {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: 'opsz' 48;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-wrap: balance;
  margin: 0;
}
.h2 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.2rem); margin-bottom: 1rem; }
.h3 { font-size: 1.25rem; margin: 2.25rem 0 0.75rem; }

/* ---------- the day ---------- */
.sheet--day { padding-top: 1.5rem; }
.day-title {
  font-family: var(--text);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  margin: 0 0 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1.5px solid var(--ink);
}
.day-title__weekday { color: var(--ink-soft); }
.day { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  column-gap: 0.75rem;
  border-bottom: 1px solid var(--rule);
}
.row--blank { min-height: 1.9rem; align-items: center; }
.row__time {
  font-size: 0.9rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  padding: 0.3rem 0;
}
.row--event {
  grid-template-columns: 3.4rem 1fr;
  padding: 0.9rem 0 1.25rem;
  border-bottom: 1.5px solid var(--ink);
  border-top: 1.5px solid var(--ink);
  margin-top: -1px;
}
.row__time--event { display: flex; flex-direction: column; gap: 0.2rem; padding-top: 0.55rem; }
.row__clock { font-size: 1rem; font-weight: 700; color: var(--ink); letter-spacing: 0.02em; }
.row__zone { font-size: 0.78rem; color: var(--ink-soft); line-height: 1.3; }
.row__body { min-width: 0; }

/* the highlighter mark behind the title: the one motion */
.mark {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: 0 0 0.6rem;
  isolation: isolate;
}
.mark::before {
  content: "";
  position: absolute;
  inset: 0.18em -0.25em 0.06em -0.3em;
  background: var(--mark);
  transform: skewX(-4deg);
  z-index: -1;
  transform-origin: left center;
  animation: write 850ms cubic-bezier(0.16, 1, 0.3, 1) 150ms both;
}
@keyframes write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .mark::before { animation: none; } }
.title {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: 'opsz' 72;
  font-size: clamp(2rem, 1.3rem + 4.2vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0;
  padding: 0.05em 0.1em 0.05em 0.05em;
  text-wrap: balance;
}
.lede {
  font-family: var(--display);
  font-variation-settings: 'opsz' 20;
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.45rem);
  line-height: 1.35;
  max-width: 34ch;
  margin: 0 0 0.6rem;
}
.support { color: var(--ink-soft); max-width: 48ch; margin: 0 0 1.1rem; }

.facts {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0;
  font-size: 0.95rem;
}
.facts li { padding-right: 0.8rem; margin-right: 0.8rem; border-right: 1px solid var(--rule-strong); line-height: 1.35; }
.facts li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.facts li:first-child { font-weight: 600; }

.pick { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 1.1rem; }
.pick__label { color: var(--ink-soft); font-size: 0.95rem; margin-right: 0.25rem; }
.pick__btn {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  transition: background 160ms ease-out, color 160ms ease-out;
}
.pick__btn:hover { background: var(--mark); }
.pick__btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 0; }
.actions--inline { margin-top: 0.5rem; }

/* buttons */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
  padding: 0.85rem 1.4rem;
  border-radius: 4px;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: background 160ms ease-out, color 160ms ease-out, transform 160ms ease-out, box-shadow 160ms ease-out;
}
.btn--primary { background: var(--ink); color: var(--paper); box-shadow: 0 2px 0 rgba(28, 34, 48, 0.25); }
.btn--primary:hover { background: #2a3448; }
.btn--primary:active { transform: translateY(1px); box-shadow: none; }
.btn--primary:disabled, .btn--primary[data-loading] { background: var(--ink-soft); border-color: var(--ink-soft); cursor: progress; box-shadow: none; }
.btn--primary[data-loading]::after { content: "…"; }
.btn--secondary { background: var(--paper); color: var(--ink); }
.btn--secondary:hover { background: var(--mark); }
.textlink { font-weight: 500; }
@media (max-width: 30rem) { .btn--primary { width: 100%; } }

.day-note { margin: 1rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }

@media (min-width: 48rem) {
  .row { grid-template-columns: 5rem 1fr; column-gap: 1.25rem; }
  .row--blank { min-height: 2.2rem; }
  .row--event { grid-template-columns: 5rem 1fr; padding: 1.4rem 0 1.75rem; }
  .row__time { font-size: 0.95rem; }
  .row__clock { font-size: 1.15rem; }
}

/* ---------- ruled lists ---------- */
.ruled { margin: 0.5rem 0 0; }
.ruled__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem 1.5rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--rule);
}
.ruled__row:last-child { border-bottom: 1px solid var(--rule); }
.ruled dt { font-weight: 600; }
.ruled dd { margin: 0; max-width: var(--measure); }
.ruled dd a { font-weight: 500; }
@media (min-width: 48rem) {
  .ruled__row { grid-template-columns: 14rem 1fr; }
  .ruled--faq .ruled__row { grid-template-columns: 22rem 1fr; }
}

/* the evening's own mini-timetable */
.steps { list-style: none; margin: 0.25rem 0 1.25rem; padding: 0; }
.steps__row {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  column-gap: 0.75rem;
  align-items: baseline;
  padding: 0.65rem 0;
  border-top: 1px solid var(--rule);
}
.steps__row:last-child { border-bottom: 1px solid var(--rule); }
.steps__n { font-weight: 700; color: var(--ink-soft); letter-spacing: 0.02em; }
.steps__text { max-width: var(--measure); }
@media (min-width: 48rem) { .steps__row { grid-template-columns: 5rem 1fr; column-gap: 1.25rem; } }

/* people */
.people { display: grid; gap: 1.25rem; }
.photo {
  width: 100%;
  max-width: 14rem;
  aspect-ratio: 4 / 5;
  border: 1px dashed var(--rule-strong);
  display: grid;
  place-items: center;
  padding: 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.people__name { font-weight: 600; margin-bottom: 0.35rem; }
@media (min-width: 48rem) {
  .people { grid-template-columns: 14rem 1fr; gap: 2rem; align-items: start; }
}

/* ---------- form ---------- */
.preview-note {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border: 1px solid var(--rule-strong);
  padding: 0.3rem 0.6rem;
  margin: 0 0 1.5rem;
}
.form { max-width: 40rem; }
.field { margin: 0 0 1.25rem; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 600; margin: 0 0 0.45rem; padding: 0; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea {
  display: block;
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 0.6rem 0.25rem;
  transition: background 160ms ease-out;
}
.field input::placeholder, .field textarea::placeholder { color: #6b7585; }
.field input:hover, .field textarea:hover { background: #fffdf0; }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 0; background: #fffbe0; }
.field textarea { resize: vertical; min-height: 5.5rem; }
.hint { color: var(--ink-soft); font-size: 0.9rem; max-width: var(--measure); margin: 0.5rem 0 0; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.choice { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; padding: 0.2rem 0; }
.choice input, .consent input { accent-color: var(--ink); width: 1.1rem; height: 1.1rem; margin: 0; flex: none; }
.consent { display: flex; align-items: flex-start; gap: 0.6rem; max-width: var(--measure); cursor: pointer; }
.consent input { margin-top: 0.3rem; }
.form .actions { margin: 1.5rem 0 0.75rem; }
.form .hint { margin-top: 0.5rem; }

.done {
  max-width: 40rem;
  padding: 1.25rem 1.25rem 0.5rem;
  border-left: 1px solid var(--rule-strong);
  background: #fffbe0;
}
.done .h3 { margin-top: 0; }

/* ---------- countdown ---------- */
.sheet--countdown { text-align: center; }
.countdown { max-width: 36rem; margin-inline: auto; }
.countdown__label { color: var(--ink-soft); margin: 0 0 0.6rem; }
.countdown__label--live, .countdown__label--ended { display: none; font-weight: 600; color: var(--ink); }
.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; }
.countdown[data-state="live"] .countdown__nums, .countdown[data-state="ended"] .countdown__nums { display: none; }
.countdown__nums { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0 0 0.75rem; }
.countdown__unit { display: inline-flex; flex-direction: column; align-items: center; min-width: 3.5rem; }
.countdown__n { font-family: var(--display); font-variation-settings: 'opsz' 72; font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem); line-height: 1.1; letter-spacing: -0.02em; }
.countdown__w { font-size: 0.85rem; color: var(--ink-soft); }
.countdown__date { margin: 0; font-weight: 500; }

/* footer */
.sheet--footer { padding-bottom: 1.5rem; }
.sheet--footer .text { margin-bottom: 0.5rem; }
