/**
 * REIDASLP - DESIGN SYSTEM
 * Arquitetura de estilos com variáveis dinâmicas.
 */

:root {
  /* Fallbacks - Sobrescritos pelo JS via config.js */
  --bg-base: #050505;
  --bg-surface: #0F0F0F;
  --bg-elevated: rgba(255,255,255,0.03);
  --accent: #E5C07B;
  --accent-dim: rgba(229,192,123,0.10);
  --accent-glow: rgba(229,192,123,0.20);
  --text-high: #F5F5F5;
  --text-mid: #A3A3A3;
  --text-low: #666666;
  --border-subtle: rgba(255,255,255,0.08);
  --border-accent: rgba(229,192,123,0.25);
  --gradient-brand: linear-gradient(135deg, #E5C07B, #B89045);
  
  /* Tipografia */
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'DM Sans', sans-serif;

  /* Espaçamento */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 100px;
  --space-3xl: 160px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Transições e Curvas de Bezier de alto padrão */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 180ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
}

/* ══ RESET & BASE ══ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-mid);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.display-font { font-family: var(--font-display); }
.text-high { color: var(--text-high); }
.text-mid { color: var(--text-mid); }
.text-low { color: var(--text-low); }
.bg-surface { background-color: var(--bg-surface); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.text-center { text-align: center; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

.block { display: block; }

/* ══ TYPOGRAPHY ══ */
h1, h2, h3, .section-title {
  font-family: var(--font-display);
  color: var(--text-high);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: var(--space-md);
}

.section-desc {
  max-width: 68ch;
  margin: 0 auto;
  font-size: clamp(1rem, 2vw, 1.125rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 16px;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

/* ══ BUTTONS ══ */
a { text-decoration: none; color: inherit; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  border: 1px solid transparent;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--gradient-brand);
  color: var(--bg-base); /* Fundo escuro precisa de texto contrastante, no caso dourado pede fundo claro ou preto, ajustado dinamicamente via JS se necessário. Para ouro, texto preto/base é luxo */
  font-weight: 700;
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(229,192,123,0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-high);
  border-color: var(--border-subtle);
}

.btn-ghost:hover {
  border-color: var(--border-accent);
  background: var(--accent-dim);
}

/* ══ PRELOADER ══ */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.preloader-img {
  width: 120px;
  height: auto;
  opacity: 0;
  transform: scale(0.9);
  animation: logoFadeIn 1s var(--ease-spring) forwards;
}

.preloader-bar-wrap {
  width: 150px;
  height: 2px;
  background: var(--border-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.preloader-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width linear;
}

@keyframes logoFadeIn {
  to { opacity: 1; transform: scale(1); }
}

/* ══ CUSTOM CURSOR ══ */
@media (hover: hover) and (pointer: fine) {
  #cursor-dot, #cursor-ring {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    border-radius: 50%;
  }
  
  #cursor-dot {
    width: 6px; height: 6px;
    background: var(--accent);
  }
  
  #cursor-ring {
    width: 36px; height: 36px;
    border: 1.5px solid rgba(229, 192, 123, 0.45);
    transition: width var(--duration-fast) var(--ease-out),
                height var(--duration-fast) var(--ease-out),
                background var(--duration-fast) var(--ease-out);
  }

  body.is-hovering #cursor-ring {
    width: 54px; height: 54px;
    background: var(--accent-dim);
    border-color: transparent;
  }
}

/* ══ HEADER & NAV ══ */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: all var(--duration-base) var(--ease-out);
}

#header.scrolled {
  padding: 12px 0;
  background: rgba(5, 5, 5, 0.85); /* fallback */
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-img {
  height: 32px;
  width: auto;
}

.desktop-nav {
  display: flex;
  gap: var(--space-lg);
}

.desktop-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: color var(--duration-fast);
}

.desktop-nav a:hover { color: var(--text-high); }

.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px; height: 20px;
  position: relative;
  z-index: 101;
}

.burger .line {
  position: absolute; left: 0;
  height: 2px; width: 100%;
  background: var(--text-high);
  transition: all var(--duration-base) var(--ease-out);
}

.burger .line:nth-child(1) { top: 0; }
.burger .line:nth-child(2) { top: 50%; transform: translateY(-50%); }
.burger .line:nth-child(3) { bottom: 0; }

