/* Медиаволна — цвета взяты с афиши. Меняйте здесь. */
:root {
  --bg: #000000;
  --fg: #ffffff;
  --green: #63bd5a;
  --blue: #5572b9;
  --blue-light: #7d97d6;
  --lilac: #b784bb;
  --muted: #8a8a8a;
  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ---------- пиксельный декор ---------- */
.pixels { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.pixels i {
  position: absolute;
  display: block;
  animation: blink 6s steps(1) infinite;
}
.pixels i.g { background: var(--green); }
.pixels i.b { background: var(--blue); }
.pixels i.l { background: var(--lilac); }
@keyframes blink {
  0%, 100% { opacity: 1; }
  48% { opacity: 1; }
  50% { opacity: 0; }
  58% { opacity: 1; }
}

/* ---------- рамка как на афише ---------- */
.frame {
  position: relative;
  border: 6px solid var(--green);
  outline: 1px dashed rgba(99, 189, 90, .6);
  outline-offset: 6px;
  background: var(--bg);
}
.frame::after {
  content: "";
  position: absolute;
  right: -6px; top: -6px;
  width: 18px; height: 18px;
  background: var(--green);
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: .95;
  letter-spacing: -.01em;
}

/* ---------- экран ---------- */
body.screen { height: 100vh; overflow: hidden; cursor: default; }
body.screen.idle { cursor: none; }

.screen-wrap {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 3.2vh 3vw 3vh;
  gap: 1.5vh;
}

.screen-head {
  display: flex;
  align-items: center;
  gap: 2.2vw;
  min-width: 0;
  padding-right: 7vw;
}
.screen-head .frame { padding: 1vh 1.3vw; flex: none; }
.screen-head .logo { font-size: 3.1vh; }
.screen-head .question {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.4vh;
  line-height: 1.2;
  max-width: 62vw;
}
.screen-head .counter {
  margin-left: auto;
  text-align: right;
  font-family: var(--font-display);
  color: var(--muted);
  font-size: 1.7vh;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
.screen-head .counter b {
  display: block;
  color: var(--green);
  font-size: 4.2vh;
  font-weight: 800;
  letter-spacing: 0;
}

.cloud-area { position: relative; min-height: 0; }
.cloud { position: absolute; inset: 0; }

.word {
  position: absolute;
  left: 50%;
  top: 50%;
  white-space: nowrap;
  line-height: 1;
  font-family: var(--font-display);
  transition:
    transform .9s cubic-bezier(.2, .8, .2, 1),
    font-size .9s cubic-bezier(.2, .8, .2, 1),
    opacity .6s ease,
    color .6s ease;
  will-change: transform, font-size;
}
.word.enter { opacity: 0; }
.word.leave { opacity: 0 !important; }
.word.c0 { color: var(--fg); }
.word.c1 { color: var(--green); }
.word.c2 { color: var(--lilac); }
.word.c3 { color: var(--blue-light); }
.word.pop { animation: pop .9s ease; }
@keyframes pop {
  0% { text-shadow: 0 0 0 transparent; }
  30% { text-shadow: 0 0 .35em rgba(99, 189, 90, .9); }
  100% { text-shadow: 0 0 0 transparent; }
}

.empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.5vh;
  color: var(--muted);
  transition: opacity .5s;
}
.empty span { animation: dots 1.6s steps(4) infinite; display: inline-block; width: 1.4em; text-align: left; overflow: hidden; vertical-align: bottom; }
@keyframes dots { from { width: 0; } to { width: 1.4em; } }
.empty.hidden { opacity: 0; pointer-events: none; }

.qr-box {
  position: fixed;
  right: 3vw;
  bottom: 4vh;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1.2vw;
  padding: 1.4vh;
}
.qr-box .qr {
  width: 18vh;
  height: 18vh;
  background: #fff;
  padding: 1.2vh;
}
.qr-box .qr img { width: 100%; height: 100%; display: block; }
.qr-box .qr-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2vh;
  line-height: 1.25;
  text-transform: uppercase;
  max-width: 13vw;
}
.qr-box .qr-text small {
  display: block;
  margin-top: .8vh;
  font-weight: 500;
  font-size: 1.5vh;
  color: var(--green);
  text-transform: none;
  word-break: break-all;
}

/* ---------- телефон ---------- */
body.phone { min-height: 100dvh; }
.phone-wrap {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  padding: 36px 20px 28px;
  display: flex;
  flex-direction: column;
}
.phone-wrap .frame { align-self: flex-start; padding: 12px 16px; }
.phone-wrap .logo { font-size: 30px; }
.phone-wrap .logo em { font-style: normal; color: var(--green); }

.ask {
  margin-top: auto;
  padding-top: 40px;
}
.ask h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
  margin-bottom: 22px;
}
.ask form { display: flex; flex-direction: column; gap: 12px; }
.ask input {
  width: 100%;
  font: 600 20px var(--font-body);
  color: var(--fg);
  background: #0d0d0d;
  border: 2px solid #333;
  border-radius: 0;
  padding: 16px;
  outline: none;
  -webkit-appearance: none;
}
.ask input:focus { border-color: var(--green); }
.ask button {
  font: 800 17px var(--font-display);
  text-transform: uppercase;
  letter-spacing: .02em;
  color: #000;
  background: var(--green);
  border: 0;
  border-radius: 0;
  padding: 18px;
  cursor: pointer;
  box-shadow: 6px 6px 0 var(--lilac);
  transition: transform .1s, box-shadow .1s;
}
.ask button:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--lilac); }
.ask button:disabled { opacity: .6; }
.hint { color: var(--muted); font-size: 14px; }
.msg { min-height: 1.5em; font-weight: 700; font-size: 16px; }
.msg.err { color: var(--lilac); }
.msg.ok { color: var(--green); }

.sent { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.sent span {
  font: 600 14px var(--font-display);
  padding: 6px 10px;
  border: 2px solid var(--blue);
}

.bottom-spacer { flex: 1; min-height: 40px; }
