/* ==========================================================================
   NeuroHype — Required components
   Specs: repos/assets/VISUAL_SYSTEM_EXTRACT.md ("Required components")
   Built to be shared by the landing page and Find Your Flow.
   ========================================================================== */

/* --- nico wordmark -------------------------------------------------------
   Casing ruled 2026-07-28 (final). Lowercase nico in exactly three places:
   the wordmark, DM Mono labels, and her chat bubbles. Everything else keeps
   capitalized "Nico" — including Anton headlines, which are uppercase by law
   and transform NICO along with the rest of the line ("YOUR NICO.").

   Use this class only inside a container that uppercases its text (.mono
   labels), where nico must resist the transform. Chat bubbles already opt out
   via .bubble__who. Headlines must NOT use it. */
.nico-mark {
  text-transform: none !important;
  font-variant: none;
}

/* --- Utility -------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Mode card -----------------------------------------------------------
   3px left border in the mode color. Stack: DM Mono label → Anton name in
   mode color → verb triplet → 3–4 traits → REQUIRED risk line.
   "Every mode card carries its shadow." A mode card without .mode-card__risk
   is an incomplete component, not a styling choice. */
.mode-card {
  background: var(--nh-card-2);
  border-radius: 14px;
  padding: 28px;
  border-left: var(--nh-mode-card-border) solid var(--nh-mode, var(--nh-text-32));
}
.mode-card__label {
  font-family: var(--nh-font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nh-text-50);
  margin-bottom: 14px;
}
.mode-card__name {
  font-family: var(--nh-font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 34px;
  line-height: 1.05;
  margin-bottom: 6px;
  color: var(--nh-mode, var(--nh-text-100));
}
.mode-card__verbs {
  font-weight: 700;
  color: var(--nh-text-84);
  font-size: 14px;
  margin-bottom: 16px;
}
.mode-card__traits { list-style: none; font-size: 14px; color: var(--nh-text-50); }
.mode-card__traits li { padding: 5px 0; border-bottom: 1px solid var(--nh-text-09); }
.mode-card__traits li:last-child { border-bottom: none; }
.mode-card__risk {
  margin-top: 14px;
  font-family: var(--nh-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nh-text-32);
}

/* --- Badge — translucent fill + matching border, pill. NEVER solid. ------- */
.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--nh-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nh-text-84);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--nh-text-32);
}
.badge--boost   { color: var(--nh-boost);   background: rgba(239, 158, 51, 0.12); border-color: rgba(239, 158, 51, 0.45); }
.badge--control { color: var(--nh-control); background: rgba(50, 201, 228, 0.12); border-color: rgba(50, 201, 228, 0.45); }
.badge--restore { color: var(--nh-restore); background: rgba(126, 88, 227, 0.12); border-color: rgba(126, 88, 227, 0.45); }
.badge--nico    { color: var(--nh-nico-pink); background: rgba(234, 25, 142, 0.12); border-color: rgba(234, 25, 142, 0.45); }

/* --- CTA ------------------------------------------------------------------
   Pink is the AI layer and CTAs only. Loading state is signal bars, never a
   spinner — a spinner says "wait"; bars say "the system is reading." */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  background: var(--nh-nico-pink);
  color: #fff;
  font-family: var(--nh-font-body);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 24px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  /* A pill that wraps to two lines reads as broken, anywhere it appears.
     Applied to every CTA, not just the one that was caught wrapping. */
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform var(--nh-dur-settle) var(--nh-ease-signal),
              box-shadow var(--nh-dur-settle) var(--nh-ease-signal);
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(234, 25, 142, 0.35); }
.cta:focus-visible { outline: 2px solid var(--nh-control); outline-offset: 3px; }
.cta--ghost {
  background: transparent;
  border: 1px solid var(--nh-text-32);
  color: var(--nh-text-84);
  font-weight: 500;
}
.cta--ghost:hover { border-color: var(--nh-text-84); box-shadow: none; }

/* Loading: bars rise and settle. No spinner, no pulse-glow. */
.cta__bars { display: none; align-items: flex-end; gap: 3px; height: 14px; }
.cta__bars i { display: block; width: 3px; border-radius: 2px; background: currentColor; height: 30%; }
.cta.is-loading .cta__label { opacity: 0.55; }
.cta.is-loading .cta__bars { display: inline-flex; }
.cta.is-loading .cta__bars i { animation: nh-bar-settle 900ms var(--nh-ease-signal) infinite; }
.cta.is-loading .cta__bars i:nth-child(2) { animation-delay: 120ms; }
.cta.is-loading .cta__bars i:nth-child(3) { animation-delay: 240ms; }
.cta.is-loading .cta__bars i:nth-child(4) { animation-delay: 360ms; }
@keyframes nh-bar-settle {
  0%, 100% { height: 30%; }
  45%      { height: 100%; }
}

