:root {
  --cream: #f3e5c8;
  --paper: #fbf5e8;
  --ink: #1b1b1b;
  --orange: #d9561e;
  --red: #b3261e;

  --font-script: "Lobster", "Brush Script MT", cursive;
  --font-body: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --shadow: 4px 4px 0 var(--ink);
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.container {
  width: min(100% - 2.5rem, 1080px);
  margin-inline: auto;
}

.narrow {
  max-width: 720px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--ink);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-script);
  font-size: 1.5rem;
  text-decoration: none;
}

.site-brand img {
  width: 40px;
  height: 40px;
}

.site-nav {
  display: none;
  gap: 1.5rem;
  margin-left: auto;
  font-weight: 500;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--orange);
}

.lang-switch {
  display: flex;
  margin-left: auto;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch button {
  padding: 0.3rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 700 0.875rem var(--font-body);
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

/* Hero */

.hero {
  padding-block: 2.5rem 3.5rem;
  background: repeating-radial-gradient(
    circle at 50% 30%,
    transparent 0 38px,
    color-mix(in srgb, var(--ink) 6%, transparent) 38px 40px
  );
}

.hero-inner {
  display: grid;
  justify-items: center;
  gap: 2rem;
  text-align: center;
}

.hero-logo img {
  width: min(72vw, 360px);
  filter: drop-shadow(var(--shadow));
}

.badge {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.25rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  font-family: var(--font-script);
  font-size: clamp(3rem, 14vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
}

.hero-tagline {
  margin: 0.75rem 0 1.75rem;
  font-size: 1.2rem;
}

.hero-actions,
.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn-primary {
  background: var(--orange);
}

.btn-ghost {
  background: var(--paper);
}

/* Sections */

.stripes {
  height: 22px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 8px,
    var(--paper) 8px 16px
  );
  border-block: 2px solid var(--ink);
}

.section {
  padding-block: 3.5rem;
}

.section-alt {
  background: var(--paper);
}

.section-title {
  margin: 0 0 1.25rem;
  font-family: var(--font-script);
  font-size: clamp(2.25rem, 8vw, 3.25rem);
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
}

.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin: 0.5rem auto 0;
  border-radius: 2px;
  background: var(--orange);
}

.section p {
  margin: 0 0 1rem;
}

.cards {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 1.5rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--cream);
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0.75rem 0 0.25rem;
  font-size: 1.25rem;
}

.card p {
  margin: 0;
}

.card-num {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--orange);
  font-family: var(--font-script);
  font-size: 1.25rem;
}

.contacts {
  display: grid;
  gap: 1rem;
  margin: 0 0 2rem;
  text-align: center;
}

.contacts dt {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red);
}

.contacts dd {
  margin: 0;
  font-size: 1.2rem;
}

/* Footer */

.site-footer {
  padding-block: 1.5rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.875rem;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.site-footer-brand {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--orange);
}

@media (min-width: 640px) {
  .contacts {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .site-nav {
    display: flex;
  }

  .lang-switch {
    margin-left: 0;
  }

  .hero {
    padding-block: 4.5rem 5rem;
  }

  .hero-inner {
    grid-template-columns: auto 1fr;
    justify-items: start;
    gap: 3.5rem;
    text-align: left;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding-block: 5rem;
  }
}

@media (min-width: 1024px) {
  .cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Intro */

.intro {
  display: none;
}

.intro-active body {
  overflow: hidden;
}

.intro-active .intro {
  --p: 0;
  --mw: clamp(104px, 28vw, 180px);
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--cream);
  transition:
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.7, 0, 0.3, 1);
}

