/* ============================================
   netfinitiva s.l. — WaaS Stylesheet
   Proporción áurea (φ ≈ 1.618)
   Fuentes: Inter (sans) + Source Serif 4 (serif) + JetBrains Mono (mono)
   ============================================ */

/* ----- Imports -----*/

 @import url(./hero-canvas.css);
@import url(./faqs-css.css);


/* ─── CSS Custom Properties ─── */
:root {
  --phi: 1.618;
  --phi-inv: 0.618;

  /* Paleta de grises suaves */
  --c-bg:        #f7f6f4;
  --c-bg-2:      #eeede9;
  --c-bg-3:      #e5e4df;
  --c-surface:   #ffffff;
  --c-text:      #1c1c1a;
  --c-text-2:    #5c5b58;
  --c-text-3:    #8a8985;
  --c-text-4:    #b5b4b0;
  --c-border:    #dddcd7;
  --c-border-light: #eae9e5;

  /* Acento sobrio */
  --c-accent:    #2d2d2b;
  --c-accent-2:  #6b6a66;
  --c-whatsapp:  #25d366;

  /* Sombras suaves */
  --shadow-sm:   0 1px  3px  rgba(0,0,0,0.04);
  --shadow-md:   0 4px  12px rgba(0,0,0,0.06);
  --shadow-lg:   0 12px 32px rgba(0,0,0,0.08);

  /* Tipografía */
  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;
  --font-serif:  'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono:   'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Espaciado basado en φ */
  --space-xs:    0.382rem;  /* 1/φ² */
  --space-sm:    0.618rem;  /* 1/φ */
  --space-md:    1rem;
  --space-lg:    1.618rem;
  --space-xl:    2.618rem;
  --space-2xl:   4.236rem;
  --space-3xl:   6.854rem;

  /* Transiciones */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ─── Reset básico ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.618;
  color: var(--c-text);
  background: var(--c-bg);
  overflow-x: hidden;
}

img, video, canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ─── Revelado on-scroll ─── */
.reveal {
  opacity: 0;
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), filter 0.9s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
  filter: blur(0);
}
.reveal-up {
  transform: translateY(60px);
}
.reveal-left {
  transform: translateX(-80px);
}
.reveal-right {
  transform: translateX(80px);
}
.reveal-scale {
  transform: scale(0.88);
}
.reveal-blur {
  filter: blur(12px);
  transform: translateY(30px);
}
.reveal-fade {
  transform: translateY(0);
}

/* Revelado escalonado para hijos */
.reveal.is-visible .pilar-card:nth-child(1) { transition-delay: 0s; }
.reveal.is-visible .pilar-card:nth-child(2) { transition-delay: 0.1s; }
.reveal.is-visible .pilar-card:nth-child(3) { transition-delay: 0.2s; }
.reveal.is-visible .servicio-card:nth-child(1) { transition-delay: 0s; }
.reveal.is-visible .servicio-card:nth-child(2) { transition-delay: 0.1s; }
.reveal.is-visible .servicio-card:nth-child(3) { transition-delay: 0.2s; }
.reveal.is-visible .servicio-card:nth-child(4) { transition-delay: 0.3s; }

.noview { display: none !important; }

