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

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

html:fullscreen,
html:-webkit-full-screen {
  width: 100%;
  height: 100%;
}

html:fullscreen body,
html:-webkit-full-screen body {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: #1d1d1f;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: #e8e8ed;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("/assets/bg-office-generated.png") center / cover no-repeat,
    url("/assets/bg-office.jpg") center / cover no-repeat;
  filter: blur(10px);
  transform: scale(1.06);
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(245, 245, 247, 0.5);
  z-index: 1;
}

.top-bar {
  position: relative;
  z-index: 10;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.4);
}

.top-bar__text {
  font-size: clamp(13px, 3.2vw, 15px);
  font-weight: 400;
  color: #1d1d1f;
  letter-spacing: -0.01em;
  display: block;
  word-break: break-word;
  text-decoration: none;
}

.top-bar__text:active {
  opacity: 0.7;
}

.page {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 49px);
  min-height: calc(100dvh - 49px);
  padding: clamp(12px, 3vw, 24px);
  gap: clamp(8px, 2vh, 20px);
}

.page__title {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  font-size: clamp(2rem, 9vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #1d1d1f;
  text-align: center;
  line-height: 1.05;
  z-index: 4;
}

.page__bg-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(72px, 14vh, 120px) clamp(12px, 4vw, 32px) clamp(100px, 18vh, 160px);
  pointer-events: none;
}

.page__bg-text {
  width: min(980px, 100%);
  max-width: 100%;
  font-size: clamp(0.95rem, 3.8vw, 2.1rem);
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  color: rgba(29, 29, 31, 0.28);
  text-wrap: balance;
  hyphens: auto;
  user-select: none;
}

.dialog {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  width: min(500px, 100%);
  background: #fff;
  border-radius: 14px;
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.18),
    0 0 0 0.5px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.dialog__body {
  padding: clamp(18px, 4vw, 26px);
  font-size: clamp(13px, 3.5vw, 14px);
  line-height: 1.5;
  color: #2c2c2e;
  text-align: left;
}

.dialog__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  padding: 4px 16px 14px;
}

.dialog__phone {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dialog__btn {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: clamp(14px, 3.5vw, 15px);
  font-weight: 400;
  color: #007aff;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  -webkit-tap-highlight-color: transparent;
}

.dialog__btn:hover {
  background: rgba(0, 122, 255, 0.08);
}

.dialog__btn:active {
  opacity: 0.7;
}

@media (max-width: 768px) {
  .page {
    justify-content: flex-start;
    padding-top: clamp(8px, 2vh, 16px);
    min-height: calc(100dvh - 45px);
  }

  .page__title {
    margin-bottom: 4px;
  }

  .page__bg-layer {
    align-items: flex-start;
    padding-top: clamp(56px, 11vh, 88px);
    padding-bottom: clamp(220px, 38vh, 320px);
  }

  .page__bg-text {
    font-size: clamp(1rem, 4.2vw, 1.35rem);
    line-height: 1.4;
    color: rgba(29, 29, 31, 0.42);
    letter-spacing: -0.01em;
  }

  .dialog {
    margin-top: auto;
    margin-bottom: clamp(8px, 2vh, 20px);
  }
}

@media (max-width: 400px) {
  .page__bg-text {
    font-size: clamp(0.9rem, 4.5vw, 1.1rem);
    color: rgba(29, 29, 31, 0.48);
  }

  .top-bar {
    padding: 10px 12px;
  }
}

@media (min-width: 769px) {
  .page__title {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
  }

  .dialog {
    margin-top: clamp(24px, 4vh, 48px);
  }
}
