/*
 * Signal Night — human marketing landing.
 * Presentation only. Tokens are --hk-*. The night landing does not load
 * landing.css or its unused light theme.
 * Inter is the one webfont. Lime (--hk-positive) is reserved for a confirmed
 * protocol-positive state and is not applied on this page.
 */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-variable.woff2") format("woff2");
}

:root {
  --hk-bg: #050508;
  --hk-bg-elev: #0c0c12;
  --hk-bg-soft: #12121a;
  --hk-fg: #f4f4f5;
  --hk-fg-muted: #a1a1aa;
  --hk-fg-faint: #71717a;
  --hk-line: rgba(255, 255, 255, 0.08);
  --hk-line-strong: rgba(255, 255, 255, 0.16);
  --hk-accent: #7c9cff;
  --hk-accent-soft: rgba(124, 156, 255, 0.14);
  --hk-positive: #b8ff5f;
  --hk-warning: #f5c542;
  --hk-focus: #dbe4ff;
  --hk-page-max: 72rem;
  --hk-gutter: clamp(1.25rem, 4vw, 3rem);
  --hk-section: clamp(4.5rem, 10vw, 8rem);
  --hk-radius-xs: 6px;
  --hk-radius-sm: 10px;
  --hk-radius-md: 14px;
  --hk-radius-pill: 999px;
  --hk-motion-fast: 160ms;
  --hk-motion-base: 240ms;
  --hk-ease: cubic-bezier(.22, 1, .36, 1);
  --hk-font: Inter, ui-sans-serif, system-ui, sans-serif;
  --hk-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: dark;
}

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

html { background: var(--hk-bg); }

body.landing-page {
  margin: 0;
  background: var(--hk-bg);
  color: var(--hk-fg);
  font-family: var(--hk-font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

body.landing-page :is(h1, h2, h3, p) { margin: 0; }

body.landing-page :is(a, button, summary):focus-visible {
  outline: 2px solid var(--hk-focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--hk-gutter);
  top: 0.75rem;
  z-index: 40;
  padding: 0.6rem 0.9rem;
  border-radius: var(--hk-radius-sm);
  background: var(--hk-fg);
  color: var(--hk-bg);
  font-size: 0.95rem;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--hk-bg-elev) 88%, transparent);
  border-bottom: 1px solid var(--hk-line);
  backdrop-filter: blur(16px);
}

.header-inner,
.landing-section,
.hero,
.site-footer,
.hk-noscript {
  width: min(var(--hk-page-max), calc(100% - (var(--hk-gutter) * 2)));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
}

.wordmark {
  color: var(--hk-fg);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.wordmark span { color: var(--hk-accent); }

.site-nav,
.footer-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav { margin-left: auto; }

.site-nav a,
.footer-nav a,
.hk-text-link {
  color: var(--hk-fg-muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover,
.footer-nav a:hover,
.hk-text-link:hover { color: var(--hk-accent); }

.header-inner > .hk-button { margin-left: 0.75rem; }

.nav-overflow { display: none; position: relative; }

.nav-overflow summary {
  display: grid;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.85rem;
  border: 1px solid var(--hk-line-strong);
  border-radius: var(--hk-radius-sm);
  color: var(--hk-fg);
  list-style: none;
  place-items: center;
  cursor: pointer;
}

.nav-overflow summary::-webkit-details-marker { display: none; }

.nav-overflow nav {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  display: grid;
  min-width: 14rem;
  padding: 0.5rem;
  border: 1px solid var(--hk-line-strong);
  border-radius: var(--hk-radius-md);
  background: var(--hk-bg-elev);
}

.nav-overflow nav a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border-radius: var(--hk-radius-xs);
  color: var(--hk-fg);
  text-decoration: none;
}

.nav-overflow nav a:hover { background: var(--hk-accent-soft); }

.hk-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  border-radius: var(--hk-radius-pill);
  font: 560 0.95rem/1 var(--hk-font);
  text-decoration: none;
  cursor: pointer;
}

.hk-button--primary {
  border: 1px solid var(--hk-accent);
  background: var(--hk-accent);
  color: #050508;
}

.hk-button--secondary {
  border: 1px solid var(--hk-line-strong);
  background: transparent;
  color: var(--hk-fg);
}

@media (hover: hover) and (pointer: fine) {
  .hk-button {
    transition:
      background var(--hk-motion-fast) var(--hk-ease),
      border-color var(--hk-motion-fast) var(--hk-ease);
  }

  .hk-button--primary:hover { background: color-mix(in srgb, var(--hk-accent) 82%, white); }
  .hk-button--secondary:hover { background: var(--hk-accent-soft); }
}

.eyebrow {
  color: var(--hk-fg-faint);
  font: 500 0.75rem/1.4 var(--hk-mono);
  letter-spacing: 0.08em;
}

.hk-chip {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 1.75rem;
  margin: 0;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--hk-line-strong);
  border-radius: var(--hk-radius-pill);
  background: var(--hk-accent-soft);
  color: var(--hk-fg);
  font: 500 0.75rem/1 var(--hk-mono);
  letter-spacing: 0.06em;
}

