/* ============================================================
   FREE TOOLS SECTION
   ============================================================ */
.tools {
  position: relative;
  width: 100%;
  padding: 120px 48px;
  background:
    linear-gradient(180deg, #050d1c 0%, #0a1628 50%, #081222 100%);
  overflow: hidden;
  isolation: isolate;
}

/* Divider line bridging services -> tools */
.tools__divider {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(640px, 80%);
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(245, 166, 35, 0.45) 50%, transparent 100%);
}

.tools__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}
.tools__glow--a {
  top: 8%; left: -160px;
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.10) 0%, transparent 60%);
}
.tools__glow--b {
  bottom: 6%; right: -160px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(42, 111, 204, 0.10) 0%, transparent 60%);
}

.tools__inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
}

/* ============================================================
   HEADER + 60-SEC TIMER BADGE
   ============================================================ */
.tools__header {
  text-align: center;
  max-width: 880px;
  margin: 0 auto 72px;
}
.tools__title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tools__title-row .section-headline { margin-bottom: 0; }

.timer-badge {
  position: relative;
  width: 96px; height: 96px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.timer-badge__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.timer-badge__track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 5;
}
.timer-badge__progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 175.93;
  stroke-dashoffset: 175.93;
  filter: drop-shadow(0 0 6px var(--accent-glow));
  animation: timerSweep 4s var(--ease-out) infinite alternate;
}
@keyframes timerSweep {
  0%   { stroke-dashoffset: 175.93; }
  100% { stroke-dashoffset: 0; }
}
.timer-badge__center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.timer-badge__num {
  font-size: 26px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.timer-badge__unit {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 4px;
}

/* ============================================================
   TOOLS GRID
   ============================================================ */
.tools__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 60px;
}

/* ============================================================
   TOOL CARD
   ============================================================ */
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 26px 26px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.4s var(--ease-out);
  isolation: isolate;
}
.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.5), rgba(245, 166, 35, 0) 40%, rgba(245, 166, 35, 0) 60%, rgba(245, 166, 35, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
  z-index: 3;
}
.tool-card:hover {
  transform: translateY(-4px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: rgba(245, 166, 35, 0.22);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}
.tool-card:hover::before { opacity: 1; }

/* Card top row */
.tool-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  position: relative;
  z-index: 2;
}
.tool-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 9px;
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4ade80;
}
.tool-card__pill-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}
.tool-card__num {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* Icon */
.tool-card__icon {
  width: 52px; height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.16) 0%, rgba(245, 166, 35, 0.04) 100%);
  border: 1px solid rgba(245, 166, 35, 0.30);
  color: var(--accent);
  box-shadow: 0 8px 22px rgba(245, 166, 35, 0.12);
  position: relative;
  z-index: 2;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease);
}
.tool-card__icon svg { width: 26px; height: 26px; }
.tool-card:hover .tool-card__icon {
  transform: rotate(-4deg) scale(1.05);
  box-shadow: 0 12px 30px rgba(245, 166, 35, 0.22);
}

.tool-card__title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
  position: relative;
  z-index: 2;
}
.tool-card__hook {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.4;
  position: relative;
  z-index: 2;
}
.tool-card__body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  position: relative;
  z-index: 2;
  margin-bottom: 4px;
}

/* ============================================================
   MINI INTERACTIVE-FEEL PREVIEW
   ============================================================ */
.tool-preview {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 14px;
  background: rgba(5, 13, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-top: 4px;
  font-family: 'Inter', system-ui, sans-serif;
}
.tool-preview__field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tool-preview__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.tool-preview__value {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.tool-preview__chip {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  background: rgba(245, 166, 35, 0.10);
  color: var(--accent);
  border: 1px solid rgba(245, 166, 35, 0.30);
  border-radius: 100px;
}

/* Result row */
.tool-preview__result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.14) 0%, rgba(245, 166, 35, 0.04) 100%);
  border: 1px solid rgba(245, 166, 35, 0.30);
  border-radius: 10px;
}
.tool-preview__result-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.tool-preview__result-value {
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.tool-preview__result-unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
  margin-left: 1px;
}