/* --- nico module ---------------------------------------------------------
   nico left, pink accent, ALWAYS lowercase, no exclamation points,
   1–3 short sentences. User bubbles right, neutral, natural casing. */
.nico-chat {
  background: var(--nh-card-1);
  border: 1px solid var(--nh-text-09);
  border-radius: 18px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bubble {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.5;
}
.bubble--nico {
  align-self: flex-start;
  background: var(--nh-card-3);
  border-left: 2px solid var(--nh-nico-pink);
  color: var(--nh-text-84);
}
.bubble--user {
  align-self: flex-end;
  background: var(--nh-card-2);
  color: var(--nh-text-84);
}
.bubble__who {
  display: block;
  font-family: var(--nh-font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--nh-nico-pink);
  margin-bottom: 5px;
  text-transform: none; /* nico is displayed here — never uppercased */
}

/* --- Energy Profile card -------------------------------------------------
   dial / waveform / bars + one Anton line. Share exports 9:16 and 1:1. */
.profile-card {
  background: linear-gradient(160deg, var(--nh-card-2), var(--nh-card-1));
  border: 1px solid var(--nh-text-09);
  border-radius: 20px;
  padding: 30px;
  max-width: 420px;
}
.profile-card__head { display: flex; justify-content: space-between; margin-bottom: 22px; }
.profile-card__line {
  font-family: var(--nh-font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 26px;
  line-height: 1.1;
  color: var(--nh-text-100);
  margin-bottom: 20px;
}
.profile-card__wave { width: 100%; height: auto; display: block; margin-bottom: 22px; }
.levels { display: flex; flex-direction: column; gap: 10px; }
.level {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--nh-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--nh-text-50);
}
.level__track { flex: 1; height: 8px; background: var(--nh-card-3); border-radius: 4px; overflow: hidden; }
.level__fill {
  height: 100%;
  border-radius: 4px;
  background: var(--nh-mode, var(--nh-text-50));
  width: 0;
  transition: width var(--nh-dur-sweep) var(--nh-ease-signal);
}
.profile-card__foot {
  margin-top: 22px;
  font-family: var(--nh-font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nh-text-32);
}

@media (prefers-reduced-motion: reduce) {
  .cta.is-loading .cta__bars i { animation: none; height: 65%; }
  .level__fill { transition: none; }
}

/* --- Waiting moments -------------------------------------------------------
   The heart, never a spinner. Founder ruling 2026-07-28. */
.nh-loader {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background: rgba(29, 29, 27, 0.92);
  animation: nh-loader-in 260ms var(--nh-ease-signal) forwards;
}
@keyframes nh-loader-in { from { opacity: 0; } to { opacity: 1; } }
.nh-loader__inner { display: grid; justify-items: center; gap: 22px; }
.nh-loader__label {
  font-family: var(--nh-font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--nh-text-50);
}

/* The build, looping for as long as the wait lasts. Bars enter top-down —
   Animation A's signature — then the whole cycle restarts. */
.nh-heart.is-building rect,
.nh-heart.is-building path {
  transform: scaleX(0); transform-origin: center; transform-box: fill-box;
  animation: nh-heart-bar 400ms var(--nh-ease-signal) forwards;
  animation-delay: calc(var(--i) * 62ms);
}
@keyframes nh-heart-bar { to { transform: scaleX(1); } }

.nh-heart.is-looping rect,
.nh-heart.is-looping path {
  animation: nh-heart-loop 2200ms var(--nh-ease-signal) infinite;
  animation-delay: calc(var(--i) * 62ms);
}
@keyframes nh-heart-loop {
  0%   { transform: scaleX(0); }
  18%  { transform: scaleX(1); }
  72%  { transform: scaleX(1); }
  88%  { transform: scaleX(0); }
  100% { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .nh-loader { animation: none; }
  .nh-heart.is-building rect, .nh-heart.is-building path,
  .nh-heart.is-looping rect, .nh-heart.is-looping path {
    animation: none; transform: none;
  }
}

/* --- Profile card mode line — instrument register --------------------------
   DM Mono, caps. Mode hex is legal here: this is the instrument naming the
   reading, not nico speaking. Grammar is always "HOME: BOOST", never a
   sentence that turns the mode into an identity. */
.profile-card__mode {
  font-family: var(--nh-font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.profile-card__mode-key  { color: var(--nh-text-50); }
.profile-card__mode-name { color: var(--nh-text-100); }
.profile-card__mode-name[data-mode="boost"]   { color: var(--nh-boost); }
.profile-card__mode-name[data-mode="control"] { color: var(--nh-control); }
.profile-card__mode-name[data-mode="restore"] { color: var(--nh-restore); }
.profile-card__mode-qual { color: var(--nh-text-32); }