/* ─── Header ─── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: var(--space-md) var(--space-xl);
  transition: background 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.header.is-scrolled {
  background: rgba(247, 246, 244, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
}
.logo-mono {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--c-text);
}
.logo-sans {
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--c-text);
}
.logo-dot {
  font-family: var(--font-mono);
  color: var(--c-text-4);
}

.header-contact {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--c-text-2);
  transition: color 0.3s var(--ease-out);
}
.contact-link:hover {
  color: var(--c-text);
}
.contact-link svg {
  flex-shrink: 0;
}

/* ─── Burger ─── */
.burger {
  width: 32px;
  height: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1100;
}
.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-text);
  border-radius: 1px;
  transition: transform 0.4s var(--ease-out), opacity 0.3s;
  transform-origin: center;
}
.burger.is-open span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.burger.is-open span:nth-child(2) {
  opacity: 0;
}
.burger.is-open span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* ─── Nav Panel ─── */
.nav-panel {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}
.nav-panel.is-open {
  opacity: 1;
  visibility: visible;
}
.nav-panel-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  max-height: 100vh;
}
.nav-link {
  font-family: var(--font-sans);
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: var(--c-text-2);
  transition: color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.nav-link:hover {
  color: var(--c-text);
  transform: translateX(8px);
}
.nav-cta {
  color: var(--c-text);
  font-weight: 400;
}

/* ─── Hero ─── 
.hero{
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: var(--space-3xl) var(--space-xl) var(--space-2xl);
  overflow: hidden;
  align-items: flex-start;
}*/


section {background: var(--c-surface)}

section:nth-child(2){
  background-color: transparent;
  background: linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 30%);
}

/* ─── Botones ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1;
  border-radius: 8px;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.3s var(--ease-out);
  cursor: pointer;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-primary {
  background: var(--c-accent);
  color: var(--c-bg);
}
.btn-primary:hover {
  background: var(--c-text);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: transparent;
  color: var(--c-text-2);
  border: 1px solid var(--c-border);
}
.btn-secondary:hover {
  background: var(--c-bg-2);
  color: var(--c-text);
  border-color: var(--c-text-4);
}
.btn-full {
  width: 100%;
}

/* ─── Sections ─── */
.section {
  position: relative;
  padding: var(--space-3xl) var(--space-xl);
}

.section-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.04;
  pointer-events: none;
}

.section-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: var(--space-2xl);
}
.section-header.centered {
  text-align: center;
}

.section-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-text-4);
  margin-bottom: var(--space-md);
}

.section-h2 {
  font-family: var(--font-sans);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--c-text);
  max-width: 700px;
}
.section-header.centered .section-h2 {
  margin: 0 auto;
}

.h2-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--c-text-2);
}

/* ─── Diagnóstico ─── */
.diagnostico-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}
.diagnostico-narrativa {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--c-text-2);
}
.diagnostico-narrativa p {
  margin-bottom: var(--space-lg);
}
.diagnostico-list {
  list-style: none;
  margin-bottom: var(--space-lg);
}
.diagnostico-list li {
  position: relative;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
  color: var(--c-text-2);
}
.diagnostico-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--c-text-4);
}
.diagnostico-list li strong {
  display: block;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--c-text);
  margin-bottom: var(--space-xs);
}
.diagnostico-cierre {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--c-text);
}
.diagnostico-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.diagnostico-visual .pain-icon {
  font-size: 8rem;
  opacity: 0.08;
  color: var(--c-text);
}

/* ─── Pilares ─── */
.pilares-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}
.pilar-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: 12px;
  padding: var(--space-xl);
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}
.reveal.is-visible .pilar-card {
  opacity: 1;
  transform: translateY(0);
}
.pilar-card:hover {
  border-color: var(--c-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.pilar-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--c-bg-2);
  color: var(--c-text-2);
  margin-bottom: var(--space-lg);
}
.pilar-title {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--c-text);
  margin-bottom: var(--space-sm);
}
.pilar-text {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--c-text-2);
}

/* ─── Servicios / CMS Features ─── */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}
.servicio-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: 12px;
  padding: var(--space-xl);
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}
.reveal.is-visible .servicio-card {
  opacity: 1;
  transform: translateY(0);
}
.servicio-card:hover {
  border-color: var(--c-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.cms-image-trigger {
  position: relative;
  display: block;
  width: 100%;
  height: 15rem;
  margin: 0 0 var(--space-lg);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--c-surface);
  color: #fff;
  cursor: pointer;
}
.cms-image-trigger img {
  display: block;
  margin:0 auto;
  width: auto;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}
.cms-image-trigger span {
  position: absolute;
  right: var(--space-sm);
  bottom: var(--space-sm);
  padding: 0.375rem 0.625rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
}
.cms-image-trigger:hover img,
.cms-image-trigger:focus-visible img {
  opacity: 0.82;
  transform: scale(1.04);
}
.cms-image-trigger:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}
.servicio-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--c-text-4);
  margin-bottom: var(--space-md);
}
.servicio-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--c-text);
  margin-bottom: var(--space-md);
}
.servicio-text {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--c-text-2);
  margin-bottom: var(--space-lg);
}
.servicio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.tag {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--c-text-3);
  background: var(--c-bg-2);
  border-radius: 4px;
}