.hk-chip--neutral {
  background: transparent;
  color: var(--hk-fg-muted);
}

/* Confirmed protocol-positive only. Not used for CTAs, prices, or catalogue cards. */
.hk-confirmed { color: var(--hk-positive); }

.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 var(--hk-section); }

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(14rem, 0.78fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-copy { display: grid; justify-items: start; gap: 1rem; }

.hero h1 {
  max-width: 11ch;
  color: var(--hk-fg);
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 0.98;
}

.hero-body { max-width: 38rem; color: var(--hk-fg-muted); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.seller-line { max-width: 36rem; color: var(--hk-fg); font-size: 1.05rem; }

.hero-focal { margin: 0; display: grid; gap: 0.85rem; justify-items: center; }

.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
}

.hero-still-frame,
.hero-agent-renderer { grid-area: 1 / 1; }

.hero-still-frame {
  position: relative;
  width: min(100%, 26rem);
}

/* Soft accent wash behind the still. Black in the render screens out so the wash reads as emissive spill. */
.hero-still-frame::before {
  position: absolute;
  z-index: 0;
  top: 54%;
  left: 50%;
  width: 92%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--hk-accent) 62%, transparent) 0%, var(--hk-accent-soft) 42%, transparent 72%);
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.hero-still { position: relative; z-index: 1; display: block; margin: 0; }

.hero-still img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  mix-blend-mode: screen;
}

.hero-agent-renderer {
  position: relative;
  width: min(100%, 26rem);
  aspect-ratio: 1;
  opacity: 0;
}

.hero-agent-renderer[hidden] { display: none; }

/* Same accent wash as the still, so the halo stays when the picture fades. */
.hero-agent-renderer::before {
  position: absolute;
  z-index: 0;
  top: 54%;
  left: 50%;
  width: 92%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--hk-accent) 62%, transparent) 0%, var(--hk-accent-soft) 42%, transparent 72%);
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.hero-agent-renderer canvas { position: relative; z-index: 1; width: 100%; height: 100%; }

/* Crossfade stays on --hk-motion-base (240ms), inside the 400ms ceiling. The still stays mounted until a frame exists. */
.hero-still-frame,
.hero-agent-renderer { transition: opacity var(--hk-motion-base) var(--hk-ease); }

.hero-focal[data-hero-renderer-state="ready"] .hero-still-frame { opacity: 0; }

.hero-focal[data-hero-renderer-state="ready"] .hero-agent-renderer { opacity: 1; }

.hero-caption,
#hero-caption {
  color: var(--hk-fg-faint);
  font: 500 0.75rem/1.4 var(--hk-mono);
  letter-spacing: 0.06em;
  text-align: center;
}

.landing-section { padding-bottom: var(--hk-section); }

.section-intro { display: grid; justify-items: start; gap: 0.85rem; max-width: 40rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }

.section-intro h2,
.trust-card h3,
.protocol-steps h3,
.ecosystem-names h3 {
  color: var(--hk-fg);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-intro h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.12; }

.section-intro p,
.trust-card p,
.protocol-steps p,
.ecosystem-names p,
.catalog-boundary { color: var(--hk-fg-muted); }

.protocol-steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.protocol-steps > li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--hk-line);
  border-radius: var(--hk-radius-md);
  background: var(--hk-bg-soft);
}

