/* Cuentamania Variables & Base — v2.0.0 (Plugin Local)
   Authoritative Reference: DESIGN_SYSTEM.md
   Synchronized with Child Theme variables.css
*/
:root{
  /* 1. Core Identity: Colors */
  --c-bg: #000000;
  --c-bg-deep: #0E0D14;
  --c-bg-secondary: #14121F;
  --c-text: #DBDBDB;
  --c-heading: #FFFFFF;
  --c-muted: #BEB9BC;
  --c-text-muted: var(--c-muted);

  --c-primary: #543BF5;
  --gradient-primary: linear-gradient(105deg, rgb(9 13 56) 10%, rgb(238 57 112) 150%);
  --gradient-secondary: linear-gradient(90deg, #FA00FF 0%, #5200FF 100%);

  --c-danger: #EE3770;
  --c-success: #22CC28;
  --c-info: #2AAFBB;
  --c-warning: #BAB104;
  --c-bg-secondary: #14121F;
  --c-bg-hover: rgba(255,255,255,0.05);
  --c-border: rgba(255,255,255,0.12);

  /* 2. Visual DNA: Surfaces */
  --cm-surface: rgba(255,255,255, 0.04);
  --cm-surface-2: rgba(255,255,255, 0.08);
  --card-bg: var(--cm-surface);
  --card-radius: 20px;
  --card-shadow: 0 12px 40px rgba(0,0,0,0.55);
  --cm-border-color: rgba(255,255,255, 0.12);

  /* 3. Core Component Foundations: Spacing & Typography */
  --ff-display: 'Trispace', Helvetica, Arial, Lucida, sans-serif;
  --ff-body-alt: 'Open Sans', Arial, sans-serif;
  --ff-ui: 'Inter', Helvetica, Arial, Lucida, sans-serif;

  --fs-xs: 0.8125rem;  /* 13px */
  --fs-sm: 0.875rem;   /* 14px */
  --fs-base: 1rem;     /* 16px */
  --fs-lg: 1.125rem;   /* 18px */
  --fs-xl: 1.375rem;   /* 22px */
  --fs-2xl: 1.75rem;   /* 28px */
  --fs-3xl: 2.25rem;   /* 36px */
  --fs-4xl: 3rem;      /* 48px */

  --lh-normal: 1.55;
  --lh-tight: 1.15;

  /* Spacing Scale (8px) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Effects */
  --focus-ring: 0 0 0 3px rgba(84,59,245,0.45);
  --elev-1: 0 6px 18px rgba(0,0,0,.35);
  --cm-shadow-md: var(--card-shadow);

  /* Buttons */
  --btn-font: var(--ff-ui);
  --btn-font-weight: 700;
  --btn-radius: 8px;
  --btn-transition: all 300ms ease;
  --btn-bg-primary: var(--c-primary);
  --btn-color: #FFFFFF;
  --btn-py: 14px;
  --btn-px: 24px;

  /* Component Module Logic */
  --cm-background: var(--c-bg-deep);
  --cm-border: 1px solid var(--cm-border-color);
  --cm-primary: var(--c-primary);
  --cm-primary-rgb: 84,59,245;
  --cm-secondary-rgb: 250,0,255;
  --cm-bg-rgb: 14,13,20;
  --cm-warning-rgb: 186,177,4;
  --cm-radius-md: 12px;
  --cm-radius-lg: var(--card-radius);
  --cm-radius-full: 9999px;

  color-scheme: dark;
}

/* Base */
html, body{
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--ff-body-alt);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.cm-page{
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6{
  font-family: var(--ff-display);
  color: var(--c-text);
}
p{
  font-family: var(--ff-body-alt);
  color: var(--c-text);
}
h1, h2{
  color: var(--c-heading);
}
h1{ font-size: clamp(2rem, 2vw + 1.5rem, var(--fs-4xl)); line-height: var(--lh-tight); }
h2{ font-size: clamp(1.5rem, 1.5vw + 1rem, var(--fs-3xl)); line-height: var(--lh-snug); }
p{ font-size: var(--fs-base); }

/* Divi typography alignment */
body.cm-page h1,
body.cm-page h2,
body.cm-page h3,
body.cm-page h4,
body.cm-page h5,
body.cm-page h6,
body.cm-page .et_pb_module_header,
body.cm-page .et_pb_module_header a{
  font-family: var(--ff-display) !important;
}

body.cm-page .hero-copy .eyebrow{
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  color: #c17cff !important;
}
body.cm-page .hero-copy .display{
  font-family: var(--ff-display) !important;
  font-size: clamp(42px, 8vw, 88px) !important;
  line-height: 0.95 !important;
  font-weight: 600 !important;
}
body.cm-page .hero-copy .display .accent{
  background: var(--gradient-secondary) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}
body.cm-page .hero-copy .lead{
  font-size: clamp(16px, 2.1vw, 18px) !important;
}

/* Cards / Surfaces */
.cm-card{
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: var(--sp-6);
  backdrop-filter: saturate(120%) blur(6px);
}

/* Secciones destacadas con gradiente */
.cm-section--gradient{
  background-color: var(--c-bg-deep);
  background-image:
    radial-gradient(520px 320px at 22% 72%, rgba(206,0,255,.08), transparent 60%),
    radial-gradient(380px 280px at 78% 18%, rgba(0,127,255,.08), transparent 60%);
  color: var(--c-heading);
  border-radius:0;
}

/* Botones: base + variantes (usa solo variables) */
.cm-btn{
  color: var(--btn-color);
  border-width: 0;
  border-radius: var(--btn-radius);
  font-family: var(--btn-font) !important;
  font-weight: var(--btn-font-weight);
  padding: var(--btn-py) var(--btn-px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  transition: var(--btn-transition);
  position: relative;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  will-change: transform, filter;
}
.cm-btn:hover{ filter: brightness(1.05); transform: translateY(-1px); }
.cm-btn:active{ transform: translateY(0); }
.cm-btn:focus-visible{ outline: none; box-shadow: var(--focus-ring); }

.cm-btn__icon{
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.cm-btn--icon{ gap: var(--sp-2); }

.cm-btn--primary{ background-color: var(--btn-bg-primary); }
.cm-btn--danger{  background-color: var(--c-danger); }
.cm-btn--success{ background-color: var(--c-success); }

/* Inputs (aplica a todos por defecto) */
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="search"], textarea, select{
  font-weight: 700;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--c-heading);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
input::placeholder, textarea::placeholder{ color: rgba(255,255,255,0.6); text-transform: none; letter-spacing: normal; font-weight: 400;}
input:focus, textarea:focus, select:focus{
  box-shadow: var(--focus-ring);
  border-color: rgba(84,59,245,0.6);
  background: rgba(255,255,255,0.09);
}

/* Utilidades */
.cm-container,.et_pb_row{ max-width: min(1200px, 92vw); width: min(1200px, 92vw); margin-inline: auto; }
.cm-muted{ color: var(--c-muted); }
.cm-gradient-text{
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Media queries con rangos Divi */
@media (max-width: 768px){
  .cm-container,.et_pb_row{ width: 92vw; }
  h1{ font-size: clamp(1.75rem, 5vw + 1rem, 2.25rem); }
}

@media (min-width: 768px) and (max-width: 980px){
  .cm-container,.et_pb_row{ width: min(940px, 90vw); }
}

@media (min-width: 1100px) and (max-width: 1405px){
  .cm-container,.et_pb_row{ width: min(1100px, 90vw); }
}

@media (min-width: 1405px){
  .cm-container,.et_pb_row{ width: 1216px; }
}
