/* =============================================================================
   Amezu Labs — landing "coming soon"
   Diseño: minimalista, mobile-first, tema claro/oscuro por tokens CSS.
   ============================================================================= */

/* ---------- Tokens ---------- */
:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --accent-1: #7c3aed;   /* violeta */
  --accent-2: #22d3ee;   /* cian    */
  --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --container: 1100px;
  --gutter: clamp(16px, 4vw, 32px);

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* Tema oscuro (por defecto) */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-elev: rgba(255, 255, 255, 0.04);
  --bg-elev-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #e8ebf5;
  --text-2: #a5adc4;
  --text-3: #7c86a2;
  --link: #8ee7f5;
  --grid-line: rgba(255, 255, 255, 0.045);
  --orb-opacity: 0.55;
  --header-bg: rgba(11, 16, 32, 0.72);
  --btn-primary-text: #ffffff;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --focus: #22d3ee;
}

/* Tema claro */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-elev: #f6f7fb;
  --bg-elev-hover: #eef0f7;
  --border: #e4e7f0;
  --border-strong: #cfd4e3;
  --text: #0f172a;      /* 16.9:1 sobre blanco */
  --text-2: #3f4a63;    /* 8.6:1 */
  --text-3: #64708c;    /* 5.1:1 */
  --link: #5b21b6;      /* 7.4:1 */
  --grid-line: rgba(15, 23, 42, 0.05);
  --orb-opacity: 0.35;
  --header-bg: rgba(255, 255, 255, 0.78);
  --btn-primary-text: #ffffff;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --focus: #5b21b6;
}