.intro--exit {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.intro-soon {
  margin: 0;
  font-family: var(--font-script);
  font-size: clamp(3rem, 15vw, 7rem);
  line-height: 1.1;
  color: var(--orange);
  text-shadow:
    3px 3px 0 var(--ink),
    -1px -1px 0 var(--ink),
    1px -1px 0 var(--ink),
    -1px 1px 0 var(--ink);
  opacity: 0;
  transform: scale(0.6) rotate(-8deg);
  transition:
    opacity 0.3s ease,
    transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.intro--done .intro-soon {
  opacity: 1;
  transform: scale(1) rotate(-4deg);
}

.intro-stage {
  position: relative;
  width: min(90vw, 560px);
  padding-top: calc(var(--mw) * 1.1);
}

.intro-walker {
  position: absolute;
  bottom: calc(100% - var(--mw) * 1.1);
  left: 0;
  width: calc(100% - var(--mw));
}

.intro-walker-move {
  transform: translateX(calc(var(--p) * 100%));
}

.monkey {
  display: block;
  width: var(--mw);
  height: auto;
  overflow: visible;
}

.intro-track {
  height: 16px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  overflow: hidden;
}

.intro-fill {
  height: 100%;
  background: repeating-linear-gradient(
    -45deg,
    var(--orange) 0 10px,
    color-mix(in srgb, var(--orange) 80%, var(--ink)) 10px 20px
  );
  transform: scaleX(var(--p));
  transform-origin: left;
}

.intro-percent {
  margin: 0.5rem 0 0;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.intro-skip {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  padding: 0.4rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 500 0.875rem var(--font-body);
  cursor: pointer;
}

.intro--done .intro-skip,
.intro--done .intro-percent {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.monkey-rig,
.monkey-leg,
.monkey-arm,
.monkey-key,
.monkey-head {
  transform-box: fill-box;
  transform-origin: center;
}

.monkey-rig {
  animation: monkey-bob 0.3s ease-in-out infinite alternate;
}

.monkey-leg-l {
  animation: monkey-step 0.6s ease-in-out infinite;
}

.monkey-leg-r {
  animation: monkey-step 0.6s ease-in-out -0.3s infinite;
}

.monkey-head {
  transform-origin: 50% 90%;
  animation: monkey-tilt 1.2s ease-in-out infinite alternate;
}

.monkey-key {
  animation: monkey-wind 0.8s linear infinite;
}

.monkey-arm-l {
  --clash: 40px;
  animation: monkey-clash 0.6s cubic-bezier(0.5, 0, 0.6, 1) infinite;
}

.monkey-arm-r {
  --clash: -40px;
  animation: monkey-clash 0.6s cubic-bezier(0.5, 0, 0.6, 1) infinite;
}

.monkey-eye {
  fill: var(--red);
  animation: monkey-glare 0.6s steps(1) infinite;
}

.intro--done .monkey-rig,
.intro--done .monkey-leg,
.intro--done .monkey-head {
  animation: none;
}

.intro--done .monkey-arm {
  animation: monkey-clash 0.35s cubic-bezier(0.5, 0, 0.6, 1) 3;
}

.intro--done .monkey-eye {
  animation: monkey-glare 0.35s steps(1) 3;
}

@keyframes monkey-bob {
  to {
    transform: translateY(-4px);
  }
}

@keyframes monkey-step {
  0%,
  50%,
  100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-6px);
  }
}

@keyframes monkey-tilt {
  from {
    transform: rotate(-4deg);
  }
  to {
    transform: rotate(4deg);
  }
}

@keyframes monkey-wind {
  0%,
  100% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(-1);
  }
}

@keyframes monkey-clash {
  0%,
  100% {
    transform: translateX(0) rotate(0);
  }
  50% {
    transform: translateX(var(--clash)) scaleX(0.85);
  }
}

@keyframes monkey-glare {
  0%,
  40%,
  60%,
  100% {
    fill: var(--red);
  }
  45% {
    fill: #ff3b2f;
  }
}

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

  .monkey *,
  .btn {
    animation: none !important;
    transition: none !important;
  }

  .intro-active .intro {
    transition: opacity 0.3s ease;
  }

  .intro--exit {
    transform: none;
  }

  .intro-soon {
    transform: rotate(-4deg);
  }
}
