/* ¿Muerdes o no muerdes? · #NoCaigasEnLaRed */

:root {
  --ground: #0A0B1E;
  --ground-2: #14173A;
  --ground-3: #222759;
  --ink: #F5F7FF;
  --ink-2: #C3C7EC;
  --accent: #C6FF3D;
  --alert: #FF3B5C;
  --cyan: #3DE0FF;
  --paper: #F5F7FF;
  --paper-ink: #0A0B1E;

  --display: 'Unbounded', 'Space Grotesk', sans-serif;
  --text: 'Space Grotesk', system-ui, sans-serif;

  --margin: clamp(20px, 4vw, 56px);
  --gutter-l: max(var(--margin), env(safe-area-inset-left, 0px));
  --gutter-r: max(var(--margin), env(safe-area-inset-right, 0px));
  color-scheme: dark;
  --radius: 28px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--ground-3) var(--ground);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.5;
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--ground); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: var(--ground-3); border-radius: 6px; border: 3px solid var(--ground); }

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

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }

h1, h2, h3 { font-family: var(--display); font-weight: 900; margin: 0; text-wrap: balance; }
p { margin: 0; }

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

.skip {
  position: absolute; left: var(--margin); top: -100px; z-index: 10;
  background: var(--accent); color: var(--ground); padding: 12px 20px; border-radius: 999px; font-weight: 700;
}
.skip:focus { top: 12px; }

/* ---------- Barra ---------- */

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-block: 20px;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
.wordmark { font-family: var(--display); font-weight: 900; font-size: 1.15rem; text-decoration: none; letter-spacing: -0.02em; }
.wordmark span, .foot-mark span { color: var(--accent); }
.bar nav { display: flex; align-items: center; gap: 28px; }
.bar nav a.social-btn { color: var(--ground); text-decoration: none; }

.social-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 22px; border-radius: 999px;
  background: var(--accent); color: var(--ground); font-weight: 700; text-decoration: none;
  transition: transform 0.2s var(--ease-out), filter 0.2s;
}
.social-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.social-btn:active { transform: scale(0.98); }
.social-btn--big { margin-top: 24px; min-height: 60px; padding: 14px 30px; font-size: 1.15rem; }
.bar nav a { text-decoration: none; font-weight: 500; color: var(--ink-2); }
.bar nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Juego ---------- */

.game, .cebos, .ayuda, .foot { padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.game { padding-block: 12px 120px; }
.stage { min-height: min(820px, calc(100svh - 90px)); scroll-margin-top: 16px; }

/* Portada */
.intro {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 80px);
  align-items: center; min-height: inherit;
}
.intro h1 {
  font-size: clamp(2.9rem, 7.4vw, 6rem); line-height: 0.95; letter-spacing: -0.035em;
}
.lede { margin-top: 32px; font-size: clamp(1.15rem, 1.6vw, 1.35rem); max-width: 38ch; color: var(--ink); }

