/* ╔═══════════════════════════════════════════════════════════════════╗
   ║  Aurora widgets — styles for the 5 alive components.               ║
   ║  Loaded after site.css so it picks up the light-theme variables.   ║
   ╚═══════════════════════════════════════════════════════════════════╝ */

/* ════════════════════════════════════════════════════════════════
   1. LIVE FEED — simulated activity ticker
   ════════════════════════════════════════════════════════════════ */
[data-aurora="live-feed"] {
  background: var(--aurora-surface);
  border: 1px solid var(--aurora-border);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: var(--shadow-md);
  max-width: 480px;
  margin: 0 auto;
}
.alf-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--aurora-border);
  margin-bottom: 12px;
}
.alf-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--emerald-500);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: alf-pulse 1.6s infinite;
}
@keyframes alf-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(16, 185, 129, 0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0   rgba(16, 185, 129, 0); }
}
.alf-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--slate-900);
}
.alf-meta {
  margin-inline-start: auto;
  font-size: 11px;
  color: var(--slate-400);
}
.alf-list {
  display: flex; flex-direction: column;
  gap: 8px;
  position: relative;
}
.alf-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--aurora-elev);
  border: 1px solid var(--aurora-border);
  border-radius: 10px;
  transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1),
              opacity 380ms ease;
}
.alf-row--enter { transform: translateY(-12px); opacity: 0; }
.alf-row--exit  { transform: translateX(10px);  opacity: 0; }
.alf-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--sapphire-50);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.alf-body { flex: 1; min-width: 0; }
.alf-line1 {
  font-size: 13px; color: var(--slate-700);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.alf-line1 strong { color: var(--slate-900); }
.alf-line2 {
  font-size: 11px; color: var(--slate-400);
  margin-top: 2px;
}
.alf-amt {
  font-weight: 700;
  font-size: 14px;
  background: linear-gradient(135deg, var(--emerald-600), var(--sapphire-700));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  font-variant-numeric: tabular-nums;
}

/* ════════════════════════════════════════════════════════════════
   2. SAVINGS CALCULATOR
   ════════════════════════════════════════════════════════════════ */
[data-aurora="savings-calc"] {
  background: linear-gradient(180deg, var(--aurora-surface), var(--aurora-elev));
  border: 1px solid var(--aurora-border);
  border-radius: 20px;
  padding: 28px 30px;
  box-shadow: var(--shadow-lg);
  max-width: 560px;
  margin: 0 auto;
}
.asc-head h3 { font-size: 22px; margin: 0 0 6px; color: var(--slate-900); }
.asc-head p  { font-size: 14px; color: var(--slate-500); margin: 0 0 18px; }
.asc-input-wrap {
  position: relative;
  margin-bottom: 14px;
}
.asc-currency {
  position: absolute;
  top: 50%; inset-inline-end: 16px;
  transform: translateY(-50%);
  color: var(--slate-400);
  font-size: 18px;
  pointer-events: none;
}
.asc-input {
  width: 100%;
  height: 56px;
  padding: 0 44px 0 16px;
  border-radius: 12px;
  border: 1.5px solid var(--aurora-border) !important;
  background: var(--aurora-surface) !important;
  font-size: 22px;
  font-weight: 700;
  color: var(--sapphire-700) !important;
  font-variant-numeric: tabular-nums;
  text-align: start;
}
.asc-slider-wrap { margin-bottom: 22px; }
.asc-slider {
  width: 100%;
  -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 6px;
  background: linear-gradient(90deg, var(--sapphire-400), var(--iris-400), var(--aurora-gold-400));
  outline: none;
}
.asc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--aurora-surface);
  border: 3px solid var(--sapphire-600);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
  cursor: pointer;
}
.asc-slider::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--aurora-surface);
  border: 3px solid var(--sapphire-600);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
  cursor: pointer;
}
.asc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.asc-card {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid;
}
.asc-card--danger {
  background: var(--coral-100);
  border-color: var(--coral-400);
}
.asc-card--success {
  background: var(--emerald-50);
  border-color: var(--emerald-400);
}
.asc-label { font-size: 12px; color: var(--slate-500); font-weight: 600; margin-bottom: 6px; }
.asc-card--danger  .asc-label { color: var(--coral-700); }
.asc-card--success .asc-label { color: var(--emerald-700); }
.asc-value {
  font-size: 26px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.asc-card--danger  .asc-value { color: var(--coral-600); }
.asc-card--success .asc-value { color: var(--emerald-700); }
.asc-hint { font-size: 11.5px; color: var(--slate-500); margin-top: 4px; line-height: 1.5; }
.asc-savings {
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, var(--sapphire-50), var(--iris-100));
  border: 1px solid var(--sapphire-200);
  border-radius: 14px;
  font-size: 16px;
}
.asc-savings strong {
  font-size: 28px; font-weight: 700;
  background: linear-gradient(135deg, var(--sapphire-700), #7A5C14);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
  margin: 0 6px;
}
.asc-ratio { font-size: 13px; color: var(--slate-500); margin-inline-start: 8px; }
@media (max-width: 540px) {
  .asc-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════
   3. VS-COMPARISON CARD
   ════════════════════════════════════════════════════════════════ */
[data-aurora="vs-comparison"] {
  background: var(--aurora-surface);
  border: 1px solid var(--aurora-border);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: var(--shadow-md);
  max-width: 720px;
  margin: 0 auto;
}
.avc-head h3 { font-size: 22px; margin: 0 0 4px; color: var(--slate-900); }
.avc-head p  { font-size: 14px; color: var(--slate-500); margin: 0 0 20px; }
.avc-grid { display: flex; flex-direction: column; gap: 6px; }
.avc-row {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 4px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
}
.avc-row--header {
  font-size: 12px;
  color: var(--slate-500);
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 6px 12px;
}
.avc-hdr { text-align: center; }
.avc-label { font-weight: 500; color: var(--slate-700); }
.avc-cell {
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  width: 28px; height: 28px;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.avc-ok  { color: var(--emerald-700);  background: var(--emerald-50);  }
/* WCAG AA: glyphs are 16px bold (min 4.5:1). coral-600 on coral-100 was
   ~3.95:1 and aurora-gold-600 on amber was ~2.35:1 — both fail. Darken the
   text tokens (coral-700 ~5.3:1, gold-700 ~5.1:1) keeping the same tinted bg. */
.avc-no  { color: var(--coral-700);       background: var(--coral-100);       }
.avc-mid { color: var(--aurora-gold-700); background: var(--aurora-gold-100); }
.avc-row--highlight {
  background: linear-gradient(90deg, var(--sapphire-50), var(--iris-100));
  border: 1.5px solid var(--sapphire-300);
  margin-top: 4px;
}
.avc-row--highlight .avc-label {
  color: var(--sapphire-800);
  font-weight: 700;
}
@media (max-width: 600px) {
  .avc-row { font-size: 12px; }
  .avc-row--header { font-size: 10.5px; }
  .avc-cell { width: 24px; height: 24px; font-size: 14px; }
}

/* ════════════════════════════════════════════════════════════════
   4. DEAL TIMELINE
   ════════════════════════════════════════════════════════════════ */
[data-aurora="deal-timeline"] {
  background: var(--aurora-surface);
  border: 1px solid var(--aurora-border);
  border-radius: 22px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-md);
  max-width: 880px;
  margin: 0 auto;
}
.adt-head { text-align: center; margin-bottom: 32px; }
.adt-head h3 { font-size: 24px; margin: 0 0 6px; color: var(--slate-900); }
.adt-head p  { font-size: 14px; color: var(--slate-500); margin: 0; }
.adt-track { position: relative; }
.adt-line {
  position: absolute;
  top: 28px; left: 6%; right: 6%;
  height: 4px;
  background: var(--aurora-border);
  border-radius: 4px;
  overflow: hidden;
  z-index: 0;
}
.adt-line-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--emerald-500), var(--sapphire-500), var(--iris-500), var(--aurora-gold-500));
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 4px;
}
.adt-steps {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.adt-step { text-align: center; position: relative; }
.adt-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--aurora-elev);
  border: 2px solid var(--aurora-border);
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  transition: all 400ms cubic-bezier(0.22, 1, 0.36, 1);
}
.adt-num {
  position: absolute;
  top: -6px; inset-inline-end: calc(50% - 38px);
  width: 22px; height: 22px;
  border-radius: 50%;
  /* WCAG AA: white digit on the old --slate-300 (~#D6D6DB) was ~1.45:1 and
     practically invisible. --slate-500 (#565862) gives white text ~7:1. */
  background: var(--slate-500);
  color: #ffffff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background 400ms ease;
}
.adt-step--active .adt-icon {
  background: linear-gradient(135deg, var(--sapphire-50), var(--iris-100));
  border-color: var(--sapphire-400);
  transform: scale(1.05);
  box-shadow: var(--shadow-glow-sapphire);
}
.adt-step--active .adt-num {
  background: linear-gradient(135deg, var(--sapphire-600), #7A5C14);
}
.adt-step--current .adt-icon {
  border-color: var(--aurora-gold-500);
  box-shadow: var(--shadow-glow-gold);
  animation: adt-bob 1.4s ease-in-out infinite;
}
@keyframes adt-bob {
  0%, 100% { transform: scale(1.05); }
  50%      { transform: scale(1.12); }
}
.adt-step--current .adt-num {
  background: linear-gradient(135deg, var(--aurora-gold-500), var(--aurora-gold-700));
}
.adt-label {
  font-weight: 600; font-size: 14.5px;
  color: var(--slate-900);
  margin-bottom: 4px;
}
.adt-desc {
  font-size: 12.5px; color: var(--slate-500);
  line-height: 1.55;
}
@media (max-width: 720px) {
  .adt-steps { grid-template-columns: 1fr 1fr; gap: 20px; }
  .adt-line { display: none; }
}

/* ════════════════════════════════════════════════════════════════
   5. TRUST METER
   ════════════════════════════════════════════════════════════════ */
[data-aurora="trust-meter"] {
  text-align: center;
  background: var(--aurora-surface);
  border: 1px solid var(--aurora-border);
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-md);
  max-width: 280px;
  margin: 0 auto;
}
.atm-svg { width: 100%; height: auto; max-width: 200px; display: block; margin: 0 auto -10px; }
.atm-value {
  font-size: 44px; font-weight: 700;
  color: var(--slate-900);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.atm-pct { font-size: 18px; color: var(--slate-400); margin-inline-start: 2px; }
.atm-label { font-size: 14px; font-weight: 600; color: var(--slate-700); margin-top: 8px; }
.atm-sub { font-size: 12px; color: var(--slate-400); margin-top: 3px; }

/* ── 6. HERO DEAL DEMO (data-aurora="hero-deal") ────────────────────────────
   An animated "website deal walkthrough" in a browser-chrome frame — loops the
   full escrow lifecycle (create → escrow → handover → confirm → release) for the
   homepage hero. Clean White + gold, RTL, IntersectionObserver-gated, reduced-
   motion safe. Replaces the old app-walkthrough MP4 (R583). */
.ahd-wrap { direction: rtl; width: min(440px, 92vw); margin-inline: auto; }
.ahd-browser { background: #fff; border: 1px solid #E8ECF1; border-radius: 22px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(20,30,45,.05), 0 26px 64px -30px rgba(20,30,45,.30); }
.ahd-bar { display: flex; align-items: center; gap: 10px; padding: 12px 15px; background: #F7F9FC; border-bottom: 1px solid #EEF1F5; }
.ahd-dots { display: flex; gap: 6px; }
.ahd-d { width: 10px; height: 10px; border-radius: 50%; background: #D8DEE6; }
.ahd-url { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: #5E6B78;
  background: #fff; border: 1px solid #E8ECF1; border-radius: 999px; padding: 5px 14px; max-width: 250px; margin-inline: auto; }
.ahd-url b { color: #1C2A35; font-weight: 700; }
.ahd-view { padding: 20px 20px 22px; }
.ahd-ey { font-size: 11px; letter-spacing: .05em; color: #7A5C14; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.ahd-titrow { display: flex; align-items: flex-start; justify-content: space-between; margin-top: 11px; gap: 10px; }
.ahd-tit { font-size: 16.5px; font-weight: 700; color: #1C2A35; }
.ahd-id { font-size: 11.5px; color: #93A0AD; font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 3px; }
.ahd-amt { font-size: 31px; font-weight: 800; color: #1C2A35; font-variant-numeric: tabular-nums; letter-spacing: -.01em; margin-top: 5px; }
.ahd-amt small { font-size: 15px; font-weight: 600; color: #5E6B78; margin-inline-start: 3px; }
.ahd-steps { position: relative; display: flex; justify-content: space-between; margin: 24px 2px 6px; }
.ahd-rail { position: absolute; top: 13px; right: 14px; left: 14px; height: 3px; background: #ECEFF3; border-radius: 2px; }
.ahd-railfill { position: absolute; top: 13px; right: 14px; height: 3px; width: 0; border-radius: 2px;
  background: linear-gradient(90deg, #B7975A, #AC8C47); transition: width .6s cubic-bezier(.22,1,.36,1); }
.ahd-node { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; width: 19%; }
.ahd-circ { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid #E2E6EC; display: flex;
  align-items: center; justify-content: center; font-size: 13px; color: #93A0AD; transition: border-color .4s, background .4s, color .4s, box-shadow .4s; }
.ahd-node.on .ahd-circ { border-color: #A98841; color: #7A5C14; background: #F7EFDD; }
.ahd-node.done .ahd-circ { border-color: #1F8A5B; background: #1F8A5B; color: #fff; }
.ahd-node.cur .ahd-circ { box-shadow: 0 0 0 4px rgba(169,136,65,.16); }
.ahd-nlab { font-size: 10px; font-weight: 600; color: #93A0AD; text-align: center; line-height: 1.25; transition: color .4s; }
.ahd-node.on .ahd-nlab { color: #5E6B78; }
.ahd-node.done .ahd-nlab, .ahd-node.cur .ahd-nlab { color: #1C2A35; }
.ahd-status { display: flex; align-items: center; gap: 11px; margin-top: 18px; padding: 12px 14px; border-radius: 14px;
  background: #F1F4F8; border: 1px solid #E8ECF1; transition: background .4s, border-color .4s; }
.ahd-status.hold { background: #FBF2DF; border-color: #F0E2C0; }
.ahd-status.go { background: #E6F4ED; border-color: #CFE9DC; }
.ahd-sico { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; background: #fff; border: 1px solid #E8ECF1; flex: none; }
.ahd-stxt { font-size: 13.5px; font-weight: 700; color: #1C2A35; line-height: 1.3; }
.ahd-status.hold .ahd-stxt { color: #8A5E10; }
.ahd-status.go .ahd-stxt { color: #157046; }
.ahd-sub { font-size: 11px; color: #5E6B78; font-weight: 500; margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .ahd-railfill, .ahd-circ, .ahd-status { transition: none; } }
