:root {
  /* LIGHT THEME (Default) */
  --bg-body: linear-gradient(135deg, rgba(47, 129, 247, 0.08) 0%, transparent 40%), linear-gradient(315deg, rgba(88, 166, 255, 0.08) 0%, transparent 40%), #f6f8fa;
  --bg-card: #ffffff;
  --bg-alt: #f6f8fa;
  --bg-elevated: #ffffff;
  --text-primary: #1F2328;
  --text-secondary: #656d76;
  --text-muted: #59636e;
  --border-light: rgba(31, 35, 40, 0.15);
  --border-medium: rgba(31, 35, 40, 0.3);
  --border-glow: rgba(9, 105, 218, 0.1);
  --blue-accent: #0969da;
  --blue-glow: #0969da;
  --blue-muted: rgba(9, 105, 218, 0.1);
  --blue-muted-strong: rgba(9, 105, 218, 0.15);
  --orange-accent: #9a6700;
  --orange-muted: rgba(154, 103, 0, 0.1);
  --purple-accent: #8250df;
  --green-accent: #1a7f37;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(31, 35, 40, 0.07), 0 2px 5px rgba(31, 35, 40, 0.08);
  --shadow-md: 0 2px 5px rgba(31, 35, 40, 0.07), 0 6px 18px rgba(31, 35, 40, 0.10);
  --shadow-lg: 0 4px 8px rgba(31, 35, 40, 0.06), 0 12px 36px rgba(31, 35, 40, 0.12);
  --shadow-xl: 0 8px 16px rgba(31, 35, 40, 0.06), 0 20px 56px rgba(31, 35, 40, 0.12);

  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
  /* DARK THEME (GitHub Exact) */
  --bg-body: #0d1117;
  --bg-card: #13243d;
  --bg-alt: #0d1117;
  --bg-elevated: #21262d;
  --text-primary: #ffffff;
  --text-secondary: #ffffff;
  --text-muted: #e6edf3;
  --border-light: rgba(255, 255, 255, 0.1);
  --border-medium: rgba(255, 255, 255, 0.2);
  --border-glow: rgba(88, 166, 255, 0.3);
  --blue-accent: #2f81f7;
  --blue-glow: #58a6ff;
  --blue-muted: rgba(47, 129, 247, 0.1);
  --blue-muted-strong: rgba(47, 129, 247, 0.15);
  --orange-accent: #d29922;
  --orange-muted: rgba(210, 153, 34, 0.1);
  --purple-accent: #bc8cff;
  --green-accent: #3fb950;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 40px rgba(47, 129, 247, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.50), 0 0 60px rgba(47, 129, 247, 0.05);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 90px rgba(47, 129, 247, 0.06);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
}

/* Simular zoom al 90% solo en pantallas de ordenador (para no afectar a móviles) */
@media (min-width: 1025px) {
  html {
    zoom: 0.9;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-body);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* GLOBAL GLOWS & ORBS */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  opacity: 0.6;
  pointer-events: none;
  animation: orbPulse 10s alternate infinite ease-in-out;
}

.glow-orb.purple {
  background: rgba(88, 166, 255, 0.4);
}

.glow-orb.blue {
  background: rgba(47, 129, 247, 0.4);
}

.glow-orb.cyan {
  background: rgba(14, 98, 209, 0.3);
}

[data-theme="light"] .glow-orb {
  display: none;
}

/* GRID BACKGROUND */
.global-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.3;
}

/* TYPOGRAPHY */
.section-label {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--blue-accent);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-weight: 700;
}

.section-title {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.7;
}

/* BUTTONS */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--text-primary);
  color: var(--bg-alt);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid var(--text-primary);
  border-radius: 6px;
  cursor: pointer;
  transition: all .3s var(--ease-out);
}

.btn-primary:hover {
  background: transparent;
  color: var(--text-primary);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  cursor: pointer;
  transition: all .3s var(--ease-out);
}

.btn-secondary:hover {
  border-color: var(--blue-accent);
  color: var(--blue-accent);
  box-shadow: inset 0 0 0 1px var(--blue-accent);
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: all .4s var(--ease-out);
}

.header.scrolled {
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

[data-theme="light"] .header.scrolled {
  background: rgba(255, 255, 255, 0.85);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--text-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--bg-alt);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color .3s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--blue-accent);
}

.controls-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle,
.theme-toggle {
  display: flex;
  align-items: center;
  background: transparent;
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  overflow: hidden;
}

