/* --- ROVIDEV STUDIO: ULTRA-MODERN THEME --- */

/* 1. VARIABLES & RESET */
:root {
  --bg-dark: #0b1220;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --primary: #4661e6;
  --neon-blue: #00f3ff;
  --neon-purple: #bc13fe;

  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 16px;

  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

a[href],
button:not(:disabled),
.btn,
.lang-switch-btn,
[role="button"],
summary,
select,
.menu-toggle,
.tilt-card,
label[for],
.cursor-pointer {
  cursor: pointer;
}

input[type="text"],
input[type="email"],
input[type="number"],
input:not([type]),
input[type="search"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="date"],
input[type="time"],
textarea {
  cursor: text;
}

/* Gracias / thanks: refuerzo (misma semántica que el resto del sitio) */
body.page-thanks,
body.page-thanks * {
  cursor: inherit;
}

body.page-thanks a,
body.page-thanks button,
body.page-thanks .btn,
body.page-thanks [role="button"] {
  cursor: pointer;
}

body.page-thanks input,
body.page-thanks textarea {
  cursor: text;
}

/* Cursor personalizado desactivado: solo se ve el ratón nativo */
.cursor-dot,
.cursor-outline {
  display: none !important;
}

body {
  cursor: default;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* SYSTEM BOOT SCREEN */
#boot-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #050505;
  z-index: 10000;
  display: none;
  justify-content: start;
  align-items: end;
  /* Bottom-left terminal style */
  padding: 40px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  transition: transform 0.6s cubic-bezier(0.8, 0, 0.2, 1);
}

#boot-screen.loaded {
  transform: translateY(-100%);
}

.boot-container {
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.5;
  text-transform: uppercase;
}

.log-line {
  display: block;
  margin-bottom: 4px;
}

.log-line.accent {
  color: var(--neon-blue);
}

.cursor-blink {
  color: var(--neon-blue);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* SOUND TOGGLE */
#sound-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  width: 50px;
  height: 50px;
  padding: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

/* CUSTOM CURSOR: PRECISION STYLE */
.cursor-dot {
  width: 6px;
  height: 6px;
  background-color: white;
  /* Sharp White */
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  /* Thin elegant ring */
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9998;
  pointer-events: none;
  transition: width 0.15s, height 0.15s, border-color 0.2s, background-color 0.2s;
}

body:hover .cursor-outline {
  opacity: 1;
}

h1,
h2,
h3,
.brand-text,
.btn,
.badge,
.stat-number,
.nav-inner {
  font-family: var(--font-display);
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

ul {
  list-style: none;
}

/* 2. AURORA BACKGROUND ANIMATION */
.aurora-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: #060910;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 14s infinite ease-in-out;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--neon-purple);
  top: -10%;
  left: -10%;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: var(--neon-blue);
  bottom: 10%;
  right: -5%;
  animation-delay: -5s;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: var(--primary);
  top: 40%;
  left: 30%;
  animation-duration: 20s;
  opacity: 0.3;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(50px, -50px) scale(1.1);
  }

  66% {
    transform: translate(-30px, 20px) scale(0.9);
  }

  100% {
    transform: translate(0, 0) scale(1);
  }
}

/* 3. LAYOUT & TYPOGRAPHY */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 24px;
}

.lead {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 32px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 4. GLASSMORPHISM COMPONENTS */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 5000;
  /* Por encima de main, paneles de idioma y overlays sueltos */
  border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.2rem;
  cursor: pointer;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--neon-purple));
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
}

.menu {
  display: flex;
  gap: 32px;
  align-items: center;
}

/* FIX: Ensure Menu Toggle is HIDDEN by default on desktop */
.menu-toggle {
  display: none !important;
}

.menu a:hover {
  color: var(--neon-blue);
}

/* Language switcher (compact dropdown) */
.lang-switch {
  position: relative;
  flex-shrink: 0;
}

.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.lang-switch-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--neon-blue);
}

.lang-switch.is-open .lang-switch-btn {
  background: rgba(70, 97, 230, 0.16);
  border-color: rgba(99, 102, 241, 0.45);
  color: var(--neon-blue);
  box-shadow: 0 0 24px rgba(70, 97, 230, 0.2);
}