.protocol-steps > li > span {
  color: var(--hk-fg-faint);
  font: 500 0.75rem/1 var(--hk-mono);
  letter-spacing: 0.08em;
}

.protocol-steps h3 { font-size: 1.2rem; margin-bottom: 0.35rem; }

.phase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0;
  padding: 0;
  list-style: none;
}

.phase-tags li {
  display: flex;
  grid-template-columns: none;
  gap: 0.4rem;
  align-items: center;
  margin: 0;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--hk-line);
  border-radius: var(--hk-radius-pill);
  background: transparent;
}

.phase-tags span { color: var(--hk-fg); letter-spacing: 0; font: 500 0.75rem/1 var(--hk-font); }

.phase-tags b {
  color: var(--hk-warning);
  font: 500 0.7rem/1 var(--hk-mono);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.principle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--hk-fg-faint);
  font: 500 0.75rem/1.4 var(--hk-mono);
  letter-spacing: 0.06em;
}

.catalog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }

.catalog-label {
  margin: 0 0 0.85rem;
  color: var(--hk-fg-faint);
  font: 500 0.75rem/1.4 var(--hk-mono);
  letter-spacing: 0.06em;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

[aria-busy="true"] > .catalog-loading,
.catalog-loading,
.catalog-empty,
.catalog-unavailable {
  grid-column: 1 / -1;
  display: grid;
  min-height: 8.5rem;
  margin: 0;
  padding: 1rem;
  border: 1px dashed var(--hk-line-strong);
  border-radius: var(--hk-radius-md);
  color: var(--hk-fg-muted);
  place-items: center;
  text-align: center;
}

.catalog-unavailable { border-color: color-mix(in srgb, var(--hk-warning) 55%, transparent); }

.latest-product-card {
  position: relative;
  display: grid;
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid var(--hk-line);
  border-radius: var(--hk-radius-md);
  background: var(--hk-bg-soft);
}

.latest-product-visual {
  position: relative;
  display: grid;
  min-height: 8rem;
  overflow: hidden;
  border-radius: var(--hk-radius-sm);
  background: var(--hk-bg);
}

.latest-product-visual img { width: 100%; height: 9rem; object-fit: cover; }

.latest-product-visual-facts,
.latest-product-provenance {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--hk-fg-faint);
  font: 500 0.75rem/1.4 var(--hk-mono);
  letter-spacing: 0.04em;
}

.latest-product-heading {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.latest-product-heading h3 { font-size: 1.05rem; letter-spacing: -0.02em; }

.catalog-card-price { color: var(--hk-fg); font-weight: 600; }

.catalog-card-meta,
.latest-product-delivery { color: var(--hk-fg-muted); font-size: 0.95rem; }

.hk-dummy-chip {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  z-index: 1;
  margin: 0;
}

.agent-search-trigger {
  min-height: 2.75rem;
  margin-top: 0.35rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--hk-line-strong);
  border-radius: var(--hk-radius-pill);
  background: transparent;
  color: var(--hk-fg);
  font: 500 0.9rem/1 var(--hk-font);
  cursor: pointer;
}

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

.catalog-boundary { margin-top: 1.25rem; max-width: 42rem; font-size: 0.95rem; }

.trust-grid,
.ecosystem-names {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust-card,
.ecosystem-names li {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--hk-line);
  border-radius: var(--hk-radius-md);
  background: var(--hk-bg-soft);
}

.trust-card h3,
.ecosystem-names h3 { font-size: 1.15rem; }

.ecosystem-names { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.ecosystem-names p { color: var(--hk-warning); font-size: 0.95rem; }

.ecosystem-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.ecosystem-chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--hk-line);
  border-radius: var(--hk-radius-pill);
  color: var(--hk-fg);
  font-size: 0.95rem;
}

.ecosystem-chips span {
  color: var(--hk-warning);
  font: 500 0.7rem/1 var(--hk-mono);
  letter-spacing: 0.05em;
}

.ecosystem-plugins { margin: 1.25rem 0 0; }

.hk-noscript {
  margin-bottom: var(--hk-section);
  padding: 1rem 1.1rem;
  border: 1px solid var(--hk-line-strong);
  border-radius: var(--hk-radius-sm);
  color: var(--hk-fg-muted);
}