.lang-btn,
.theme-btn {
  padding: 6px 10px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all .2s;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.lang-flag {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  overflow: hidden;
  margin-right: 5px;
  flex-shrink: 0;
}

.lang-btn {
  gap: 0;
}

.lang-btn.active,
.theme-btn.active {
  background: var(--border-medium);
  color: var(--text-primary);
}

.lang-btn:hover:not(.active),
.theme-btn:hover:not(.active) {
  color: var(--text-primary);
  background: var(--border-light);
}

.nav-mobile {
  display: none;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all .3s;
  border-radius: 2px;
}

/* HERO */
.hero {
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-text {
  max-width: 680px;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border-medium);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 28px;
  animation: fadeInUp .8s var(--ease-out) .2s both;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--green-accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--green-accent);
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  animation: fadeInUp .8s var(--ease-out) .35s both;
}

.hero h1 .accent {
  background: linear-gradient(90deg, var(--blue-accent), var(--purple-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 580px;
  animation: fadeInUp .8s var(--ease-out) .5s both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp .8s var(--ease-out) .65s both;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 56px;
  padding-top: 32px;
  animation: fadeInUp .8s var(--ease-out) .8s both;
}

.hero-stat-value {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* HERO VISUAL (GITHUB REPO CARD STYLE) */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 1.2s var(--ease-out) .6s both;
}

.hero-render {
  width: 100%;
  max-width: 700px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-medium);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
  z-index: 1;
}

.hero-render::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.8), rgba(47, 129, 247, 0.8));
  filter: blur(80px);
  opacity: 0.5;
  z-index: -1;
  border-radius: inherit;
  transform: scale(1.05);
  animation: pulse-glow 4s ease-in-out infinite alternate;
}

[data-theme="light"] .hero-render::before {
  background: radial-gradient(ellipse 80% 40% at 50% 100%, rgba(0, 0, 0, 0.18), transparent 70%);
  filter: blur(30px);
  opacity: 1;
  animation: none;
  transform: scale(1.1) translateY(10px);
}

.hero-render-inner {
  background: var(--bg-card);
  border-radius: 16px;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-render-header {
  height: 40px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  border-radius: 16px 16px 0 0;
}

.hero-render-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-medium);
}

.hero-render-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-radius: 0 0 16px 16px;
}

.hero-render-placeholder svg {
  width: 80px;
  height: 80px;
  stroke: var(--border-medium);
  fill: none;
  margin-bottom: 16px;
}

.hero-floating-tag {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

.hero-floating-tag.tag-sw {
  top: 10%;
  right: -30px;
  animation: float 4s ease-in-out infinite;
}

.hero-floating-tag.tag-tol {
  bottom: 15%;
  left: -30px;
  animation: float 4s ease-in-out 1.5s infinite;
}

/* TRUST BAR */
.trust-bar {
  padding: 48px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: transparent;
  position: relative;
  z-index: 2;
}

.trust-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.trust-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-primary);
  fill: none;
  stroke-width: 1.5;
}

/* ABOUT */
.about {
  padding: 80px 0;
  position: relative;
}

.about-content {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.about-content .section-label {
  justify-content: center;
}

.about-content .section-title {
  margin-bottom: 32px;
}




.about-body {
  text-align: left;
}

.about-body p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.about-body p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 36px;
}

.sw-tag {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  text-align: center;
  transition: all .3s var(--ease-out);
  position: relative;
  overflow: visible;
  z-index: 1;
}

.sw-tag::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(88, 166, 255, 0.6) 0%, rgba(47, 129, 247, 0.6) 100%);
  filter: blur(40px);
  opacity: 0;
  z-index: -1;
  border-radius: inherit;
  transition: opacity 0.4s var(--ease-out);
  transform: scale(1.05);
  pointer-events: none;
}

.sw-tag:hover {
  border-color: var(--blue-accent);
  transform: translateY(-4px);
  background: radial-gradient(circle at center, var(--bg-card) 40%, rgba(47, 129, 247, 0.4) 100%);
  box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.8), 0 0 20px rgba(47, 129, 247, 0.4);
}

.sw-tag:hover::after {
  opacity: 1;
}

[data-theme="light"] .sw-tag:hover {
  background-color: #eef4fc;
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.9), inset 0 -2px 4px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .sw-tag:hover::after {
  background: radial-gradient(ellipse at center, rgba(160, 160, 160, 0.5) 0%, rgba(190, 190, 190, 0.5) 100%);
  opacity: 0.3;
}

.sw-tag .sw-icon {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 6px;
}

.sw-tag .sw-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
}

/* SERVICES (GITHUB BENTO BOXES) */
.services {
  padding: 50px 0;
  position: relative;
}

