/* ==========================================================================
   Quenavo — components.css
   Buttons, cards, badges, search, forms, tool interface, FAQ, misc widgets
   ========================================================================== */

/* -------------------------------- Buttons -------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.7rem;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--fs-sm);
  line-height: 1.2;
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-med) var(--ease),
              background var(--t-med) var(--ease), color var(--t-med) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--grad-primary);
  color: #fff !important;
  box-shadow: 0 6px 20px var(--glow-blue);
  background-size: 150% 150%;
}
.btn--primary:hover, .btn--primary:focus-visible {
  background-image: var(--grad-hover);
  box-shadow: 0 10px 30px var(--glow-purple);
  transform: translateY(-2px);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.18); transform: translateY(-2px); }

.btn--secondary {
  background: rgba(124, 58, 237, 0.1);
  color: var(--purple) !important;
  border: 1px solid rgba(124, 58, 237, 0.28);
}
.btn--secondary:hover {
  background: var(--purple);
  color: #fff !important;
  box-shadow: 0 8px 24px var(--glow-purple);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink) !important;
}
.btn--outline:hover { border-color: var(--blue); color: var(--blue) !important; }

.btn--sm { padding: 0.5rem 1.1rem; font-size: var(--fs-xs); }
.btn--lg { padding: 1rem 2.2rem; font-size: var(--fs-md); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* Ripple effect (added via JS) */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: ripple 0.55s var(--ease) forwards;
  pointer-events: none;
}

/* --------------------------------- Cards --------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease);
}

/* Tool card */
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
  isolation: isolate;
  overflow: hidden;
}
.tool-card::before {
  /* animated gradient border */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--blue));
  background-size: 250% 250%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
  animation: gradShift 4s ease infinite;
  z-index: -1;
  pointer-events: none;
}
.tool-card:hover, .tool-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.16);
}
.tool-card:hover::before, .tool-card:focus-within::before { opacity: 1; }

.tool-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
  color: var(--blue);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
  flex: none;
}
.tool-card-icon svg { width: 26px; height: 26px; }
.tool-card:hover .tool-card-icon {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 8px 20px var(--glow-blue);
}
.tool-card h3 {
  font-size: 1.05rem;
  margin: 0;
}
.tool-card h3 a { color: var(--navy); }
.tool-card h3 a::after { content: ""; position: absolute; inset: 0; } /* full-card click */
.tool-card p {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tool-card-foot {
  margin-top: auto;
  padding-top: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.tool-card-open {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap var(--t-fast) var(--ease);
}
.tool-card:hover .tool-card-open { gap: 0.55rem; color: var(--purple); }

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.22rem 0.65rem;
  border-radius: var(--r-pill);
  background: rgba(37, 99, 235, 0.09);
  color: var(--blue);
  white-space: nowrap;
}
.badge--purple { background: rgba(124, 58, 237, 0.09); color: var(--purple); }
.badge--navy { background: rgba(15, 23, 42, 0.08); color: var(--navy); }

/* Tool grid */
.tool-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .tool-grid { grid-template-columns: repeat(4, 1fr); } }

/* Feature card */
.feature-card {
  text-align: left;
  padding: 1.8rem;
  border-radius: var(--r-lg);
  background: #fff;
  border: 1px solid var(--line);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-glow); }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--grad-primary);
  color: #fff;
  margin-bottom: 1rem;
  box-shadow: 0 6px 16px var(--glow-blue);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 1.08rem; }
.feature-card p { font-size: var(--fs-sm); color: var(--ink-soft); margin: 0; }

.feature-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }

/* --------------------------------- Search -------------------------------- */
.search-wrap {
  position: relative;
  width: min(340px, 100%);
}
.search-input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: var(--fs-sm);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.search-input::placeholder { color: rgba(255, 255, 255, 0.55); }
.search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}
.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}
.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  min-width: min(400px, 92vw);
  background: #fff;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  max-height: 420px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.search-panel.is-open { display: block; animation: fadeUp 0.22s var(--ease); }
.search-panel .sp-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  padding: 0.5rem 0.75rem 0.25rem;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: var(--fs-sm);
}
.search-result:hover, .search-result.is-active { background: rgba(37, 99, 235, 0.08); color: var(--blue); }
.search-result .sr-cat { margin-left: auto; font-size: 0.65rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; flex: none; }
.search-result mark { background: rgba(124, 58, 237, 0.18); color: inherit; border-radius: 3px; padding: 0 2px; }
.search-empty { padding: 1rem 0.75rem; color: var(--ink-faint); font-size: var(--fs-sm); }

