/* ==========================================================================
   SolucionesRuiz — pantalla única
   ========================================================================== */

@font-face {
  font-family: "Michroma";
  src: url("../fonts/michroma.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #04060b;
  --ink: #eef3fa;
  --accent: #6ea8ff;

  --px: 0;
  --py: 0;
}

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--ink);
  font-family: "Michroma", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(110, 168, 255, 0.28);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Fondo: degradado de respaldo (visible sin WebGL y durante la carga)
   -------------------------------------------------------------------------- */

body::before {
  content: "";
  position: fixed;
  inset: -15%;
  z-index: 0;
  background:
    radial-gradient(42% 48% at 50% 46%, rgba(110, 168, 255, 0.1), transparent 72%),
    radial-gradient(34% 42% at 16% 82%, rgba(58, 102, 190, 0.09), transparent 72%),
    radial-gradient(30% 34% at 86% 14%, rgba(90, 142, 226, 0.07), transparent 72%),
    radial-gradient(60% 65% at 50% 50%, #070b14 0%, #04060b 62%, #020308 100%);
}

/* grano fino sobre el fondo, por debajo del texto */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  mix-blend-mode: soft-light;
}

#fluid {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  background: var(--bg);
  opacity: 0;
  transition: opacity 2s ease;
}

#fluid.is-ready {
  opacity: 1;
}

.no-webgl #fluid {
  display: none;
}

/* --------------------------------------------------------------------------
   Escena
   -------------------------------------------------------------------------- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right))
    max(1.25rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  perspective: 1200px;
}

.wordmark-wrap {
  transform-style: preserve-3d;
  transform: translate3d(calc(var(--px) * 14px), calc(var(--py) * 10px), 0)
    rotateX(calc(var(--py) * -2.3deg)) rotateY(calc(var(--px) * 2.9deg));
  transition: transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.wordmark-intro {
  position: relative;
  font-size: clamp(1.6rem, 5.8vw, 5.8rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.005em;
  white-space: nowrap;
  animation: wordmark-in 1.7s cubic-bezier(0.19, 1, 0.22, 1) 0.2s both;
}

/* canto extrusionado, detrás de la cara del texto */
.wordmark-edge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  font: inherit;
  color: #2a4667;
  transform: translate3d(0.065em, 0.08em, 0);
  text-shadow:
    0.028em 0.034em 0 #16263c,
    0 0.14em 0.28em rgba(0, 0, 0, 0.5);
  pointer-events: none;
  user-select: none;
}

.wordmark {
  position: relative;
  z-index: 2;
  display: inline-block;
  margin: 0;
  font: inherit;
  color: transparent;
  background-image: linear-gradient(
    178deg,
    #ffffff 0%,
    #eef4fb 38%,
    #c6d2e2 74%,
    #a5b4c9 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 34px rgba(110, 168, 255, 0.16))
    drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .wordmark {
    color: var(--ink);
    background: none;
    filter: none;
  }

  .wordmark-edge,
  .wordmark::after {
    display: none;
  }
}

/* barrido de luz que sigue al cursor sobre las letras */
.wordmark::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: 3;
  color: transparent;
  background-image: radial-gradient(
    10rem circle at var(--mx, 50%) var(--my, 50%),
    rgba(240, 247, 255, 0.92),
    rgba(150, 195, 255, 0.32) 38%,
    transparent 70%
  );
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.wordmark-wrap:hover .wordmark::after {
  opacity: 0.85;
}

@keyframes wordmark-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(1.025);
    letter-spacing: 0.085em;
    filter: blur(16px);
  }
  to {
    opacity: 1;
    transform: none;
    letter-spacing: 0.005em;
    filter: blur(0);
  }
}

/* --------------------------------------------------------------------------
   Accesibilidad: sin movimiento
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  #fluid,
  .wordmark::after {
    transition: none;
  }

  .wordmark {
    animation: none;
  }

  .wordmark-wrap {
    transform: none;
    transition: none;
  }
}

@media (prefers-contrast: more) {
  .wordmark {
    background-image: none;
    color: #ffffff;
    filter: none;
  }

  .wordmark::after {
    display: none;
  }
}