.services-header {
  text-align: center;
  margin-bottom: 40px;
}

.services-header .section-label {
  justify-content: center;
}

.services-header .section-subtitle {
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card {
  padding: 44px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  transition: all .4s var(--ease-out);
  position: relative;
  overflow: visible;
  z-index: 1;
}

.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(88, 166, 255, 0.6) 0%, rgba(47, 129, 247, 0.6) 100%);
  filter: blur(80px);
  opacity: 0;
  z-index: -1;
  border-radius: inherit;
  transition: opacity 0.4s var(--ease-out);
  transform: scale(1.05);
  pointer-events: none;
}

.service-card:hover {
  border-color: var(--blue-accent);
  transform: translateY(-4px);
  background: radial-gradient(ellipse at center, var(--bg-card) 50%, rgba(47, 129, 247, 0.4) 100%);
  box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.8), 0 0 20px rgba(47, 129, 247, 0.4);
}

.service-card:hover::after {
  opacity: 1;
}

[data-theme="light"] .service-card:hover {
  background-color: #eef4fc;
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.9), inset 0 -2px 4px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .service-card:hover::after {
  background: radial-gradient(ellipse at center, rgba(160, 160, 160, 0.5) 0%, rgba(190, 190, 190, 0.5) 100%);
  opacity: 0.35;
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.service-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-primary);
  fill: none;
  stroke-width: 1.5;
}

.service-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.service-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.service-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.service-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.service-feature .check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 4px;
}

.service-feature .check svg {
  width: 10px;
  height: 10px;
  stroke: var(--bg-alt);
  fill: none;
  stroke-width: 2.5;
}

.service-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: calc(50% - 12px);
  justify-self: center;
}

/* SERVICE WHEEL (Desktop) */
.service-wheel-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-items: start;
  gap: 0px;
  min-height: 460px;
  padding: 0;
}

.service-wheel-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
}

.service-wheel {
  position: relative;
  width: 560px;
  height: 560px;
  flex-shrink: 0;
}

.wheel-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.wheel-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.wheel-sector-group {
  cursor: pointer;
}

.wheel-sector-path {
  fill: transparent;
  stroke: none;
}

.wheel-sector-group:hover .wheel-sector-path,
.wheel-sector-group.active .wheel-sector-path {
  fill: transparent;
}

/* Detail Panel */
.wheel-detail-panel {
  flex: 1;
  max-width: 460px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wheel-detail-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  min-height: 200px;
  padding: 40px;
  background: var(--bg-card);
  border: 1px dashed var(--border-medium);
  border-radius: 16px;
  transition: opacity 0.3s ease;
}

.wheel-detail-prompt.hidden {
  display: none;
}

.wheel-detail-inner {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s 0.35s;
}

.wheel-detail-inner.visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0s 0s;
}

.wheel-detail-inner .wheel-panel-card {
  padding: 36px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--blue-accent);
  position: relative;
  overflow: hidden;
}

.wheel-detail-inner .wheel-panel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sector-color, var(--blue-accent)), transparent);
  opacity: 0.6;
}

.wheel-detail-inner .service-icon {
  margin-bottom: 20px;
}

.wheel-detail-inner .service-number {
  margin-bottom: 12px;
}

.wheel-detail-inner h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.wheel-detail-inner p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.wheel-detail-inner .service-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wheel-detail-inner .service-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* wheelPanelIn removed — using opacity/visibility crossfade instead */

@keyframes wheelEntrance {
  from {
    opacity: 0;
    transform: scale(0.8) rotate(-15deg);
  }

  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* SERVICE PROGRESS DOTS */
.wheel-progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
  margin-top: -30px;
  position: relative;
  z-index: 5;
}

/* Fixed-size container — no layout shift on state change */
.wheel-progress-item {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Visual dot — scales from small to full via transform (GPU, no reflow) */
.wheel-progress-item::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--border-medium);
  transform: scale(0.26);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
  border: 2px solid var(--border-medium);
}

.wheel-progress-item:hover::before {
  transform: scale(0.34);
  background: var(--text-muted);
  border-color: var(--text-muted);
}

.wheel-progress-item.active::before {
  transform: scale(1);
  background: var(--bg-card);
  border-color: var(--dot-color, var(--blue-accent));
  box-shadow: 0 0 14px color-mix(in srgb, var(--dot-color, var(--blue-accent)) 30%, transparent);
}

/* Number label inside the circle */
.wheel-progress-number {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--dot-color, var(--blue-accent));
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.3s ease 0.1s,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.08s;
  pointer-events: none;
  user-select: none;
  position: relative;
  z-index: 1;
}

