/* css/style.css */
* { box-sizing: border-box; }

:root {
  --cta-row-bottom: calc(72px + env(safe-area-inset-bottom));
  --brand-blue: #168bff;
  --brand-ice: #b9e2ff;
  --brand-deep: #031a35;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  /* Fallback antes do WebGL: cinza-escuro para contrastar com o diamante. */
  background: #2b2f36;
  overflow: hidden;
  font-family: "Libre Baskerville", serif;
  color-scheme: dark;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand-ice);
  outline-offset: 4px;
}

.webgl-fallback,
.no-script {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 28px;
  text-align: center;
  background: radial-gradient(circle at 50% 42%, rgba(22,139,255,.18), transparent 38%), #02040a;
  color: #fff;
}

.webgl-fallback img { width: min(420px, 82vw); height: auto; border-radius: 18px; }
.webgl-fallback h2, .no-script h1 { margin: 0; font-size: clamp(24px, 5vw, 42px); }
.webgl-fallback p, .no-script p { max-width: 620px; margin: 0; color: rgba(255,255,255,.75); line-height: 1.6; }
.webgl-fallback a, .no-script a {
  padding: 12px 18px;
  border: 1px solid rgba(185,226,255,.4);
  border-radius: 999px;
  color: #fff;
  background: rgba(22,139,255,.22);
  text-decoration: none;
}

/* ✅ canvas atrás do menu */
#app {
  position: fixed;
  inset: 0;
  z-index: 0;
}
#app canvas {
  position: fixed;
  inset: 0;
  display: block;
  z-index: 0;
}

/* Loader */
#loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  pointer-events: none;
  z-index: 80;
  background: rgba(15,16,20,0.18);
  backdrop-filter: blur(2px);
}

/* Hint */
#hint {
  position: fixed;
  left: calc(16px + env(safe-area-inset-left));
  bottom: calc(16px + env(safe-area-inset-bottom));
  color: rgba(255,255,255,0.65);
  font-size: 12px;
  user-select: none;
  pointer-events: none;
  z-index: 20;
  transition: opacity .18s ease, transform .18s ease;
}
#hint.hint-hidden {
  opacity: 0;
  transform: translateY(6px);
}

/* Discover button */
.discover-toggle {
  position: fixed;
  left: 50%;
  bottom: var(--cta-row-bottom);
  transform: translateX(-50%);

  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(22,139,255,0.10);
  color: rgba(255,255,255,0.92);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 40;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease, opacity .18s ease, background .18s ease;
}
.discover-toggle:hover {
  transform: translateX(-50%) translateY(-1px);
  background: rgba(22,139,255,0.18);
}
.discover-toggle:active {
  transform: translateX(-50%) translateY(0);
  opacity: 0.9;
}
.discover-toggle.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
}

/* Hero text */
.hero-text {
  position: fixed;
  left: 50%;
  top: calc(22vh + env(safe-area-inset-top));
  transform: translate(-50%, -50%) scale(0.98);
  max-width: min(900px, calc(100vw - 32px));
  text-align: center;
  color: rgba(255,255,255,0.9);
  font-size: clamp(16px, 2.4vw, 28px);
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-shadow: 0 16px 50px rgba(0,0,0,0.55);
  opacity: 0;
  transition: opacity .6s ease, transform .6s ease;
  pointer-events: none;
  z-index: 30;
}
.hero-text.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* =========================
   ✅ ÚNICO BOTÃO
   ========================= */
.menu-toggle {
  position: fixed;
  right: calc(18px + env(safe-area-inset-right));
  top: calc(18px + env(safe-area-inset-top));

  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  cursor: pointer;
  z-index: 70;
  display: none;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
  animation: menuTogglePulse 2s ease-in-out infinite;
  opacity: 0;
  pointer-events: none;
}
.menu-toggle:hover { background: rgba(255,255,255,0.10); }
.menu-toggle.is-open { animation: none; }
.menu-toggle.is-visible {
  display: grid;
  opacity: 1;
  pointer-events: auto;
}
.menu-toggle:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  animation: none;
}

.burger { display: grid; gap: 6px; }

.burger span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  display: block;
  transition: transform .25s ease, opacity .25s ease;
}

.menu-toggle.is-open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.is-open .burger span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@keyframes menuTogglePulse {
  0% { transform: scale(1); box-shadow: 0 18px 40px rgba(0,0,0,0.35); }
  50% { transform: scale(1.08); box-shadow: 0 24px 60px rgba(0,0,0,0.5); }
  100% { transform: scale(1); box-shadow: 0 18px 40px rgba(0,0,0,0.35); }
}

/* =========================
   MENU OVERLAY
   ========================= */
.menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  background: transparent;

  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
  overflow: hidden;

  padding:
    calc(84px + env(safe-area-inset-top))
    calc(16px + env(safe-area-inset-right))
    var(--cta-row-bottom)
    calc(16px + env(safe-area-inset-left));
}

.menu.show { opacity: 1; pointer-events: auto; }
.menu.hidden { display: none; }

.menu.section-open {
  align-items: center;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(48px + env(safe-area-inset-bottom));
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.menu.section-open::-webkit-scrollbar { width: 0; height: 0; }

/* container transparente */
.menu-inner {
  width: auto;
  max-width: min(1100px, calc(100vw - 32px));
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  position: relative;

  opacity: 0;
  transform: translateY(10px) scale(0.99);
  transition: opacity .22s ease, transform .22s ease;
}
.menu-inner.show { opacity: 1; transform: translateY(0) scale(1); }

.menu.section-open .menu-inner {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 140px);
}