/* ─── Planes ─── */
.planes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}
.plan-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: 12px;
  padding: var(--space-xl);
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.plan-card:hover {
  border-color: var(--c-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.plan-card.featured {
  border-color: var(--c-accent);
  position: relative;
}
.plan-badge {
  position: absolute;
  top: -12px;
  right: var(--space-xl);
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--c-accent);
  color: var(--c-bg);
  border-radius: 4px;
}
.plan-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--c-border-light);
}
.plan-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--c-text);
  margin-bottom: var(--space-xs);
}
.plan-price {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 400;
  color: var(--c-text);
  margin-bottom: var(--space-xs);
}
.plan-price span {
  font-size: 0.875rem;
  color: var(--c-text-3);
}
.plan-audience {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--c-text-3);
}
.plan-features {
  list-style: none;
  margin-bottom: var(--space-xl);
}
.plan-features li {
  position: relative;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--c-text-2);
}
.plan-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--c-whatsapp);
  font-weight: 500;
}

/* ─── Cierre / Demo Form ─── */
.demo-form {
  max-width: 640px;
  margin: 0 auto;
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: 12px;
  padding: var(--space-xl);
}

.demo-form option span {font-size:0.8rem; color:var(--c-accent-2)}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}
.form-group {
  margin-bottom: var(--space-lg);
}
.form-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--c-text-3);
  margin-bottom: var(--space-sm);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--c-text);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--c-text-4);
  box-shadow: 0 0 0 3px rgba(45,45,43,0.06);
}
.form-textarea {
  resize: vertical;
  min-height: 100px;
}
.form-feedback {
  margin-top: var(--space-md);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 400;
  min-height: 1.5em;
}
.form-feedback.success {
  color: #2e7d32;
}
.form-feedback.error {
  color: #c62828;
}

/* ─── Contenteditable highlight ─── */
[data-editable] {
  border: 1px dashed transparent;
  border-radius: 4px;
  padding: 2px 4px;
  transition: border-color 0.2s, background 0.2s;
}
[data-editable]:hover {
  border-color: var(--c-border);
  background: rgba(247, 246, 244, 0.5);
  cursor: text;
}
[data-editable]:focus {
  outline: none;
  border-color: var(--c-accent);
  background: var(--c-surface);
}

/* ─── Checkbox ─── */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--c-text-2);
  line-height: 1.6;
}
.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1.5px solid var(--c-border);
  border-radius: 4px;
  background: var(--c-bg);
  cursor: pointer;
  position: relative;
  margin-top: 2px;
  transition: border-color 0.2s, background 0.2s;
}
.checkbox-label input[type="checkbox"]:checked {
  border-color: var(--c-accent);
  background: var(--c-accent);
}
.checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid var(--c-bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox-label a {
  text-decoration: underline;
  color: var(--c-text);
}
.checkbox-label a:hover {
  color: var(--c-accent-2);
}

/* ─── Dynamic block controls ─── */
.block-controls {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  opacity: 0;
  transition: opacity 0.3s;
}
.block-item:hover .block-controls,
.block-item:focus-within .block-controls {
  opacity: 1;
}
.block-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.375rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-text-3);
  background: var(--c-bg-2);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.block-btn:hover {
  color: var(--c-text);
  background: var(--c-bg-3);
}
.block-btn.danger:hover {
  color: #c62828;
  background: rgba(198, 40, 40, 0.08);
  border-color: rgba(198, 40, 40, 0.2);
}

