/* ============================================================
   Greenwich Invest — kinetic layer
   Cursor-lit cards, staggered reveals, kinetic buttons, auth
   photo stage and readable footers. Behaviour lives in
   kinetic.js; everything here degrades to the static design
   when JS is off or prefers-reduced-motion is set.
   ============================================================ */

:root {
  --kx-green: #84CA23;
  --kx-deep: #006527;
  --kx-ease: cubic-bezier(.16, 1, .3, 1);
}

/* ── Auth footer: readable text, bold regulatory line ───────── */
.grw-auth-brand__footer-copy { color: rgba(255, 255, 255, 0.82); font-size: 13px; line-height: 1.5; }
.grw-auth-brand__footer-copy--regulatory {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ── Auth photo stage (inside .ibp-auth-decor) ─────────────── */
.ibp-auth-photos { position: absolute; inset: 0; }
.ibp-auth-photos img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  opacity: 0;
}
.ibp-auth-photos img:first-child { opacity: 1; }
.ibp-auth-photos::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 36, 26, 0.80) 0%, rgba(10, 36, 26, 0.35) 38%, rgba(10, 36, 26, 0.82) 100%),
    linear-gradient(135deg, rgba(0, 101, 39, 0.55), rgba(20, 71, 51, 0.30));
}
@keyframes kx-photo-cycle {
  0%   { opacity: 0; transform: scale(1.06); }
  6%   { opacity: 1; }
  33%  { opacity: 1; transform: scale(1); }
  39%  { opacity: 0; }
  100% { opacity: 0; transform: scale(1.06); }
}
@media (prefers-reduced-motion: no-preference) {
  .ibp-auth-photos img { animation: kx-photo-cycle 24s ease-in-out infinite; }
  .ibp-auth-photos img:nth-child(2) { animation-delay: 8s; }
  .ibp-auth-photos img:nth-child(3) { animation-delay: 16s; }
  .ibp-auth-photos img:first-child { opacity: 0; }
}

