@font-face {
  font-family: 'Nunito';
  src: url('fonts/Nunito.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}

/* Палитра снята с арта игры: борт ванны, вода, кант кнопки и звезды */
:root {
  color-scheme: light dark;
  --wall: #b7c6cf;
  --wall-tiles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cpath d='M0 1.5h128M0 65.5h128M1.5 0v64M65.5 64v64' stroke='%23c9d5dc' stroke-width='3' fill='none'/%3E%3C/svg%3E");
  --panel: #e9f2f1;
  --cell: #ffffff;
  --cell-edge: #c7d9d9;
  --line: #2b3d46;
  --text: #2b3d46;
  --muted: #4d6670;
  --link: #1d6e8c;
  --rim: #f3f8f8;
  --water-1: #a7e2ed;
  --water-2: #68b5d1;
  --on-water: #22323b;
  --foam: #f4fafc;
  --accent: #ffc93c;
  --accent-edge: #e8a32e;
  --accent-ink: #3d2e0e;
  --ink: #2b3d46;
  --star: #ffd75a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --wall: #2f3a55;
    --wall-tiles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cpath d='M0 1.5h128M0 65.5h128M1.5 0v64M65.5 64v64' stroke='%233a4664' stroke-width='3' fill='none'/%3E%3C/svg%3E");
    --panel: #3b4768;
    --cell: #47547a;
    --cell-edge: #5a6890;
    --line: #141b28;
    --text: #edf3f7;
    --muted: #bcc8dc;
    --link: #9ddee9;
    --rim: #94a5d6;
    --water-1: #74a8da;
    --water-2: #4f82c2;
    --on-water: #17222b;
    --foam: #c9d5f2;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font:
    600 18px/1.55 'Nunito',
    'Segoe UI',
    -apple-system,
    BlinkMacSystemFont,
    'Helvetica Neue',
    Arial,
    sans-serif;
  color: var(--text);
  background: var(--wall) var(--wall-tiles);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--link);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 4px solid var(--accent-edge);
  outline-offset: 3px;
}

h1,
h2,
h3,
p,
ol,
ul,
figure,
blockquote {
  margin: 0;
}

.wrap {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}

/* ---------- Шапка ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  font-weight: 900;
  font-size: 19px;
  line-height: 1.15;
  text-decoration: none;
}

.brand img {
  flex: none;
  width: 48px;
  height: 48px;
  border: 3px solid var(--line);
  border-radius: 14px;
}

.langs {
  display: flex;
  flex: none;
  gap: 8px;
}

.langs a {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.langs a:hover {
  background: var(--cell);
}

.langs a[aria-current] {
  background: var(--accent);
  border-color: var(--accent-edge);
  color: var(--accent-ink);
}

/* ---------- Ванна ---------- */

.tub {
  position: relative;
  padding: 22px;
  border: 5px solid var(--line);
  border-radius: 64px;
  background: var(--rim);
}

.water {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 600px;
  padding: 210px 24px 150px;
  border: 4px solid var(--line);
  border-radius: 42px;
  background:
    radial-gradient(ellipse 52px 96px at 16% 26%, rgb(255 255 255 / 0.26) 98%, transparent),
    radial-gradient(ellipse 30px 58px at 23% 60%, rgb(255 255 255 / 0.2) 98%, transparent),
    radial-gradient(ellipse 44px 120px at 81% 30%, rgb(255 255 255 / 0.22) 98%, transparent),
    radial-gradient(ellipse 26px 46px at 70% 76%, rgb(255 255 255 / 0.2) 98%, transparent),
    radial-gradient(ellipse 22px 40px at 40% 88%, rgb(255 255 255 / 0.18) 98%, transparent),
    linear-gradient(180deg, var(--water-1), var(--water-2));
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.foam {
  position: absolute;
  z-index: 3;
  width: 150px;
  pointer-events: none;
}

.foam-tl {
  top: -14px;
  left: -10px;
}

.foam-tr {
  top: -8px;
  right: -12px;
  width: 124px;
  transform: scaleX(-1) rotate(8deg);
}

.foam-bl {
  bottom: -12px;
  left: 6px;
  width: 118px;
  transform: rotate(-10deg);
}

.foam-br {
  bottom: -16px;
  right: -8px;
  transform: scaleX(-1);
}

.foam-fill {
  fill: var(--foam);
}

.foam-edge {
  fill: var(--line);
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 820px;
  text-align: center;
  color: var(--on-water);
}

/* Белая обводка кругом из теней: у -webkit-text-stroke острые шипы на «W» и «K» */
.title {
  --o: 6px;
  font-weight: 900;
  font-size: clamp(34px, 6.1vw, 68px);
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--ink);
  text-shadow:
    var(--o) 0 #fff,
    calc(var(--o) * 0.924) calc(var(--o) * 0.383) #fff,
    calc(var(--o) * 0.707) calc(var(--o) * 0.707) #fff,
    calc(var(--o) * 0.383) calc(var(--o) * 0.924) #fff,
    0 var(--o) #fff,
    calc(var(--o) * -0.383) calc(var(--o) * 0.924) #fff,
    calc(var(--o) * -0.707) calc(var(--o) * 0.707) #fff,
    calc(var(--o) * -0.924) calc(var(--o) * 0.383) #fff,
    calc(var(--o) * -1) 0 #fff,
    calc(var(--o) * -0.924) calc(var(--o) * -0.383) #fff,
    calc(var(--o) * -0.707) calc(var(--o) * -0.707) #fff,
    calc(var(--o) * -0.383) calc(var(--o) * -0.924) #fff,
    0 calc(var(--o) * -1) #fff,
    calc(var(--o) * 0.383) calc(var(--o) * -0.924) #fff,
    calc(var(--o) * 0.707) calc(var(--o) * -0.707) #fff,
    calc(var(--o) * 0.924) calc(var(--o) * -0.383) #fff;
}

.tagline {
  max-width: 30em;
  font-size: clamp(18px, 2vw, 21px);
  font-weight: 700;
  line-height: 1.4;
  text-wrap: balance;
}

.cta {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.cta-note {
  font-size: 15px;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 30px 15px 24px;
  border: 4px solid var(--accent-edge);
  border-radius: 24px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  text-wrap: balance;
  transition: transform 0.12s ease;
}

.btn svg {
  flex: none;
  width: 22px;
  height: 22px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(1px);
}

.hint {
  position: absolute;
  z-index: 2;
  top: 34px;
  left: 150px;
  padding: 7px 16px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  rotate: -4deg;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.splashed .hint {
  opacity: 0;
}

.duck {
  position: absolute;
  z-index: 1;
  width: 230px;
  aspect-ratio: 1;
}

/* Круг на воде под уточкой, как на баннере игры */
.duck::before {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 9%;
  height: 34%;
  border: 3px solid rgb(255 255 255 / 0.5);
  border-radius: 50%;
}

.duck img {
  position: relative;
  width: 100%;
  height: 100%;
  animation: bob 3.6s ease-in-out infinite;
  -webkit-user-drag: none;
}

.duck-villain {
  top: 8px;
  left: calc(50% - 96px);
  width: 192px;
}

.duck-villain img {
  animation-duration: 3.1s;
}

.duck-hat {
  left: 3%;
  bottom: 4px;
}

.duck-hat img {
  animation-delay: -1.2s;
}

.duck-pink {
  right: 3%;
  bottom: 4px;
}

.duck-pink img {
  scale: -1 1;
  animation-delay: -2.3s;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-1.5deg);
  }
  50% {
    transform: translateY(-7px) rotate(1.5deg);
  }
}

.ripple {
  position: absolute;
  z-index: 0;
  width: 220px;
  height: 220px;
  margin: -110px 0 0 -110px;
  border: 5px solid rgb(255 255 255 / 0.85);
  border-radius: 50%;
  pointer-events: none;
  animation: ripple 0.75s ease-out forwards;
}

.ripple::after {
  content: '';
  position: absolute;
  inset: 22%;
  border: 4px solid rgb(255 255 255 / 0.7);
  border-radius: 50%;
}

@keyframes ripple {
  from {
    transform: scale(0.15);
    opacity: 1;
  }
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* ---------- Панели ---------- */

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding-bottom: 28px;
}

.panel {
  padding: 44px 48px 48px;
  border: 5px solid var(--line);
  border-radius: 40px;
  background: var(--panel);
}

h2 {
  font-weight: 900;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}

.lead {
  max-width: 44em;
  margin-top: 14px;
  color: var(--muted);
  font-size: 19px;
}

.shot {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  border: 4px solid var(--line);
  border-radius: 26px;
  background: var(--wall);
}

/* Как играть */

.how {
  display: grid;
  grid-template-columns: minmax(0, 290px) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
}

.steps {
  display: grid;
  gap: 22px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 4px 18px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 4px solid var(--accent-edge);
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
  font-size: 24px;
}

h3 {
  font-weight: 800;
  font-size: 21px;
  line-height: 1.25;
}

.steps p,
.cells p {
  color: var(--muted);
}

.warn {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  padding: 10px 22px 10px 10px;
  border: 3px solid var(--cell-edge);
  border-radius: 24px;
  background: var(--cell);
  font-weight: 700;
}

.warn img {
  width: 92px;
  height: 92px;
}

/* Уровни и комнаты: три кадра в ряд */

.levels-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
}