.burger.active .line:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.burger.active .line:nth-child(2) { opacity: 0; }
.burger.active .line:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg-surface);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-base) var(--ease-out);
}

.mobile-menu.active {
  opacity: 1; visibility: visible;
}

.mobile-menu nav {
  display: flex; flex-direction: column;
  gap: var(--space-md); text-align: center;
}

.mobile-link {
  font-size: 1.5rem; font-family: var(--font-display);
  color: var(--text-high);
}

@media (max-width: 768px) {
  .desktop-nav, .btn-nav { display: none; }
  .burger { display: block; }
}

/* ══ HERO SECTION ══ */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  overflow: hidden;
  background-image: var(--gradient-hero-bg);
}

#topo-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

.hero-grid-bg {
  position: absolute; inset: 0; z-index: 1;
  background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 0%, transparent 100%);
  pointer-events: none;
}

.hero-orb {
  position: absolute; border-radius: 50%;
  filter: blur(100px); pointer-events: none; z-index: 1;
  background: var(--accent); opacity: 0.15;
}
.orb-1 { width: 400px; height: 400px; top: -100px; left: -100px; animation: float 12s infinite ease-in-out; }
.orb-2 { width: 300px; height: 300px; bottom: 10%; right: -50px; animation: float 15s infinite reverse ease-in-out; }

.hero-content {
  position: relative; z-index: 10;
  max-width: 800px;
}

.dot-blink {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: blink 1.5s infinite;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1.0;
  margin-bottom: var(--space-md);
}

.hero-title em {
  font-style: italic; color: var(--accent);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-mid);
  max-width: 52ch; margin: 0 auto var(--space-lg);
}

.hero-actions {
  display: flex; gap: var(--space-sm);
  justify-content: center; align-items: center;
  margin-bottom: var(--space-md);
}

@media (max-width: 600px) {
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
}

.social-proof {
  font-size: 0.85rem; color: var(--text-low);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.social-proof .icon { color: var(--accent); font-size: 1.1rem; }

.scroll-indicator {
  position: absolute; bottom: 40px; left: 50%;
  transform: translateX(-50%); z-index: 10;
}

.mouse {
  width: 24px; height: 36px;
  border: 2px solid var(--border-subtle);
  border-radius: 12px; display: flex; justify-content: center;
}

.wheel {
  width: 4px; height: 6px; background: var(--text-low);
  border-radius: 2px; margin-top: 6px;
  animation: scrollWheel 2s infinite var(--ease-out);
}

/* ══ STATS BAND ══ */
#stats {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-lg) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  text-align: center;
}

.stat-item {
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: ''; position: absolute;
  right: -12px; top: 10%; height: 80%; width: 1px;
  background: var(--border-subtle);
}

@media (max-width: 768px) {
  .stat-item:not(:last-child)::after { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

.stat-val {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem; color: var(--text-low);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-top: 4px;
}

/* ══ SECTIONS LAYOUT ══ */
.section-padding { padding: clamp(100px, 12vw, 160px) 0; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-md);
}

/* ══ ABOUT / IMAGE ══ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
}

.about-image-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.about-img {
  width: 100%; height: auto;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
}

.about-badge {
  position: absolute; bottom: 20px; right: 20px;
  width: 60px; height: 60px;
  background: rgba(5,5,5,0.7);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--accent);
}

/* ══ SERVICES / GLASSMORPHISM CARDS ══ */
.card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  overflow: hidden;
  transition: transform var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Spotlight Effect */
.card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(800px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.06), transparent 40%);
  opacity: 0; transition: opacity var(--duration-base);
  pointer-events: none; z-index: 0;
}
.card:hover::before { opacity: 1; }

.card:hover {
  transform: translateY(-8px);
  border-color: var(--border-accent);
}

.card-img-wrap {
  width: 100%; height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden; margin-bottom: var(--space-md);
  position: relative; z-index: 1;
}

.card-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.card:hover .card-img-wrap img { transform: scale(1.05); }

.card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: var(--space-sm); position: relative; z-index: 1;
}