/* ---- Loan slider visual ---- */
.tool-preview__slider { display: flex; flex-direction: column; gap: 8px; }
.tool-preview__slider-track {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
}
.tool-preview__slider-fill {
  position: absolute;
  inset: 0;
  width: 62%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hot) 100%);
  border-radius: 100px;
  box-shadow: 0 0 12px var(--accent-glow);
}
.tool-card:hover .tool-preview__slider-fill {
  animation: sliderSweep 2.4s var(--ease-out) infinite alternate;
}
@keyframes sliderSweep {
  0%   { width: 48%; }
  100% { width: 78%; }
}
.tool-preview__slider-thumb {
  position: absolute;
  top: 50%;
  left: 62%;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--accent);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  transition: left 0.4s var(--ease-out);
}
.tool-card:hover .tool-preview__slider-thumb { left: 78%; }
.tool-preview__meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
}

/* ---- Trade-in range visual ---- */
.tool-range {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tool-range__bar {
  position: relative;
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
}
.tool-range__fill {
  position: absolute;
  top: 0; bottom: 0;
  left: 22%;
  right: 18%;
  background: linear-gradient(90deg, rgba(245, 166, 35, 0.5) 0%, var(--accent) 50%, rgba(245, 166, 35, 0.5) 100%);
  border-radius: 6px;
  box-shadow: 0 0 16px var(--accent-glow);
}
.tool-range__low,
.tool-range__high {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--bg-base);
  font-variant-numeric: tabular-nums;
  padding: 0 8px;
  z-index: 1;
}
.tool-range__low  { left: 22%; }
.tool-range__high { right: 18%; }
.tool-range__ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
}
.tool-range__ticks span {
  width: 1px;
  height: 4px;
  background: rgba(255, 255, 255, 0.18);
}

/* ---- Affordability fit list ---- */
.tool-fit {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tool-fit__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.tool-fit__item svg {
  width: 16px; height: 16px;
  padding: 3px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tool-fit__item--yes svg {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}
.tool-fit__item--no svg {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
}
.tool-fit__item--no { color: var(--ink-mute); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.25); }

/* ============================================================
   CARD CTA
   ============================================================ */
.tool-card__cta {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
  padding-bottom: 2px;
  align-self: flex-start;
  transition: color 0.25s var(--ease), gap 0.25s var(--ease);
}
.tool-card__cta svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.tool-card__cta::after {
  content: "";
  position: absolute;
  left: 0; right: 24px; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.tool-card:hover .tool-card__cta { color: var(--accent-hot); gap: 12px; }
.tool-card:hover .tool-card__cta::after { transform: scaleX(1); }
.tool-card:hover .tool-card__cta svg { transform: translateX(4px); }

/* ============================================================
   PRIVACY STRIP
   ============================================================ */
.tools__privacy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 22px 30px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.tools__privacy-list {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.tools__privacy-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.tools__privacy-list li strong {
  font-weight: 700;
  color: var(--ink);
}
.tools__privacy-list li svg {
  width: 18px; height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}
.tools__privacy-tag {
  padding-left: 18px !important;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  font-style: italic;
  color: var(--ink-mute) !important;
}
.tools__privacy-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: rgba(245, 166, 35, 0.10);
  border: 1px solid rgba(245, 166, 35, 0.35);
  border-radius: 100px;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 700;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.tools__privacy-cta svg {
  width: 16px; height: 16px;
  transition: transform 0.25s var(--ease);
}
.tools__privacy-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-base);
}
.tools__privacy-cta:hover svg { transform: translateX(4px); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .tools { padding: 100px 36px; }
  .tools__grid { gap: 18px; }
}

@media (max-width: 920px) {
  .tools { padding: 88px 28px; }
  .tools__title-row { flex-direction: column; gap: 18px; }
  .timer-badge { width: 84px; height: 84px; }
  .timer-badge__num { font-size: 22px; }
  .tools__grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .tools__privacy {
    flex-direction: column;
    align-items: stretch;
    border-radius: 20px;
    padding: 22px 24px;
  }
  .tools__privacy-list { justify-content: center; }
  .tools__privacy-cta { justify-content: center; }
}

@media (max-width: 600px) {
  .tools { padding: 72px 20px; }
  .tools__header { margin-bottom: 48px; }
  .tool-card { padding: 24px 22px 22px; }
  .tool-card__title { font-size: 19px; }
  .tool-card__hook { font-size: 13.5px; }
  .tool-card__body { font-size: 13.5px; }
  .tool-preview { padding: 14px; }
  .tool-preview__result-value { font-size: 18px; }
  .tools__privacy-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .tools__privacy-tag {
    padding-left: 0 !important;
    border-left: 0 !important;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tool-card, .tool-card__icon, .tool-preview__slider-fill,
  .tool-preview__slider-thumb, .timer-badge__progress,
  .tool-card__cta, .tool-card__cta svg, .tools__privacy-cta, .tools__privacy-cta svg {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}
