/* Diaple Labs — Home v2
   Tokens y layout portados de "Diaple Labs Home v2.dc.html" (Claude Design). */

:root {
  --bg: #0B0B0B;
  --surface: #111111;
  --line: #1C1C1C;
  --line-soft: #161616;
  --line-card: #1F1F1F;
  --line-strong: #2A2A2A;
  --line-off: #1A1A1A;

  --text: #FFFFFF;
  --text-soft: #E9ECEF;
  --text-muted: #B8BDC2;
  --text-dim: #7C8288;
  --text-faint: #4A4F54;
  --text-disabled: #3A3A3A;

  --accent: #CCFF00;
  --accent-deep: #8ED100;
  --accent-mid: #DCFA45;
  --accent-pale: #E4F58A;
  --on-accent: #111111;

  --pad-x: clamp(20px, 4vw, 56px);
  --pad-y: clamp(56px, 8vw, 88px);
  --radius: 8px;
  --radius-card: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; }

button { font: inherit; }

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

/* Primer elemento tabulable de la página: invisible hasta que recibe foco.
   `fixed` y no `absolute` para que aparezca en pantalla aunque la página esté
   desplazada; `:focus` y no `:focus-visible` porque a un enlace fuera de
   pantalla sólo se llega tabulando. */
.skip {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 600;
  transition: top 160ms ease;
}
.skip:focus { top: 16px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.accent { color: var(--accent); }

@keyframes labsPulse {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}

/* ---------- Botones y piezas compartidas ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius);
  font-size: 15px;
  padding: 14px 24px;
  white-space: nowrap;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.btn--primary:hover { background: var(--accent-deep); color: var(--on-accent); }

.btn--ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-weight: 500;
}
.btn--ghost:hover { border-color: var(--accent); color: var(--text); }

.kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker--dot { display: flex; align-items: center; gap: 10px; }

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.dot--pulse {
  width: 9px; height: 9px;
  animation: labsPulse 2.4s ease-in-out infinite;
}

.body {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
}

.link { font-size: 14px; font-weight: 500; }

.section {
  padding: var(--pad-y) var(--pad-x);
  border-bottom: 1px solid var(--line);
}

.langs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.langs button {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: transparent;
  color: var(--text-dim);
  transition: background 180ms ease, color 180ms ease;
}
.langs button:hover { color: var(--text-soft); }
.langs button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* ---------- Cabecera ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px var(--pad-x);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 11, 11, 0.92);
  backdrop-filter: blur(8px);
}

.header__brand { display: flex; align-items: center; flex: none; }
.header__brand img { height: 26px; width: auto; mix-blend-mode: screen; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 30px);
  font-size: 14px;
}
.nav > a:not(.btn) { color: var(--text-soft); }
.nav > a:not(.btn):hover { color: var(--accent); }
.nav .btn { padding: 11px 20px; font-size: 14px; }

.header__mobile { display: none; align-items: center; gap: 10px; }

.burger {
  width: 46px; height: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
}
.burger span {
  width: 20px; height: 2px;
  background: var(--accent);
  display: block;
  transition: transform 200ms ease, opacity 200ms ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.menu[hidden] { display: none; }
.menu > a:not(.btn) {
  color: var(--text-soft);
  font-size: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line-soft);
}
.menu > a:not(.btn):hover { color: var(--accent); }
/* El último enlace de navegación (el .btn va después) va sin separador. */
.menu > a:not(.btn):nth-last-of-type(2) { border-bottom: none; }
.menu__cta {
  margin-top: 8px;
  justify-content: center;
  padding: 15px 20px;
}

@media (max-width: 899px) {
  .nav { display: none; }
  .header__mobile { display: flex; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(204, 255, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(204, 255, 0, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(circle at 72% 50%, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle at 72% 50%, #000 0%, transparent 72%);
}

.hero__glow {
  position: absolute;
  width: 640px; height: 640px;
  right: 6%; top: -80px;
  background: radial-gradient(circle, rgba(204, 255, 0, 0.16) 0%, rgba(204, 255, 0, 0.04) 40%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding: clamp(56px, 8vw, 104px) var(--pad-x) clamp(56px, 7vw, 96px);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 560px;
}

.hero h1 {
  font-size: clamp(40px, 7.5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero__body {
  margin: 0;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 46ch;
}

.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero__figure {
  height: clamp(260px, 34vw, 400px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero__figure-glow {
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(204, 255, 0, 0.14), transparent 65%);
}

.cube {
  position: relative;
  width: min(300px, 64vw);
  height: min(300px, 64vw);
}

.cube__face {
  position: absolute;
  left: 50%; top: 50%;
  width: 50%; height: 50%;
  transform-origin: 0 0;
  border: 1px solid rgba(204, 255, 0, 0.28);
  background: linear-gradient(135deg, rgba(204, 255, 0, 0.07), rgba(204, 255, 0, 0.01));
  box-shadow: inset 0 0 32px rgba(204, 255, 0, 0.18);
}
.cube__face--a {
  transform: rotate(210deg) skewX(-30deg) scaleY(0.864);
  border-color: rgba(204, 255, 0, 0.65);
}
.cube__face--b {
  transform: rotate(-30deg) skewX(-30deg) scaleY(0.864);
  border-color: rgba(204, 255, 0, 0.4);
}
.cube__face--c {
  transform: rotate(90deg) skewX(-30deg) scaleY(0.864);
}

.cube__core {
  position: absolute;
  left: 50%; top: 50%;
  width: 12px; height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 22px 6px rgba(204, 255, 0, 0.65);
}

.cube__spark {
  position: absolute;
  left: 50%; top: 5%;
  width: 9px; height: 9px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px 5px rgba(204, 255, 0, 0.5);
  animation: labsPulse 3s ease-in-out infinite;
}

/* ---------- Productos ---------- */

.products { overflow: hidden; }

.products__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.products__title { display: flex; flex-direction: column; gap: 14px; max-width: 58ch; }
.products__title h2 { font-size: clamp(26px, 3vw, 34px); }
.products__body {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
}

.carousel__controls { display: flex; align-items: center; gap: 10px; }
.carousel__counter { font-size: 13px; color: var(--text-dim); margin-right: 6px; }

.arrow {
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease;
}
.arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.arrow:disabled {
  border-color: var(--line-off);
  color: var(--text-disabled);
  cursor: default;
}

.carousel { overflow: hidden; margin: 0 -10px; }

.carousel__track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform 480ms cubic-bezier(.22, .61, .36, 1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carousel__track { transition: none; }
  .dot--pulse, .cube__spark { animation: none; opacity: 1; }
}

.slot {
  flex: 0 0 33.3333%;
  padding: 0 10px;
}
@media (max-width: 1099px) { .slot { flex-basis: 50%; } }
@media (max-width: 699px)  { .slot { flex-basis: 100%; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color 200ms ease, transform 200ms ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-4px); }

.card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg);
}

/* Marcador de reserva: se ve si la imagen del producto falta o falla al cargar. */
.card__media::before {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 88px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: rgba(204, 255, 0, 0.22);
  background:
    radial-gradient(circle at 50% 45%, rgba(204, 255, 0, 0.10), transparent 62%),
    linear-gradient(160deg, #131313, #0B0B0B);
}

/* <picture> es inline por defecto y dejaría un hueco bajo la imagen. */
.card__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.card__media img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__media img[data-broken] { display: none; }

.badge {
  position: absolute;
  top: 14px; right: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 999px;
  /* Borde transparente para que ambos estados midan igual. */
  border: 1px solid transparent;
  color: var(--on-accent);
}

/* Verde sólido: sólo para lo que está realmente en tiendas. */
.badge--live { background: var(--accent); }

/* Contorno gris apagado: no compite con el estado lanzado. El fondo translúcido
   mantiene el texto legible sobre cualquier imagen de producto. */
.badge--dev {
  background: rgba(11, 11, 11, 0.7);
  border-color: rgba(233, 236, 239, 0.3);
  color: var(--text-soft);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.card__body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.card__text { display: flex; flex-direction: column; gap: 8px; }
.card__name { font-size: 21px; letter-spacing: -0.01em; }
.card__desc { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-muted); }

.card__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text-soft);
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line-card);
  padding-top: 14px;
}
.card__seal { font-size: 12px; color: var(--text-dim); }
.card__link {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.card__soon { font-size: 12px; color: var(--text-faint); }

.products__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.dots { display: flex; align-items: center; gap: 8px; }
.dots button {
  width: 9px; height: 9px;
  border-radius: 999px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: var(--line-strong);
  transition: width 240ms ease, background 240ms ease;
}
.dots button[aria-current="true"] { width: 26px; background: var(--accent); }

/* ---------- Método ---------- */

.method {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 4vw, 48px);
}
@media (min-width: 1000px) { .method { grid-template-columns: 1fr 1fr; } }

.method__intro { display: flex; flex-direction: column; gap: 18px; }
.method__intro h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.1; }

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 480px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.step { display: flex; flex-direction: column; gap: 14px; }
.step__rail { display: flex; align-items: center; }
.step__dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.step__line { flex: 1; height: 1px; }

.step--1 .step__dot { background: #FFFFFF; }
.step--1 .step__line { background: linear-gradient(90deg, #FFFFFF, var(--accent-pale)); }
.step--2 .step__dot { background: var(--accent-pale); }
.step--2 .step__line { background: linear-gradient(90deg, var(--accent-pale), var(--accent-mid)); }
.step--3 .step__dot { background: var(--accent); }
.step--3 .step__line { background: var(--accent); }

.step h3 { font-size: 16px; letter-spacing: normal; }
.step p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--text-muted); }

/* ---------- Sobre Labs + alta ---------- */

.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: clamp(32px, 5vw, 72px);
}

.about__intro { display: flex; flex-direction: column; gap: 18px; }
.about__intro h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.15; }
.about__intro .body { line-height: 1.75; }
.about__corporate {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}
.about__corporate a {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.signup {
  background: var(--surface);
  border: 1px solid var(--line-card);
  border-radius: 14px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-self: start;
  scroll-margin-top: 96px;
}

.signup__title { font-size: 20px; letter-spacing: normal; }
.signup__body { margin: 0; font-size: 14px; line-height: 1.65; color: var(--text-muted); }

.signup__form { display: flex; gap: 10px; flex-wrap: wrap; }

.signup__input {
  flex: 1;
  min-width: 180px;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  transition: border-color 180ms ease;
}
.signup__input::placeholder { color: var(--text-dim); }
.signup__input:focus { border-color: var(--accent); outline: none; }

.signup__button {
  padding: 13px 22px;
  font-size: 14px;
  border: none;
  cursor: pointer;
}

/* Señuelo antispam: fuera de la vista y del flujo, pero sin display:none, que
   algunos bots detectan y saltan. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.signup__status { margin: 0; font-size: 13px; min-height: 1em; color: var(--text-muted); }
.signup__status[data-tone="error"] { color: #FF8A7A; }
.signup__status[data-tone="ok"] { color: var(--accent); }

/* ---------- Pie ---------- */

.footer {
  padding: 32px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer__logo { height: 34px; width: auto; opacity: 0.85; mix-blend-mode: screen; }
.footer__desc { margin: 0; font-size: 13px; color: var(--text-dim); }

.footer__meta {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-dim);
}
.footer__meta > a { color: var(--text-dim); }
.footer__meta > a:hover { color: var(--accent); }

.footer__langs { display: flex; align-items: center; gap: 10px; }
.footer__langs button {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
  transition: color 180ms ease;
}
.footer__langs button:hover { color: var(--text-soft); }
.footer__langs button[aria-pressed="true"] { font-weight: 600; color: var(--accent); }