/* ─── Footer ─── */
.footer {
  background: var(--c-text);
  color: var(--c-bg);
  padding: var(--space-3xl) var(--space-xl) var(--space-xl);
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-2xl);
}
.footer-brand .logo-mono {
  color: var(--c-bg);
  font-weight: 400;
}
.footer-brand .logo-sans {
  color: var(--c-bg);
  font-weight: 500;
}
.footer-brand .logo-dot {
  color: var(--c-text-3);
}
.footer-tagline {
  margin-top: var(--space-md);
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--c-text-3);
  border-bottom:1px  solid var(--c-text-2);
  padding-bottom:1rem;
  margin-bottom:1rem;
}
.footer-links, a.legal {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.footer-links a, a.legal {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--c-text-3);
  transition: color 0.3s;
}
.footer-links a:hover ,a.legal:hover {
  color: var(--c-bg);
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.footer-contact a,
.footer-contact span {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--c-text-3);
  transition: color 0.3s;
}
.footer-contact a:hover {
  color: var(--c-bg);
}
.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--space-lg);
  margin-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.footer-bottom p {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--c-text-3);
}
.footer-update {
  font-family: var(--font-mono);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--c-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--c-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--c-text-4);
}

/* ─── Selection ─── */
::selection {
  background: rgba(45,45,43,0.12);
  color: var(--c-text);
}

/* ─── Páginas legales ─── */
.legal-page {
  padding-top: calc(var(--space-3xl) + 80px);
}
.legal-page .section-h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}
.legal-content {
  max-width: 800px;
}
.legal-block {
  margin-bottom: var(--space-2xl);
}
.legal-block h2 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--c-text);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--c-border-light);
}
.legal-block h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--c-text);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}
.legal-block p,
.legal-block li {
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--c-text-2);
  margin-bottom: var(--space-md);
}
.legal-block ul {
  list-style: none;
  margin-bottom: var(--space-lg);
}
.legal-block ul li {
  position: relative;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
}
.legal-block ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--c-text-4);
}
.legal-block a {
  color: var(--c-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-block a:hover {
  color: var(--c-accent-2);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  font-size: 0.875rem;
}
.legal-table th,
.legal-table td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border: 1px solid var(--c-border-light);
}
.legal-table th {
  background: var(--c-bg-2);
  font-weight: 400;
  color: var(--c-text);
}
.legal-table td {
  color: var(--c-text-2);
}
.legal-table code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: var(--c-bg-2);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--c-text);
}

/* ─── Cookie Banner ─── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: var(--c-text);
  color: var(--c-bg);
  padding: var(--space-lg) var(--space-xl);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
  transform: translateY(100%);
  transition: transform 0.5s var(--ease-out);
}
.cookie-banner.is-visible {
  transform: translateY(0);
}
.cookie-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
}
.cookie-banner-text {
  flex: 1;
  min-width: 260px;
}
.cookie-banner-text p {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--c-text-3);
  margin: 0;
}
.cookie-banner-text a {
  color: var(--c-bg);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-banner-text a:hover {
  opacity: 0.8;
}
.cookie-banner-actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}
.cookie-btn {
  padding: 0.625rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 400;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, transform 0.2s;
  border: none;
}
.cookie-btn:hover {
  transform: translateY(-1px);
}
.cookie-btn-accept {
  background: var(--c-bg);
  color: var(--c-text);
}
.cookie-btn-accept:hover {
  background: var(--c-bg-2);
}
.cookie-btn-reject {
  background: transparent;
  color: var(--c-text-3);
  border: 1px solid rgba(255,255,255,0.15);
}
.cookie-btn-reject:hover {
  color: var(--c-bg);
  border-color: rgba(255,255,255,0.3);
}

@media (max-width: 640px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-banner-actions {
    justify-content: stretch;
  }
  .cookie-btn {
    flex: 1;
  }
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {

  .section-inner {
    max-width: 100%;
  }
  .diagnostico-content {
    grid-template-columns: 1fr;
  }
  .diagnostico-visual {
    order: -1;
  }
  .pilares-grid {
    grid-template-columns: 1fr;
  }
  .servicios-grid {
    grid-template-columns: 1fr;
  }
  .planes-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .header {
    padding: var(--space-md);
  }
  .section {
    padding: var(--space-2xl) var(--space-md);
  }
  .hero {
    padding: var(--space-2xl) var(--space-md) var(--space-xl);
  }
  .hero-cta {
    flex-direction: column;
  }

  .contact-link{display: none !important;}
  .btn {
    width: 100%;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ════════════════════════════════════════════
   ECOMM — Demo tienda online
   ════════════════════════════════════════════ */