.lang-switch-icon {
  display: flex;
  color: rgba(255, 255, 255, 0.75);
}

.lang-switch.is-open .lang-switch-icon {
  color: var(--neon-blue);
}

.lang-switch-chevron {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-top: 1px;
  opacity: 0.65;
  transition: transform 0.2s ease;
}

.lang-switch.is-open .lang-switch-chevron {
  transform: rotate(180deg);
}

.lang-switch-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 288px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(11, 18, 32, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  z-index: 1100;
  direction: ltr;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, visibility 0.22s, transform 0.22s ease;
  pointer-events: none;
}

[dir="rtl"] .lang-switch-panel {
  right: auto;
  left: 0;
}

.lang-switch.is-open .lang-switch-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 0.8125rem;
  line-height: 1.2;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none;
}

.lang-opt:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.08);
}

.lang-opt.is-current {
  background: rgba(70, 97, 230, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--text-main);
}

.lang-opt-code {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.lang-opt-name {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.8;
}

@media (max-width: 900px) {
  .lang-switch-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    right: auto;
    transform: translate(-50%, -50%) scale(0.97);
    min-width: min(calc(100vw - 28px), 300px);
    max-height: min(75vh, 520px);
    overflow-y: auto;
    z-index: 250;
  }

  .lang-switch.is-open .lang-switch-panel {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Fondo al abrir idiomas en móvil (inyectado por main.js) */
.lang-switch-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 240;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lang-switch-backdrop.is-visible {
  display: block;
}

@media (min-width: 901px) {
  .lang-switch-backdrop {
    display: none !important;
  }
}

/* Páginas de herramientas (clase page-tool en body) */
.page-tool main.container {
  position: relative;
  z-index: 0;
  /* El nav es position:fixed y no ocupa flujo: main empieza en y=0.
     El padding-top deja una franja “vacía” que sigue perteneciendo a <main>
     y en algunos navegadores captura clics encima del header. */
  pointer-events: none;
  padding-top: 100px !important;
  padding-bottom: 88px !important;
}

.page-tool main.container > * {
  pointer-events: auto;
}

.page-tool main.container > nav:first-of-type {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 28px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--glass-border);
  font-size: 0.875rem;
  line-height: 1.5;
}

.page-tool main.container > nav:first-of-type a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.page-tool main.container > nav:first-of-type a:hover {
  color: var(--neon-blue);
}

.page-tool main.container > nav:first-of-type span:last-child {
  color: var(--text-main);
  font-weight: 600;
}

.page-tool .section-header .h1 {
  font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.page-tool main .bento-card.glass {
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.35) !important;
}

.page-tool main select,
.page-tool main input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.page-tool main textarea {
  border-radius: 12px !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.page-tool main select:focus,
.page-tool main input:focus,
.page-tool main textarea:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(70, 97, 230, 0.22);
}

.page-tool footer .foot {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--glass-border);
}

/* Buttons */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 28px;
  border-radius: 99px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.btn.primary {
  background: var(--primary);
  color: white;
  position: relative;
  overflow: hidden;
}

.btn.glow {
  box-shadow: 0 0 20px rgba(70, 97, 230, 0.5);
}

.btn.glow:hover {
  box-shadow: 0 0 40px rgba(70, 97, 230, 0.8);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: white;
}

.btn.small {
  padding: 6px 16px;
  font-size: 0.9rem;
}

.btn.wa {
  background: #25D366;
  color: #fff;
  gap: 8px;
}

.btn.wa:hover {
  background: #1ebe5d;
  box-shadow: 0 0 32px rgba(37, 211, 102, 0.55);
}

.btn.wa svg {
  width: 18px;
  height: 18px;
}

/* 5. SECTIONS */
.section {
  padding: 100px 0;
}

