/* Sentinel Systems — homepage (v39)
   Scoped to the home page only; reuses the global tokens in styles.css. */

.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;
}

/* ---------- Hero ---------- */
.hx {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
}
.hx-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 178, 226, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 178, 226, 0.06) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 20%, transparent 78%);
}
.hx-glow {
  position: absolute; top: -30%; left: 55%; width: 900px; height: 620px;
  transform: translateX(-40%);
  background: radial-gradient(closest-side, rgba(59, 130, 246, 0.22), transparent 70%);
  filter: blur(20px); pointer-events: none;
}
.hx-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hx-copy h1 {
  font-size: clamp(2.3rem, 5.2vw, 3.7rem);
  letter-spacing: -.035em;
  background: linear-gradient(180deg, #ffffff 25%, #b9cdf2);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hx-copy .lead {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.5vw, 1.13rem);
  max-width: 46ch;
  margin-top: 1rem;
}
.hx-cta { margin-top: 1.9rem; }
.hx .eyebrow .led,
.hx-live .led {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .55);
  animation: hx-pulse 2.4s var(--ease) infinite;
}
@keyframes hx-pulse {
  70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hx .eyebrow .led, .hx-live .led { animation: none; }
}

.hx-proof {
  list-style: none; margin: 2.2rem 0 0; padding: 1.2rem 0 0;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
}
.hx-proof li { display: flex; flex-direction: column; gap: .15rem; }
.hx-proof strong {
  font-family: 'Sora', sans-serif; font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  letter-spacing: -.02em; color: #fff; line-height: 1.15;
}
.hx-proof span { font-size: .8rem; color: var(--text-dim); }
.hx-hint { margin-top: 1.3rem; }
.hx-hint kbd {
  background: var(--navy-750); border: 1px solid var(--line-strong);
  border-radius: 6px; padding: .05rem .35rem; font-size: .75rem; margin: 0 .1rem;
}

