/* ══ DESIGN SYSTEM TOKENS ══ */
:root {
  --bg-base: #FDFDFD;
  --bg-surface: #F5F5F7;
  --bg-elevated: rgba(0,0,0,0.02);
  --accent: #212121;
  --accent-dim: rgba(33,33,33,0.08);
  --accent-glow: rgba(33,33,33,0.15);
  --text-high: #111111;
  --text-mid: #555555;
  --text-low: #888888;
  --border-subtle: rgba(0,0,0,0.08);
  --border-accent: rgba(33,33,33,0.20);
  --gradient-brand: linear-gradient(135deg, #212121, #4A4A4A);
  
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 100px;
  --space-3xl: 160px;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  --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;
}

a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
img { max-width: 100%; display: block; }
.d-block { display: block; }
.mt-4 { margin-top: var(--space-md); }

/* ══ TYPOGRAPHY ══ */
h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
  color: var(--text-high);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

/* ══ PRELOADER ══ */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-base);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}
.preloader-content {
  position: relative; width: 100px; height: 100px;
  display: flex; align-items: center; justify-content: center;
}
.preloader-ring {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.preloader-ring circle {
  fill: none; stroke: var(--accent); stroke-width: 2;
  stroke-dasharray: 300; stroke-dashoffset: 300;
  animation: drawRing 1.4s var(--ease-out) forwards;
}
.preloader-logo {
  width: 50px; opacity: 0; transform: scale(0.9);
  animation: logoReveal 0.6s 1s var(--ease-spring) forwards;
}
.preloader-bar {
  width: 200px; height: 2px; background: var(--border-subtle);
  margin-top: 40px; border-radius: var(--radius-pill); overflow: hidden;
}
.preloader-progress {
  height: 100%; width: 0%; background: var(--accent);
  transition: width linear;
}
@keyframes drawRing { to { stroke-dashoffset: 0; } }
@keyframes logoReveal { to { opacity: 1; transform: scale(1); } }

/* ══ CUSTOM CURSOR ══ */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  #cursor-dot {
    position: fixed; width: 5px; height: 5px; background: var(--accent);
    border-radius: 50%; pointer-events: none; z-index: 10000;
    transform: translate(-50%, -50%);
  }
  #cursor-ring {
    position: fixed; width: 32px; height: 32px;
    border: 1.5px solid rgba(33,33,33,0.45); border-radius: 50%;
    pointer-events: none; z-index: 9999; transform: translate(-50%, -50%);
    transition: width var(--duration-fast), height var(--duration-fast), background var(--duration-fast);
  }
  body.is-hovering #cursor-ring {
    width: 48px; height: 48px; background: var(--accent-dim); border-color: transparent;
  }
}

/* ══ HEADER & NAV ══ */
#main-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  padding: 24px 0; transition: all var(--duration-base) var(--ease-out);
}
#main-header.scrolled {
  padding: 16px 0; background: rgba(253,253,253,0.85); /* fallback light */
  backdrop-filter: blur(24px); border-bottom: 1px solid var(--border-subtle);
}
.header-container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.header-logo { height: 28px; object-fit: contain; }
.desktop-nav { display: flex; gap: 32px; align-items: center; }
.desktop-nav a { font-size: 0.875rem; font-weight: 500; transition: color var(--duration-fast); }
.desktop-nav a:hover { color: var(--text-high); }
.btn-nav {
  padding: 10px 24px; border: 1px solid var(--border-accent);
  border-radius: var(--radius-pill); font-size: 0.875rem; font-weight: 600;
  transition: all var(--duration-fast);
}
.btn-nav:hover { background: var(--accent-dim); }

.burger-menu { display: none; width: 32px; height: 24px; position: relative; z-index: 201; }
.burger-menu span {
  position: absolute; width: 100%; height: 2px; background: var(--text-high);
  left: 0; transition: all var(--duration-base);
}
.burger-menu span:nth-child(1) { top: 0; }
.burger-menu span:nth-child(2) { top: 11px; }
.burger-menu span:nth-child(3) { bottom: 0; }
.burger-menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.burger-menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger-menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

.mobile-menu-overlay {
  position: fixed; inset: 0; background: var(--bg-base); z-index: 200;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity var(--duration-base);
}
.mobile-menu-overlay.active { opacity: 1; pointer-events: all; }
.mobile-nav { display: flex; flex-direction: column; gap: 32px; text-align: center; }
.mobile-nav a { font-family: var(--font-display); font-size: 2rem; color: var(--text-high); }

@media (max-width: 768px) {
  .desktop-nav, .btn-nav { display: none; }
  .burger-menu { display: block; }
}

/* ══ BUTTONS ══ */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--radius-pill); font-weight: 600; font-size: 1rem;
  transition: all var(--duration-base) var(--ease-out);
}
.btn-primary {
  background: var(--gradient-brand); color: #FFF;
  box-shadow: 0 4px 28px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 36px var(--accent-glow); }