@media (max-width: 1023px) {
  .header-search { display: none; }
  .main-nav .search-wrap { margin-bottom: 1rem; width: 100%; }
}

/* --------------------------------- Forms --------------------------------- */
.field {
  position: relative;
  margin-bottom: 1.35rem;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 1.05rem 1rem 0.55rem;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line);
  background: #fff;
  font-size: var(--fs-sm);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; }
.field label {
  position: absolute;
  left: 1rem;
  top: 0.85rem;
  font-size: var(--fs-sm);
  color: var(--ink-faint);
  pointer-events: none;
  transition: all var(--t-fast) var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  top: 0.28rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--blue);
}
.field input::placeholder, .field textarea::placeholder { color: transparent; }
.field .field-error {
  display: none;
  font-size: var(--fs-xs);
  color: #DC2626;
  margin-top: 0.3rem;
}
.field.has-error input, .field.has-error textarea { border-color: #DC2626; animation: shake 0.3s ease; }
.field.has-error .field-error { display: block; }
.field.is-valid input, .field.is-valid textarea { border-color: #16A34A; }

.form-msg {
  display: none;
  padding: 0.9rem 1.1rem;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  margin-bottom: 1rem;
}
.form-msg.is-success { display: block; background: rgba(22, 163, 74, 0.1); color: #15803D; border: 1px solid rgba(22, 163, 74, 0.25); }
.form-msg.is-error { display: block; background: rgba(220, 38, 38, 0.08); color: #B91C1C; border: 1px solid rgba(220, 38, 38, 0.22); }

/* Newsletter inline form */
.newsletter-form { display: flex; gap: 0.55rem; }
.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 1rem;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: var(--fs-sm);
}
.newsletter-form input::placeholder { color: rgba(255, 255, 255, 0.5); }
.newsletter-form input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3);
}
.newsletter-msg { font-size: var(--fs-xs); margin-top: 0.5rem; min-height: 1.2em; }
.newsletter-msg.is-success { color: #4ADE80; }
.newsletter-msg.is-error { color: #FCA5A5; }

/* ----------------------------- Tool interface ---------------------------- */
.tool-hero {
  text-align: center;
  padding-block: 2.2rem 1.6rem;
}
.tool-hero h1 { margin-bottom: 0.4rem; }
.tool-hero .tool-lede {
  max-width: 60ch;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: var(--fs-lg);
}

.tool-shell {
  max-width: 880px;
  margin: 0 auto 2rem;
}

.dropzone {
  position: relative;
  border: 2px dashed rgba(37, 99, 235, 0.4);
  border-radius: var(--r-xl);
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.045), rgba(124, 58, 237, 0.05));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: clamp(2rem, 6vw, 3.5rem) 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-med) var(--ease), background var(--t-med) var(--ease),
              transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.dropzone:hover, .dropzone:focus-visible {
  border-color: var(--purple);
  box-shadow: 0 14px 40px rgba(37, 99, 235, 0.14);
  transform: translateY(-2px);
}
.dropzone.is-drag {
  border-color: var(--purple);
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.12));
  box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.12);
}
.dropzone-icon {
  width: 64px; height: 64px;
  margin: 0 auto 1rem;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 10px 26px var(--glow-blue);
  animation: floaty 4s ease-in-out infinite;
}
.dropzone-icon svg { width: 30px; height: 30px; }
.dropzone h2 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.dropzone p { color: var(--ink-faint); font-size: var(--fs-sm); margin: 0; }
.dropzone .dz-hint { font-size: var(--fs-xs); margin-top: 0.6rem; }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

