:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fff8f5;
  color: #321d29;
  --paper: #fffdfb;
  --ink: #321d29;
  --muted: #67545e;
  --berry: #b51849;
  --berry-dark: #921139;
  --rose: #fff0f3;
  --line: #ead1da;
  --green: #186342;
  --mint: #d9f0df;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 280px;
  isolation: isolate;
  background:
    radial-gradient(ellipse 42rem 24rem at 96% 2rem, #ffdce7b3, transparent 95%),
    radial-gradient(ellipse 34rem 27rem at 0% 12rem, #ffe9cdcc, transparent 95%),
    linear-gradient(180deg, #fff7f5, #fffdfa 56%, #fff5f5);
}

body.has-dialog { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 3px solid #c42054;
  outline-offset: 3px;
}

.page-width { width: min(1320px, calc(100% - clamp(28px, 7vw, 112px))); margin-inline: auto; }

.masthead {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
}

.wordmark { width: clamp(107px, 10.7vw, 145px); height: auto; }
.masthead__actions { display: flex; align-items: center; gap: 8px; }

.salute,
.effects-toggle,
.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  font-size: .85rem;
  font-weight: 750;
  transition: background-color .18s, border-color .18s, color .18s, transform .18s;
}

.salute,
.effects-toggle {
  border: 1px solid #edbdce;
  border-radius: 999px;
  background: #fffcfae8;
  color: var(--berry-dark);
}

.salute { min-width: 100px; padding: 0 14px; }
.effects-toggle { width: 44px; padding: 0; }
.salute svg, .effects-toggle svg { width: 19px; height: 19px; }
.salute:hover, .effects-toggle:hover { background: #ffebf0; border-color: #d9809d; }
.salute:active, .button:active { transform: translateY(1px); }
.effects-toggle[aria-pressed="true"] .effects-toggle__play,
.effects-toggle[aria-pressed="false"] .effects-toggle__pause { display: none; }

.hero {
  position: relative;
  z-index: 3;
  text-align: center;
  padding-block: clamp(19px, 2.8vw, 39px) clamp(19px, 2.55vw, 34px);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.05rem, 5.15vw, 5.35rem);
  font-weight: 830;
  line-height: 1.04;
  letter-spacing: -.055em;
}

.hero h1 em {
  position: relative;
  isolation: isolate;
  display: inline-block;
  margin-inline-start: .075em;
  color: var(--berry);
  font-style: normal;
  white-space: nowrap;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto .04em -.016em -.025em;
  height: .19em;
  border-radius: 58% 22% 42% 23%;
  background: #ffbfcb9c;
  transform: rotate(-3deg);
}

.hero p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: clamp(.9rem, 1.45vw, 1.12rem);
  line-height: 1.45;
}

.office-section {
  width: min(1680px, calc(100% - clamp(16px, 3.3vw, 48px)));
  margin-inline: auto;
}

.office-section, .greetings { scroll-margin-top: 16px; }

.office-frame {
  overflow: hidden;
  border: 1px solid #e9cdd6;
  border-radius: 23px;
  background: var(--paper);
  box-shadow: 0 20px 58px #7c314922, 0 4px 12px #7c31490b;
}

.office-frame__bar,
.office-frame__footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px clamp(12px, 1.6vw, 23px);
  background: var(--paper);
  color: var(--muted);
}

.office-frame__bar h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.15rem, 2.2vw, 1.62rem);
  line-height: 1.1;
  letter-spacing: -.04em;
}

.office-frame__bar p { margin: 4px 0 0; font-size: .79rem; }
.swipe-hint { display: none; }
.swipe-hint span { color: var(--berry); }

.text-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--berry-dark);
  white-space: nowrap;
}

.text-link:hover { color: var(--berry); text-decoration: underline; text-underline-offset: 3px; }
.button svg, .text-link svg { width: 18px; height: 18px; flex: none; }

.map-scroll {
  overflow-x: auto;
  background: #eee4de;
  scrollbar-color: #bd6d89 #faeaf0;
  overscroll-behavior-inline: contain;
}

.map-scroll:focus-visible { outline-offset: -4px; }

.map {
  position: relative;
  min-width: 940px;
  aspect-ratio: 1672 / 941;
  overflow: hidden;
}

/* Coordinates stay tied to the full image when the bottom is cropped on a phone. */
.map__layout {
  position: absolute;
  inset: 0 0 auto;
  aspect-ratio: 1672 / 941;
}

.map__photo { width: 100%; height: 100%; }
.map__pins { position: absolute; z-index: 3; inset: 0; }

.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(var(--shift-x, -50%), calc(-50% + var(--shift-y, 0px)));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid #fff;
  border-radius: 999px;
  padding: 4px 10px 4px 5px;
  background: #fffdfbf5;
  color: var(--ink);
  box-shadow: 0 3px 12px #39202a59;
  font-size: .73rem;
  line-height: 1.1;
  font-weight: 780;
  white-space: nowrap;
  transition: background-color .16s, border-color .16s, box-shadow .16s;
}