.hk-noscript a { color: var(--hk-accent); }

.agent-brief-dialog {
  width: min(36rem, calc(100% - 2rem));
  padding: 1.25rem;
  border: 1px solid var(--hk-line-strong);
  border-radius: var(--hk-radius-md);
  background: var(--hk-bg-elev);
  color: var(--hk-fg);
}

.agent-brief-dialog::backdrop { background: rgba(5, 5, 8, 0.72); }

.agent-brief-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.agent-brief-dialog h2 { font-size: clamp(1.35rem, 2vw, 1.75rem); letter-spacing: -0.02em; }

.agent-brief-details,
.agent-brief-boundary,
.agent-brief-status { color: var(--hk-fg-muted); }

.agent-brief-label {
  display: block;
  margin: 0.85rem 0 0.4rem;
  color: var(--hk-fg-faint);
  font: 500 0.75rem/1 var(--hk-mono);
  letter-spacing: 0.06em;
}

.agent-brief-instructions {
  width: 100%;
  min-height: 8rem;
  padding: 0.75rem;
  border: 1px solid var(--hk-line);
  border-radius: var(--hk-radius-sm);
  background: var(--hk-bg);
  color: var(--hk-fg);
  font: 400 0.95rem/1.5 var(--hk-font);
  resize: vertical;
}

.agent-brief-close {
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 1px solid var(--hk-line-strong);
  border-radius: var(--hk-radius-sm);
  background: transparent;
  color: var(--hk-fg);
  font-size: 1.25rem;
  cursor: pointer;
}

.agent-brief-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.85rem;
}

.agent-brief-actions div { display: flex; gap: 0.5rem; }

.site-footer {
  display: grid;
  gap: 0.85rem;
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.site-footer p { color: var(--hk-fg-muted); }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy {
    animation: hk-hero-settle 600ms var(--hk-ease) both;
  }

  .hero-still-frame {
    animation: hk-hero-float 4.2s ease-in-out infinite alternate;
  }

  .hero-still-frame::before,
  .hero-agent-renderer::before {
    animation: hk-hero-glow 4.2s ease-in-out infinite alternate;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero-still-frame::before,
  .hero-agent-renderer::before {
    transition: filter var(--hk-motion-base) var(--hk-ease);
  }

  .hero-stage:hover .hero-still-frame::before,
  .hero-stage:hover .hero-agent-renderer::before {
    filter: brightness(1.45);
  }
}

html.has-motion [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
}

html.has-motion [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--hk-motion-base) var(--hk-ease),
    transform var(--hk-motion-base) var(--hk-ease);
  transition-delay: var(--hk-reveal-delay, 0ms);
}

@keyframes hk-hero-settle {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes hk-hero-float {
  from { transform: translateY(0); }
  to { transform: translateY(-0.55rem); }
}

@keyframes hk-hero-glow {
  from { opacity: 0.55; transform: translate(-50%, -50%) scale(0.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 840px) {
  .hero-layout,
  .trust-grid,
  .catalog-grid { grid-template-columns: 1fr 1fr; }

  .hero-layout { grid-template-columns: 1fr; }

  .hero-focal { width: min(68vw, 15rem); justify-self: center; }

  .hero-still-frame,
  .hero-agent-renderer { width: 100%; }

  .ecosystem-names { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-nav { display: none; }

  .header-inner > .hk-button { margin-left: auto; }

  .nav-overflow { display: block; }

  .catalog-grid,
  .trust-grid { grid-template-columns: 1fr; }

  .agent-brief-actions { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy,
  html.has-motion [data-reveal],
  html.has-motion [data-reveal].is-revealed,
  .hero-still-frame,
  .hero-still,
  .hero-agent-renderer,
  .hk-button {
    opacity: 1;
    filter: none;
    transform: none;
    animation: none;
    transition: none;
  }

  .hero-still-frame::before,
  .hero-agent-renderer::before,
  .hero-stage:hover .hero-still-frame::before,
  .hero-stage:hover .hero-agent-renderer::before {
    opacity: 1;
    filter: none;
    animation: none;
    transition: none;
    transform: translate(-50%, -50%);
  }
}