/* ---------- Reset básico ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
}
.skip-link:focus { top: 12px; }

/* ---------- Fondo decorativo ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
}
.bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: var(--orb-opacity);
  will-change: transform;
  animation: float 18s ease-in-out infinite alternate;
}
.bg__orb--1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -18vmax;  background: var(--accent-1); }
.bg__orb--2 { width: 38vmax; height: 38vmax; right: -14vmax; top: 4vmax;   background: var(--accent-2); animation-delay: -6s; animation-duration: 22s; }
.bg__orb--3 { width: 30vmax; height: 30vmax; left: 30vw;   bottom: -20vmax; background: #4f46e5;       animation-delay: -12s; animation-duration: 26s; opacity: calc(var(--orb-opacity) * .6); }

@keyframes float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, 4vh, 0) scale(1.08); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.125rem;
}
.brand:hover { text-decoration: none; }
.brand__mark { flex: none; border-radius: 10px; box-shadow: 0 4px 14px rgba(124, 58, 237, .35); }
.brand__accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: 2px;
}

.controls { display: flex; align-items: center; gap: 10px; }

.lang-switch {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.lang-switch__btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 6px 12px;
  min-width: 44px;
  min-height: 34px;
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text-2);
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.lang-switch__btn:hover { color: var(--text); }
.lang-switch__btn[aria-pressed="true"] {
  background: var(--gradient);
  color: #fff;
}

.theme-toggle {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.theme-toggle:hover { background: var(--bg-elev-hover); border-color: var(--border-strong); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle .icon { grid-area: 1 / 1; transition: opacity .25s var(--ease), transform .35s var(--ease); }
/* En oscuro se muestra el sol (acción: pasar a claro); en claro, la luna */
:root[data-theme="dark"]  .icon--moon { opacity: 0; transform: rotate(-90deg) scale(.6); }
:root[data-theme="dark"]  .icon--sun  { opacity: 1; transform: none; }
:root[data-theme="light"] .icon--sun  { opacity: 0; transform: rotate(90deg) scale(.6); }
:root[data-theme="light"] .icon--moon { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
main { flex: 1; }

.hero {
  padding-block: clamp(56px, 12vh, 128px) clamp(32px, 6vh, 64px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-2);
  animation: rise .7s var(--ease) both;
}
.eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, .6);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 211, 238, .55); }
  70%  { box-shadow: 0 0 0 10px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.hero__title {
  margin-top: 24px;
  max-width: 16ch;
  font-size: clamp(2.125rem, 6.2vw, 4.25rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-wrap: balance;
  animation: rise .8s .08s var(--ease) both;
}
.gradient-text {
  background: linear-gradient(120deg, var(--accent-1) 0%, var(--accent-2) 40%, var(--accent-1) 80%, var(--accent-2) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s linear infinite;
}
@keyframes shimmer {
  from { background-position: 0% 50%; }
  to   { background-position: 250% 50%; }
}

/* ---------- Terminal "en construcción" ---------- */
.terminal {
  width: 100%;
  max-width: 560px;
  margin-top: 40px;
  text-align: left;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  overflow: hidden;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: rise .8s .32s var(--ease) both;
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.terminal__dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal__dot--r { background: #ff5f57; }
.terminal__dot--y { background: #febc2e; }
.terminal__dot--g { background: #28c840; }
.terminal__title {
  margin-left: auto;
  font-size: .75rem;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: .02em;
}
.terminal__body {
  margin: 0;
  padding: 16px 18px 18px;
  min-height: 9.2em;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .875rem;
  line-height: 1.75;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal__line { display: block; }
.terminal__prompt { color: var(--accent-2); font-weight: 700; }
.terminal__ok { color: #22c55e; font-weight: 700; }
.terminal__progress {
  display: inline-block;
  vertical-align: middle;
  width: 110px;
  height: 8px;
  margin: 0 4px 0 2px;
  border-radius: 999px;
  background: var(--border-strong);
  overflow: hidden;
}
.terminal__progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--gradient);
  transition: width .6s var(--ease);
}
.terminal__pct { color: var(--text-3); font-size: .8em; }
.terminal__cursor {
  display: inline-block;
  width: .6em;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--accent-2);
  border-radius: 2px;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

/* ---------- Aparición al hacer scroll ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }
html.js .reveal:nth-child(2) { transition-delay: .1s; }
html.js .reveal:nth-child(3) { transition-delay: .2s; }

.hero__lead {
  margin-top: 20px;
  max-width: 58ch;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: var(--text-2);
  text-wrap: pretty;
  animation: rise .8s .16s var(--ease) both;
}

.hero__actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  animation: rise .8s .24s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  color: var(--btn-primary-text);
  background: var(--gradient);
  box-shadow: 0 8px 24px rgba(124, 58, 237, .32);
}
.btn--primary:hover { box-shadow: 0 12px 30px rgba(124, 58, 237, .42); }

.btn--ghost {
  color: var(--text);
  background: var(--bg-elev);
  border-color: var(--border-strong);
}
.btn--ghost:hover { background: var(--bg-elev-hover); }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(32px, 6vh, 64px); }

.section__title {
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}
.section__lead {
  margin-top: 8px;
  text-align: center;
  color: var(--text-2);
}

.grid {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.card::before {
  /* borde con degradado sutil al pasar el cursor */
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--card-accent-1, var(--accent-1)), var(--card-accent-2, var(--accent-2)));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .25s var(--ease);
  pointer-events: none;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); background: var(--bg-elev-hover); }
.card:hover::before { opacity: 1; }
.card--link:hover { text-decoration: none; }

.card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--gradient);
  color: #fff;
  margin-bottom: 4px;
}
.card__head { display: flex; align-items: center; gap: 12px; }
.card__arrow { margin-left: auto; color: var(--text-3); transition: color .2s, transform .2s var(--ease); }
.card--link:hover .card__arrow { color: var(--text); transform: translate(2px, -2px); }
.card__title { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
.card__text { color: var(--text-2); font-size: .975rem; }
.card__url { margin-top: auto; font-size: .8125rem; color: var(--text-3); font-weight: 500; }

/* Badges con la identidad de cada producto (colores tomados de sus propios sitios) */
.app-badge {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  transition: transform .25s var(--ease);
}
.card--link:hover .app-badge { transform: scale(1.06) rotate(-3deg); }

/* Rutix: menta sobre verde oscuro, icono de tendencia */
.app-badge--rutix {
  background: linear-gradient(135deg, #2dd4bf, #5eead4);
  color: #06281f;
  box-shadow: 0 4px 14px rgba(45, 212, 191, .35);
}
/* EzzyApps: "e" blanca sobre negro con punto azul */
.app-badge--ezzyapps {
  background: #0f172a;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 4px 14px rgba(15, 23, 42, .35);
}
.app-badge__dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2563eb;
}
/* EzzyMessage: "e" blanca sobre azul */
.app-badge--ezzymessage {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .4);
}

/* Acento por producto: borde en hover y flecha */
.card--rutix       { --card-accent-1: #2dd4bf; --card-accent-2: #34d399; }
.card--ezzyapps    { --card-accent-1: #2563eb; --card-accent-2: #38bdf8; }
.card--ezzymessage { --card-accent-1: #2563eb; --card-accent-2: #7c3aed; }
.card--rutix:hover .card__arrow       { color: #2dd4bf; }
.card--ezzyapps:hover .card__arrow    { color: #3b82f6; }
.card--ezzymessage:hover .card__arrow { color: #3b82f6; }

/* ---------- Contacto ---------- */
.contact {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(32px, 6vw, 56px) var(--gutter);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elev);
}
.contact::after {
  content: "";
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 120%;
  background: radial-gradient(closest-side, rgba(124, 58, 237, .28), transparent 70%);
  pointer-events: none;
}
.contact > * { position: relative; z-index: 1; }
.contact__title {
  font-size: clamp(1.375rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.contact__text { margin-top: 10px; color: var(--text-2); }
.contact__mail {
  display: inline-block;
  margin-top: 18px;
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  border-bottom: 2px solid transparent;
  border-image: var(--gradient) 1;
  padding-bottom: 2px;
  word-break: break-all;
}
.contact__mail:hover { text-decoration: none; opacity: .85; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 24px;
  margin-top: clamp(24px, 4vh, 48px);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: .875rem;
  color: var(--text-3);
}
.site-footer__copy { color: var(--text-2); }

/* ---------- Accesibilidad / movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .bg__orb { animation: none; }
  .gradient-text { animation: none; }
  html.js .reveal { opacity: 1; transform: none; }
}

/* ---------- Ajustes móviles ---------- */
@media (max-width: 480px) {
  .hero__title { max-width: 14ch; }
  .btn { width: 100%; }
  .site-footer__inner { flex-direction: column; text-align: center; }
  .brand__name { font-size: 1.0625rem; }
}