/* ── Card reveal ───────────────────────────────────────────── */
@keyframes kx-rise {
  from { opacity: 0; transform: translateY(22px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.kx-pre { opacity: 0; }
.kx-in { animation: kx-rise 640ms var(--kx-ease) both; animation-delay: var(--kx-d, 0ms); }

/* ── Cards: one soft cursor light, and a small lift on key cards ── */
.kx-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms ease;
  z-index: 1;
  background: radial-gradient(360px circle at var(--kx-x, 50%) var(--kx-y, 50%), rgba(132, 202, 35, 0.03), transparent 65%);
}
.kx-card.kx-live .kx-glow { opacity: 1; }
.kx-lift { transition: transform 260ms var(--kx-ease), box-shadow 260ms ease; }
.kx-lift.kx-live { transform: translateY(-2px); box-shadow: 0 12px 28px -18px rgba(16, 24, 22, 0.35); }

/* ── Buttons: one signature effect each (see kinetic.js) ───── */
.kx-light { position: relative; overflow: hidden; isolation: isolate; }
.kx-light::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(110px circle at var(--kx-bx, 50%) var(--kx-by, 50%), rgba(132, 202, 35, 0.05), transparent 65%);
  transition: opacity 200ms ease;
}
.kx-light:not(:disabled, .is-disabled, [aria-disabled="true"]):hover::before { opacity: 1; }
.kx-ring { transition: box-shadow 260ms ease; }
.kx-ring:not(:disabled, .is-disabled, [aria-disabled="true"]):hover {
  box-shadow: 0 0 0 2px rgba(132, 202, 35, 0.16);
}
.kx-light:focus-visible, .kx-ring:focus-visible { box-shadow: 0 0 0 3px rgba(132, 202, 35, 0.55); }

/* ── Count-up numbers ──────────────────────────────────────── */
.kx-count { font-variant-numeric: tabular-nums; }

/* ── Reduced motion / touch: calm fallback ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  .kx-pre { opacity: 1; }
  .kx-in { animation: none; }
  .kx-lift, .kx-lift.kx-live { transform: none; transition: none; }
  .kx-glow { display: none; }
  .kx-light::before { display: none; }
}
@media (hover: none) {
  .kx-glow { display: none; }
  .kx-lift.kx-live { transform: none; }
}

/* ── People: support card + empty-state portraits ──────────── */
.ibp-support-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border-radius: 16px;
  border: 1px solid var(--color-border, rgba(20, 71, 51, 0.14));
  background: var(--color-surface, #fff);
}
.ibp-support-card__photo {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  box-shadow: 0 0 0 3px var(--color-surface, #fff), 0 0 0 5px var(--kx-green);
}
.ibp-support-card__body { flex: 1 1 auto; min-width: 0; }
.ibp-support-card__title { margin: 0 0 2px; font-size: 16px; font-weight: 700; }
.ibp-support-card__text { margin: 0; font-size: 14px; color: var(--color-text-muted, #4b5a52); }
.ibp-empty-photo {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  box-shadow: 0 0 0 4px var(--color-surface, #fff), 0 0 0 6px rgba(132, 202, 35, 0.35);
}
@media (max-width: 640px) {
  .ibp-support-card { flex-wrap: wrap; }
  .ibp-support-card .grw-btn { width: 100%; }
}

/* ── Landing nav: sliding indicator + scroll-spy ───────────── */
.landing-nav__links { position: relative; }
.landing-nav__indicator {
  position: absolute;
  left: 0;
  top: 50%;
  height: 34px;
  margin-top: -17px;
  border-radius: 999px;
  background: rgba(132, 202, 35, 0.18);
  box-shadow: inset 0 0 0 1px rgba(0, 101, 39, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateX(var(--kx-nx, 0px));
  width: var(--kx-nw, 0px);
  transition: transform 320ms var(--kx-ease), width 320ms var(--kx-ease), opacity 200ms ease;
}
.landing-nav__indicator.is-on { opacity: 1; }
.landing-nav__links a { position: relative; z-index: 1; padding: 8px 14px; border-radius: 999px; }
.landing-nav__links a[aria-current="true"] { color: #006527; }
.landing-nav__links a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--kx-green);
  transform: scale(0);
  transition: transform 240ms var(--kx-ease);
}
.landing-nav__links a[aria-current="true"]::after { transform: scale(1); }
[data-theme="dark"] .landing-nav__links a[aria-current="true"] { color: #84CA23; }
@media (max-width: 980px) {
  .landing-nav__indicator { display: none; }
  .landing-nav__links a { border-radius: 0; padding: 14px 0; }
  .landing-nav__links a::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .landing-nav__indicator { transition: none; }
}

/* Admin: article cover preview */
.ibp-insight-cover-preview { display: block; max-width: 320px; height: auto; margin-bottom: 10px; border-radius: 12px; }

/* ── Floating dock (landing + insights) ────────────────────── */
.landing-dock {
  position: fixed;
  right: clamp(14px, 2vw, 28px);
  bottom: clamp(14px, 2vw, 28px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
body:has(.cookie-ribbon.is-open) .landing-dock { bottom: 110px; }
.landing-dock__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  min-width: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: #006527;
  box-shadow: 0 12px 28px -12px rgba(0, 60, 24, 0.7);
  transition: transform 220ms var(--kx-ease), background-color 200ms ease, box-shadow 220ms ease;
}
.landing-dock__btn:hover { background: #00551f; transform: translateY(-2px); }
.landing-dock__btn:focus-visible { outline: 3px solid rgba(132, 202, 35, 0.7); outline-offset: 3px; }
.landing-dock__btn--scroll { width: 46px; padding: 0; color: #144733; background: #fff; box-shadow: 0 10px 24px -12px rgba(16, 24, 22, 0.6), 0 0 0 1px rgba(20, 71, 51, 0.14); }
.landing-dock__btn--scroll:hover { background: #f3f7f4; }
.landing-dock__btn--scroll[hidden] { display: none; }
.landing-dock__arrow { transition: transform 320ms var(--kx-ease); }
.landing-dock__btn--scroll[data-dir="up"] .landing-dock__arrow { transform: rotate(180deg); }
.landing-dock__panel {
  width: min(330px, calc(100vw - 28px));
  padding: 18px 18px 16px;
  border-radius: 18px;
  color: #0f241a;
  background: #fff;
  box-shadow: 0 24px 60px -20px rgba(16, 24, 22, 0.55), 0 0 0 1px rgba(20, 71, 51, 0.12);
}
.landing-dock__panel[hidden] { display: none; }
.landing-dock__title { display: block; margin-bottom: 10px; font-size: 16px; }
.landing-dock__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  margin: 0 -10px;
  border-radius: 10px;
  font-size: 14px;
  color: #144733;
  text-decoration: none;
  word-break: break-word;
}
.landing-dock__link:hover { background: rgba(132, 202, 35, 0.16); }
.landing-dock__link svg { flex: 0 0 auto; color: #006527; }
.landing-dock__address { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: #4b5a52; }
[data-theme="dark"] .landing-dock__panel { color: #f1f7f2; background: #12211a; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(132, 202, 35, 0.18); }
[data-theme="dark"] .landing-dock__link { color: rgba(255, 255, 255, 0.88); }
[data-theme="dark"] .landing-dock__link svg { color: #84ca23; }
[data-theme="dark"] .landing-dock__address { color: rgba(255, 255, 255, 0.7); }
[data-theme="dark"] .landing-dock__btn--scroll { color: #84ca23; background: #12211a; box-shadow: 0 0 0 1px rgba(132, 202, 35, 0.25); }
@media (max-width: 560px) {
  .landing-dock__btn--contact span { display: none; }
  .landing-dock__btn--contact { width: 46px; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .landing-dock__btn, .landing-dock__arrow { transition: none; }
  .landing-dock__btn:hover { transform: none; }
}
@media print { .landing-dock { display: none; } }

/* Dock: copy buttons */
.landing-dock__row { display: flex; align-items: center; gap: 4px; margin: 0 -10px; }
.landing-dock__row .landing-dock__link { flex: 1 1 auto; min-width: 0; margin: 0; }
.landing-dock__copy {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  color: #144733;
  background: transparent;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.landing-dock__copy:hover { background: rgba(132, 202, 35, 0.2); }
.landing-dock__copy:focus-visible { outline: 3px solid rgba(132, 202, 35, 0.7); outline-offset: 1px; }
.landing-dock__copy-done { position: absolute; opacity: 0; transform: scale(.6); transition: opacity 160ms ease, transform 200ms var(--kx-ease); }
.landing-dock__copy-icon { transition: opacity 160ms ease, transform 200ms var(--kx-ease); }
.landing-dock__copy.is-copied { color: #006527; background: rgba(132, 202, 35, 0.22); }
.landing-dock__copy.is-copied .landing-dock__copy-icon { opacity: 0; transform: scale(.6); }
.landing-dock__copy.is-copied .landing-dock__copy-done { opacity: 1; transform: none; }
.landing-dock__status { display: block; min-height: 0; font-size: 12px; font-weight: 700; color: #006527; }
.landing-dock__status:not(:empty) { min-height: 18px; margin-top: 4px; }
.landing-dock__sr { position: fixed; left: -9999px; top: 0; opacity: 0; }
[data-theme="dark"] .landing-dock__copy { color: rgba(255, 255, 255, 0.86); }
[data-theme="dark"] .landing-dock__copy.is-copied, [data-theme="dark"] .landing-dock__status { color: #84ca23; }
@media (prefers-reduced-motion: reduce) {
  .landing-dock__copy-done, .landing-dock__copy-icon { transition: none; }
}