.wheel-progress-item.active .wheel-progress-number {
  opacity: 1;
  transform: scale(1);
}


/* Hide mobile grid on desktop, hide wheel on mobile */
@media (min-width: 1025px) {
  .services-grid-mobile {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  .service-wheel-layout {
    display: none !important;
  }

  .services-grid-mobile {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* METHODOLOGY */
.methodology {
  padding: 80px 0;
  position: relative;
}

.method-header {
  margin-bottom: 72px;
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.method-steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: var(--border-medium);
  z-index: 1;
}

.method-step {
  text-align: center;
  position: relative;
  z-index: 2;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 auto 20px;
  transition: all .3s var(--ease-out);
}

.method-step:hover .step-number {
  background: var(--blue-accent);
  color: var(--white);
  border-color: var(--blue-accent);
  box-shadow: 0 0 20px var(--blue-accent);
}

.method-step h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.method-step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.nda-box {
  margin-top: 72px;
  padding: 40px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nda-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nda-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--text-primary);
  fill: none;
  stroke-width: 1.5;
}

.nda-content h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.nda-content p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.nda-content p strong {
  color: var(--text-primary);
}

/* PORTFOLIO */
.portfolio {
  padding: 80px 0;
  position: relative;
}

.portfolio-header {
  margin-bottom: 64px;
}

.case-studies {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.case-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  overflow: visible;
  transition: all .4s var(--ease-out);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.case-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(47, 129, 247, 0.6) 0%, rgba(88, 166, 255, 0.6) 100%);
  filter: blur(80px);
  opacity: 0;
  z-index: -1;
  border-radius: inherit;
  transition: opacity 0.4s var(--ease-out);
  transform: scale(1.05);
  pointer-events: none;
}

[data-theme="dark"] .case-card {
  background: linear-gradient(175deg, #1c3050 0%, #0d1b2a 100%);
  box-shadow:
    0 10px 35px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -6px 16px rgba(0, 0, 0, 0.45);
}

.case-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue-accent);
  background: radial-gradient(ellipse at center, var(--bg-card) 50%, rgba(47, 129, 247, 0.4) 100%);
  box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.8), 0 0 20px rgba(47, 129, 247, 0.4);
}

.case-card:hover::after {
  opacity: 1;
}

[data-theme="light"] .case-card {
  background: linear-gradient(175deg, #ffffff 0%, #e8f0fb 100%);
  box-shadow:
    0 10px 35px rgba(31, 35, 40, 0.20),
    inset 0 -6px 16px rgba(31, 35, 40, 0.18);
}

[data-theme="light"] .case-card:hover {
  background: linear-gradient(175deg, #f5f8ff 0%, #ddeafc 100%);
  box-shadow:
    0 14px 45px rgba(31, 35, 40, 0.22),
    inset 0 -6px 16px rgba(31, 35, 40, 0.18);
}

[data-theme="light"] .case-card:hover::after {
  background: radial-gradient(ellipse at center, rgba(160, 160, 160, 0.5) 0%, rgba(190, 190, 190, 0.5) 100%);
  opacity: 0.35;
}

.case-image {
  height: 240px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px 16px 0 0;
}

.case-image-placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.case-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  font-weight: 700;
}

.case-body {
  padding: 32px;
}

.case-body h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.case-block {
  margin-bottom: 16px;
}

.case-block:last-child {
  margin-bottom: 0;
}

.case-block-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 700;
}

.case-block p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.case-result {
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-left: 3px solid var(--green-accent);
  border-radius: 0 8px 8px 0;
}

.case-result p {
  color: var(--text-primary) !important;
  font-weight: 600;
}

.case-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.case-card.featured .case-image {
  height: auto;
  min-height: 320px;
  border-bottom: none;
  border-right: 1px solid var(--border-light);
  border-radius: 16px 0 0 16px;
}

/* CONTACT */
.contact {
  padding: 80px 0;
  position: relative;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-top: 36px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.contact-info h3:first-of-type {
  margin-top: 32px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.contact-detail svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-primary);
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.contact-detail a {
  color: var(--text-secondary);
  transition: color .3s;
}

.contact-detail a:hover {
  color: var(--blue-accent);
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: var(--shadow-xl);
}

.form-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group label .optional {
  font-weight: 400;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all .3s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px var(--blue-muted-strong);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.file-upload {
  padding: 24px;
  border: 2px dashed var(--border-medium);
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all .3s;
  background: var(--bg-elevated);
}

.file-upload:hover {
  border-color: var(--blue-accent);
}

.file-upload svg {
  width: 32px;
  height: 32px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.5;
  margin: 0 auto 10px;
  display: block;
}

.file-upload p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.file-upload span {
  color: var(--blue-accent);
  font-weight: 600;
}

/* File list (shown when files are selected) */
.file-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 0;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  text-align: left;
}

.file-item--big {
  border-color: #e05c5c;
  background: rgba(224, 92, 92, 0.08);
}

.file-item .file-item__name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-weight: normal;
}

