html {
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at 15% -8%, rgba(49, 143, 255, 0.18), transparent 32rem),
    radial-gradient(circle at 92% 0%, rgba(139, 92, 246, 0.14), transparent 28rem),
    var(--bg);
  line-height: 1.5;
  transition: background-color var(--transition), color var(--transition);
}

body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

html[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(15, 62, 103, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 62, 103, 0.035) 1px, transparent 1px);
}

body.menu-open,
body.dialog-open {
  overflow: hidden;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: 104px 0;
}

.section-soft {
  border-block: 1px solid var(--line);
  background:
    radial-gradient(circle at 92% 12%, rgba(94, 185, 255, 0.08), transparent 28rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 38px;
}

.section-heading > div:first-child {
  max-width: 760px;
}

.section-heading > p {
  max-width: 500px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.section-heading.centered {
  display: block;
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
}

.section-heading.centered > p {
  margin: 16px auto 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 22px;
  height: 1px;
  content: "";
  background: currentColor;
}

h1,
h2,
h3,
strong {
  text-wrap: balance;
}

h2 {
  margin-top: 12px;
  font-size: clamp(2.2rem, 4.8vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

h3 {
  font-size: 1.08rem;
  line-height: 1.2;
}

p {
  color: var(--muted);
}

svg {
  width: 1em;
  height: 1em;
}

[data-icon] {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

::selection {
  color: #06101d;
  background: #8ae7ff;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: #06101d;
  background: #8ae7ff;
  font-weight: 900;
  transform: translateY(-180%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 700ms cubic-bezier(.2, .7, .2, 1),
    transform 700ms cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.noscript-message {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  max-width: 420px;
  padding: 16px 18px;
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
  color: #fecdd3;
  background: #351824;
  box-shadow: var(--shadow-medium);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}


/* =========================================================
   HOME MODERNA CLARA · AJUSTES GLOBALES
   ========================================================= */
html[data-theme="light"] body {
  background:
    radial-gradient(circle at 8% -5%, rgba(56, 189, 248, 0.16), transparent 30rem),
    radial-gradient(circle at 90% 2%, rgba(124, 58, 237, 0.10), transparent 28rem),
    linear-gradient(180deg, #fbfdff 0%, #f7f9fd 44%, #f4f7fb 100%);
}

html[data-theme="light"] body::before {
  opacity: .5;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.026) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.65) 38%, transparent 82%);
}

html[data-theme="light"] .section-soft {
  background:
    radial-gradient(circle at 92% 10%, rgba(37, 99, 235, 0.07), transparent 28rem),
    linear-gradient(180deg, rgba(255,255,255,.78), rgba(240,245,252,.72));
}

html[data-theme="light"] .eyebrow {
  color: #2563eb;
}

/* =========================================================
   XIPALAPLUTS · BASE CLARA PREMIUM V3
   ========================================================= */
html[data-theme="light"] body {
  color: var(--text);
  background:
    radial-gradient(circle at 12% -4%, rgba(59, 130, 246, 0.13), transparent 31rem),
    radial-gradient(circle at 93% 5%, rgba(124, 58, 237, 0.10), transparent 28rem),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 46%, #f2f6fc 100%);
}

html[data-theme="light"] body::before {
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(38, 71, 113, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 71, 113, 0.025) 1px, transparent 1px);
}

html[data-theme="light"] .section-soft {
  border-color: rgba(32, 61, 101, 0.08);
  background:
    radial-gradient(circle at 95% 4%, rgba(37, 99, 235, 0.07), transparent 25rem),
    linear-gradient(180deg, #f0f5fb 0%, #f7f9fd 100%);
}

html[data-theme="light"] .section-heading h2,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3 {
  color: #0b1b33;
}

html[data-theme="light"] .eyebrow {
  color: #1d5ec7;
  border-color: rgba(37, 99, 235, 0.16);
  background: rgba(37, 99, 235, 0.07);
}
