/* ==============================================================
   MAESTROS DE LA CONSTRUCCIÓN - ESTÉTICA PREMIUM CÁLIDA
   Modo Claro Elegante (Warm Sand / Alabaster) & Modo Oscuro Opcional
   ============================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@600;700;800&display=swap');

:root {
  /* MODO CLARO CÁLIDO & SERENO (CERO DESLUMBRAMIENTOS) */
  --bg-deep: #f5f4ef;          /* Tono arena/lino natural, suave y acogedor */
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --text-main: #1c1917;         /* Tono piedra oscura de máximo confort */
  --text-muted: #57534e;        /* Gris cálido legible */
  --border-subtle: #e7e5df;
  --border-card: #e5e3dc;
  --border-highlight: rgba(217, 119, 6, 0.45);
  --card-shadow: 0 4px 20px -2px rgba(28, 25, 23, 0.05), 0 2px 6px -1px rgba(28, 25, 23, 0.03);
  --card-hover-shadow: 0 16px 32px -8px rgba(217, 119, 6, 0.14);

  --primary-gradient: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  --nav-bg: rgba(245, 244, 239, 0.92);
  --footer-bg: #1c1917;
  --footer-text: #a8a29e;
}

/* MODO OSCURO (CUANDO .dark ESTÁ ACTIVO EN <html>) */
html.dark {
  --bg-deep: #080914;
  --bg-surface: #0e1124;
  --bg-card: rgba(17, 21, 44, 0.85);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(245, 158, 11, 0.4);
  --card-shadow: none;
  --card-hover-shadow: 0 20px 40px -15px rgba(245, 158, 11, 0.2);

  --nav-bg: rgba(8, 9, 20, 0.85);
  --footer-bg: #05060d;
  --footer-text: #64748b;
}

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

html.dark body {
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 10% 30%, rgba(168, 85, 247, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 90% 70%, rgba(56, 189, 248, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
}

h1, h2, h3, .font-heading {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.035em;
}

/* Dot grid pattern sutil */
.bg-mesh-dots {
  background-size: 28px 28px;
  background-image: radial-gradient(circle, rgba(28, 25, 23, 0.05) 1px, transparent 1px);
}
html.dark .bg-mesh-dots {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
}

/* Luces ambientales cálidas */
.ambient-glow-amber {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.10) 0%, rgba(245, 158, 11, 0) 70%);
  filter: blur(60px);
  pointer-events: none;
}

.ambient-glow-purple {
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.06) 0%, rgba(168, 85, 247, 0) 70%);
  filter: blur(60px);
  pointer-events: none;
}

/* Gradientes de texto */
.text-gradient-vibrant {
  background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #ea580c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
html.dark .text-gradient-vibrant {
  background: linear-gradient(135deg, #ffffff 15%, #fcd34d 45%, #f59e0b 70%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-purple-cyan {
  background: linear-gradient(135deg, #0369a1 0%, #4f46e5 50%, #7e22ce 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
html.dark .text-gradient-purple-cyan {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Bento Card Style */
.bento-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: 1.25rem;
  box-shadow: var(--card-shadow);
  color: var(--text-main);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 119, 6, 0.5);
  box-shadow: var(--card-hover-shadow);
}

/* REGLAS CLAVE MODO CLARO: Contraste perfecto para títulos y textos */
html:not(.dark) h1 {
  color: #1c1917 !important;
}
html:not(.dark) h1 span.text-gradient-vibrant {
  background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #ea580c 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

html:not(.dark) .bento-card h2,
html:not(.dark) .bento-card h3,
html:not(.dark) .bento-card h4,
html:not(.dark) .bento-card strong,
html:not(.dark) header h1,
html:not(.dark) header span.text-white,
html:not(.dark) main h2,
html:not(.dark) main h3,
html:not(.dark) main h4 {
  color: #1c1917 !important;
}

html:not(.dark) p,
html:not(.dark) .bento-card p,
html:not(.dark) main p {
  color: #57534e !important;
}

html:not(.dark) strong.text-white {
  color: #1c1917 !important;
}

html:not(.dark) .border-white\/10,
html:not(.dark) .border-white\/5 {
  border-color: #e5e3dc !important;
}

html:not(.dark) .bg-white\/5,
html:not(.dark) .bg-white\/10 {
  background-color: #eae7df !important;
  color: #1c1917 !important;
  border-color: #d6d3cb !important;
}

html:not(.dark) .bg-\[\#10142c\] {
  background-color: #ffffff !important;
  color: #1c1917 !important;
  border-color: #d6d3cb !important;
}

html:not(.dark) .bg-\[\#0a0c1a\],
html:not(.dark) .bg-\[\#080914\] {
  background-color: #ece9e2 !important;
}

html:not(.dark) .bg-\[\#05060d\] {
  background-color: #1c1917 !important;
  color: #a8a29e !important;
}

html:not(.dark) .bg-\[\#05060d\] span.text-white,
html:not(.dark) footer .text-white {
  color: #ffffff !important;
}

/* Icon Containers con Neon Glow */
.bento-icon-amber {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #b45309;
}
html.dark .bento-icon-amber {
  color: #fbbf24;
}

.bento-icon-cyan {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #0369a1;
}
html.dark .bento-icon-cyan {
  color: #38bdf8;
}

.bento-icon-purple {
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #7e22ce;
}
html.dark .bento-icon-purple {
  color: #c084fc;
}

.bento-icon-emerald {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #047857;
}
html.dark .bento-icon-emerald {
  color: #34d399;
}

/* Glass Navbar espaciosa */
.nav-spacious {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* Botón llamativo tipo EchoScribe */
.btn-cta-vibrant {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.4);
  transition: all 0.25s ease;
}

.btn-cta-vibrant:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -5px rgba(245, 158, 11, 0.55);
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
}

/* Pill badge superior */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  background: #edeae2;
  border: 1px solid #d6d3cb;
  color: #44403c;
}
html.dark .pill-badge {
  background: rgba(30, 36, 70, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

/* Before / After Slider Perfeccionado */
.ba-container {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  user-select: none;
  cursor: ew-resize;
}

.ba-before {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  overflow: hidden;
  z-index: 10;
}

.ba-before img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
}

.ba-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background-color: #ffffff;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
  z-index: 20;
  transform: translateX(-50%);
  pointer-events: none;
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: #1c1917;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  pointer-events: auto;
  cursor: grab;
}
.ba-handle:active {
  cursor: grabbing;
}

/* Range input */
input[type="range"] {
  accent-color: #f59e0b;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: #d6d3cb;
  border-radius: 4px;
}
html.dark ::-webkit-scrollbar-thumb {
  background: #1e2446;
}
::-webkit-scrollbar-thumb:hover {
  background: #f59e0b;
}
