/* Published from Horyzon design kit — edit sources in horyzon-design-kit/, then sync. */

/* --- components/button.css --- */

/* Horyzon primary CTA — text + arrow square.
   One contract for every `.btn[data-btn-theme="primary"]`:
   light: black shell, white inset, black icon
   dark:  white shell, black inset, white icon
   Hover runs the arrow slide only — inset surface + icon color stay put. */

:root {
  --hz-btn-shell: #000;
  --hz-btn-on-shell: #fff;
  --hz-btn-inset: #fff;
  --hz-btn-on-inset: #212121;
}

[data-theme="dark"] {
  --hz-btn-shell: #fff;
  --hz-btn-on-shell: #000;
  --hz-btn-inset: #000;
  --hz-btn-on-inset: #fff;
}

/* Shell */
html .btn[data-btn-theme="primary"] .btn__bg {
  background-color: var(--hz-btn-shell);
  background-image: none;
}

html .btn[data-btn-theme="primary"] .btn__text,
html .btn[data-btn-theme="primary"] .btn__span {
  color: var(--hz-btn-on-shell);
}

/* Inset square — stable resting surface */
html .btn[data-btn-theme="primary"] .arrow {
  background-color: var(--hz-btn-inset);
  background-image: none;
}

/* Hover fill matches inset so the square never recolors mid-animation */
html .btn[data-btn-theme="primary"] .arrow__bg,
html .btn[data-btn-theme="primary"][data-hover]:hover .arrow__bg,
html .btn[data-btn-theme="primary"].is--active .arrow__bg {
  background-color: var(--hz-btn-inset);
}

/* Resting + incoming icon share on-inset (no flash to a second color) */
html .btn[data-btn-theme="primary"] .arrow .arrow__box,
html .btn[data-btn-theme="primary"] .arrow .arrow__box.is--duplicate,
html .btn[data-btn-theme="primary"][data-hover]:hover .arrow .arrow__box,
html .btn[data-btn-theme="primary"][data-hover]:hover .arrow .arrow__box.is--duplicate {
  color: var(--hz-btn-on-inset);
}

/* Keep motion layers inside one clean rounded square */
html .btn[data-btn-theme="primary"] .arrow {
  clip-path: inset(0 round 0.25em);
  background-clip: padding-box;
  overflow: hidden;
}

html .btn[data-btn-theme="primary"] .arrow,
html .btn[data-btn-theme="primary"] .arrow__bg,
html .btn[data-btn-theme="primary"] .arrow__box {
  border: 0;
  box-shadow: none;
}

/* ------------------------------------------------------------------
   Header actions: Log in (text) + Let's talk (primary button), one row.
   Same 3em height as Log in; arrow scaled to ~hero proportion (~0.67).
   Subtle hover grow (default site --grow is 0.25em; header stays quieter).
   ------------------------------------------------------------------ */
html .nav-bar__btn {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .25em;
  flex: none;
}

html .nav-bar__btn .btn {
  flex: none;
  white-space: nowrap;
  background: transparent;
  border: 0;
  box-shadow: none;
}

html .nav-bar__btn .btn[data-btn-theme="primary"] {
  /* Same hover expand as the rest of the site (root --grow). */
  --grow: 0.25em;
  box-sizing: border-box;
  height: 3em;
  padding: 0.4375em 0.4375em 0.4375em 0.85em;
  align-items: center;
  gap: 0.5em;
}

html .nav-bar__btn .btn[data-btn-theme="primary"] .arrow {
  width: 2.125em;
  height: 2.125em;
  border-radius: 0.22em;
}

html .nav-bar__btn .btn[data-btn-theme="primary"] .arrow__svg {
  width: 1.0625em;
}

/* --- components/button-signature.css --- */

/* Opt-in original H01 signature artwork, only behind the arrow square.
   150% height crops the source's empty top/bottom margins, retaining all bands. */
html .btn.horyzon-button--signature .arrow,
html .footer-expert__link.horyzon-button--signature .scaling-bg.is--primary {
  background-color: #090b11;
  background-image: url('/brand/pixel-grain.svg'), url('/brand/signature-wide.png');
  background-size: 96px 96px, 100% 150%;
  background-position: center;
  background-repeat: repeat, no-repeat;
  background-blend-mode: soft-light, normal;
}

/* Resting arrow stays white on the signature artwork. */
html .btn.horyzon-button--signature .arrow .arrow__box {
  color: #fff;
}

/* The entering arrow contrasts with the existing theme-aware hover fill. */
html .btn.horyzon-button--signature .arrow .arrow__box.is--duplicate {
  color: var(--color-light);
}

/* The footer's pixel arrow shares the signature surface, retaining its motion. */
html .footer-expert__link.horyzon-button--signature .arrow-pixel {
  color: #fff;
}

/* Header CTA — beat signature artwork; shell stays transparent.
   Light: dark text, black square, white icon.
   Dark:  white text, white square, black icon. Stable through hover. */
html .nav-bar__btn .btn.horyzon-button--signature {
  --hz-nav-text: #212121;
  --hz-nav-inset: #000;
  --hz-nav-on-inset: #fff;
}

html[data-theme="dark"] .nav-bar__btn .btn.horyzon-button--signature,
html body[data-theme="dark"] .nav-bar__btn .btn.horyzon-button--signature,
[data-theme="dark"] .nav-bar__btn .btn.horyzon-button--signature {
  --hz-nav-text: #fff;
  --hz-nav-inset: #fff;
  --hz-nav-on-inset: #212121;
}

html .nav-bar__btn .btn.horyzon-button--signature .btn__bg {
  background-color: transparent;
  background-image: none;
}

html .nav-bar__btn .btn.horyzon-button--signature .btn__text,
html .nav-bar__btn .btn.horyzon-button--signature .btn__span {
  color: var(--hz-nav-text);
}

html .nav-bar__btn .btn.horyzon-button--signature .arrow,
html .nav-bar__btn .btn.horyzon-button--signature .arrow__bg,
html .nav-bar__btn .btn.horyzon-button--signature[data-hover]:hover .arrow,
html .nav-bar__btn .btn.horyzon-button--signature[data-hover]:hover .arrow__bg,
html .nav-bar__btn .btn.horyzon-button--signature.is--active .arrow__bg {
  background-color: var(--hz-nav-inset);
  background-image: none;
}

html .nav-bar__btn .btn.horyzon-button--signature .arrow .arrow__box,
html .nav-bar__btn .btn.horyzon-button--signature .arrow .arrow__box.is--duplicate,
html .nav-bar__btn .btn.horyzon-button--signature[data-hover]:hover .arrow .arrow__box,
html .nav-bar__btn .btn.horyzon-button--signature[data-hover]:hover .arrow .arrow__box.is--duplicate {
  color: var(--hz-nav-on-inset);
}