/* File list / previews */
.file-list { display: grid; gap: 0.7rem; margin-top: 1.2rem; }
.file-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.7rem 0.9rem;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.3s var(--ease);
}
.file-thumb {
  width: 46px; height: 46px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface);
  flex: none;
  display: grid;
  place-items: center;
  color: var(--blue);
  overflow: hidden;
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-meta { min-width: 0; flex: 1; }
.file-meta .fname {
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-meta .fsize { font-size: var(--fs-xs); color: var(--ink-faint); }
.file-remove {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  flex: none;
}
.file-remove:hover { background: rgba(220, 38, 38, 0.1); color: #DC2626; }
.file-move { display: inline-flex; gap: 2px; flex: none; }
.file-move button {
  width: 26px; height: 26px;
  border-radius: 6px;
  color: var(--ink-faint);
  display: grid; place-items: center;
}
.file-move button:hover { background: rgba(37, 99, 235, 0.1); color: var(--blue); }

/* Options panel */
.tool-options {
  margin-top: 1.3rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.3rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 1rem;
}
.opt-row { display: grid; gap: 0.35rem; }
.opt-row > label { font-size: var(--fs-xs); font-weight: 700; color: var(--navy); }
.opt-row input[type="number"], .opt-row input[type="text"], .opt-row select, .opt-row textarea, .opt-row input[type="password"] {
  padding: 0.55rem 0.8rem;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line);
  font-size: var(--fs-sm);
  width: 100%;
  background: #fff;
}
.opt-row textarea { min-height: 90px; resize: vertical; font-family: inherit; }
.opt-row input:focus, .opt-row select:focus, .opt-row textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
}
.opt-row input[type="range"] { accent-color: var(--blue); width: 100%; }
.opt-row .range-val { font-size: var(--fs-xs); color: var(--blue); font-weight: 700; }
.opt-row input[type="color"] {
  width: 52px; height: 36px;
  padding: 2px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
}
.opt-inline { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: end; }
.opt-inline .opt-row { flex: 1; min-width: 130px; }
.opt-check { display: flex; align-items: center; gap: 0.5rem; font-size: var(--fs-sm); }
.opt-check input { accent-color: var(--blue); width: 17px; height: 17px; }

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.3rem;
  justify-content: center;
}

/* Progress */
.progress-wrap { margin-top: 1.2rem; display: none; }
.progress-wrap.is-active { display: block; animation: fadeUp 0.25s var(--ease); }
.progress-bar {
  height: 10px;
  border-radius: var(--r-pill);
  background: rgba(37, 99, 235, 0.12);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--grad-primary);
  background-size: 200% 100%;
  animation: glowSlide 1.6s linear infinite;
  transition: width 0.25s var(--ease);
}
.progress-label {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  margin-top: 0.4rem;
  text-align: center;
}

/* Result / status */
.tool-status {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  display: none;
  align-items: flex-start;
  gap: 0.6rem;
}
.tool-status.is-success { display: flex; background: rgba(22, 163, 74, 0.09); color: #166534; border: 1px solid rgba(22, 163, 74, 0.25); animation: fadeUp 0.3s var(--ease); }
.tool-status.is-error { display: flex; background: rgba(220, 38, 38, 0.07); color: #991B1B; border: 1px solid rgba(220, 38, 38, 0.2); animation: shake 0.35s ease; }
.tool-status.is-info { display: flex; background: rgba(37, 99, 235, 0.07); color: var(--blue-dark); border: 1px solid rgba(37, 99, 235, 0.2); }

.result-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin-top: 1.2rem;
}
.result-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.7rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.3s var(--ease);
}
.result-card img, .result-card canvas { border-radius: 8px; margin: 0 auto 0.5rem; max-height: 130px; width: auto; max-width: 100%; }
.result-card .rc-name { font-size: var(--fs-xs); font-weight: 600; word-break: break-all; }

.preview-stage {
  margin-top: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    repeating-conic-gradient(rgba(15,23,42,0.05) 0% 25%, transparent 0% 50%) 0 0 / 22px 22px,
    #fff;
  padding: 1rem;
  display: none;
  justify-content: center;
  overflow: auto;
  max-height: 520px;
}
.preview-stage.is-active { display: flex; }
.preview-stage canvas, .preview-stage img { max-width: 100%; height: auto; box-shadow: var(--shadow-md); border-radius: 6px; }

.output-text {
  width: 100%;
  min-height: 180px;
  font-family: ui-monospace, 'Cascadia Code', Menlo, monospace;
  font-size: 0.8rem;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line);
  padding: 0.9rem;
  background: var(--surface);
  resize: vertical;
}

/* ------------------------------ FAQ accordion ---------------------------- */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 0.75rem; }
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}
.faq-item[open] { box-shadow: var(--shadow-glow); border-color: rgba(37, 99, 235, 0.3); }
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  font-weight: 600;
  font-size: var(--fs-sm);
  cursor: pointer;
  color: var(--navy);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--blue);
  transition: transform var(--t-med) var(--ease);
  flex: none;
}
.faq-item[open] summary::after { transform: rotate(45deg); color: var(--purple); }
.faq-item .faq-a {
  padding: 0 1.25rem 1.1rem;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
}

/* ------------------------------ Stats ------------------------------------ */
.stats-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  text-align: center;
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  padding: 1.8rem 1rem;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.stat-num {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #60A5FA, #A78BFA);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
}
.stat-label { font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.66); margin-top: 0.3rem; display: block; }

