/* ═══ BASE / RESET ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  background: #1a0f0a;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  touch-action: manipulation;
}

h1, h2, h3, h4, h5, h6,
.btn-primary,
.btn-secondary,
.modal-title {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

/* Background layers */
.bg-layer {
  position: fixed;
  inset: 0;
  background-color: #2a1810;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0.15) 40%,
    rgba(0,0,0,0.35) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Buttons */
.btn-primary {
  display: block;
  width: 100%;
  padding: 18px 24px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, #ff6b35 0%, #e63900 100%);
  border-radius: 16px;
  box-shadow: 0 6px 0 #b32d00, 0 8px 24px rgba(255,107,53,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #b32d00, 0 4px 12px rgba(255,107,53,0.3);
}

.btn-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 6px 0 #b32d00, 0 8px 24px rgba(255,107,53,0.4); }
  50% { box-shadow: 0 6px 0 #b32d00, 0 8px 36px rgba(255,180,50,0.6); }
}

.btn-secondary {
  display: block;
  width: 100%;
  padding: 14px 20px;
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  transition: background 0.2s;
}

.btn-secondary:active { background: rgba(255,255,255,0.22); }

.btn-icon {
  width: 52px;
  height: 52px;
  font-size: 1.4rem;
  background: rgba(0,0,0,0.35);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 14px;
  backdrop-filter: blur(6px);
  transition: transform 0.15s;
}

.btn-icon:active { transform: scale(0.92); }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 340px;
  padding: 28px 24px;
  background: linear-gradient(160deg, rgba(60,35,20,0.95), rgba(30,18,10,0.98));
  border: 2px solid rgba(255,180,80,0.3);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  text-align: center;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.animate-pop {
  animation: pop-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.8) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.animate-in {
  animation: fade-up 0.6s ease both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Toggle */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-weight: 600;
  cursor: pointer;
}

.toggle-row input { display: none; }

.toggle-slider {
  width: 48px;
  height: 28px;
  background: rgba(255,255,255,0.2);
  border-radius: 14px;
  position: relative;
  transition: background 0.2s;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-row input:checked + .toggle-slider {
  background: #ff6b35;
}

.toggle-row input:checked + .toggle-slider::after {
  transform: translateX(20px);
}

/* ── Fundos lazy-load (mobile) ── */
[data-lazy-bg] {
  opacity: 0.92;
  transition: opacity 0.35s ease, filter 0.35s ease;
}

[data-lazy-bg].is-loaded {
  opacity: 1;
}