.file-item--big .file-item__name {
  color: #e05c5c;
}

.file-item .file-item__size {
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: normal;
}

.file-item__rm {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 2px;
  border-radius: 3px;
  flex-shrink: 0;
  transition: color 0.15s;
}

.file-item__rm:hover {
  color: #e05c5c;
}

.file-add-btn {
  align-self: flex-start;
  margin-top: 2px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blue-accent);
  font-size: 0.8rem;
  padding: 2px 0;
  font-weight: 600;
}

.file-add-btn:hover {
  text-decoration: underline;
}

.form-submit {
  width: 100%;
  margin-top: 8px;
}

.form-privacy {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
  text-align: center;
}

/* FOOTER */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-body);
  position: relative;
  z-index: 2;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color .3s;
}

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

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

/* ANIMATIONS */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pulse {

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

  50% {
    opacity: .6;
    transform: scale(1.2);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes orbPulse {
  0% {
    transform: scale(1) translate(0, 0);
    opacity: 0.4;
  }

  50% {
    transform: scale(1.1) translate(20px, 20px);
    opacity: 0.6;
  }

  100% {
    transform: scale(0.9) translate(-20px, -20px);
    opacity: 0.4;
  }
}

@keyframes pulse-glow {
  0% {
    opacity: 0.2;
    transform: scale(0.98);
  }

  100% {
    opacity: 0.5;
    transform: scale(1.02);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: all .7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* CAROUSEL */
.carousel-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  /* Color de fondo que se funde con los renders CAD para que no se noten los bordes */
  background: #eaedf1;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s var(--ease-spring);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Para que nunca se recorte la imagen */
  position: relative;
  z-index: 1;
}

.carousel-blur-bg {
  position: absolute;
  inset: -15%;
  /* extend boundaries to hide unblurred edges */
  background-size: cover;
  background-position: center;
  filter: blur(25px) brightness(0.85);
  z-index: 0;
  transition: opacity 0.5s ease;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 20px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  pointer-events: none;
  z-index: 2;
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  z-index: 10;
  font-size: 1.2rem;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: var(--blue-accent);
}

.carousel-prev {
  left: 12px;
}

.carousel-next {
  right: 12px;
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 10;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s;
}

.carousel-dot.active {
  background: #fff;
  transform: scale(1.2);
}

/* RESPONSIVE */
@media(max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-visual {
    display: none;
  }


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

  .service-card:last-child:nth-child(odd) {
    max-width: 100%;
  }

  .method-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .method-steps::before {
    display: none;
  }

  .case-card.featured {
    grid-template-columns: 1fr;
  }

  .case-card.featured .case-image {
    border-radius: 16px 16px 0 0;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }

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

@media(max-width: 768px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-mobile.open {
    display: flex;
    position: fixed;
    inset: 0;
    background: var(--bg-body);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
  }

  .nav-mobile a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
  }

  .hero-stats {
    gap: 24px;
    flex-wrap: wrap;
  }

  .method-steps {
    grid-template-columns: 1fr;
  }

  .case-studies {
    grid-template-columns: 1fr;
  }

  .case-card.featured {
    grid-column: 1;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .nda-box {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .software-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-items {
    gap: 24px;
  }
}

/* PRIVACY LINK */
.form-privacy a {
  color: var(--blue-accent);
  text-decoration: underline;
  transition: opacity 0.2s;
}

.form-privacy a:hover {
  opacity: 0.8;
}

/* PRIVACY MODAL */
.privacy-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
  padding: 24px;
}

.privacy-modal-overlay.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0s 0s;
}

.privacy-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  padding: 40px;
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s var(--ease-out);
}

.privacy-modal-overlay.open .privacy-modal {
  transform: translateY(0) scale(1);
}

.privacy-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.privacy-modal-close:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.privacy-modal h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-right: 32px;
}

.privacy-modal-body {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.privacy-modal-body p {
  margin-bottom: 16px;
}

.privacy-modal-body h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 24px;
  margin-bottom: 8px;
}

.privacy-modal-body ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.privacy-modal-body li {
  margin-bottom: 6px;
  line-height: 1.6;
}