/* Home-only motion. Layout boxes are fixed; motion uses transform and opacity. */

.premium-home .hero-layout { align-items: start; }

.hero-monitor {
  position: relative;
  box-sizing: border-box;
  height: 188px;
  margin: 0 0 18px;
  padding: 12px 14px 10px;
  display: grid;
  grid-template-rows: 24px 100px 32px;
  gap: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  pointer-events: none;
  user-select: none;
  contain: layout paint;
}

.hero-monitor-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  font-size: 11px;
  font-weight: 550;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #3f3f43;
}

.hero-monitor-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
}

.hero-monitor-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.hero-monitor-radar {
  position: relative;
  width: 14px;
  height: 14px;
  border: 1px solid #8d8d92;
  border-radius: 50%;
  flex-shrink: 0;
}

.hero-monitor-arm {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 1px;
  background: var(--red);
  transform-origin: left center;
}

.hero-monitor-status {
  position: relative;
  height: 1.2em;
  min-width: 0;
}

.hero-monitor-status span {
  position: absolute;
  inset: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.hero-monitor-status .is-live { opacity: 0; }
.hero-monitor-status .is-ready { color: #7d241c; }

.hero-monitor-time {
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
  color: var(--ink);
}

.hero-monitor-stage {
  position: relative;
  height: 100px;
  overflow: hidden;
}

.hero-monitor-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 30px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
}

.hero-monitor-line.is-a { opacity: 1; transform: translateY(0); }
.hero-monitor-line.is-b { opacity: 1; transform: translateY(34px); }
.hero-monitor-line.is-c { opacity: 1; transform: translateY(68px); }

.hero-monitor-tag {
  flex: 0 0 70px;
  padding: 3px 0;
  border-radius: 999px;
  text-align: center;
  font-size: 10px;
  font-weight: 550;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.3;
}

.hero-monitor-line[data-kind="senal"] .hero-monitor-tag { background: #f6e4e1; color: #7d241c; }
.hero-monitor-line[data-kind="sector"] .hero-monitor-tag { background: #e5efe4; color: #23402a; }
.hero-monitor-line[data-kind="contexto"] .hero-monitor-tag { background: #eceae3; color: #32322c; }
.hero-monitor-line[data-kind="ruido"] .hero-monitor-tag { background: #f1eeea; color: #3f3a34; }

.hero-monitor-ttl {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 400 14.5px/1.3 var(--serif);
  color: #242426;
}

.hero-monitor-line[data-fate="drop"] .hero-monitor-ttl {
  color: #3a3a3e;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.hero-monitor-line[data-fate="drop"] .hero-monitor-ttl::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 52%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
}

.hero-monitor-ttl { position: relative; }

.hero-monitor-dossier {
  display: grid;
  place-items: center;
  height: 32px;
  margin: 0;
  font: italic 400 20px/1 var(--serif);
  letter-spacing: -.03em;
  color: #242426;
}

.channel-section { background: #fff; border-top: 1px solid var(--line); }

.relay { margin-top: 8px; }

.relay-source {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2, #f1f1ee);
  color: #242426;
  font-size: 14px;
  line-height: 1.4;
}

.relay-source-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

.relay-source-kicker {
  flex-shrink: 0;
  color: #7d241c;
  font-size: 11px;
  font-weight: 550;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.relay-source-text { min-width: 0; }

.relay-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 0;
  padding: 0;
}

.relay-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 12px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper, #fafaf8);
}

.relay-name {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  margin-bottom: 10px;
  color: #242426;
  font-size: 14px;
  font-weight: 550;
}

.relay-name svg { width: 18px; height: 18px; flex-shrink: 0; }

.lane {
  height: 188px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.lane-bar {
  height: 32px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  color: #3a3a3e;
  font-size: 11px;
  font-weight: 550;
  letter-spacing: .04em;
}

.lane-peer { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.lane-peer i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

.mail-list { display: flex; flex-direction: column; gap: 6px; height: 156px; padding: 8px; }
.mail-row {
  height: 46px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 0 8px;
  border-radius: 8px;
  background: #f7f6f2;
}
.mail-row.is-new { height: 88px; align-items: start; padding-top: 8px; }
.mail-row.is-new { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.mail-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.mail-dot.is-read { background: transparent; box-shadow: inset 0 0 0 1px #b9b9b4; }
.mail-copy { min-width: 0; }
.mail-copy strong, .mail-copy small { display: block; overflow: hidden; }
.mail-copy strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  color: #242426;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.3;
  max-height: 3.9em;
  -webkit-line-clamp: 3;
}
.mail-copy small { text-overflow: ellipsis; white-space: nowrap; }
.mail-row.is-old .mail-copy strong { color: #5c5c60; font-weight: 500; }
.mail-copy small, .mail-row time { color: #4e4e52; font-size: 11px; font-style: normal; }
.mail-row time { font-variant-numeric: tabular-nums; }

.lane-chat { background: #f6f4ef; }
.lane-wa .lane-peer { color: #1f4d38; }
.lane-tg { background: #eef2f5; }
.lane-tg .lane-peer { color: #243e5c; }
.chat-thread { position: relative; height: 156px; padding: 10px; display: flex; flex-direction: column; justify-content: flex-end; }
.chat-typing {
  position: absolute;
  left: 10px;
  bottom: 96px;
  width: 52px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 14px;
  background: #fff;
  opacity: 0;
}
.lane-tg .chat-typing { border-radius: 14px 14px 14px 6px; }
.chat-typing span { width: 5px; height: 5px; border-radius: 50%; background: #4a4a4e; }
.chat-bubble {
  min-height: 86px;
  padding: 8px 10px 6px;
  border-radius: 4px 14px 14px 14px;
  background: #fff;
  box-shadow: 0 1px 0 #0000000a;
}
.lane-tg .chat-bubble { border-radius: 14px 14px 14px 5px; background: #fff; }
.chat-bubble p { margin: 0; color: #242426; font-size: 12.5px; line-height: 1.4; }
.chat-meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; height: 16px; margin-top: 4px; color: #4e4e52; font-size: 10px; }
.ticks { position: relative; width: 16px; height: 11px; flex: none; }
.ticks svg { position: absolute; inset: 0; width: 16px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ticks-wait, .ticks-one { color: #6e6e72; opacity: 0; }
.ticks-read, .ticks-two { color: #1f5878; opacity: 1; }
.ticks-one { width: 11px; }

.lane-slack { background: #f7f6f3; }
.slack-msg { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; height: 156px; padding: 10px; }
.slack-avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; background: #2e332c; color: #f4efe6; font-size: 10px; font-weight: 550; }
.slack-head { display: flex; align-items: center; gap: 6px; height: 18px; min-width: 0; }
.slack-head strong { color: #242426; font-size: 12px; font-weight: 550; }
.slack-app { padding: 0 4px; border: 1px solid #7d241c; border-radius: 3px; color: #7d241c; font-size: 9px; font-weight: 550; letter-spacing: .04em; line-height: 14px; }
.slack-head time { margin-left: auto; color: #4e4e52; font-size: 10px; font-variant-numeric: tabular-nums; }
.slack-slot { position: relative; min-height: 36px; margin-top: 2px; }
.slack-typing, .slack-text { margin: 0; color: #242426; font-size: 12.5px; line-height: 1.4; }
.slack-typing { position: absolute; left: 0; top: 0; color: #4e4e52; opacity: 0; }
.slack-react { display: inline-flex; align-items: center; gap: 4px; height: 22px; margin-top: 8px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #242426; font-size: 11px; }
.slack-react svg { width: 11px; height: 11px; fill: none; stroke: #1f5878; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.nty-count { position: relative; white-space: nowrap; }
.nty-count-num {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  text-align: right;
  vertical-align: baseline;
}
.nty-count-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html.nty-motion .premium-home .reveal:not(.nty-in):not(:focus-within) {
    opacity: 0;
    transform: translateY(16px);
  }

  html.nty-motion .premium-home .reveal.nty-in {
    animation: nty-wow-reveal .72s cubic-bezier(.32, .72, 0, 1) backwards;
    animation-delay: var(--nty-d, 0ms);
  }

  @keyframes nty-wow-reveal {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
  }

  .premium-home.motion-enabled .hero-monitor-line.is-a { animation: nty-wow-line-a 14s linear infinite; }
  .premium-home.motion-enabled .hero-monitor-line.is-b { animation: nty-wow-line-b 14s linear infinite; }
  .premium-home.motion-enabled .hero-monitor-line.is-c { animation: nty-wow-line-c 14s linear infinite; }
  .premium-home.motion-enabled .hero-monitor-line.is-d { animation: nty-wow-line-d 14s linear infinite; }
  .premium-home.motion-enabled .hero-monitor-dossier { animation: nty-wow-dossier 14s linear infinite; }
  .premium-home.motion-enabled .hero-monitor-status .is-live { animation: nty-wow-status-live 14s linear infinite; }
  .premium-home.motion-enabled .hero-monitor-status .is-ready { animation: nty-wow-status-ready 14s linear infinite; }
  .premium-home.motion-enabled .hero-monitor-arm { animation: nty-wow-sweep 2.8s linear infinite; }
  .premium-home.motion-enabled .hero-monitor-dot { animation: nty-wow-dot 1.8s ease-in-out infinite; }
  .premium-home.motion-enabled .hero-monitor-line[data-fate="drop"] .hero-monitor-ttl { text-decoration: none; }
  .premium-home.motion-enabled .hero-monitor-line[data-fate="drop"] .hero-monitor-ttl::after { animation: nty-wow-strike 14s linear infinite; }

  .premium-home.motion-enabled #hero:not(.motion-in-view) :is(
    .hero-monitor-line,
    .hero-monitor-dossier,
    .hero-monitor-status span,
    .hero-monitor-arm,
    .hero-monitor-dot,
    .hero-monitor-ttl::after
  ) { animation-play-state: paused; }

  .premium-home.motion-enabled .relay-card .mail-row.is-new { animation: nty-mail-in 10s linear infinite both; }
  .premium-home.motion-enabled .relay-card .mail-row.is-new .mail-dot { animation: nty-mail-dot 10s linear infinite both; }
  .premium-home.motion-enabled .relay-card .chat-typing,
  .premium-home.motion-enabled .relay-card .slack-typing { animation: nty-typing 10s linear infinite both; }
  .premium-home.motion-enabled .relay-card .lane-wa .chat-bubble { animation: nty-bubble 10s linear infinite both; }
  .premium-home.motion-enabled .relay-card .lane-tg .chat-bubble { animation: nty-bubble-tg 10s linear infinite both; }
  .premium-home.motion-enabled .relay-card .ticks-wait { animation: nty-tick-wait 10s linear infinite both; }
  .premium-home.motion-enabled .relay-card .ticks-read { animation: nty-tick-read 10s linear infinite both; }
  .premium-home.motion-enabled .relay-card .ticks-one { animation: nty-tick-one 10s linear infinite both; }
  .premium-home.motion-enabled .relay-card .ticks-two { animation: nty-tick-two 10s linear infinite both; }
  .premium-home.motion-enabled .relay-card .slack-text { animation: nty-slack-in 10s linear infinite both; }
  .premium-home.motion-enabled .relay-card .slack-react { animation: nty-react 10s linear infinite both; }
  .premium-home.motion-enabled .relay-card .chat-typing span { animation: nty-bob .7s ease-in-out infinite; animation-delay: calc(var(--arrive, 0ms) + var(--bob, 0ms)); }
  .premium-home.motion-enabled .relay-card :is(
    .mail-row.is-new,
    .mail-row.is-new .mail-dot,
    .chat-typing,
    .chat-bubble,
    .ticks-wait,
    .ticks-read,
    .ticks-one,
    .ticks-two,
    .slack-typing,
    .slack-text,
    .slack-react
  ) { animation-delay: var(--arrive, 0ms); }
  .premium-home.motion-enabled #canales:not(.motion-in-view) .relay-card :is(
    .mail-row.is-new,
    .mail-dot,
    .chat-typing,
    .chat-typing span,
    .chat-bubble,
    .ticks svg,
    .slack-typing,
    .slack-text,
    .slack-react
  ) { animation-play-state: paused; }

  .premium-home.motion-enabled.motion-suspended #hero :is(
    .hero-monitor-line,
    .hero-monitor-dossier,
    .hero-monitor-status span,
    .hero-monitor-arm,
    .hero-monitor-dot,
    .hero-monitor-ttl::after
  ),
  .premium-home.motion-enabled.motion-suspended .relay-card :is(
    .mail-row.is-new,
    .mail-dot,
    .chat-typing,
    .chat-typing span,
    .chat-bubble,
    .ticks svg,
    .slack-typing,
    .slack-text,
    .slack-react
  ) { animation-play-state: paused; }

  @keyframes nty-wow-line-a {
    0% { opacity: 0; transform: translate3d(36px, 0, 0); }
    7% { opacity: 1; transform: translate3d(0, 0, 0); }
    48% { opacity: 1; transform: translate3d(0, 0, 0); }
    58% { opacity: 0; transform: translate3d(0, 36px, 0) scale(.97); }
    100% { opacity: 0; transform: translate3d(36px, 0, 0); }
  }

  @keyframes nty-wow-line-b {
    0%, 8% { opacity: 0; transform: translate3d(36px, 34px, 0); }
    15% { opacity: 1; transform: translate3d(0, 34px, 0); }
    22% { opacity: 1; transform: translate3d(0, 34px, 0); }
    31% { opacity: 0; transform: translate3d(22px, 34px, 0); }
    100% { opacity: 0; transform: translate3d(36px, 34px, 0); }
  }

  @keyframes nty-wow-line-c {
    0%, 10% { opacity: 0; transform: translate3d(36px, 68px, 0); }
    18% { opacity: 1; transform: translate3d(0, 68px, 0); }
    48% { opacity: 1; transform: translate3d(0, 68px, 0); }
    58% { opacity: 0; transform: translate3d(0, 36px, 0) scale(.97); }
    100% { opacity: 0; transform: translate3d(36px, 68px, 0); }
  }

  @keyframes nty-wow-line-d {
    0%, 30% { opacity: 0; transform: translate3d(36px, 34px, 0); }
    37% { opacity: 1; transform: translate3d(0, 34px, 0); }
    48% { opacity: 1; transform: translate3d(0, 34px, 0); }
    58% { opacity: 0; transform: translate3d(0, 36px, 0) scale(.97); }
    100% { opacity: 0; transform: translate3d(36px, 34px, 0); }
  }

  @keyframes nty-wow-strike {
    0%, 16% { opacity: 0; transform: scaleX(0); }
    24%, 28% { opacity: 1; transform: scaleX(1); }
    34%, 100% { opacity: 0; transform: scaleX(1); }
  }

  @keyframes nty-wow-dossier {
    0%, 50% { opacity: 0; transform: translateY(10px) scale(.98); }
    60%, 84% { opacity: 1; transform: translateY(-70px) scale(1); }
    93%, 100% { opacity: 0; transform: translateY(-48px) scale(.98); }
  }

  @keyframes nty-wow-status-live {
    0%, 48% { opacity: 1; }
    58%, 86% { opacity: 0; }
    94%, 100% { opacity: 1; }
  }

  @keyframes nty-wow-status-ready {
    0%, 48% { opacity: 0; }
    58%, 86% { opacity: 1; }
    94%, 100% { opacity: 0; }
  }

  @keyframes nty-wow-sweep { to { transform: rotate(360deg); } }

  @keyframes nty-wow-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
  }

  @keyframes nty-mail-in {
    0%, 8% { opacity: 0; transform: translateY(-16px); }
    18%, 70% { opacity: 1; transform: none; }
    86%, 100% { opacity: 0; transform: translateY(-16px); }
  }
  @keyframes nty-mail-dot {
    0%, 14% { opacity: 0; transform: scale(.4); }
    26%, 70% { opacity: 1; transform: none; }
    86%, 100% { opacity: 0; transform: scale(.4); }
  }
  @keyframes nty-typing {
    0%, 12% { opacity: 1; }
    20%, 78% { opacity: 0; }
    90%, 100% { opacity: 1; }
  }
  @keyframes nty-bubble {
    0%, 14% { opacity: 0; transform: translateY(8px) scale(.96); }
    24%, 70% { opacity: 1; transform: none; }
    86%, 100% { opacity: 0; transform: translateY(8px) scale(.96); }
  }
  @keyframes nty-bubble-tg {
    0%, 14% { opacity: 0; transform: translateX(-10px) scale(.98); }
    24%, 70% { opacity: 1; transform: none; }
    86%, 100% { opacity: 0; transform: translateX(-10px) scale(.98); }
  }
  @keyframes nty-tick-wait {
    0%, 26% { opacity: 0; }
    34%, 46% { opacity: 1; }
    56%, 100% { opacity: 0; }
  }
  @keyframes nty-tick-read {
    0%, 48% { opacity: 0; }
    58%, 70% { opacity: 1; }
    86%, 100% { opacity: 0; }
  }
  @keyframes nty-tick-one {
    0%, 26% { opacity: 0; }
    34%, 46% { opacity: 1; }
    56%, 100% { opacity: 0; }
  }
  @keyframes nty-tick-two {
    0%, 48% { opacity: 0; }
    58%, 70% { opacity: 1; }
    86%, 100% { opacity: 0; }
  }
  @keyframes nty-slack-in {
    0%, 14% { opacity: 0; transform: translateY(10px); }
    24%, 70% { opacity: 1; transform: none; }
    86%, 100% { opacity: 0; transform: translateY(10px); }
  }
  @keyframes nty-react {
    0%, 40% { opacity: 0; transform: scale(.86); }
    52%, 70% { opacity: 1; transform: none; }
    86%, 100% { opacity: 0; transform: scale(.86); }
  }
  @keyframes nty-bob {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-3px); }
  }
}

@media (max-width: 800px) {
  .relay-source { align-items: flex-start; border-radius: 16px; }
  .relay-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .hero-monitor { padding-inline: 10px; }
  .hero-monitor-tag { flex-basis: 62px; letter-spacing: .04em; }
  .hero-monitor-ttl { font-size: 13px; }
  .hero-monitor-dossier { font-size: 18px; }
  .relay-list { grid-template-columns: 1fr; }
  .relay-source { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-monitor-line.is-a,
  .hero-monitor-line.is-b,
  .hero-monitor-line.is-c,
  .hero-monitor-dossier,
  .hero-monitor-status .is-ready { animation: none; opacity: 1; }
  .hero-monitor-line.is-d,
  .hero-monitor-status .is-live,
  .chat-typing,
  .slack-typing,
  .ticks-wait,
  .ticks-one { animation: none; opacity: 0; }
  .mail-row.is-new,
  .mail-dot,
  .chat-bubble,
  .ticks-read,
  .ticks-two,
  .slack-text,
  .slack-react { animation: none; opacity: 1; transform: none; }
  .hero-monitor-line.is-a { transform: translateY(0); }
  .hero-monitor-line.is-b { transform: translateY(34px); }
  .hero-monitor-line.is-c { transform: translateY(68px); }
}