.btn-secondary { border: 1px solid var(--border-subtle); color: var(--text-high); }
.btn-secondary:hover { border-color: var(--border-accent); background: var(--bg-surface); }
.btn-large { padding: 18px 48px; font-size: 1.125rem; }

/* ══ HERO SECTION ══ */
#hero {
  position: relative; min-height: 100svh;
  display: grid; place-items: center; overflow: hidden;
  padding-top: 80px; text-align: center;
}
#topo-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.8; z-index: 0; pointer-events: none; }
.hero-grid-bg {
  position: absolute; inset: 0;
  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 at center, black 0%, transparent 70%); z-index: 0;
}
.hero-orb {
  position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: var(--accent); opacity: 0.05; filter: blur(100px); z-index: 0; pointer-events: none;
}
.orb-1 { top: -100px; left: -100px; animation: float 12s infinite alternate ease-in-out; }
.orb-2 { bottom: 10%; right: -50px; animation: float 15s infinite alternate-reverse ease-in-out; }
@keyframes float { 100% { transform: translateY(40px) translateX(40px); } }

.hero-content { position: relative; z-index: 10; max-width: 900px; padding: 0 24px; }
.eyebrow-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px;
  background: var(--accent-dim); border: 1px solid var(--border-accent);
  border-radius: var(--radius-pill); font-size: 0.72rem; text-transform: uppercase;
  font-weight: 700; letter-spacing: 0.04em; color: var(--text-high); margin-bottom: 32px;
}
.eyebrow-badge .dot {
  width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }

.hero-title { font-size: clamp(2.5rem, 6vw, 5.5rem); font-weight: 800; line-height: 1.0; margin-bottom: 24px; }
.hero-title em { color: var(--accent); font-style: italic; font-weight: 400; }
.hero-subtitle { font-size: clamp(1rem, 2vw, 1.25rem); max-width: 52ch; margin: 0 auto 48px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.social-proof { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-low); }
.social-proof svg { width: 16px; height: 16px; color: var(--accent); }

.scroll-indicator { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 10; }
.mouse { width: 24px; height: 36px; border: 2px solid var(--text-low); border-radius: 12px; position: relative; }
.wheel { width: 4px; height: 6px; background: var(--text-low); border-radius: 2px; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); animation: scrollWheel 2s infinite; }
@keyframes scrollWheel { 0% { transform: translate(-50%, 0); opacity: 1; } 100% { transform: translate(-50%, 12px); opacity: 0; } }

/* ══ UTILS ══ */
.section-padding { padding: clamp(80px, 12vw, 160px) 24px; }
.section-header { text-align: center; margin-bottom: var(--space-xl); }
.section-eyebrow { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); margin-bottom: 12px; font-weight: 700; }
.section-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }

/* ══ STATS ══ */
#stats { background: var(--bg-surface); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); padding: var(--space-xl) 24px; }
.stats-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-item { text-align: center; border-right: 1px solid var(--border-subtle); }
.stat-item:last-child { border-right: none; }
.stat-value { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; background: var(--gradient-brand); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.1; margin-bottom: 8px; }
.stat-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-low); font-weight: 600; }
@media (max-width: 768px) {
  .stats-container { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .stat-item:nth-child(2) { border-right: none; }
}

/* ══ SERVICES (GLASSMORPHISM CARDS) ══ */
.services-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-md); }
.service-card {
  position: relative; background: rgba(255,255,255,0.6); /* Glass light mode */
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  padding: 40px; overflow: hidden; transition: all var(--duration-base) var(--ease-out);
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  opacity: 0; transition: opacity var(--duration-base);
}
.service-card::after {
  content: ''; position: absolute; top: var(--my, 50%); left: var(--mx, 50%);
  width: 300px; height: 300px; background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  transform: translate(-50%, -50%); opacity: 0; pointer-events: none; transition: opacity var(--duration-base);
}
.service-card:hover { transform: translateY(-8px); border-color: var(--border-accent); box-shadow: 0 12px 40px rgba(0,0,0,0.03); }
.service-card:hover::before, .service-card:hover::after { opacity: 1; }

.service-img-wrapper { width: 100%; height: 200px; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 24px; position: relative; z-index: 2; }
.service-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.service-card:hover .service-img { transform: scale(1.05); }

.service-tag { display: inline-block; padding: 4px 12px; background: var(--accent-dim); border: 1px solid var(--border-accent); border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 700; color: var(--accent); margin-bottom: 16px; position: relative; z-index: 2; text-transform: uppercase; }
.service-title { font-size: 1.5rem; margin-bottom: 12px; position: relative; z-index: 2; }
.service-desc { font-size: 0.95rem; position: relative; z-index: 2; }