/* ---------- Hero console ---------- */
.hx-console {
  background: linear-gradient(180deg, rgba(22, 35, 60, .95), rgba(13, 21, 38, .95));
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow), 0 0 0 1px rgba(59, 130, 246, .06) inset;
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.hx-console-bar {
  display: flex; align-items: center; gap: .45rem;
  padding: .7rem 1rem; border-bottom: 1px solid var(--line);
  background: rgba(10, 17, 34, .55);
}
.hx-console-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: #24365a; }
.hx-console-title {
  margin-left: .6rem; font-size: .78rem; color: var(--text-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.hx-live {
  margin-left: auto; display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ok);
}
.hx-search {
  display: flex; align-items: center; gap: .6rem;
  margin: 1rem; padding: .4rem .4rem .4rem .85rem;
  background: var(--navy-900); border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.hx-search:focus-within { border-color: rgba(59, 130, 246, .55); box-shadow: 0 0 0 4px var(--brand-soft); }
.hx-search svg { width: 17px; height: 17px; color: var(--text-dim); flex: none; }
.hx-search input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  color: var(--text); font-family: inherit; font-size: .92rem; padding: .5rem 0;
}
.hx-search input::placeholder { color: var(--text-dim); }

.hx-result { margin: 0 1rem; padding: 1rem; background: rgba(10, 17, 34, .5); border: 1px solid var(--line); border-radius: 12px; }
.hx-result-head { display: flex; align-items: center; gap: .75rem; }
.hx-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
}
.hx-result-head strong { display: block; font-size: .93rem; }
.hx-result-head em {
  font-style: normal; font-size: .76rem; color: var(--text-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.hx-risk {
  margin-left: auto; font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  padding: .28rem .6rem; border-radius: 999px;
  background: rgba(248, 113, 113, .14); border: 1px solid rgba(248, 113, 113, .35); color: #fca5a5;
}
.hx-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.hx-tag {
  font-size: .74rem; padding: .22rem .6rem; border-radius: 999px;
  background: var(--navy-750); border: 1px solid var(--line); color: var(--text-muted);
}
.hx-tag.bad { background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.3); color: #fca5a5; }
.hx-tag.warn { background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.3); color: #fcd34d; }
.hx-meta { list-style: none; margin: 1rem 0 0; padding: .9rem 0 0; border-top: 1px dashed var(--line); display: grid; gap: .5rem; }
.hx-meta li { display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; }
.hx-meta span { color: var(--text-dim); }
.hx-meta strong { font-weight: 600; color: var(--text); }
.hx-console-foot { margin: .9rem 1rem 1.1rem; }

/* ---------- Bento ---------- */
.hx-band { padding-top: clamp(3rem, 6vw, 4.5rem); }
.hx-bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.hx-cell {
  background: linear-gradient(180deg, rgba(22, 35, 60, .62), rgba(17, 28, 49, .45));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.hx-cell:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.hx-cell::after {
  content: ''; position: absolute; inset: -1px -1px auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,.55), transparent);
  opacity: .6;
}
.hx-cell h3 { font-size: 1.08rem; margin-top: .9rem; }
.hx-cell p { color: var(--text-muted); font-size: .93rem; margin-top: .5rem; }
.hx-cell .tick-list { margin-top: 1.1rem; }
.hx-cell-lg { grid-row: span 2; display: flex; flex-direction: column; }
.hx-cell-lg .tick-list { margin-top: auto; padding-top: 1.2rem; }
.hx-cell-wide { grid-column: span 2; }
.hx-cell-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 1.5rem; align-items: center; }
.hx-cell-split .btn { margin-top: 1rem; }
.hx-code {
  margin: 0; padding: 1rem; border-radius: 12px; overflow-x: auto;
  background: var(--navy-900); border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .8rem; line-height: 1.7; color: var(--text-muted);
}
.hx-code .c-k { color: #7dd3fc; font-weight: 600; }
.hx-code .c-s { color: #86efac; }
.hx-code .c-n { color: #fcd34d; }
.hx-code .c-b { color: #f0abfc; }
.hx-code .c-c { color: var(--text-dim); }

/* ---------- Steps ---------- */
.hx-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; position: relative; }
.hx-step {
  background: rgba(17, 28, 49, .5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
}
.hx-step-n {
  display: inline-block; font-family: 'Sora', sans-serif; font-size: .85rem; font-weight: 700;
  letter-spacing: .08em; color: #9fc0ff;
  background: var(--brand-soft); border: 1px solid rgba(59,130,246,.3);
  border-radius: 8px; padding: .2rem .5rem;
}
.hx-step h3 { margin-top: .9rem; font-size: 1.05rem; }
.hx-step p { color: var(--text-muted); font-size: .93rem; margin-top: .45rem; }

/* ---------- News ---------- */
.hx-head-row { max-width: none; text-align: left; align-items: flex-end; }
.hx-news { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.hx-news-card {
  display: block; color: var(--text);
  background: rgba(17, 28, 49, .55); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem; overflow: hidden;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.hx-news-card:hover { border-color: var(--line-strong); transform: translateY(-3px); color: var(--text); }
.hx-news-thumb { display: block; margin: -1.2rem -1.2rem 1rem; aspect-ratio: 16 / 9; overflow: hidden; }
.hx-news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hx-news-card h3 { font-size: 1.02rem; margin-top: .35rem; }
.hx-news-card p { color: var(--text-muted); font-size: .9rem; margin-top: .45rem; }

/* ---------- Partners ---------- */
.hx-partners { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.hx-partner {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .55rem 1rem; border-radius: 999px;
  background: rgba(17, 28, 49, .6); border: 1px solid var(--line);
  color: var(--text-muted); font-size: .9rem;
}
.hx-partner img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

/* ---------- Final CTA ---------- */
.hx-final {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: clamp(1.8rem, 4vw, 2.8rem);
  border: 1px solid var(--line-strong); border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(700px 260px at 15% 0%, rgba(59,130,246,.18), transparent 70%),
    linear-gradient(180deg, rgba(22,35,60,.9), rgba(13,21,38,.9));
  box-shadow: var(--shadow);
}
.hx-final h2 { font-size: clamp(1.5rem, 3.2vw, 2.05rem); letter-spacing: -.02em; }
.hx-final p { margin-top: .5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hx-inner { grid-template-columns: minmax(0, 1fr); }
  .hx-copy .lead { max-width: none; }
  .hx-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-cell-lg { grid-row: auto; }
  .hx-cell-lg .tick-list { margin-top: 1.1rem; padding-top: 0; }
  .hx-cell-wide { grid-column: span 2; }
  .hx-news { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .hx-bento, .hx-steps, .hx-news { grid-template-columns: minmax(0, 1fr); }
  .hx-cell-wide { grid-column: auto; }
  .hx-cell-split { grid-template-columns: minmax(0, 1fr); }
  .hx-proof { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .hx-proof li { flex-direction: row; align-items: baseline; gap: .6rem; }
  .hx-head-row { flex-direction: column; align-items: flex-start; }
}

/* ---------- Live hero result states (v40) ---------- */
.hx-result { transition: border-color .25s var(--ease), background .25s var(--ease); }
.hx-result[data-state="flagged"] { border-color: rgba(248,113,113,.32); }
.hx-result[data-state="clean"]   { border-color: rgba(52,211,153,.3); }
.hx-result[data-state="error"]   { border-color: rgba(251,191,36,.3); }
.hx-result > * { animation: hxFade .3s var(--ease) both; }
@keyframes hxFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hx-result > * { animation: none; } }

.hx-idle { display: grid; gap: .75rem; }
.hx-idle-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-soft); border: 1px solid var(--line); color: var(--brand);
}
.hx-idle-icon svg { width: 18px; height: 18px; }
.hx-idle-icon.ok { color: var(--ok); background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.28); }
.hx-idle-icon.bad { color: #fcd34d; background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.28); }
.hx-idle p { margin: 0; display: grid; gap: .25rem; }
.hx-idle p strong { font-size: .95rem; }
.hx-idle p span { font-size: .84rem; color: var(--text-dim); }
.hx-idle code { font-size: .8rem; }
.hx-idle .hx-meta { margin-top: .35rem; }

img.hx-avatar { object-fit: cover; }
.hx-risk.warn { background: rgba(251,191,36,.14); border-color: rgba(251,191,36,.35); color: #fcd34d; }
.hx-risk:not(.bad):not(.warn) { background: rgba(148,163,184,.12); border-color: var(--line-strong); color: var(--text-muted); }

.hx-result-link {
  display: inline-block; margin-top: .9rem; font-size: .82rem; font-weight: 600;
  color: var(--brand); text-decoration: none;
}
.hx-result-link:hover { text-decoration: underline; }

.hx-skeleton { display: grid; gap: .6rem; }
.hx-skeleton .sk-row { display: flex; align-items: center; gap: .65rem; }
.hx-skeleton .sk-dot { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.hx-skeleton .sk-line { height: 10px; border-radius: 6px; }
.hx-skeleton .sk-dot, .hx-skeleton .sk-line {
  background: linear-gradient(90deg, rgba(148,163,184,.09), rgba(148,163,184,.2), rgba(148,163,184,.09));
  background-size: 200% 100%; animation: hxShimmer 1.2s linear infinite;
}
.hx-skeleton .w40 { width: 40%; } .hx-skeleton .w55 { width: 55%; }
.hx-skeleton .w60 { width: 60%; } .hx-skeleton .w70 { width: 70%; }
@keyframes hxShimmer { to { background-position: -200% 0; } }
.hx-loading-note { margin: .8rem 0 0; font-size: .8rem; color: var(--text-dim); }
