* {
  box-sizing: border-box;
}

:root {
  --ink: #21486f;
  --blue: #1f5f96;
  --pink: #ff7fc5;
}

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

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  overflow: hidden;
  background: url('images/fundo.jpeg') center/cover no-repeat fixed;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.page {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 40%);
  pointer-events: none;
  z-index: 0;
}

.god-rays {
  position: absolute;
  top: 0;
  left: 50%;
  width: 140%;
  height: 55%;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.12) 25%, rgba(255, 255, 255, 0.04) 50%, transparent 70%),
    radial-gradient(ellipse 100% 80% at 50% -5%, rgba(255, 255, 255, 0.2) 0%, transparent 55%);
  filter: blur(20px);
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
}

.top-wave,
.top-wave-2 {
  position: absolute;
  left: -5%;
  width: 110%;
  height: 90px;
  border-radius: 0 0 45% 55%;
  background: rgba(255, 255, 255, 0.14);
  filter: blur(8px);
  z-index: 1;
  animation: waveDrift 8s ease-in-out infinite alternate;
}

.top-wave {
  top: 0;
}

.top-wave-2 {
  top: 30px;
  opacity: 0.55;
  animation-duration: 12s;
}

@keyframes waveDrift {
  from {
    transform: translateX(-1.5%);
  }
  to {
    transform: translateX(1.5%);
  }
}

.card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 720px;
  width: 90%;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  padding: 40px;
  border-radius: 25px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  z-index: 5;
}

h1 {
  margin-top: 0;
  font-size: clamp(1.5rem, 5vw, 38px);
  color: var(--blue);
}

p {
  font-size: clamp(0.9375rem, 2.5vw, 18px);
  line-height: 1.6;
  color: var(--ink);
}

.card a:not(.cta) {
  text-decoration: underline;
  color: var(--blue);
}

.cta {
  display: inline-block;
  margin-top: 20px;
  padding: 16px 28px;
  min-height: 44px;
  min-width: 44px;
  box-sizing: border-box;
  background: var(--pink);
  color: white;
  font-weight: bold;
  border-radius: 40px;
  text-decoration: none;
  font-size: clamp(1rem, 2.5vw, 18px);
  transition: 0.25s;
  -webkit-tap-highlight-color: transparent;
}

.cta:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.cta:active {
  transform: scale(0.98);
}

.logo {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  left: max(20px, env(safe-area-inset-left));
  width: min(220px, 45vw);
  max-width: 220px;
  height: auto;
  z-index: 6;
}

.tech-logo {
  position: absolute;
  top: max(22px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  width: min(140px, 28vw);
  max-width: 140px;
  height: auto;
  z-index: 6;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 14px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 22px rgba(255, 255, 255, 0.35));
}

.creature {
  position: absolute;
  left: 0;
  top: 0;
  width: 110px;
  pointer-events: auto;
  transition: filter 0.25s ease;
  z-index: 3;
  transform-origin: center center;
}

.creature:hover {
  filter: drop-shadow(0 10px 20px rgba(31, 95, 150, 0.25)) brightness(1.05);
}

.creature img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.bubble {
  position: absolute;
  bottom: -60px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.65) 40%, rgba(255, 255, 255, 0.25) 65%, rgba(255, 255, 255, 0) 75%);
  border: 2px solid rgba(120, 190, 255, 0.6);
  opacity: 0.9;
  animation: bubbleUp linear infinite;
  z-index: 2;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  font-size: 22px;
  opacity: 0.8;
  animation: twinkle 3.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

.seafloor-star {
  position: absolute;
  bottom: 28px;
  font-size: 42px;
  z-index: 2;
  opacity: 0.85;
  animation: starBob 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bubbleUp {
  from {
    transform: translateY(0) scale(1);
    opacity: 0.65;
  }
  to {
    transform: translateY(-120vh) scale(1.2);
    opacity: 0;
  }
}

@keyframes twinkle {
  0%,
  100% {
    transform: scale(0.9) rotate(0deg);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.18) rotate(12deg);
    opacity: 0.95;
  }
}

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

@media (max-width: 768px) {
  .card {
    padding: 24px 20px;
    width: 92%;
    max-height: calc(100vh - 1.5rem);
  }
  .logo {
    width: min(170px, 42vw);
  }
}

@media (max-width: 480px) {
  .card {
    padding: 20px 16px;
    width: 94%;
    border-radius: 20px;
  }
  .cta {
    padding: 14px 24px;
    width: 100%;
    max-width: 320px;
    text-align: center;
  }
  .logo {
    width: min(150px, 38vw);
  }
  .tech-logo {
    width: min(100px, 24vw);
  }
}