.section-header {
  margin-bottom: 60px;
  text-align: center;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

/* Hero */
.hero-section {
  min-height: 100vh;
  padding-top: 140px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 60px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(70, 97, 230, 0.2);
  color: var(--neon-blue);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(70, 97, 230, 0.3);
}

.hero-visual {
  perspective: 1000px;
}

.code-window {
  border-radius: 12px;
  transform: rotateY(-10deg) rotateX(5deg);
  transition: transform 0.5s ease;
}

.code-window:hover {
  transform: rotateY(0) rotateX(0) scale(1.02);
}

.window-header {
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--glass-border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red {
  background: #ff5f56;
}

.dot.yellow {
  background: #ffbd2e;
}

.dot.green {
  background: #27c93f;
}

.filename {
  margin-left: auto;
  font-size: 0.8rem;
  color: #666;
}

.code-content {
  padding: 20px;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  color: #d19a66;
}

.code-content pre {
  color: #abb2bf;
}

.k {
  color: #c678dd;
}

.v {
  color: #e06c75;
}

.f {
  color: #61afef;
}

.s {
  color: #98c379;
}

.c {
  color: #5c6370;
}

/* 6. BENTO GRID */
.bento-grid {
  display: grid;
  gap: 24px;
}

/* Utilities added for V2 */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Live signals strip (home: sensación de software vivo) */
.live-signals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 22px auto 0;
  max-width: 980px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
}

.live-signals__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.live-signals__pulse {
  flex: 0 0 auto;
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: live-pulse 2.4s ease-out infinite;
}

@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.live-signals__label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-signals__value {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (prefers-reduced-motion: reduce) {
  .live-signals__pulse { animation: none; }
}

.small-card {
  padding: 20px;
  align-items: center;
  text-align: center;
}

.icon-small {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.text-xs {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tech-stack-mini {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  opacity: 0.8;
}

.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.portfolio-grid {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(180px, auto);
}

.bento-card {
  padding: 32px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bento-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.featured-project {
  grid-column: span 2;
  background: linear-gradient(to right, rgba(11, 18, 32, 0.92) 0%, rgba(11, 18, 32, 0.55) 55%, rgba(11, 18, 32, 0.15) 100%), url('/assets/img/cases/case-globalkeymarket-1280.webp');
  background-size: cover;
  background-position: right center;
  position: relative;
  overflow: hidden;
}

.featured-project .project-content {
  z-index: 2;
  max-width: 58%;
}

@media (max-width: 768px) {
  .featured-project {
    background: linear-gradient(to bottom, rgba(11, 18, 32, 0.45) 0%, rgba(11, 18, 32, 0.95) 70%), url('/assets/img/cases/case-globalkeymarket-800.webp');
    background-size: cover;
    background-position: center top;
  }
  .featured-project .project-content {
    max-width: 100%;
    padding-top: 160px;
  }
}

/* Case study thumbnails (mockup previews above card content) */
.case-thumb {
  display: block;
  margin: -32px -32px 18px;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0b1220;
  position: relative;
}

.case-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}

.bento-card:hover .case-thumb img {
  transform: scale(1.035);
}

.case-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11,18,32,0) 60%, rgba(11,18,32,0.55) 100%);
}

.badge-tech {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--neon-blue);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.tech-tags {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tech-tags li {
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 4px;
}

/* Icons & Stats */
.icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.stat-card {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stat-number {
  font-size: 3.5rem;
  color: white;
  display: block;
  margin-bottom: 8px;
}

/* 7. MARQUEE */
.tech-marquee-container {
  overflow: hidden;
  white-space: nowrap;
  padding: 30px 0;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
}

.tech-marquee-track {
  display: inline-block;
  animation: scroll 30s linear infinite;
}

.tech-marquee-track span {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 40px;
  font-weight: 700;
}

/* A11y: enlaces dentro de texto deben distinguirse por algo más que el color */
p a:not(.btn):not([class*="btn"]) {
  text-decoration: underline;
  text-underline-offset: 2px;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* 8. CONTACT & FOOTER */
.contact-box {
  padding: 60px;
}

input,
textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  padding: 16px;
  color: white;
  border-radius: 8px;
  margin-bottom: 16px;
  font-family: var(--font-main);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Form Status Messages */
.form-status {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
  animation: slideIn 0.3s ease;
}

.form-status.success {
  background: rgba(40, 167, 69, 0.2);
  border: 1px solid rgba(40, 167, 69, 0.5);
  color: #28a745;
}

.form-status.error {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.5);
  color: #dc3545;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  margin-top: 80px;
  color: var(--text-muted);
}

footer .foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

footer .brand-foot p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 6px;
}

footer .links a {
  color: var(--text-muted);
}

footer .links a:hover {
  color: var(--neon-blue);
}

/* Gracias / thanks — misma estética que la home */
.thanks-main {
  padding: 120px 24px 80px;
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thanks-card {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 48px 40px;
  text-align: center;
  border-radius: 20px;
}

.thanks-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(70, 97, 230, 0.4), rgba(188, 19, 254, 0.15));
  border: 1px solid var(--glass-border);
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: var(--neon-blue);
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 32px rgba(0, 243, 255, 0.12);
}

.thanks-heading {
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  margin-bottom: 16px;
  line-height: 1.2;
}

.thanks-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 16px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.thanks-hint {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.thanks-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

/* Thanks: menú siempre usable en móvil (sin drawer ni main.js) */
@media (max-width: 900px) {
  body.page-thanks .nav-inner .menu {
    position: static !important;
    transform: none !important;
    visibility: visible !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    top: auto !important;
    right: auto !important;
    gap: 10px 14px !important;
    justify-content: flex-end !important;
    align-items: center !important;
  }

  body.page-thanks .menu-toggle {
    display: none !important;
  }

  body.page-thanks .nav-inner {
    height: auto;
    min-height: 80px;
    flex-wrap: wrap;
    padding: 16px 0;
    gap: 12px;
  }

  .thanks-card {
    padding: 36px 24px;
  }
}

/* 9. SCROLL REVEAL - Contenido SIEMPRE visible (móvil/JS fallido). Animación opcional con .active */
.reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: opacity 0.4s ease;
}

.reveal.active {
  opacity: 1 !important;
  transform: none !important;
}

/* Herramientas: contenido SIEMPRE visible en todas las vistas (evita fallos backdrop-filter y JS) */
main .reveal,
main .bento-card,
main .section-header {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}
main .bento-card.glass {
  min-height: 120px;
  background: rgba(15, 23, 42, 0.96) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}

.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

/* Overlay (Hidden by default, used for Mobile) */
.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  /* Darker, NO BLUR */
  z-index: 4500;
  /* Debajo del nav (5000), encima del contenido */
  /* backdrop-filter: blur(4px); REMOVED to prevent artifacts */
}