.stars {
  display: flex;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 22px;
  background: #9ddee9;
}

.stars svg {
  width: 44px;
  height: 44px;
}

.strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 34px;
}

.strip figcaption {
  margin-top: 12px;
  font-weight: 800;
  text-align: center;
  text-wrap: balance;
}

.note {
  max-width: 44em;
  margin-top: 30px;
  color: var(--muted);
}

/* Карточка комнаты красится в цвет своих обоев из игры */
.room {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px 16px 22px;
  border: 4px solid var(--line);
  border-radius: 32px;
  color: var(--ink);
}

.room .shot {
  border-width: 3px;
  border-radius: 20px;
}

.room h3 {
  margin-top: 8px;
  padding-inline: 6px;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.room p {
  padding-inline: 6px;
  font-size: 17px;
}

.room-kitchen {
  background: #cfe6e2;
}

.room-wardrobe {
  background: #f4dde4;
}

.room-bedroom {
  background: #5a66b2;
  color: #fff;
}

/* Родителям */

.cells {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
  padding: 0;
  list-style: none;
}

.cells li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-content: start;
  gap: 2px 18px;
  padding: 22px 24px;
  border: 3px solid var(--cell-edge);
  border-radius: 26px;
  background: var(--cell);
}

.cells svg {
  grid-row: span 2;
  width: 56px;
  height: 56px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cells a {
  display: block;
  width: fit-content;
  margin-top: 6px;
}

.cells .slash {
  stroke: #ef4450;
  stroke-width: 3;
}

/* Об игре */

.about {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
  gap: 36px;
}

.about img {
  width: 190px;
  height: 190px;
}

.about blockquote {
  margin-top: 14px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.5;
  text-wrap: pretty;
}

/* Второй заход в воду */

.pool {
  min-height: 0;
  padding: 56px 24px 60px;
  background:
    radial-gradient(ellipse 40px 62px at 14% 42%, rgb(255 255 255 / 0.24) 98%, transparent),
    radial-gradient(ellipse 22px 36px at 22% 78%, rgb(255 255 255 / 0.18) 98%, transparent),
    radial-gradient(ellipse 34px 70px at 84% 52%, rgb(255 255 255 / 0.2) 98%, transparent),
    linear-gradient(180deg, var(--water-1), var(--water-2));
  cursor: default;
}

.pool .hero-copy {
  gap: 24px;
}

.pool h2 {
  font-size: clamp(28px, 4vw, 44px);
}

/* ---------- Подвал ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 28px;
  padding: 6px 8px 40px;
  font-size: 15px;
  font-weight: 700;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.foot a {
  color: var(--text);
}

.foot small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Политика конфиденциальности ---------- */

.sheet {
  width: min(780px, 100%);
  margin-inline: auto;
}

.sheet-head {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.sheet-head img {
  width: 104px;
  height: 104px;
  margin-bottom: 10px;
  border: 4px solid var(--line);
  border-radius: 28px;
}

.sheet-head h1 {
  font-weight: 900;
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}

.sheet-head p {
  color: var(--muted);
  font-weight: 700;
}

.callout {
  margin: 30px 0 4px;
  padding: 18px 22px;
  border: 3px solid var(--cell-edge);
  border-left: 10px solid #6fbbd4;
  border-radius: 20px;
  background: var(--cell);
  font-weight: 800;
}

.prose h2 {
  margin: 32px 0 8px;
  font-size: 20px;
  letter-spacing: 0.04em;
}

.prose p,
.prose ul {
  margin-bottom: 12px;
}

.prose ul {
  padding-left: 24px;
}

.prose li {
  margin-bottom: 6px;
}

.updated {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 3px solid var(--cell-edge);
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Узкие экраны ---------- */

@media (max-width: 860px) {
  .how {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  .how .shot {
    order: 1;
    width: min(290px, 100%);
    margin-inline: auto;
  }

  .levels-head {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  /* Три кадра листаются вбок: в столбик это три экрана высоты подряд */
  .strip {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(74%, 290px);
    gap: 18px;
    margin-inline: -28px;
    padding: 4px 28px 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 28px;
  }

  .strip > * {
    scroll-snap-align: start;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }

  .brand span {
    display: none;
  }

  .tub {
    padding: 14px;
    border-radius: 46px;
  }

  .water {
    min-height: 0;
    padding: 150px 16px 176px;
    border-radius: 32px;
  }

  .title {
    --o: 4px;
  }

  .hint {
    position: static;
    order: 3;
    rotate: none;
  }

  .hero-copy {
    gap: 16px;
  }

  .btn {
    gap: 8px;
    padding: 13px 20px 13px 14px;
    font-size: 15px;
    letter-spacing: 0.02em;
  }

  .warn {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 16px 12px 10px;
  }

  .warn img {
    width: 64px;
    height: 64px;
  }

  .duck {
    width: 152px;
  }

  .duck-villain {
    top: 4px;
    left: calc(50% - 72px);
    width: 144px;
  }

  .duck-hat {
    left: 2%;
  }

  .duck-pink {
    right: 2%;
  }

  .foam {
    width: 104px;
  }

  .foam-tr,
  .foam-bl {
    width: 86px;
  }

  .panel {
    padding: 30px 24px 32px;
    border-radius: 32px;
  }

  .strip {
    margin-inline: -24px;
    padding-inline: 24px;
    scroll-padding-inline: 24px;
  }

  .cells {
    grid-template-columns: minmax(0, 1fr);
  }

  .cells li {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 2px 14px;
    padding: 18px;
  }

  .cells svg {
    width: 48px;
    height: 48px;
  }

  .about {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: 6px;
  }

  .about img {
    width: 128px;
    height: 128px;
    margin: -14px 0 0 -14px;
  }

  .about blockquote {
    font-size: 19px;
  }

  .pool {
    padding: 44px 16px 48px;
  }
}

@media (max-width: 400px) {
  .duck-hat,
  .duck-pink {
    width: 136px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .duck img {
    animation: none;
  }

  .ripple {
    animation-name: ripple-still;
  }

  .btn {
    transition: none;
  }
}

@keyframes ripple-still {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