.ecomm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.ecomm-toggle {
  display: inline-flex;
  background: var(--c-bg-2);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
}

.toggle-btn {
  padding: 0.5rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 400;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--c-text-3);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.toggle-btn.active {
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: var(--shadow-sm);
}

.ecomm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

@media (max-width: 1024px) {
  .ecomm-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .ecomm-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Producto Card ─── */
.producto-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  display: flex;
  flex-direction: column;
}

.producto-card:hover {
  border-color: var(--c-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.producto-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--c-bg-2);
  overflow: hidden;
  cursor: pointer;
}

.producto-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}

.producto-img-wrap img.active {
  opacity: 1;
}

.producto-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-4);
  font-size: 0.875rem;
}

.producto-body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 1;
}

.producto-category {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-text-4);
}

.producto-name {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--c-text);
  line-height: 1.3;
}

.producto-desc {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--c-text-2);
  line-height: 1.6;
}

.producto-price {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--c-text);
  margin-top: auto;
  padding-top: var(--space-md);
}

.producto-price .price-euro {
  color: var(--c-text-3);
  font-size: 1rem;
}

.producto-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding-top: var(--space-md);
}

.producto-add-card{ height:fit-content}
.producto-add-content{height:fit-content}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  overflow: hidden;
}

.qty-control button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-bg-2);
  color: var(--c-text-2);
  font-size: 1.125rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.qty-control button:hover {
  background: var(--c-bg-3);
}

.qty-control span {
  width: 40px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--c-text);
}

.btn-add-cart {
  flex: 1;
  padding: 0.625rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  background: var(--c-accent);
  color: var(--c-bg);
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn-add-cart:hover {
  background: var(--c-text);
  transform: translateY(-1px);
}

/* ─── Modo Edición ─── */
.producto-card.is-editing .producto-name,
.producto-card.is-editing .producto-desc {
  outline: none;
  border-bottom: 1px dashed var(--c-border);
  transition: background 0.2s;
}

.producto-card.is-editing .producto-name:focus,
.producto-card.is-editing .producto-desc:focus,
.producto-card.is-editing [contenteditable="true"]:focus {
  background: rgba(45, 45, 43, 0.04);
}

.producto-card.is-editing .producto-price [contenteditable="true"] {
  outline: none;
  border-bottom: 1px dashed var(--c-border);
}

.producto-card.is-editing .producto-img-wrap {
  cursor: pointer;
  position: relative;
}

.producto-card.is-editing .producto-img-wrap::after {
  content: 'Editar imágenes';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 28, 26, 0.5);
  color: var(--c-bg);
  font-size: 0.875rem;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.producto-card.is-editing .producto-img-wrap:hover::after {
  opacity: 1;
}

.producto-edit-actions {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--c-border-light);
}

.btn-edit {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.8125rem;
  background: var(--c-bg-2);
  color: var(--c-text-2);
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-edit:hover {
  background: var(--c-bg-3);
  color: var(--c-text);
}

.btn-delete {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.8125rem;
  background: transparent;
  color: #c62828;
  border: 1px solid rgba(198, 40, 40, 0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-delete:hover {
  background: rgba(198, 40, 40, 0.06);
}

/* ─── Modal Imágenes ─── */
.ecomm-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.ecomm-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.ecomm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 28, 26, 0.5);
  backdrop-filter: blur(4px);
}

.ecomm-modal-content {
  position: relative;
  z-index: 1;
  background: var(--c-surface);
  border-radius: 12px;
  width: 90%;
  max-width: 640px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.ecomm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--c-border-light);
}