.menu-overlay.active {
  display: block;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .section {
    padding: 60px 0;
  }

  /* Reduced padding for mobile */

  .hero-section {
    grid-template-columns: 1fr;
    padding-top: 100px;
    text-align: center;
  }

  .h1 {
    font-size: 2.5rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .featured-project {
    grid-column: span 1;
  }

  /* Fix Grid-2 on Mobile (Stack columns) */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Fix Contact Box Padding */
  .contact-box {
    padding: 24px;
  }

  /* Mobile Menu Container */
  .menu {
    display: flex;
    /* Always flex, hide via transform */
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 300px;
    height: 100vh;
    background: rgba(11, 18, 32, 0.95);
    /* High opacity for legibility */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 100px 32px;
    z-index: 200;
    align-items: flex-start;
    gap: 32px;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);

    /* Animation State: Hidden */
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.4s;
  }

  /* Active State: Visible */
  .menu.active {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
  }

  /* Show toggle on mobile, override the !important global */
  .menu-toggle {
    display: inline-flex !important;
    z-index: 201;
  }

  .code-window {
    display: none;
  }

  .cursor-dot,
  .cursor-outline {
    display: none;
  }

  /* Garantizar que el contenido de herramientas (calculadoras, etc.) se vea siempre en móvil */
  main .reveal,
  main .bento-card,
  main .section-header {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
  main .bento-card.glass {
    min-height: 200px;
    background: rgba(15, 23, 42, 0.95);
  }
}

/* Barra fija de contacto en landings de servicio */
.rovi-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 180;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: rgba(11, 18, 32, 0.92);
  border-top: 1px solid rgba(56, 189, 248, 0.35);
  backdrop-filter: blur(12px);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
}
.rovi-sticky-cta-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}
body:has(.rovi-sticky-cta) main {
  padding-bottom: 88px !important;
}
@media (max-width: 600px) {
  .rovi-sticky-cta-text { display: none; }
}
.rovi-purchase-hero .btn { min-width: 160px; }

