/* ==========================================================================
   EDU FREITAS — LENTES DENTAIS | DESIGN SYSTEM & STYLESHEET
   Paleta: Cimento Queimado com Dourado Premium
   Padrão: Nível Agência Internacional (O COPY)
   ========================================================================== */

:root {
  /* Cores Base: Cimento Queimado */
  --bg-deep: #0c0d0f;
  --bg-cement-dark: #121417;
  --bg-cement-card: #181b20;
  --bg-cement-elevated: #20242b;
  --bg-glass: rgba(24, 27, 32, 0.72);
  --bg-glass-card: rgba(26, 30, 36, 0.85);

  /* Acentos: Ouro Nobre / Dourado Premium */
  --gold-primary: #d4af37;
  --gold-light: #f5df88;
  --gold-pale: #fbf5df;
  --gold-dark: #917521;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --gold-subtle: rgba(212, 175, 55, 0.12);
  --gold-border: rgba(212, 175, 55, 0.28);
  --gold-border-bright: rgba(245, 223, 136, 0.65);

  /* Textos & Contrastes */
  --text-primary: #f6f7f9;
  --text-secondary: #c2c6cf;
  --text-muted: #838894;
  --text-gold: #e5c567;

  /* Bordas & Sombras */
  --border-glass: rgba(255, 255, 255, 0.07);
  --shadow-subtle: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 20px 45px -15px rgba(0, 0, 0, 0.75);
  --shadow-gold: 0 12px 35px -8px rgba(212, 175, 55, 0.38);

  /* Tipografia */
  --font-serif: 'Cormorant Garamond', 'Cinzel', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max-width: 580px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 9999px;

  /* Transições suaves */
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset Universal & Acessibilidade */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden !important;
  background-color: var(--bg-deep);
}

body {
  position: relative;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 65%),
    radial-gradient(circle at 10% 40%, rgba(32, 36, 43, 0.7) 0%, transparent 50%),
    radial-gradient(circle at 90% 70%, rgba(26, 30, 36, 0.6) 0%, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden !important;
  line-height: 1.5;
  padding: 0;
}

/* Trate textura sutil de cimento queimado */
.cement-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Canvas 3D Three.js */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

/* Wrapper Geral Link-in-Bio */
.main-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 18px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ==========================================================================
   HERO PROFILE SECTION
   ========================================================================== */

.hero-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding-top: 10px;
}

/* Avatar Frame com Rim-Light Dourado */
.avatar-container {
  position: relative;
  width: 126px;
  height: 126px;
  margin: 0 auto;
}

.avatar-halo {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 180deg at 50% 50%, var(--gold-dark), var(--gold-primary), var(--gold-light), var(--gold-dark));
  filter: drop-shadow(0 0 16px var(--gold-glow));
  animation: rotateGlow 12s linear infinite;
  opacity: 0.9;
}

.avatar-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-cement-dark);
  padding: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  display: block;
}

/* Badge Flutuante de Status / Presença */
.badge-status-dot {
  position: absolute;
  bottom: 4px;
  right: 6px;
  width: 18px;
  height: 18px;
  background: #101216;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--gold-border);
}

.badge-status-dot::after {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #38d39f;
  box-shadow: 0 0 8px #38d39f;
}

/* Textos do Perfil */
.profile-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.name-badge-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-name {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 6vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.15;
}

.verified-seal {
  width: 20px;
  height: 20px;
  color: var(--gold-primary);
  flex-shrink: 0;
}

.profile-title {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-tagline {
  font-size: 0.86rem;
  color: var(--text-secondary);
  max-width: 380px;
  line-height: 1.45;
  margin-top: 2px;
}

/* Pills de Contexto Oficial (500 sorrisos / RJ • Cabo Frio) */
.profile-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
  width: 100%;
}

.info-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-cement-card);
  border: 1px solid var(--border-glass);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-subtle);
  backdrop-filter: blur(8px);
}

.info-pill.gold-accent {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--gold-border);
  color: var(--gold-pale);
}

.pill-icon {
  width: 14px;
  height: 14px;
  stroke: var(--gold-primary);
  flex-shrink: 0;
}

/* ==========================================================================
   PRIMARY CTA: BOTÃO DE IMPACTO COM SHINY SWEEP GLOW
   ========================================================================== */

.primary-cta-container {
  width: 100%;
  margin-top: 6px;
}

.btn-cta-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(135deg, #e5c158 0%, #d4af37 50%, #b88d22 100%);
  color: #0c0d0f;
  text-decoration: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-gold), 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
  overflow: hidden;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: none;
}

/* Efeito Shiny Sweep Glow */
.btn-cta-main::before {
  content: '';
  position: absolute;
  top: -50%;
  bottom: -50%;
  left: -80%;
  width: 60%;
  background: linear-gradient(
    90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.45) 50%, 
    transparent 100%
  );
  transform: skewX(-24deg);
  animation: shinySweep 4.2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  pointer-events: none;
}

.btn-cta-main:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 16px 40px -5px rgba(212, 175, 55, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
}

.btn-cta-main:active {
  transform: translateY(0) scale(0.99);
}

.cta-left {
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 1;
}

.cta-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(12, 13, 15, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.cta-icon-box svg {
  width: 22px;
  height: 22px;
}

.cta-text-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.cta-headline {
  font-family: var(--font-sans);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #0c0d0f;
  line-height: 1.2;
}

.cta-subtext {
  font-size: 0.78rem;
  font-weight: 600;
  color: #2e2609;
  letter-spacing: 0.02em;
}

.cta-arrow {
  width: 24px;
  height: 24px;
  stroke: #0c0d0f;
  stroke-width: 2.5;
  transition: transform 0.3s ease;
  z-index: 1;
}

.btn-cta-main:hover .cta-arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   BEFORE & AFTER INTERACTIVE SLIDER (TRANSFORMAÇÃO DENTAL)
   ========================================================================== */

.comparison-card {
  width: 100%;
  background: var(--bg-cement-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.comparison-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border-bright), transparent);
}

