/* ============================================================
   Wattron · Realidade Aumentada — página dedicada (mobile first)
   Consistente com o restante site (tokens de marca partilhados)
   ============================================================ */

:root {
  --black: #060606;
  --yellow: #fde712;
  --amber: #fea300;
  --orange: #ff9b00;
  --grad-brand: linear-gradient(95deg, #fde712 0%, #ffb400 55%, #fea300 100%);
  --ink: #f4f4f6;
  --muted: #9a9aa3;
  --shell: 480px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #000; overscroll-behavior: none; }
body {
  margin: 0;
  min-height: 100dvh;
  background: #000;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.stage {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  background-color: #000;
  background-image: radial-gradient(56% 42% at 50% 40%,
    rgba(255, 176, 0, 0.30) 0%, rgba(255, 155, 0, 0.10) 44%, transparent 72%);
  background-attachment: fixed;
}

.ar-page {
  width: 100%;
  max-width: var(--shell);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(28px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
  background: var(--black);
}

/* Cabeçalho */
.ar-page__head { text-align: center; animation: ar-fade 0.6s var(--ease) both; }
.ar-page__logo {
  height: 52px; width: auto;
  filter: drop-shadow(0 8px 26px rgba(255, 176, 0, 0.22));
}
.ar-page__title {
  margin: 22px 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.ar-page__sub {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

/* Visualizador 3D (protagonista) */
.ar-viewer {
  flex: 1;
  min-height: 46vh;
  margin: 20px 0;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(70% 60% at 50% 40%, rgba(255, 176, 0, 0.14) 0%, transparent 72%),
    #0a0a0b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 30px 70px -40px rgba(255, 160, 0, 0.4);
  animation: ar-fade 0.6s var(--ease) 0.08s both;
}
#ar-mv {
  width: 100%;
  height: 100%;
  background: transparent;
  --poster-color: transparent;
  --progress-bar-color: var(--amber);
  --interaction-prompt-threshold: 1500ms;
}
/* Interruptor de LED (sobre o visualizador) */
.ar-led {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 12, 14, 0.55);
  color: #e9e9ee;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color 0.22s var(--ease), box-shadow 0.22s var(--ease), background 0.22s var(--ease);
}
.ar-led__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4b4b52;
  transition: background 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.ar-led.is-on {
  border-color: rgba(64, 220, 90, 0.5);
  box-shadow: 0 0 0 1px rgba(64, 220, 90, 0.22), 0 10px 26px -12px rgba(64, 220, 90, 0.6);
}
.ar-led.is-on .ar-led__dot {
  background: #3ee06a;
  box-shadow: 0 0 10px 2px rgba(62, 224, 106, 0.85);
}
.ar-led:active { transform: scale(0.97); }

.ar-viewer__loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #b9b9c2;
  background: transparent;
}
.ar-spinner {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--amber);
  animation: ar-spin 0.9s linear infinite;
}
@keyframes ar-spin { to { transform: rotate(360deg); } }

/* Controlos */
.ar-dock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: ar-fade 0.6s var(--ease) 0.16s both;
}
.ar-tip {
  margin: 0;
  max-width: 320px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  color: #dcdce2;
}
.ar-launch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  justify-content: center;
  padding: 17px 30px;
  border: none;
  border-radius: 999px;
  background: var(--grad-brand);
  color: #1a1509;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 16px 36px -8px rgba(254, 163, 0, 0.72);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), opacity 0.22s var(--ease);
}
.ar-launch__ic { display: grid; place-items: center; }
.ar-launch__ic svg { width: 22px; height: 22px; }
.ar-launch:hover { transform: translateY(-2px); box-shadow: 0 20px 42px -8px rgba(254, 163, 0, 0.85); }
.ar-launch:active { transform: translateY(0) scale(0.99); }
.ar-launch:disabled { opacity: 0.5; cursor: default; box-shadow: none; transform: none; }
.ar-note {
  margin: 0;
  max-width: 340px;
  padding: 11px 15px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: #cfcfd6;
}
.ar-note[hidden] { display: none; }
.ar-back {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.ar-back:hover { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

@keyframes ar-fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Tablet / desktop: cartão emoldurado */
@media (min-width: 600px) {
  .stage { align-items: center; padding: 40px 20px; }
  .ar-page {
    min-height: min(920px, calc(100dvh - 80px));
    border-radius: 40px;
    box-shadow: 0 60px 130px -30px rgba(255, 160, 0, 0.4), 0 34px 70px -34px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.05);
  }
}
