:root {
  /* Landing en modo oscuro (identidad única, sin variante clara) */
  --surface: #002340;
  --surface-dim: #002340;
  --surface-bright: #002d67;
  --surface-container-lowest: #002340;
  --surface-container-low: #002340;
  --surface-container: #012451;
  --surface-container-high: #012451;
  --surface-container-highest: #003a80;
  --on-surface: #f0f3f7;
  --on-surface-variant: #d3d9e2;
  --outline: #5c7297;
  --outline-variant: #2a3f5c;
  --primary: #007aff;
  --on-primary: #ffffff;
  --primary-container: #002d67;
  --secondary: #a8760a;
  --background: #002340;
  --on-background: #f0f3f7;
  --brand-white: #ffffff;
  --brand-blue: #00295e;
  --brand-blue-dark: #001833;

  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-annotation: 'Space Grotesk', sans-serif;

  --spacing-unit: 8px;
  --container-max: 1280px;
  --gutter: 24px;
  --section-padding: 60px;
}

@media (max-width: 768px) {
  :root {
    --gutter: 15px;
  }
}

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

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 100px;
}

body {
  background-color: var(--background);
  color: var(--on-background);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* Silkscreen — exclusivo para anotaciones técnicas (specs, contadores, coordenadas), nunca en párrafos o títulos */
.silkscreen-regular {
  font-family: var(--font-annotation);
  font-weight: 400;
  font-style: normal;
}

.silkscreen-bold {
  font-family: var(--font-annotation);
  font-weight: 700;
  font-style: normal;
}

/* Botón marco técnico (tech frame) — usado en toda la landing */
.btn-frame {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border: none;
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-primary);
  background: var(--primary);
  overflow: hidden;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.3s ease;
}

.btn-frame:hover {
  transform: scale(1.045);
}

.btn-frame:hover {
  filter: drop-shadow(0 0 4px var(--primary));
}

.btn-frame:active {
  border-color: var(--primary);
  transform: scale(1);
  filter: none;
}

/* Camino de luz alrededor del marco: recorre el perímetro una vez por hover */
.btn-frame__light {
  position: absolute;
  top: 0;
  left: 0;
  width: 45px;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    rgba(191, 226, 255, 0) 0%,
    rgba(191, 226, 255, 0.5) 35%,
    #d9ecff 75%,
    #ffffff 100%
  );
  box-shadow: 0 0 12px 2px rgba(217, 236, 255, 0.85);
  filter: blur(0.4px);
  opacity: 0;
  pointer-events: none;
  offset-path: inset(0 round 0);
  offset-distance: 0%;
  offset-rotate: auto;
}

.btn-frame:hover .btn-frame__light {
  animation: btn-light-travel 1.1s cubic-bezier(0.4, 0, 0.2, 1) 1;
}

.btn-frame:active .btn-frame__light {
  animation: none;
  opacity: 0;
}

@keyframes btn-light-travel {
  0% {
    offset-distance: 0%;
    width: 10px;
    opacity: 0;
  }
  8% {
    width: 45px;
    opacity: 1;
  }
  78% {
    width: 45px;
    opacity: 1;
  }
  100% {
    offset-distance: 100%;
    width: 5px;
    opacity: 0;
  }
}

/* Distorsión líquida WebGL (módulo compartido: hero y contacto) */
.liquid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.hero__bg-img,
.contacto__bg-img {
  transition: opacity 0.6s ease;
}

.is-liquid .liquid-canvas {
  opacity: 1;
}

.is-liquid .hero__bg-img,
.is-liquid .contacto__bg-img {
  opacity: 0;
}
