/* SilverEdge world-class polish layer — visual, CRO, interactions
   Loads after main.css and components.css. */

/* ---------- Icon system (SVG sprite — reference with <svg class="icon icon-md"><use href="/img/icons.svg#name"/></svg>) ---------- */
.icon { display: inline-block; flex-shrink: 0; vertical-align: middle; color: currentColor; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }
.icon-2xl { width: 44px; height: 44px; }
.icon-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; border-radius: 14px;
}
.icon-wrap-md { width: 40px; height: 40px; }
.icon-wrap-lg { width: 52px; height: 52px; }
.icon-wrap-xl { width: 64px; height: 64px; }
.icon-soft {
  background: linear-gradient(135deg, #dbeeff 0%, #c5ddf2 100%);
  color: var(--blue-deep);
  box-shadow: 0 4px 14px rgba(14,135,239,.12);
}
.icon-solid {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(14,135,239,.35);
}
.icon-green { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #059669; }
.icon-amber { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #b45309; }
.icon-purple { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #6d28d9; }
.icon-rose { background: linear-gradient(135deg, #ffe4e6, #fecdd3); color: #be123c; }

/* ---------- Hero polish ---------- */
.hero { position: relative; isolation: isolate; }
.hero-bg-grid {
  position: absolute; inset: 0; z-index: -1; opacity: .4;
  background-image:
    linear-gradient(rgba(14,135,239,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14,135,239,.08) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 70% 40%, rgba(0,0,0,.6), transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, rgba(0,0,0,.6), transparent 70%);
}
.hero-blob {
  position: absolute; z-index: -1; border-radius: 50%; filter: blur(80px); opacity: .5;
  pointer-events: none;
}
.hero-blob-1 { width: 480px; height: 480px; background: var(--blue); top: -100px; right: -100px; animation: blob 18s ease-in-out infinite; }
.hero-blob-2 { width: 360px; height: 360px; background: var(--blue-deep); bottom: -80px; left: -80px; animation: blob 22s ease-in-out infinite reverse; }
@keyframes blob { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(30px,-20px) scale(1.08); } 66% { transform: translate(-20px,20px) scale(.95); } }

.hero-visual {
  position: relative; overflow: visible;
}
.hero-visual .hv-float-1, .hero-visual .hv-float-2 {
  position: absolute; background: #fff; border-radius: 14px; padding: 12px 16px;
  box-shadow: 0 12px 32px rgba(17,35,55,.18);
  display: flex; align-items: center; gap: 10px; font-size: .88rem;
  color: var(--navy); white-space: nowrap; animation: floaty 6s ease-in-out infinite;
}
.hero-visual .hv-float-1 { top: 20px; left: -30px; animation-delay: 0s; }
.hero-visual .hv-float-2 { bottom: 110px; right: -30px; animation-delay: 3s; }
.hv-float-icon {
  width: 28px; height: 28px; border-radius: 8px; background: var(--light-blue); color: var(--blue-deep);
  display: grid; place-items: center; flex-shrink: 0;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Trust badge cluster ---------- */
.trust-badges {
  padding: 40px 0; background: #fff; border-top: 1px solid rgba(17,35,55,.05);
}
.trust-badges-row {
  display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; align-items: center;
}
.trust-badge {
  display: flex; align-items: center; gap: 10px;
  color: var(--slate); font-size: .88rem; font-weight: 500;
  padding: 10px 18px; background: var(--gray-50); border-radius: 100px;
  border: 1px solid rgba(17,35,55,.06);
  transition: transform .2s var(--ease);
}
.trust-badge:hover { transform: translateY(-2px); }
.trust-badge-icon {
  width: 22px; height: 22px; flex-shrink: 0;
}
.trust-badge strong { color: var(--navy); font-weight: 700; }

/* ---------- Social proof ticker ---------- */
.proof-ticker {
  position: fixed; bottom: 100px; left: 24px; z-index: 45;
  background: #fff; border-radius: 14px; padding: 12px 18px;
  box-shadow: 0 14px 40px rgba(17,35,55,.15);
  display: none; align-items: center; gap: 12px;
  max-width: 340px; border: 1px solid rgba(17,35,55,.06);
  animation: slideInUp .4s var(--ease) forwards;
}
.proof-ticker.show { display: flex; }
.proof-ticker-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .88rem; flex-shrink: 0;
}
.proof-ticker-body { font-size: .82rem; color: var(--navy); line-height: 1.4; }
.proof-ticker-body strong { color: var(--navy); font-weight: 600; }
.proof-ticker-body span { color: var(--slate); }
.proof-ticker-close { background: none; border: none; color: var(--slate); cursor: pointer; font-size: 1.1rem; padding: 4px; }
@keyframes slideInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 720px) {
  .proof-ticker { bottom: 80px; left: 16px; right: 16px; max-width: none; }
}

/* ---------- Animated stat counter ---------- */
.stat-counter-big {
  font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 800; color: var(--navy);
  letter-spacing: -.03em; line-height: 1; display: inline-block;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- Comparison table (SilverEdge vs typical broker) ---------- */
.compare-table {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid rgba(17,35,55,.08); box-shadow: var(--shadow-sm);
}
.compare-head {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1px; background: rgba(17,35,55,.06);
}
.compare-head > div { background: #fff; padding: 20px 24px; font-weight: 700; color: var(--navy); }
.compare-head > div:nth-child(2) { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%); color: #fff; position: relative; }
.compare-head > div:nth-child(2)::after { content: '★ BEST'; position: absolute; top: -10px; right: 20px; background: #f59e0b; color: #fff; padding: 3px 10px; border-radius: 100px; font-size: .7rem; font-weight: 700; letter-spacing: .04em; }
.compare-row {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1px; background: rgba(17,35,55,.04);
}
.compare-row > div { background: #fff; padding: 16px 24px; font-size: .95rem; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.compare-row > div:first-child { color: var(--slate); font-weight: 500; }
.compare-row > div:nth-child(2) { background: var(--light-blue-soft); color: var(--navy); font-weight: 600; }
.check-green { color: #10b981; }
.check-red { color: #ef4444; }
.check-amber { color: #f59e0b; }
@media (max-width: 700px) {
  .compare-head, .compare-row { grid-template-columns: 1fr; }
  .compare-row > div { border-bottom: 1px solid rgba(0,0,0,.04); }
}

/* ---------- Multi-step form (progress + steps) ---------- */
.step-progress {
  display: flex; gap: 4px; margin-bottom: 20px; align-items: center;
}
.step-dot {
  flex: 1; height: 4px; background: rgba(17,35,55,.1); border-radius: 2px;
  transition: background .3s var(--ease);
}
.step-dot.active { background: var(--blue); }
.step-dot.done { background: var(--blue-deep); }
.step-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;
}
.step-label { color: var(--slate); font-size: .88rem; font-weight: 500; }
.step-back {
  color: var(--blue); background: none; border: none; font-weight: 500; cursor: pointer; padding: 6px 10px; font-size: .9rem; border-radius: 6px;
}
.step-back:hover { background: var(--light-blue-soft); }
.step-content { animation: stepFade .3s var(--ease); }
@keyframes stepFade { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.step-choice {
  display: grid; gap: 10px;
}
.step-choice button {
  padding: 18px 20px; border-radius: 12px; border: 1.5px solid rgba(17,35,55,.1);
  background: #fff; color: var(--navy); font-family: inherit; font-size: 1rem; font-weight: 600;
  cursor: pointer; text-align: left; display: flex; align-items: center; gap: 14px;
  transition: all .2s var(--ease);
}
.step-choice button:hover { border-color: var(--blue); background: var(--light-blue-soft); transform: translateX(4px); }
.step-choice button .choice-icon { font-size: 1.4rem; }
.step-choice button .choice-body { flex: 1; }
.step-choice button .choice-body .choice-sub { display: block; font-weight: 400; font-size: .85rem; color: var(--slate); margin-top: 2px; }

/* ---------- Result bar chart (ACA savings) ---------- */
.savings-viz {
  margin: 24px 0; padding: 24px; background: #fff; border-radius: 14px;
  border: 1px solid rgba(14,135,239,.15);
}
.savings-viz-title { font-size: .88rem; color: var(--slate); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 14px; }
.savings-bar {
  display: flex; height: 52px; border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(17,35,55,.1);
}
.savings-bar-subsidy {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .95rem;
  transition: width .8s var(--ease);
}
.savings-bar-you {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .95rem;
  transition: width .8s var(--ease);
}
.savings-legend {
  display: flex; gap: 24px; margin-top: 12px; flex-wrap: wrap;
}
.savings-legend > div { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--slate); }
.savings-legend-dot { width: 12px; height: 12px; border-radius: 4px; }

/* ---------- Exit intent modal ---------- */
.exit-modal {
  display: none; position: fixed; inset: 0; background: rgba(17,35,55,.6); z-index: 200;
  align-items: center; justify-content: center; padding: 24px;
  animation: fade .2s ease;
}
.exit-modal.show { display: flex; }
.exit-modal-card {
  background: #fff; border-radius: var(--radius-lg); max-width: 440px; width: 100%;
  padding: 36px; position: relative;
  box-shadow: 0 30px 80px rgba(17,35,55,.3);
  animation: popin .25s var(--ease);
}
.exit-modal-close {
  position: absolute; top: 12px; right: 12px; background: none; border: none;
  font-size: 1.6rem; color: var(--slate); cursor: pointer; line-height: 1; padding: 8px;
}
.exit-modal-card h2 { font-size: 1.6rem; margin-bottom: 10px; }
.exit-modal-card p { color: var(--slate); }
.exit-modal-card input { margin-top: 16px; }
.exit-modal-card .btn { margin-top: 12px; width: 100%; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes popin { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }

/* ---------- Section reveal on scroll (disabled — caused invisibility edge cases) ---------- */
.reveal { opacity: 1 !important; transform: none !important; }

/* ---------- Enhanced FAQ (richer hover state) ---------- */
.faq-item {
  padding: 20px 24px; border: 1px solid rgba(17,35,55,.06); border-radius: 12px;
  margin-bottom: 10px; transition: all .2s var(--ease); background: #fff;
}
.faq-item:hover { border-color: var(--blue); box-shadow: 0 4px 16px rgba(14,135,239,.1); }
.faq-item[open] { border-color: var(--blue); background: var(--light-blue-soft); }

/* ---------- Enrollment timeline (Medicare page) ---------- */
.enroll-timeline {
  position: relative; padding: 40px 0 20px;
}
.enroll-timeline::before {
  content: ''; position: absolute; top: 56px; left: 5%; right: 5%; height: 4px;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue), #10b981); border-radius: 2px;
}
.enroll-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; position: relative;
}
.enroll-point {
  text-align: center; position: relative; padding-top: 40px;
}
.enroll-dot {
  position: absolute; top: 40px; left: 50%; transform: translate(-50%, -50%);
  width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 4px solid var(--blue);
  z-index: 2;
}
.enroll-point h4 { margin: 16px 0 6px; font-size: 1rem; }
.enroll-point .enroll-dates { color: var(--blue-deep); font-weight: 700; font-size: .88rem; }
.enroll-point p { font-size: .85rem; color: var(--slate); margin-top: 6px; }
@media (max-width: 720px) {
  .enroll-timeline::before { top: 18px; bottom: 18px; left: 18px; width: 4px; height: auto; }
  .enroll-row { grid-template-columns: 1fr; gap: 32px; }
  .enroll-point { padding-top: 0; padding-left: 50px; text-align: left; }
  .enroll-dot { top: 12px; left: 18px; transform: translate(-50%, 0); }
}

/* ---------- Agent comp visualization (tier cards) ---------- */
.comp-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.comp-tier {
  padding: 28px 24px; border-radius: 16px; text-align: center;
  background: #fff; border: 1.5px solid rgba(17,35,55,.08);
  transition: all .25s var(--ease);
}
.comp-tier:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(14,135,239,.3); }
.comp-tier-best { border-color: var(--blue); background: linear-gradient(180deg, var(--light-blue-soft) 0%, #fff 60%); box-shadow: 0 12px 36px rgba(14,135,239,.18); }
.comp-tier-best .comp-tier-label { color: var(--blue-deep); }
.comp-tier-label { color: var(--slate); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.comp-tier-value { font-size: 2.4rem; font-weight: 800; color: var(--navy); margin-bottom: 8px; letter-spacing: -.02em; line-height: 1; }
.comp-tier-note { color: var(--slate); font-size: .88rem; }
@media (max-width: 720px) { .comp-tiers { grid-template-columns: 1fr; } }

/* ---------- Portal command palette (Cmd+K) ---------- */
.cmdk {
  display: none; position: fixed; inset: 0; background: rgba(17,35,55,.5); z-index: 300;
  align-items: flex-start; justify-content: center; padding: 100px 20px;
}
.cmdk.show { display: flex; animation: fade .15s ease; }
.cmdk-card {
  background: #fff; border-radius: 12px; width: 100%; max-width: 520px;
  box-shadow: 0 30px 80px rgba(17,35,55,.35); overflow: hidden;
  animation: popin .15s var(--ease);
}
.cmdk-input {
  width: 100%; padding: 18px 20px; border: none; font-size: 1.1rem; font-family: inherit;
  border-bottom: 1px solid rgba(17,35,55,.08);
}
.cmdk-input:focus { outline: none; box-shadow: none; }
.cmdk-list { max-height: 400px; overflow-y: auto; padding: 6px 0; }
.cmdk-item {
  padding: 12px 20px; display: flex; align-items: center; gap: 12px; cursor: pointer;
  color: var(--navy); font-size: .95rem;
}
.cmdk-item:hover, .cmdk-item.active { background: var(--light-blue-soft); }
.cmdk-item-icon { width: 22px; text-align: center; color: var(--blue); }
.cmdk-item-label { flex: 1; }
.cmdk-item-group { color: var(--slate); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.cmdk-hint { padding: 10px 20px; background: var(--gray-50); font-size: .78rem; color: var(--slate); border-top: 1px solid rgba(17,35,55,.04); }
.cmdk-hint kbd {
  background: #fff; border: 1px solid rgba(17,35,55,.12); border-radius: 4px; padding: 2px 6px;
  font-family: ui-monospace, monospace; font-size: .82em; margin: 0 2px;
}

/* ---------- Page load shimmer ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--light-blue-soft) 50%, var(--gray-100) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- CTA gradient animation ---------- */
.btn-primary.btn-gradient {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  background-size: 200% 200%;
  animation: gradientMove 6s ease infinite;
}
@keyframes gradientMove { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* ---------- Subtle float for proof/testimonial cards ---------- */
.float-on-hover { transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.float-on-hover:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(17,35,55,.12); }

/* ---------- Improved sticky call (pulse when idle) ---------- */
.sticky-call { animation: pulse-ring 2.5s ease-in-out infinite; }
@keyframes pulse-ring {
  0% { box-shadow: 0 10px 30px rgba(14,135,239,.4), 0 0 0 0 rgba(14,135,239,.5); }
  70% { box-shadow: 0 10px 30px rgba(14,135,239,.4), 0 0 0 16px rgba(14,135,239,0); }
  100% { box-shadow: 0 10px 30px rgba(14,135,239,.4), 0 0 0 0 rgba(14,135,239,0); }
}