/* ---------------------------------------------------------------
   Google Reviews carousel — reseñas verificadas
   --------------------------------------------------------------- */
.grev-section {
  position: relative;
  padding: 72px 0;
}

.grev-header {
  max-width: 720px;
  margin: 0 auto 36px;
  text-align: center;
}

.grev-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(0, 243, 255, 0.05);
  color: var(--neon-blue);
  margin-bottom: 14px;
}

.grev-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin: 0 0 10px;
  color: #fff;
}

.grev-subtitle {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0 auto 18px;
  max-width: 620px;
}

.grev-summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.92rem;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}
.grev-summary:hover {
  border-color: rgba(0, 243, 255, 0.45);
  background: rgba(0, 243, 255, 0.07);
  transform: translateY(-1px);
}
.grev-summary__rating {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  font-size: 1.05rem;
}
.grev-summary__total {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.grev-stars {
  font-size: 1.05rem;
  letter-spacing: 1px;
  color: #facc15;
  line-height: 1;
}
.grev-stars__empty {
  color: rgba(250, 204, 21, 0.22);
  margin-left: 1px;
}

.grev-viewport {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 36px;
}

.grev-track {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 280px;
  outline: none;
}

.grev-card {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 480ms ease, transform 520ms ease;
  pointer-events: none;
}
.grev-card.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.grev-card__link {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 30px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  text-decoration: none;
  color: inherit;
  height: 100%;
  cursor: pointer;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}
.grev-card__link:hover,
.grev-card__link:focus-visible {
  border-color: rgba(0, 243, 255, 0.4);
  box-shadow: 0 12px 40px -18px rgba(0, 243, 255, 0.35);
  transform: translateY(-2px);
}

.grev-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.grev-card__avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--neon-blue);
  font-size: 1.1rem;
}
.grev-card__avatar--fallback {
  text-transform: uppercase;
}

.grev-card__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.grev-card__author {
  font-weight: 600;
  color: #fff;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grev-card__time {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: lowercase;
  letter-spacing: 0.2px;
}

.grev-card__google {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
}

.grev-card__text {
  color: var(--text-main);
  font-size: 0.98rem;
  line-height: 1.65;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grev-card.is-expanded .grev-card__text {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  overflow: visible;
}

.grev-readmore {
  align-self: flex-start;
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--neon-blue);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.grev-readmore:hover,
.grev-readmore:focus-visible {
  color: #fff;
}

.grev-card__translation-note {
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.4;
  margin: -4px 0 0;
  opacity: 0.82;
}

.grev-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(11, 18, 32, 0.65);
  color: var(--text-main);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
}
.grev-nav:hover,
.grev-nav:focus-visible {
  border-color: rgba(0, 243, 255, 0.6);
  color: var(--neon-blue);
  transform: translateY(-50%) scale(1.05);
}
.grev-nav--prev { left: -4px; }
.grev-nav--next { right: -4px; }

.grev-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.grev-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.grev-dot:hover { background: rgba(255, 255, 255, 0.32); }
.grev-dot.is-active {
  background: var(--neon-blue);
  transform: scale(1.25);
}

.grev-footer {
  text-align: center;
  margin-top: 24px;
}

.grev-section[hidden] { display: none; }

@media (max-width: 600px) {
  .grev-section { padding: 56px 0; }
  .grev-viewport { padding: 0 8px; }
  .grev-track { min-height: 320px; }
  .grev-card__link { padding: 22px 20px; }
  .grev-nav { top: auto; bottom: -52px; transform: none; }
  .grev-nav:hover, .grev-nav:focus-visible { transform: scale(1.05); }
  .grev-nav--prev { left: calc(50% - 50px); }
  .grev-nav--next { right: calc(50% - 50px); }
  .grev-dots { margin-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .grev-card { transition: opacity 0s, transform 0s; }
}