/* --------------------------- Testimonials -------------------------------- */
.testimonial-grid { display: grid; gap: 1.1rem; }
@media (min-width: 768px) { .testimonial-grid { grid-template-columns: repeat(3, 1fr); } }
.testimonial {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.7rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.testimonial:hover { transform: translateY(-5px); box-shadow: var(--shadow-glow-purple); }
.testimonial .stars { color: #F59E0B; letter-spacing: 2px; font-size: 0.9rem; }
.testimonial blockquote { margin: 0; font-size: var(--fs-sm); color: var(--ink-soft); flex: 1; }
.testimonial .t-author { display: flex; align-items: center; gap: 0.7rem; }
.testimonial .t-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex: none;
}
.testimonial .t-name { font-weight: 700; font-size: var(--fs-sm); color: var(--navy); }
.testimonial .t-role { font-size: var(--fs-xs); color: var(--ink-faint); }

/* ------------------------------ CTA band --------------------------------- */
.cta-band {
  position: relative;
  border-radius: var(--r-xl);
  background: var(--grad-hero);
  color: #fff;
  padding: clamp(2.5rem, 6vw, 4rem);
  text-align: center;
  overflow: hidden;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.8); max-width: 52ch; margin: 0 auto 1.8rem; }
.cta-band::before, .cta-band::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
}
.cta-band::before { width: 260px; height: 260px; background: var(--blue); top: -30%; left: -5%; }
.cta-band::after { width: 240px; height: 240px; background: var(--purple); bottom: -35%; right: -4%; }

/* --------------------------- Content / legal ------------------------------ */
.content-layout {
  display: grid;
  gap: 2.5rem;
  padding-block: 2rem 4rem;
}
@media (min-width: 900px) {
  .content-layout { grid-template-columns: 240px 1fr; align-items: start; }
}
.toc {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.2rem;
  display: none;
}
@media (min-width: 900px) { .toc { display: block; } }
.toc h2 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.8rem; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.toc a {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  display: block;
  padding: 0.25rem 0.5rem;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
}
.toc a:hover, .toc a.is-active { color: var(--blue); border-left-color: var(--blue); background: rgba(37, 99, 235, 0.06); }

.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.2em; font-size: 1.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; font-size: 1.15rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.45em; color: var(--ink-soft); }
.prose p { color: var(--ink-soft); }
.prose strong { color: var(--navy); }

/* SEO content under tools */
.tool-content { padding-block: 3rem 1rem; }
.tool-content .prose { margin-inline: auto; }

/* Related tools strip */
.related-tools { padding-block: 2.5rem; }

/* ----------------------------- Contact page ------------------------------ */
.contact-grid { display: grid; gap: 1.6rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.2fr 0.8fr; align-items: start; } }
.contact-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.2rem;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.contact-card h3 { font-size: 1rem; margin-bottom: 0.15rem; }
.contact-card p { font-size: var(--fs-sm); color: var(--ink-soft); margin: 0; }
.map-placeholder {
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.1));
  border: 1px dashed rgba(37, 99, 235, 0.35);
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: var(--fs-sm);
  text-align: center;
  padding: 1rem;
}

/* ----------------------------- Category hero ----------------------------- */
.page-hero {
  background: var(--grad-hero);
  color: #fff;
  padding-block: clamp(3rem, 7vw, 5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255, 255, 255, 0.8); max-width: 56ch; margin-inline: auto; }

/* Filter pills */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.filter-pill {
  padding: 0.45rem 1.1rem;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-soft);
  background: #fff;
  transition: all var(--t-fast) var(--ease);
}
.filter-pill:hover { border-color: var(--blue); color: var(--blue); }
.filter-pill.is-active {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px var(--glow-blue);
}

/* Skeleton loader */
.skeleton {
  border-radius: var(--r-md);
  background: linear-gradient(90deg, rgba(15,23,42,0.06) 25%, rgba(15,23,42,0.11) 50%, rgba(15,23,42,0.06) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  min-height: 120px;
}

/* Team */
.team-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .team-grid { grid-template-columns: repeat(4, 1fr); } }
.team-card {
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.6rem 1rem;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.team-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-glow-purple); }
.team-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  margin: 0 auto 0.9rem;
  background: var(--grad-primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.3rem;
  box-shadow: 0 8px 22px var(--glow-blue);
}
.team-card h3 { font-size: 1rem; margin-bottom: 0.1rem; }
.team-card p { font-size: var(--fs-xs); color: var(--ink-faint); margin: 0; }
