:root[data-theme="dark"] {
  --bg-primary: #050505;
  --bg-secondary: #0b0b0b;
  --text-primary: #f5f5f5;
  --text-secondary: #a8a8a8;
  --accent: #2563EB;
  --accent-soft: rgba(37, 99, 235, 0.16);
  --border: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.18);
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --shadow-card: 0 20px 40px -28px rgba(0, 0, 0, 0.9);
  --radius: 0.5rem;
  --logo-dark: block;
  --logo-light: none;
}

:root[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --text-primary: #050505;
  --text-secondary: #525252;
  --accent: #2563EB;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --border: rgba(5, 5, 5, 0.12);
  --border-strong: rgba(5, 5, 5, 0.2);
  --surface: rgba(5, 5, 5, 0.02);
  --surface-hover: rgba(5, 5, 5, 0.05);
  --shadow-card: 0 20px 40px -30px rgba(5, 5, 5, 0.25);
  --radius: 0.5rem;
  --logo-dark: none;
  --logo-light: block;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container { width: min(90vw, 80rem); margin: 0 auto; padding: 0 1rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.875rem 1.75rem; border-radius: var(--radius); font-weight: 600; font-size: 1rem; line-height: 1; transition: all 0.2s ease; border: 1px solid transparent; cursor: pointer; min-height: 44px; white-space: nowrap; }
.btn-lg { padding: 1.125rem 2.25rem; font-size: clamp(1rem, 1.1vw, 1.125rem); }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: #ffffff; box-shadow: 0 10px 30px -12px var(--accent-soft); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-primary:focus-visible, .btn-ghost:focus-visible, .btn-whatsapp:focus-visible, .theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-ghost { background: transparent; border-color: var(--border); backdrop-filter: blur(8px) saturate(120%); }
.btn-ghost:hover { background: var(--surface); }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { filter: brightness(1.05); transform: translateY(-1px); }

.skip-link { position: absolute; top: -100%; left: 0; background: var(--accent); color: #ffffff; padding: 0.75rem 1rem; z-index: 9999; }
.skip-link:focus { top: 0; }

.header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: var(--bg-primary); opacity: 0.9; backdrop-filter: blur(12px) saturate(140%); border-bottom: 1px solid var(--border); transition: background 0.3s ease, border-color 0.3s ease; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; gap: 1rem; }
.logo { display: flex; align-items: center; }
.logo img { height: clamp(3rem, 3.5vw, 4rem); width: auto; }
.logo-dark { display: var(--logo-dark); }
.logo-light { display: var(--logo-light); }
.nav { display: flex; gap: clamp(1rem, 2vw, 2rem); align-items: center; }
.nav a { color: var(--text-secondary); font-weight: 500; font-size: 0.98rem; }
.nav a:hover { color: var(--text-primary); }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.nav-cta { display: none; }
@media (min-width: 48rem) { .nav-cta { display: inline-flex; } }

.theme-toggle { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.625rem 0.875rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text-primary); font-weight: 600; font-size: 0.9rem; min-height: 44px; cursor: pointer; transition: all 0.2s ease; }
.theme-toggle:hover { background: var(--surface-hover); }
.theme-icon { width: 18px; height: 18px; display: none; color: var(--text-primary); }
[data-theme="dark"] .theme-icon.sun { display: block; }
[data-theme="light"] .theme-icon.moon { display: block; }

.hero { min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: 6rem 0 2rem; position: relative; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at top, var(--accent-soft) 0%, var(--bg-primary) 70%); pointer-events: none; transition: background 0.3s ease; }
.hero-inner { text-align: center; position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: clamp(1.5rem, 3vw, 2.5rem); }
h1 { font-size: clamp(3rem, 8vw, 9rem); font-weight: 900; line-height: 0.95; letter-spacing: -0.03em; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
.lead { font-size: clamp(1.125rem, 2vw, 1.5rem); color: var(--text-secondary); max-width: 60ch; margin: 0 auto; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

.marquee { overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: linear-gradient(to bottom, var(--surface), var(--bg-primary)); padding: 1rem 0; position: relative; mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%); -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%); transition: background 0.3s ease, border-color 0.3s ease; }
.marquee-track { display: flex; gap: clamp(2rem, 4vw, 4rem); animation: marquee 40s linear infinite; will-change: transform; }
.marquee-track span { font-size: clamp(0.875rem, 1.5vw, 1.125rem); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; color: var(--text-secondary); padding: 0 0.5rem; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.services, .how, .contact { padding: clamp(4rem, 8vw, 8rem) 0; }
.services { background: linear-gradient(to bottom, var(--surface) 0%, var(--bg-primary) 100%); transition: background 0.3s ease; }
h2 { font-size: clamp(2.5rem, 6vw, 6rem); font-weight: 900; line-height: 0.98; letter-spacing: -0.03em; margin-bottom: clamp(2rem, 5vw, 4rem); }
.services-list, .how-list { display: flex; flex-direction: column; gap: 0; }
.service-item, .how-list li { display: grid; grid-template-columns: auto 1fr; gap: clamp(1rem, 2vw, 2rem); padding: clamp(1.25rem, 2vw, 2rem) 0; border-top: 1px solid var(--border); align-items: start; transition: border-color 0.3s ease; }
.service-item:last-child, .how-list li:last-child { border-bottom: 1px solid var(--border); }
.num { font-size: clamp(1rem, 1.5vw, 1.25rem); font-weight: 700; color: var(--accent); line-height: 1.2; padding-top: 0.25rem; }
.service-item h3, .how-list h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; margin-bottom: clamp(0.5rem, 1vw, 0.75rem); }
.service-item p, .how-list p { color: var(--text-secondary); font-size: clamp(1rem, 1.5vw, 1.125rem); max-width: 60ch; }