/* ══ ABOUT / PROFISSIONAL ══ */
.about-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); align-items: center; }
.about-image-wrapper { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/5; }
.about-image-wrapper::after { content:''; position: absolute; inset: 0; border: 1px solid rgba(0,0,0,0.05); border-radius: var(--radius-lg); pointer-events: none; }
.about-img { width: 100%; height: 100%; object-fit: cover; }
.about-content { padding-right: 40px; }
.about-bio { font-size: 1.1rem; color: var(--text-mid); margin-bottom: 32px; }
@media (max-width: 900px) {
  .about-container { grid-template-columns: 1fr; }
  .about-content { padding-right: 0; order: -1; text-align: center; }
  .about-content .section-eyebrow, .about-content .section-title { text-align: center; }
  .about-image-wrapper { max-width: 500px; margin: 0 auto; }
}

/* ══ TESTIMONIALS ══ */
.testimonials-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.testimonial-card { position: relative; padding: 40px; background: var(--bg-surface); border-radius: var(--radius-lg); border: 1px solid var(--border-subtle); display: flex; flex-direction: column; }
.testimonial-quote { font-family: var(--font-display); font-size: 1.1rem; font-style: italic; color: var(--text-high); line-height: 1.6; flex-grow: 1; margin-bottom: 32px; position: relative; z-index: 2; }
.testimonial-author { display: flex; align-items: center; gap: 16px; }
.author-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.author-info h4 { font-size: 1rem; margin-bottom: 2px; }
.author-info p { font-size: 0.8rem; color: var(--text-low); }
.stars { color: var(--accent); margin-bottom: 16px; font-size: 1.2rem; }

/* ══ CTA BAND ══ */
.cta-band-container { max-width: 1000px; margin: 0 auto; background: linear-gradient(135deg, var(--bg-surface) 0%, var(--accent-dim) 100%); border: 1px solid var(--border-accent); border-radius: var(--radius-xl); padding: 80px 48px; display: flex; justify-content: space-between; align-items: center; position: relative; overflow: hidden; }
.cta-band-orb { position: absolute; right: -100px; bottom: -100px; width: 300px; height: 300px; background: var(--accent); opacity: 0.08; filter: blur(80px); border-radius: 50%; }
.cta-band-title { font-size: clamp(2rem, 4vw, 3rem); max-width: 15ch; position: relative; z-index: 2; }
.cta-band-container .btn-primary { position: relative; z-index: 2; }
.cta-band-container .btn-primary svg { width: 20px; height: 20px; transition: transform var(--duration-fast); }
.cta-band-container .btn-primary:hover svg { transform: translateX(4px); }
@media (max-width: 768px) { .cta-band-container { flex-direction: column; text-align: center; gap: 32px; padding: 48px 24px; } }

/* ══ FOOTER ══ */
#main-footer { background: var(--bg-surface); border-top: 1px solid var(--border-subtle); padding: 80px 24px 24px; }
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 64px; }
.footer-logo { height: 32px; object-fit: contain; margin-bottom: 16px; }
.footer-tagline { font-size: 0.9rem; max-width: 300px; }
.footer-social a { display: flex; align-items: center; gap: 8px; font-weight: 600; transition: color var(--duration-fast); }
.footer-social a svg { width: 20px; height: 20px; }
.footer-social a:hover { color: var(--text-high); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 24px; border-top: 1px solid var(--border-subtle); display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-low); }
@media (max-width: 600px) { .footer-container { flex-direction: column; gap: 40px; } .footer-bottom { flex-direction: column; gap: 16px; text-align: center; } }

/* ══ WHATSAPP FAB ══ */
#whatsapp-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 200;
  display: flex; align-items: center; gap: 12px;
  background: #25D366; color: #FFF; padding: 14px 24px;
  border-radius: var(--radius-pill); box-shadow: 0 8px 24px rgba(37,211,102,0.3);
  transition: all var(--duration-base) var(--ease-spring);
  max-width: 260px; overflow: hidden;
}
.wpp-icon { width: 24px; height: 24px; flex-shrink: 0; }
.fab-label { font-weight: 600; font-size: 0.95rem; white-space: nowrap; transition: opacity var(--duration-fast); }
.pulse-ring {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 100%; height: 100%; border-radius: var(--radius-pill); border: 2px solid #25D366;
  animation: pulseWpp 2s infinite; pointer-events: none;
}
@keyframes pulseWpp { 0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; } 100% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; } }
#whatsapp-fab:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 12px 32px rgba(37,211,102,0.4); }
#whatsapp-fab.collapsed { max-width: 52px; padding: 14px; border-radius: 50%; }
#whatsapp-fab.collapsed .fab-label { opacity: 0; width: 0; }

/* ══ SCROLL REVEAL ══ */
.sr { opacity: 0; transform: translateY(24px); transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out); }
.sr.visible { opacity: 1; transform: none; }