.pin[data-id="buhgalteriya"] { --shift-x: -43%; }
.pin[data-id="smm"] { --shift-y: 3px; }
.pin[data-id="zimin"] { --shift-x: -23%; --shift-y: 17px; }
.pin[data-id="abramov"] { --shift-y: -23px; }
.pin[data-id="it"] { --shift-x: -61%; }
.pin[data-id="design"] { --shift-y: 17px; }
.pin[data-id="andreev"] { --shift-x: -74%; }
.pin[data-id="safrygin"] { --shift-y: 11px; }

.pin__icon, .greeting__icon {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--berry);
  color: #fff;
}

.pin__icon { width: 22px; height: 22px; }
.pin__icon svg, .greeting__icon svg { width: 13px; height: 13px; }

.pin:hover, .pin:focus-visible {
  z-index: 2;
  background: #ffeaf0;
  border-color: #fff;
  box-shadow: 0 0 0 3px #cc32686b, 0 5px 14px #39202a59;
}

.pin--final { background: #ffe3aa; color: #502e16; border-color: #fff4d9; }
.pin--final .pin__icon { background: #783d2f; color: #ffedc7; }
.pin--final:hover, .pin--final:focus-visible { background: #ffedc5; }

.is-opened .pin__icon,
.is-opened .greeting__icon { background: var(--mint); color: var(--green); }

.office-frame__footer {
  min-height: 52px;
  border-top: 1px solid #e9cdd666;
  font-size: .79rem;
}

.progress { display: flex; align-items: center; gap: 12px; }
.progress strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.progress progress {
  appearance: none;
  width: clamp(45px, 10vw, 136px);
  height: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #f1d9e1;
  color: var(--berry);
}

.progress progress::-webkit-progress-bar { background: #f1d9e1; }
.progress progress::-webkit-progress-value { background: var(--berry); border-radius: 999px; }
.progress progress::-moz-progress-bar { background: var(--berry); border-radius: 999px; }
.final-hint span { color: var(--berry); margin-left: 3px; }

.greetings {
  position: relative;
  z-index: 3;
  margin-block: clamp(34px, 5vw, 68px) 35px;
}

.section-heading { margin-bottom: 15px; }
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -.047em;
}

.greetings__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.greeting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 55px;
  padding: 8px 12px 8px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  text-align: start;
  transition: background-color .17s, border-color .17s;
}

.greeting:hover { background: var(--rose); border-color: #d9809d; }
.greeting__name { font-size: .9rem; font-weight: 720; }
.greeting__icon { width: 30px; height: 30px; background: #fae2eb; color: var(--berry-dark); }
.greeting__icon svg { width: 15px; height: 15px; }

.finale {
  display: flex;
  align-items: center;
  gap: clamp(13px, 2vw, 23px);
  margin-top: 15px;
  padding: clamp(16px, 2.5vw, 24px);
  border: 1px solid #edc1b6;
  border-radius: 17px;
  background: radial-gradient(ellipse at 0% 0%, #ffe1af, transparent 75%), #fff0ee;
}

.finale__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: clamp(48px, 6vw, 65px);
  aspect-ratio: 1;
  border: 1px solid #ebba9c;
  border-radius: 15px;
  background: #fff8eebc;
  color: var(--berry);
}

.finale__icon svg { width: 57%; }
.finale__copy { flex: 1; }

.eyebrow {
  margin: 0;
  color: var(--berry-dark);
  font-size: .67rem;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.finale__copy h3 { margin: 5px 0; font-size: clamp(1.15rem, 2.1vw, 1.65rem); letter-spacing: -.04em; }
.finale__copy p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .87rem; }
.finale.is-next { border-color: #c56079; box-shadow: 0 0 25px #ffbc8b50; }

.button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 17px;
  white-space: nowrap;
}

.button--berry { background: var(--berry); color: #fff; }
.button--berry:hover { background: var(--berry-dark); }

.footer {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 65px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
}

.footer__heart { color: var(--berry); margin-right: 4px; }

.video-dialog {
  position: fixed;
  width: min(740px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 26px 100px #3113247a;
  overscroll-behavior: contain;
}

.video-dialog[open] { animation: dialog-in .22s ease-out; }
.video-dialog::backdrop { background: #3a243484; backdrop-filter: blur(4px); }

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(.99); }
  to { opacity: 1; transform: none; }
}

.video-dialog__body { position: relative; isolation: isolate; padding: clamp(12px, 2.5vw, 24px); }

.video-dialog__header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 14px;
}

.video-dialog__header h2 { margin: 6px 0 0; font-size: clamp(1.26rem, 3.25vw, 1.9rem); line-height: 1.12; letter-spacing: -.035em; }

.close {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--rose);
  color: var(--berry-dark);
}

.close:hover { background: #f9dce6; }
.close svg { width: 21px; height: 21px; }

.player {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 172px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 28%, #fff7e6, #fce8ef 95%);
}

.player video { position: absolute; inset: 0; width: 100%; height: 100%; background: #1a1119; }
.player__message { max-width: 34ch; padding: 14px; color: var(--muted); text-align: center; font-size: .85rem; }
.player__message p { margin: 5px 0 0; line-height: 1.45; }
.player__message strong { display: block; color: var(--ink); font-size: 1.05rem; }
.player__link { margin-top: 12px; }

.player__badge {
  display: grid;
  place-items: center;
  width: clamp(36px, 7vw, 54px);
  aspect-ratio: 1;
  margin: 0 auto 10px;
  border: 1px solid #d992aa;
  border-radius: 50%;
  color: var(--berry);
}

.player__badge svg { width: 53%; height: 53%; }

.ambient-confetti, .sparkles, .confetti {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-confetti { z-index: 2; }
.ambient-confetti__piece {
  position: absolute;
  top: 0;
  left: var(--left);
  width: var(--size);
  height: calc(var(--size) * 1.4);
  border-radius: var(--radius);
  background: var(--color);
  opacity: var(--opacity);
  animation: drift var(--duration) var(--delay) linear infinite;
}

@keyframes drift {
  0% { transform: translate(0, -6svh) rotate(var(--turn)); }
  45% { transform: translate(var(--sway), 46svh) rotate(calc(var(--turn) + 125deg)); }
  100% { transform: translate(var(--end-x), 110svh) rotate(calc(var(--turn) + 290deg)); }
}

.has-dialog .ambient-confetti__piece { animation-play-state: paused; }
.has-dialog .sparkles { visibility: hidden; }

.sparkles { z-index: 7; }
.sparkles__cursor, .sparkles__spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
  line-height: 1;
}
.sparkles__cursor { color: #c32053; font-size: 17px; text-shadow: 0 0 4px #fff, 0 0 9px #ffbd88; }
.sparkles__spark {
  color: var(--color);
  font-size: var(--size);
  text-shadow: 0 0 4px #fff2a8;
  animation: twinkle .65s ease-out both;
}

@keyframes twinkle {
  from { transform: scale(.85); opacity: .93; }
  to { transform: translate(var(--dx), var(--dy)) scale(.12); opacity: 0; }
}

.confetti { z-index: 8; }
.confetti--dialog { position: absolute; border-radius: inherit; }

.confetti__piece {
  position: absolute;
  left: var(--start-x);
  top: var(--start-y);
  width: var(--size);
  height: calc(var(--size) * 1.45);
  border-radius: var(--radius);
  background: var(--color);
  animation: burst var(--duration) var(--delay) ease-out both;
}

@keyframes burst {
  0% { transform: translate(0, 0) scale(.3); opacity: 0; }
  10% { opacity: 1; }
  30% { transform: translate(var(--arc-x), var(--arc-y)) rotate(var(--turn)); }
  72% { opacity: .95; }
  100% { transform: translate(var(--end-x), var(--end-y)) rotate(calc(var(--turn) * 3)); opacity: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .masthead,
  .hero h1,
  .hero p,
  .office-frame {
    animation: arrive .62s cubic-bezier(.2, .72, .25, 1) backwards;
  }

  .hero h1 { animation-delay: 65ms; }
  .hero p { animation-delay: 140ms; }
  .office-frame { animation-delay: 215ms; }
  .pin { animation: pin-arrive .39s ease-out var(--enter-delay, 380ms) backwards; }
  .pin:focus-visible { animation: none; }
}

@keyframes arrive {
  from { opacity: 0; translate: 0 12px; }
}

@keyframes pin-arrive {
  from { opacity: 0; translate: 0 8px; }
}

@media (max-width: 990px) {
  .swipe-hint { display: block; }
  .map-hint { display: none; }
}

@media (max-width: 850px) {
  .greetings__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .page-width { width: calc(100% - 28px); }
  .masthead { min-height: 64px; }
  .masthead__actions { gap: 5px; }
  .salute { padding-inline: 11px; font-size: .78rem; }
  .hero h1 { font-size: clamp(1.95rem, 8.3vw, 3.3rem); }
  .hero h1 em { margin-inline-start: 0; }
  .hero p { margin-top: 10px; }
  .office-frame { border-radius: 15px; }
  .office-frame__bar p { font-size: .7rem; }
  .office-frame__bar .text-link { gap: 4px; font-size: .74rem; }
  .office-frame__bar .text-link svg { width: 15px; height: 15px; }
  .office-frame__footer { font-size: .71rem; }
  .map { height: min(430px, 119vw); aspect-ratio: auto; }
  .progress { gap: 6px; }
  .greetings__list { grid-template-columns: 1fr; }
  .finale { display: grid; grid-template-columns: auto 1fr; }
  .finale > .button { grid-column: 2; justify-self: start; }
  .ambient-confetti__piece:nth-child(n + 17) { display: none; }
}

@media (max-width: 350px) {
  .salute { min-width: 76px; }
  .progress progress { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .ambient-confetti, .sparkles { display: none; }
}