/* As 3 opções grandes */
.menu-nav {
  display: flex;
  width: min(560px, calc(100vw - 32px));
  flex-wrap: nowrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.menu-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  flex: 1 1 0;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(22,139,255,0.10);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  text-decoration: none;
  font-weight: 600;
  font-size: 11px;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform .18s ease, opacity .18s ease, background .18s ease;
  text-shadow: none;
}
.menu-link:hover {
  opacity: 1;
  transform: translateY(-1px);
  background: rgba(22,139,255,0.18);
}

/* Texto após escolher uma opção */
.menu-text {
  margin-top: 18px;
  text-align: center;
  padding: 12px 12px 24px;
  color: rgba(255,255,255,0.88);
  text-shadow: 0 18px 60px rgba(0,0,0,0.65);

  overflow: auto;
  max-height: calc(100vh - 180px);
  -webkit-overflow-scrolling: touch;

  scrollbar-width: none;
  -ms-overflow-style: none;
}
.menu-text::-webkit-scrollbar { width: 0; height: 0; }

.menu-text h2 {
  margin: 10px 0 10px 0;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: clamp(22px, 2.2vw, 34px);
}

/* conteúdo */
.menu-body { margin: 0 auto; max-width: 820px; }

.menu-body p {
  margin: 0 auto 14px auto;
  line-height: 1.60;
  font-size: clamp(14px, 1.8vw, 16px);
  color: rgba(255,255,255,0.78);
}
.menu-body p:last-child { margin-bottom: 0; }

.menu-body strong { color: rgba(255,255,255,0.92); font-weight: 700; }
.menu-body em { color: rgba(255,255,255,0.84); }

/* util */
.hidden { display: none !important; }

/* =========================
   ✅ CONTATO
   ========================= */
.contact-wrap {
  max-width: 820px;
  margin: 0 auto;
  text-align: left;
}

.contact-card {
  margin-top: 14px;
  padding: 22px 18px;
  border-radius: 18px;
  background: transparent;
  border: 1px solid rgba(87,174,255,0.20);
  box-shadow: 0 22px 60px rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.input-field {
  position: relative;
  margin: 14px 0 6px;
}

.input-field input,
.input-field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.90);
  padding: 16px 0 10px;
  font-size: 15px;
  outline: none;
  font-family: inherit;
  caret-color: var(--brand-blue);
}

.input-field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.55;
}

.input-field label {
  position: absolute;
  left: 0;
  top: 16px;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: transform .18s ease, color .18s ease, top .18s ease, font-size .18s ease;
  pointer-events: none;
}

.input-field input:focus,
.input-field textarea:focus {
  border-bottom-color: var(--brand-blue);
  box-shadow: 0 1px 0 0 var(--brand-blue);
}

.input-field input:focus + label,
.input-field textarea:focus + label,
.input-field input:not(:placeholder-shown) + label,
.input-field textarea:not(:placeholder-shown) + label {
  top: 4px;
  font-size: 11px;
  color: rgba(255,255,255,0.78);
  transform: translateY(-10px);
}

.helper-text {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}

.form-actions {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.btn-premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(22,139,255,0.25);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn-premium:hover {
  transform: translateY(-1px);
  background: rgba(22,139,255,0.38);
  border-color: rgba(255,255,255,0.18);
}
.btn-premium:active { transform: translateY(0); opacity: 0.95; }

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15,16,20,0.45);
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  letter-spacing: 0.04em;
  font-size: 12px;
  text-transform: uppercase;
  box-shadow: 0 16px 36px rgba(0,0,0,0.35);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn-whatsapp:hover {
  transform: translateY(-1px);
  background: rgba(18,20,26,0.6);
  border-color: rgba(255,255,255,0.18);
}
.btn-whatsapp:active { transform: translateY(0); opacity: 0.95; }

.btn-whatsapp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ✅ botão desabilitado (durante envio) */
.btn-premium:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

/* ✅ honeypot (anti-bot) */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* ✅ status do envio */
.form-status {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.72);
  min-height: 18px;
}
.form-status.is-ok { color: rgba(255,255,255,0.88); }
.form-status.is-err { color: rgba(255,180,180,0.92); }

/* =========================
   ✅ RESPONSIVO
   ========================= */
@media (max-width: 900px) {
  .menu-nav { gap: 10px; }
  .menu.section-open { padding-top: calc(78px + env(safe-area-inset-top)); }
  .menu-text { text-shadow: none; }
  .menu-body p { text-shadow: none; }
  .contact-card {
    background: rgba(8,10,14,0.86);
    box-shadow: none;
    backdrop-filter: none;
    border-color: rgba(255,255,255,0.12);
  }
}

@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  :root {
    --cta-row-bottom: calc(56px + env(safe-area-inset-bottom));
  }

  #hint {
    display: block;
    font-size: 11px;
    line-height: 1.3;
    max-width: calc(100vw - 24px);
    right: calc(16px + env(safe-area-inset-right));
  }

  .menu-toggle {
    right: calc(14px + env(safe-area-inset-right));
    top: calc(14px + env(safe-area-inset-top));
    width: 50px;
    height: 50px;
  }

  .discover-toggle {
    padding: 11px 18px;
    font-size: 10px;
    letter-spacing: 0.16em;
  }

  .menu-link {
    font-size: 10px;
    padding: 11px 14px;
  }

  .menu.section-open .menu-inner { max-height: calc(100vh - 120px); }

  .menu-text {
    max-height: calc(100vh - 160px);
    padding-left: 6px;
    padding-right: 6px;
  }

  .contact-card { padding: 18px 14px; border-radius: 16px;  }
}
/* SweetAlert sempre acima do canvas/menu */
.swal2-container {
  z-index: 999999 !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