.modes { display: grid; gap: 14px; margin-top: 44px; max-width: 560px; }
.mode {
  display: grid; gap: 6px; text-align: left; cursor: pointer;
  padding: 26px 30px; border: 0; border-radius: var(--radius);
  font: inherit; color: var(--ink); background: var(--ground-3);
  transition: transform 0.25s var(--ease-out), background-color 0.25s;
}
.mode--inbox { background: var(--accent); color: var(--ground); }
.mode-name { font-family: var(--display); font-weight: 900; font-size: clamp(1.35rem, 2.2vw, 1.75rem); letter-spacing: -0.02em; }
.mode-desc { font-size: 1.05rem; }
.mode:hover { transform: translateY(-3px); }
.mode--chat:hover { background: #2C3270; }
.mode:active { transform: translateY(0) scale(0.99); }

/* Escena de la portada: mensajes colgando de anzuelos */
.pond { position: relative; height: clamp(560px, 66vh, 680px); }
.bait {
  position: absolute; top: 0; display: flex; flex-direction: column; align-items: center;
  transform-origin: 50% 0; animation: sway 5s ease-in-out infinite;
}
.bait .line { width: 4px; background: var(--ink-2); opacity: 0.7; }
.bait .hook { width: 44px; color: var(--ink); margin-top: -4px; }
.bait-card {
  margin-top: -6px; padding: 16px 20px; border-radius: 20px; width: 230px;
  background: var(--paper); color: var(--paper-ink); font-size: 1rem; line-height: 1.3;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.bait-card b { display: block; font-size: 0.85rem; opacity: 0.65; margin-bottom: 2px; }
.bait--1 { left: 0; } .bait--1 .line { height: 30px; }
.bait--2 { left: 30%; animation-delay: -1.6s; } .bait--2 .line { height: 150px; }
.bait--3 { right: 0; animation-delay: -3.1s; } .bait--3 .line { height: 90px; }
.pond-lalo { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 420px); }
.pond-lalo .lalo-say { flex-direction: column-reverse; align-items: center; }
.pond-lalo .lalo-wrap { width: 230px; }

@keyframes sway { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }

/* Lalo */
.lalo-say { display: flex; align-items: center; gap: 18px; }
.lalo-wrap { width: 150px; flex-shrink: 0; animation: bob 3s ease-in-out infinite; }
.lalo { display: block; width: 100%; height: auto; overflow: visible; }
.lalo-tail { transform-box: view-box; transform-origin: 64px 118px; animation: wag 0.9s ease-in-out infinite; }
.lalo-fin { transform-box: view-box; transform-origin: 150px 146px; animation: wag 0.9s ease-in-out infinite reverse; }
.bubble {
  position: relative; padding: 16px 22px; border-radius: 24px;
  background: var(--paper); color: var(--paper-ink); font-weight: 700; font-size: 1.1rem; line-height: 1.3;
}

@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes wag { 0%, 100% { rotate: -12deg; } 50% { rotate: 12deg; } }

/* Pantallas de juego */
.play { display: grid; gap: 28px; min-height: inherit; align-content: start; padding-top: 8px; }
.play-head { display: flex; align-items: center; gap: 24px; }
.progress { flex: 1; display: flex; gap: 8px; }
.progress span { flex: 1; height: 8px; border-radius: 4px; background: var(--ground-3); transition: background-color 0.3s; }
.progress .done { background: var(--accent); }
.progress .now { background: var(--ink-2); }
.score { font-family: var(--display); font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.score span { font-size: 1.6rem; color: var(--accent); font-variant-numeric: tabular-nums; }

.play-body { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: start; }

/* Mensaje */
.msg-zone { position: relative; padding-top: 130px; }
.msg-hook {
  position: absolute; top: 0; left: 50%; display: flex; flex-direction: column; align-items: center;
  translate: -50% 0; animation: drop 0.7s var(--ease-out) both;
}
.msg-hook .line { width: 4px; height: 92px; background: var(--ink-2); }
.msg-hook .hook { width: 46px; color: var(--ink); margin-top: -4px; }

.msg {
  position: relative; padding: clamp(24px, 3vw, 40px); border-radius: var(--radius);
  background: var(--paper); color: var(--paper-ink);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  animation: arrive 0.6s var(--ease-out) both;
}
.msg-kind { font-size: 0.95rem; font-weight: 500; color: #4A4F78; }
.msg-from { margin-top: 10px; font-weight: 700; font-size: 1.1rem; overflow-wrap: anywhere; }
.msg-title { margin-top: 14px; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.1; letter-spacing: -0.02em; }
.msg-body { margin-top: 14px; font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.45; overflow-wrap: anywhere; }

mark.redflag {
  background: rgba(255, 59, 92, 0.16); color: inherit; border-radius: 6px; padding: 0 4px;
  text-decoration: underline wavy var(--alert); text-decoration-thickness: 2px; text-underline-offset: 4px;
  animation: flagIn 0.5s var(--ease-out) both;
}

/* Movimiento distintivo: el anzuelo se lleva el mensaje trampa */
.is-trap .msg-hook { animation: yankHook 0.9s var(--ease-out) both; }
.is-trap .msg { animation: yank 0.9s var(--ease-out) both; outline: 5px solid var(--alert); outline-offset: 6px; }
.is-safe .msg-hook { animation: retract 0.6s ease-in both; }
.is-safe .msg { outline: 5px solid var(--accent); outline-offset: 6px; }

@keyframes drop { from { translate: -50% -220px; } to { translate: -50% 0; } }
@keyframes arrive { from { opacity: 0; transform: translateY(-36px) rotate(-1.5deg); } to { opacity: 1; transform: none; } }
@keyframes yank {
  0% { transform: none; }
  25% { transform: translateY(-46px) rotate(-3deg); }
  45% { transform: translateY(-30px) rotate(2deg); }
  100% { transform: translateY(-34px) rotate(-1.5deg); }
}
@keyframes yankHook { 0% { translate: -50% 0; } 25% { translate: -50% -46px; } 100% { translate: -50% -34px; } }
@keyframes retract { to { translate: -50% -240px; opacity: 0; } }
@keyframes flagIn { from { background: rgba(255, 59, 92, 0.6); } }

/* Columna lateral */
.side { display: grid; gap: 24px; align-content: start; }
.actions { display: grid; gap: 14px; }
.actions--grid { grid-template-columns: 1fr 1fr; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 60px; padding: 14px 26px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 1.15rem; line-height: 1.2;
  background: var(--ground-3); color: var(--ink);
  transition: transform 0.2s var(--ease-out), background-color 0.2s, filter 0.2s;
}
.btn svg { width: 26px; height: 26px; flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn:active { transform: scale(0.98); }
.btn--trap { background: var(--alert); color: var(--ground); font-size: 1.3rem; min-height: 72px; }
.btn--safe { background: var(--accent); color: var(--ground); font-size: 1.3rem; min-height: 72px; }
.btn--cebo { font-family: var(--display); font-weight: 700; font-size: 1rem; border-radius: 22px; }
.btn--next, .btn--primary { background: var(--accent); color: var(--ground); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 3px var(--ground-3); }
.btn--block { background: var(--alert); color: var(--ground); min-height: 52px; font-size: 1rem; }
.btn--reply { justify-content: flex-start; text-align: left; border-radius: 24px; font-weight: 500; }

.feedback { display: grid; gap: 14px; padding: 28px; border-radius: var(--radius); background: var(--ground-2); animation: arrive 0.5s var(--ease-out) both; }
.fb-verdict { font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1.25; }
.feedback.ok .fb-verdict b { color: var(--accent); }
.feedback.bad .fb-verdict b { color: var(--alert); }
.fb-extra { font-weight: 700; color: var(--accent); }
.feedback.bad .fb-extra { color: var(--ink-2); }
.fb-lesson { color: var(--ink); }
.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.flags li { display: flex; gap: 12px; align-items: flex-start; }
.flags svg { width: 22px; height: 22px; color: var(--alert); flex-shrink: 0; margin-top: 3px; }
.feedback .btn--next { margin-top: 6px; justify-self: start; }

/* Chat */
.phone { border-radius: 36px; background: var(--ground-2); overflow: hidden; }
.phone-head { display: flex; align-items: center; gap: 16px; padding: 20px 24px; background: var(--ground-3); }
.phone-head b { display: block; font-size: 1.15rem; }
.phone-head small { display: block; color: var(--ink-2); font-size: 0.95rem; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--cyan); flex-shrink: 0; }
.thread {
  list-style: none; margin: 0; padding: 24px; display: flex; flex-direction: column; gap: 12px;
  height: clamp(340px, 52vh, 520px); overflow-y: auto; scroll-behavior: smooth;
}
.thread li { max-width: 82%; padding: 14px 18px; border-radius: 22px; font-size: 1.1rem; line-height: 1.35; animation: arrive 0.35s var(--ease-out) both; }
.thread .in { align-self: flex-start; background: var(--ground-3); border-bottom-left-radius: 6px; }
.thread .out { align-self: flex-end; background: var(--accent); color: var(--ground); border-bottom-right-radius: 6px; font-weight: 500; }
.typing { align-self: flex-start; display: flex; gap: 6px; background: var(--ground-3); }
.typing span { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-2); animation: dot 1s ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 100% { translate: 0 0; opacity: 0.5; } 50% { translate: 0 -5px; opacity: 1; } }

/* Resultados */
.result { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; min-height: inherit; }
.result-title { font-size: clamp(2.6rem, 6.4vw, 5.5rem); line-height: 0.95; letter-spacing: -0.035em; outline: none; }
.result-score { margin-top: 24px; font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
.result-score span { color: var(--accent); font-size: 2.6rem; font-variant-numeric: tabular-nums; }
.result-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.result-lalo .lalo-wrap { width: min(100%, 420px); margin-inline: auto; }
.result--chat { align-items: start; padding-top: 24px; }
.result--chat .result-lalo { position: sticky; top: 48px; }
.result-help { margin-top: 28px; max-width: 60ch; }
.result-help a { color: var(--accent); font-weight: 700; }

.timeline { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 10px; max-width: 720px; }
.timeline li { padding: 18px 22px; border-radius: 22px; background: var(--ground-2); }
.timeline li.skipped { opacity: 0.55; }
.timeline li.cut { background: var(--ground-3); }
.tl-msg { font-weight: 500; }
.tl-signal { display: flex; gap: 10px; margin-top: 6px; color: var(--ink-2); }
.tl-signal svg { width: 18px; height: 18px; color: var(--alert); flex-shrink: 0; margin-top: 4px; }
.tl-pick { margin-top: 6px; font-weight: 700; }
.tl-pick.safe { color: var(--accent); }
.tl-pick.risky { color: var(--alert); }
.tl-reaction { margin-top: 4px; color: var(--ink-2); }
.tl-cut { margin-top: 8px; font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--accent); }

/* ---------- Los 4 cebos ---------- */

.cebos { padding-block: 140px 160px; background: var(--ground-2); }
.cebos h2, .ayuda h2 { font-size: clamp(2.2rem, 5.2vw, 4.4rem); line-height: 1; letter-spacing: -0.03em; max-width: 16ch; }
.section-lede { margin-top: 28px; font-size: clamp(1.15rem, 1.6vw, 1.35rem); max-width: 48ch; }

.cebo-list { list-style: none; margin: 96px 0 0; padding: 0; display: grid; gap: clamp(72px, 9vw, 140px); }
.cebo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.cebo:nth-child(even) .cebo-text { order: 2; }
.cebo h3 { font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: 0.95; letter-spacing: -0.04em; }
.cebo-text p { margin-top: 20px; max-width: 40ch; font-size: 1.2rem; }
.cebo-do { color: var(--ink-2); }
.cebo-do strong { color: var(--accent); }

.mini-msg {
  display: grid; gap: 6px; justify-self: center; width: min(100%, 420px);
  padding: 28px 30px; border-radius: var(--radius);
  background: var(--paper); color: var(--paper-ink); rotate: -2deg;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}
.cebo:nth-child(even) .mini-msg { rotate: 2deg; }
.mini-from { font-weight: 700; color: #4A4F78; }
.mini-body { font-size: 1.25rem; line-height: 1.35; font-weight: 500; }

/* ---------- Ayuda ---------- */

.ayuda { background: var(--accent); color: var(--ground); padding-block: 140px; }
.ayuda ::selection { background: var(--ground); color: var(--accent); }
.ayuda :focus-visible { outline-color: var(--ground); }
.steps { margin: 64px 0 0; padding-left: 1.6em; display: grid; gap: 22px; max-width: 760px; font-size: 1.25rem; }
.steps li::marker { font-family: var(--display); font-weight: 900; }
.steps strong { font-weight: 700; }
.hotline { margin-top: 64px; font-family: var(--display); font-weight: 900; font-size: clamp(1.6rem, 3.6vw, 2.8rem); line-height: 1.1; letter-spacing: -0.02em; }
.hotline a { text-decoration-thickness: 4px; }
.privacy { margin-top: 24px; font-weight: 500; }

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

.foot { padding-block: 120px 48px; }
.foot-mark { font-family: var(--display); font-weight: 900; font-size: clamp(2.6rem, 11vw, 10rem); line-height: 0.92; letter-spacing: -0.045em; }
.foot-mark span { display: block; }
.foot-by { margin-top: 40px; font-family: var(--display); font-weight: 700; font-size: clamp(1.2rem, 2.2vw, 1.6rem); }
.foot-by strong { color: var(--accent); font-weight: 900; }
.foot-credits { margin-top: 16px; max-width: 70ch; color: var(--ink-2); font-size: 1rem; }

/* ---------- Celular y tablet ---------- */

@media (max-width: 900px) {
  .intro, .result { grid-template-columns: 1fr; align-content: start; }
  .intro { gap: 8px; }
  .pond { height: 440px; margin-top: 40px; }
  .bait-card { width: 180px; font-size: 0.9rem; padding: 12px 14px; }
  .bait .hook { width: 34px; }
  .bait--2 { left: 32%; } .bait--2 .line { height: 130px; }
  .bait--3 .line { height: 60px; }
  .pond-lalo .lalo-wrap { width: 170px; }
  .play-body { grid-template-columns: 1fr; }
  .msg-zone { padding-top: 104px; }
  .msg-hook .line { height: 66px; }
  .result-lalo { order: -1; }
  .result-lalo .lalo-wrap { width: 200px; }
  .cebo { grid-template-columns: 1fr; }
  .cebo:nth-child(even) .cebo-text { order: 0; }
  .mini-msg { justify-self: start; }
}

@media (max-width: 560px) {
  .bar { gap: 12px; }
  .bar nav { gap: 16px; font-size: 0.95rem; }
  .bar nav a { white-space: nowrap; }
  .bar nav .nav-cebos { display: none; }
  .bar nav a.social-btn { min-height: 40px; padding: 8px 16px; }
  .wordmark { font-size: 0.95rem; }
  .intro h1 { margin-top: 12px; }
  .pond { height: 330px; }
  .bait--1 { left: 0; }
  .bait--2 { display: none; }
  .bait--3 { right: 0; }
  .bait--3 .line { height: 50px; }
  .bait-card { width: 160px; }
  .pond-lalo .lalo-wrap { width: 140px; }
  .bubble { font-size: 1rem; padding: 12px 16px; }
  .lalo-wrap { width: 110px; }
  .actions--grid { grid-template-columns: 1fr 1fr; }
  .btn--cebo { font-size: 0.9rem; padding: 12px 14px; }
  .play-head { flex-wrap: wrap; gap: 14px; }
  .play--chat .play-head .progress { flex-basis: 100%; }
  .play--chat .btn--block { width: 100%; }
  .thread { height: 44vh; }
  .cebos, .ayuda { padding-block: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .is-trap .msg { transform: translateY(-20px); }
}