@media (min-width: 64rem) {
  .how-list { grid-template-columns: repeat(3, 1fr); }
  .how-list li { grid-template-columns: 1fr; gap: 1rem; border: 1px solid var(--border); padding: clamp(2rem, 3vw, 3rem); border-radius: calc(var(--radius) * 2); background: var(--surface); backdrop-filter: blur(8px) saturate(120%); box-shadow: var(--shadow-card); }
  .how-list li:last-child { border-bottom: 1px solid var(--border); }
}

.contact { background: radial-gradient(ellipse at bottom, var(--accent-soft) 0%, var(--bg-primary) 70%); transition: background 0.3s ease; }
.contact .lead { margin-bottom: clamp(2rem, 4vw, 3rem); text-align: left; }
.contact-grid { display: grid; gap: clamp(2rem, 4vw, 4rem); }
@media (min-width: 64rem) { .contact-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; } }

.form { display: flex; flex-direction: column; gap: clamp(1.25rem, 2vw, 1.5rem); padding: clamp(1.5rem, 3vw, 2.5rem); border: 1px solid var(--border); border-radius: calc(var(--radius) * 2); background: var(--surface); backdrop-filter: blur(10px) saturate(130%); box-shadow: var(--shadow-card); transition: background 0.3s ease, border-color 0.3s ease; }
.form-field { display: flex; flex-direction: column; gap: 0.5rem; }
label { font-weight: 600; font-size: 0.98rem; }
input, textarea { width: 100%; padding: 0.875rem 1rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-primary); color: var(--text-primary); font-size: 1rem; font-family: inherit; transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.3s ease; min-height: 44px; }
textarea { min-height: 140px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--text-secondary); opacity: 0.8; }
input:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.form-note { font-size: 0.95rem; color: var(--text-secondary); text-align: center; }

.contact-info { display: flex; flex-direction: column; gap: clamp(1.25rem, 2vw, 1.75rem); padding: clamp(1.5rem, 3vw, 2.5rem); border: 1px solid var(--border); border-radius: calc(var(--radius) * 2); background: var(--surface); backdrop-filter: blur(8px) saturate(120%); box-shadow: var(--shadow-card); height: fit-content; transition: background 0.3s ease, border-color 0.3s ease; }
.contact-info h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 800; letter-spacing: -0.02em; }
.contact-info ul { list-style: none; display: flex; flex-direction: column; gap: clamp(0.75rem, 1.5vw, 1rem); }
.contact-info li { color: var(--text-secondary); font-size: clamp(1rem, 1.2vw, 1.0625rem); }
.contact-info li strong { color: var(--text-primary); }
.contact-info a:not(.btn) { color: var(--accent); }
.contact-info a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

.footer { border-top: 1px solid var(--border); padding: clamp(1.5rem, 2vw, 2rem) 0; background: var(--surface); transition: background 0.3s ease, border-color 0.3s ease; }
.footer-inner { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem; text-align: center; color: var(--text-secondary); font-size: 0.98rem; }
@media (min-width: 48rem) { .footer-inner { flex-direction: row; text-align: left; } }
.footer-links a { color: var(--text-secondary); }
.footer-links a:hover { color: var(--text-primary); }

.js .fade-in { opacity: 0; transform: translateY(1.5rem); transition: opacity 0.8s ease, transform 0.8s ease; transition-delay: var(--delay, 0s); }
.js .fade-in.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .js .fade-in { opacity: 1; transform: none; transition: none; }
  .btn-primary:hover, .btn-whatsapp:hover { transform: none; }
}

.instagram {
  padding: clamp(4rem, 8vw, 8rem) 0;
}

.instagram .lead {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  text-align: left;
}

.ig-embed-wrapper {
  position: relative;
  width: 100%;
  max-width: min(92vw, 950px);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  overflow: hidden;
  box-shadow: 0 40px 60px -40px rgba(37, 99, 235, 0.25);
}

behold-widget {
  display: block;
  width: 100%;
  min-height: 240px;
}

.text-center {
  text-align: center;
}

/* Service cards */
.services-grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

@media (min-width: 48rem) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 80rem) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 1.5vw, 1rem);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  background: var(--surface);
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, var(--accent-soft), transparent 60%);
  pointer-events: none;
}

.service-card > * {
  position: relative;
  z-index: 1;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: 0 30px 60px -30px rgba(37, 99, 235, 0.45);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.service-card h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.service-card p {
  color: var(--text-secondary);
  font-size: clamp(0.98rem, 1.2vw, 1.0625rem);
}

.services-cta {
  display: flex;
  justify-content: center;
  text-align: center;
}

.btn-xl {
  padding: 1.25rem 2.75rem;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  font-weight: 800;
  border-radius: 999px;
  letter-spacing: -0.01em;
  gap: 0.75rem;
}

.btn-xl .arrow {
  transition: transform 0.2s ease;
  font-weight: 900;
}

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

/* Mobile nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

.hamburger {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav.open .nav-toggle .hamburger:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav.open .nav-toggle .hamburger:nth-child(2) {
  opacity: 0;
}

.nav.open .nav-toggle .hamburger:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-cta-mobile {
  display: none;
}

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
    order: 2;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px) saturate(140%);
    padding: 0.5rem 1rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    z-index: 900;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav a {
    padding: 0.9rem 0;
    border-top: 1px solid var(--border);
    font-size: 1rem;
  }

  .nav a:first-child {
    border-top: none;
  }

  .nav-cta-mobile {
    display: inline-flex;
    margin: 0.75rem 0;
    width: 100%;
    justify-content: center;
  }

  .header-actions {
    order: 3;
  }

  .nav-cta {
    display: none !important;
  }
}