.comparison-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 6px var(--gold-primary);
}

.comparison-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.comparison-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Container do Comparador */
.before-after-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3.4;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  background: #000;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

/* Camadas de Imagem */
.ba-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ba-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
}

/* Camada DEPOIS (fundo total) */
.ba-after {
  z-index: 1;
}

/* Camada ANTES (recorte dinâmico via clipe ou largura) */
.ba-before {
  z-index: 2;
  width: 50%;
  border-right: 2px solid var(--gold-light);
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.6);
}

.ba-before .ba-image {
  /* Largura total correspondente ao container pai para alinhamento 1:1 */
  width: 100%;
  height: 100%;
  max-width: none;
}

/* Badges de Legenda (Antes e Depois) */
.ba-label {
  position: absolute;
  top: 14px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.label-before {
  left: 14px;
  background: rgba(18, 20, 24, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
}

.label-after {
  right: 14px;
  background: rgba(212, 175, 55, 0.22);
  border: 1px solid var(--gold-border-bright);
  color: var(--gold-light);
}

/* Linha Divisória e Alça de Toque */
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 44px;
  margin-left: -22px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  pointer-events: none; /* Pointer events manipulados pelo wrapper */
}

.ba-knob {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  box-shadow: 0 0 20px var(--gold-glow), 0 4px 12px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0c0d0f;
  border: 2px solid #fff;
  transition: transform 0.18s ease;
}

.ba-handle:hover .ba-knob,
.before-after-wrapper:active .ba-knob {
  transform: scale(1.1);
}

.knob-arrows {
  width: 20px;
  height: 20px;
  stroke: #0c0d0f;
  stroke-width: 2.2;
}

/* Input Range Oculto para Acessibilidade por Teclado */
.ba-slider-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 12;
  margin: 0;
}

.ba-slider-input:focus-visible + .ba-handle .ba-knob {
  outline: 3px solid var(--gold-light);
  outline-offset: 4px;
}

/* ==========================================================================
   INTERACTIVE CARDS & OFFICIAL CHANNELS (WHATSAPP & INSTAGRAM)
   ========================================================================== */

.channels-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  position: relative;
  z-index: 5;
}

.channel-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-cement-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow-subtle);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.channel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: transparent;
  transition: var(--transition-smooth);
}

.channel-card:hover {
  transform: translateY(-2px) translateZ(0);
  border-color: var(--gold-border);
  background: var(--bg-cement-elevated);
  box-shadow: var(--shadow-card);
}

.channel-card.channel-whatsapp:hover::before {
  background: #25d366;
  box-shadow: 0 0 12px #25d366;
}

.channel-card.channel-instagram:hover::before {
  background: #e1306c;
  box-shadow: 0 0 12px #e1306c;
}

.channel-info-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.channel-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-cement-dark);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.channel-icon-wrap svg {
  width: 22px;
  height: 22px;
  display: block;
}

.channel-whatsapp .channel-icon-wrap {
  color: #25d366;
}

.channel-instagram .channel-icon-wrap {
  color: #f56040;
}

.channel-card:hover .channel-icon-wrap {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.channel-texts {
  display: flex;
  flex-direction: column;
}

.channel-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.channel-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.channel-arrow-wrap {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: transform 0.25s ease, color 0.25s ease;
}

.channel-arrow-wrap svg {
  width: 20px;
  height: 20px;
}

.channel-card:hover .channel-arrow-wrap {
  transform: translateX(3px);
  color: var(--gold-light);
}

/* ==========================================================================
   LOCATION & INFORMATION CALLOUT
   ========================================================================== */

.location-callout {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: rgba(24, 27, 32, 0.7);
  border: 1px dashed var(--gold-border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 1;
  visibility: visible;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  position: relative;
  z-index: 5;
}

.loc-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
  flex-shrink: 0;
}

.loc-icon-box svg {
  width: 20px;
  height: 20px;
}

.loc-texts {
  display: flex;
  flex-direction: column;
}

.loc-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold-light);
}

.loc-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   FOOTER DE PRESTÍGIO
   ========================================================================== */

.site-footer {
  text-align: center;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border-glass);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--gold-primary);
  text-transform: uppercase;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */

@keyframes rotateGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes shinySweep {
  0% { left: -80%; }
  30%, 100% { left: 160%; }
}

/* ==========================================================================
   ACESSIBILIDADE: PREFERS-REDUCED-MOTION
   ========================================================================== */

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

  .btn-cta-main::before {
    display: none;
  }
}

/* ==========================================================================
   BREAKPOINTS RESPONSIVOS (320px até 1920px)
   ========================================================================== */

@media (max-width: 380px) {
  .main-wrapper {
    padding: 24px 12px 48px;
    gap: 22px;
  }

  .avatar-container {
    width: 108px;
    height: 108px;
  }

  .profile-name {
    font-size: 1.7rem;
  }

  .btn-cta-main {
    padding: 15px 16px;
  }

  .cta-headline {
    font-size: 0.98rem;
  }

  .comparison-card {
    padding: 16px;
  }
}

@media (min-width: 768px) {
  .main-wrapper {
    padding-top: 48px;
    padding-bottom: 80px;
    gap: 32px;
  }

  .avatar-container {
    width: 138px;
    height: 138px;
  }

  .comparison-card {
    padding: 28px;
  }

  .comparison-title {
    font-size: 1.65rem;
  }
}