.card-icon { font-size: 2rem; color: var(--accent); }
.card-tag {
  font-size: 0.75rem; padding: 4px 12px;
  background: var(--accent-dim); border: 1px solid var(--border-accent);
  border-radius: var(--radius-pill); color: var(--text-high);
}

.card-title {
  font-size: 1.5rem; font-family: var(--font-display);
  color: var(--text-high); margin-bottom: var(--space-xs);
  position: relative; z-index: 1;
}

.card-desc {
  font-size: 0.95rem; color: var(--text-mid);
  position: relative; z-index: 1;
}

/* ══ TESTIMONIALS ══ */
.testimonial-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
}

.quote-mark {
  position: absolute; top: 10px; right: 20px;
  font-family: var(--font-display);
  font-size: 6rem; color: var(--accent); opacity: 0.1;
  line-height: 1; pointer-events: none;
}

.stars { color: var(--accent); margin-bottom: var(--space-md); letter-spacing: 2px;}

.testimonial-quote {
  font-size: 1.125rem; font-style: italic;
  color: var(--text-high); line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.author-info { display: flex; align-items: center; gap: 16px; }
.author-avatar {
  width: 50px; height: 50px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border-accent);
}
.author-name { font-weight: 700; color: var(--text-high); display: block; }
.author-role { font-size: 0.85rem; color: var(--text-low); }

/* ══ MAP ══ */
.map-wrapper {
  border-radius: var(--radius-xl);
  overflow: hidden; border: 1px solid var(--border-subtle);
}

/* ══ CTA BAND ══ */
.cta-box {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-base));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: clamp(40px, 6vw, 80px);
  display: flex; justify-content: space-between; align-items: center;
  position: relative; overflow: hidden;
}

.cta-orb {
  position: absolute; right: -100px; top: -100px;
  width: 400px; height: 400px; border-radius: 50%;
  background: var(--accent); filter: blur(120px); opacity: 0.1;
  pointer-events: none;
}

.cta-content { max-width: 500px; position: relative; z-index: 1; }
.cta-content h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 8px; }

@media (max-width: 768px) {
  .cta-box { flex-direction: column; text-align: center; gap: 32px; }
}

.arrow { display: inline-block; transition: transform var(--duration-fast); }
.btn-primary:hover .arrow { transform: translateX(4px); }

/* ══ FOOTER ══ */
#footer { background: var(--bg-surface); border-top: 1px solid var(--border-subtle); padding: var(--space-xl) 0 var(--space-md); }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: var(--space-xl); }
.footer-brand p { max-width: 300px; }
.social-link { font-weight: 500; color: var(--text-mid); transition: color var(--duration-fast); }
.social-link:hover { color: var(--accent); }

.divider { height: 1px; background: var(--border-subtle); margin-bottom: var(--space-md); }
.footer-bottom { display: flex; justify-content: space-between; font-size: 0.85rem; }

@media (max-width: 600px) {
  .footer-grid { flex-direction: column; align-items: flex-start; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 16px; }
}

/* ══ WHATSAPP FAB ══ */
#whatsapp-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 200;
  background: #25D366; color: #FFF; border-radius: var(--radius-pill);
  display: flex; align-items: center; gap: 8px;
  padding: 12px 20px; box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  overflow: hidden; max-width: 200px;
  transition: all var(--duration-base) var(--ease-spring);
}

#whatsapp-fab:hover { transform: translateY(-4px) scale(1.05); }

.fab-text { white-space: nowrap; font-weight: 600; font-size: 0.95rem; transition: opacity var(--duration-fast); }

#whatsapp-fab.collapsed {
  max-width: 48px; padding: 12px; border-radius: 50%;
}
#whatsapp-fab.collapsed .fab-text { opacity: 0; width: 0; }

.pulse-ring {
  position: absolute; inset: 0; border-radius: var(--radius-pill);
  border: 2px solid #25D366; animation: pulse 2s infinite; pointer-events: none;
}

#whatsapp-fab.collapsed .pulse-ring { border-radius: 50%; }

/* ══ ANIMATIONS ══ */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes float { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-20px) scale(1.05); } }
@keyframes scrollWheel { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.4); opacity: 0; } }

/* Scroll Reveal Classes */
.sr {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
  will-change: opacity, transform;
}
.sr.visible { opacity: 1; transform: none; }