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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #2a2a2a;
}

.page {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #2a2a2a;
}

.bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 0;
}

/* Desktop */
.bg-web {
  display: block;
  background-image: url("assets/bg-web.jpg");
}

.bg-mobile {
  display: none;
  background-image: url("assets/bg-mobile.jpg");
}

.bg-tone {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.06);
}

.content {
  position: absolute;
  left: 0;
  right: 0;
  top: 60%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 0 1rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  text-align: center;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  align-items: center;
  max-width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    transform 0.25s ease,
    box-shadow 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.75);
  transform: translateY(-2px);
  box-shadow:
    0 0 20px rgba(255, 255, 255, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.25);
}

.btn:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.08);
}

.btn:focus-visible {
  outline: 2px solid rgba(200, 200, 210, 0.7);
  outline-offset: 3px;
}

/* Mobile + tablet portrait */
@media (max-width: 900px) {
  .bg-web {
    display: none;
  }

  .bg-mobile {
    display: block;
  }

  .content {
    top: auto;
    bottom: max(11vh, env(safe-area-inset-bottom, 0px) + 20px);
    align-items: center;
  }

  .buttons {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
  }

  .btn {
    padding: 0.65rem 1.5rem;
    font-size: 0.7rem;
    min-width: 190px;
    width: min(230px, 72vw);
    justify-content: center;
  }
}

/* Desktop */
@media (min-width: 901px) {
  .content {
    top: 60%;
  }

  .buttons {
    flex-direction: row;
    gap: 1.1rem;
  }

  .btn {
    padding: 0.65rem 1.7rem;
    font-size: 0.75rem;
  }
}

@media (min-width: 1200px) {
  .content {
    top: 61%;
  }
}

/* Landscape phone: use web bg, buttons in a row near bottom */
@media (max-height: 500px) and (orientation: landscape) {
  .bg-web {
    display: block;
  }

  .bg-mobile {
    display: none;
  }

  .content {
    top: auto;
    bottom: 14px;
  }

  .buttons {
    flex-direction: row;
    gap: 0.55rem;
  }

  .btn {
    min-width: 0;
    width: auto;
    padding: 0.4rem 1rem;
    font-size: 0.6rem;
  }
}