.ecomm-modal-header h3 {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 400;
}

.ecomm-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--c-text-3);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.ecomm-modal-close:hover {
  background: var(--c-bg-2);
  color: var(--c-text);
}

.ecomm-modal-body {
  padding: var(--space-lg) var(--space-xl);
  overflow-y: auto;
  flex: 1;
}

.ecomm-image-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

@media (max-width: 640px) {
  .ecomm-image-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ecomm-image-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--c-bg-2);
}

.ecomm-image-item.dragging {
  opacity: 0.5;
  border-color: var(--c-accent);
}

.ecomm-image-preview {
  position: relative;
  aspect-ratio: 1;
  cursor: grab;
}

.ecomm-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ecomm-image-item .img-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(198, 40, 40, 0.9);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.ecomm-image-item:hover .img-remove {
  opacity: 1;
}

.ecomm-image-alt {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--c-border);
  padding: 0.5rem;
  background: var(--c-surface);
  color: var(--c-text);
  font: inherit;
  font-size: 0.75rem;
}

/* ─── Pasarelas de pago ─── */
.stripe-section {
  background: var(--c-bg-2);
}


.stripe-section p{font-weight: 300;}
.pasarelas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.pasarela-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
  border-radius: 12px;
  background: var(--c-surface);
}

.pasarela-stripe {
  position: relative;
  border: 1px solid var(--c-accent);
}
.pasarela-stripe img{
  max-height: 2.8rem;
}

.pasarela-redsys {
  border: 1px solid var(--c-border);
}

.pasarela-redsys img{
  max-height: 4rem;
}

.badge-optima {
  position: absolute;
  top: -14px;
  right: 20px;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--c-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pasarela-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}


.pasarela-header a {
  min-height:4rem;
  display: flex;
  align-items: flex-end;
}

.pasarela-list {
  margin: 1.5rem 0;
  padding-left: 1.2rem;
}

@media (max-width: 640px) {
  .pasarelas-grid {
    grid-template-columns: 1fr;
  }

  .pasarela-card {
    padding: var(--space-xl);
  }
}

.ecomm-image-drop {
  border: 2px dashed var(--c-border);
  border-radius: 8px;
  padding: var(--space-xl);
  text-align: center;
  color: var(--c-text-3);
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.ecomm-image-drop.drag-over {
  border-color: var(--c-accent);
  background: rgba(45, 45, 43, 0.04);
}

.ecomm-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--c-border-light);
}

/* ─── Carga perezosa (placeholder demo) ─── */
#ecomm-placeholder .btn-primary svg {
  vertical-align: middle;
  margin-right: 0.5rem;
}

/* ─── Drag & drop de tarjetas ─── */
.producto-card {
  position: relative;
}

.producto-card.dragging {
  opacity: 0.6;
  box-shadow: var(--shadow-lg);
}

.producto-card.drag-over {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(210, 74, 48, 0.15);
}

.drag-handle {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px 6px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--c-text-3);
  cursor: grab;
  user-select: none;
  line-height: 1;
  box-shadow: var(--shadow-sm);
}

.drag-handle:active {
  cursor: grabbing;
}

/* ─── Meta edición (EAN / Stock) ─── */
.producto-meta-edit {
  display: flex;
  gap: var(--space-sm);
  font-size: 0.75rem;
  color: var(--c-text-4);
  padding-top: var(--space-sm);
}

.producto-meta-edit [contenteditable="true"] {
  border-bottom: 1px dashed var(--c-border);
  min-width: 2ch;
  outline: none;
}

.producto-meta-edit [contenteditable="true"]:focus {
  background: rgba(45, 45, 43, 0.04);
}
