/* tools.css — /tools/* pages (index, positioning-generator, battle-card-generator)
   Theme: dark indigo/violet aesthetic — matches Briefly brand
   Font: Space Grotesk (headings) + Space Mono (labels, scores)
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #09090f;
  --bg-surface: #0f0f1a;
  --bg-card: #14142a;
  --border: #1e1e3a;
  --border-light: #2a2a4a;
  --indigo: #6366f1;
  --indigo-dim: #4f52cc;
  --indigo-glow: rgba(99,102,241,0.12);
  --violet: #a78bfa;
  --amber: #f59e0b;
  --green: #22c55e;
  --red: #ef4444;
  --text: #e4e4f0;
  --text-dim: #71718a;
  --text-muted: #3a3a5a;
  --font-head: 'Space Grotesk', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --radius: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.tools-body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-head);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ──────────────────────────────────────────────────────────── */
.tools-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.tools-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--indigo);
  box-shadow: 0 0 8px var(--indigo);
}

.tools-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.tools-nav a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}
.tools-nav a:hover { color: var(--text); }

.tools-nav-cta {
  background: var(--indigo);
  color: #fff !important;
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background 0.15s !important;
}
.tools-nav-cta:hover { background: var(--indigo-dim) !important; }

/* ── Main containers ─────────────────────────────────────────────────── */
.tools-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ── Tools index grid ────────────────────────────────────────────────── */
.tools-index-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.tools-index-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--indigo);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.tools-index-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.tools-index-sub {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s, transform 0.12s;
}
.tool-card:hover {
  border-color: var(--indigo);
  transform: translateY(-2px);
}

.tool-card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}
.tool-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.tool-card-desc {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.tool-card-badge {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--indigo);
  background: var(--indigo-glow);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}

/* ── Tool page hero ──────────────────────────────────────────────────── */
.tool-hero {
  margin-bottom: 2.5rem;
}

.tool-hero-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--indigo);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.tool-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.tool-hero-accent { color: var(--indigo); }

.tool-hero-sub {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 580px;
}

/* ── Feature pills ───────────────────────────────────────────────────── */
.tool-feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.feature-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--violet);
  background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
}

/* ── Form card ───────────────────────────────────────────────────────── */
.tool-form-section {
  margin-bottom: 2.5rem;
}

.tool-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.tool-form {
  display: grid;
  gap: 1.25rem;
}

.tool-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 560px) {
  .tool-field-row { grid-template-columns: 1fr; }
}

.tool-field label {
  display: block;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.tool-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  outline: none;
  transition: border-color 0.15s;
}
.tool-input:focus { border-color: var(--indigo); }
.tool-input::placeholder { color: var(--text-muted); }

.tool-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--indigo);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8rem 1.75rem;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  width: 100%;
}
.tool-submit-btn:hover { background: var(--indigo-dim); }
.tool-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.tool-form-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 0.5rem;
}

.tool-error {
  color: var(--red);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  padding: 0.6rem 0.85rem;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 6px;
}

/* ── Spinner ─────────────────────────────────────────────────────────── */
.spinner-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 1.2s ease-in-out infinite;
}
.spinner-dot:nth-child(2) { animation-delay: 0.2s; }
.spinner-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse-dot {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.2); }
}

/* ── Result card ─────────────────────────────────────────────────────── */
.tool-result-section {
  margin-top: 2rem;
}

.tool-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.tool-result-title {
  font-size: 1rem;
  font-family: var(--font-mono);
  color: var(--indigo);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.positioning-primary {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--indigo-glow);
  border-left: 3px solid var(--indigo);
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 0;
}

.one-liner-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--violet);
  background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  margin-bottom: 1.25rem;
}

/* ── Alternatives gate ───────────────────────────────────────────────── */
.alternatives-gate {
  text-align: center;
  padding: 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 1rem;
}

.gate-lock-icon { font-size: 2rem; margin-bottom: 0.75rem; }

.gate-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.gate-sub {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

.gate-form {
  display: flex;
  gap: 0.6rem;
  max-width: 400px;
  margin: 0 auto;
}

.gate-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 0.9rem;
  padding: 0.6rem 0.85rem;
  outline: none;
}
.gate-input:focus { border-color: var(--indigo); }

.gate-btn {
  background: var(--indigo);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.gate-btn:hover { background: var(--indigo-dim); }
.gate-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.gate-fine { font-size: 0.72rem; color: var(--text-dim); margin-top: 0.6rem; }

/* ── Alternative angle cards ─────────────────────────────────────────── */
.alternatives-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.alt-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.alt-card-angle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.alt-card-statement {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}

/* ── Battle card result ──────────────────────────────────────────────── */
.bc-section {
  margin-bottom: 1.5rem;
}

.bc-section-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.bc-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
}

.bc-pricing-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
}

.bc-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.bc-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.bc-list li::before {
  content: '▸';
  color: var(--indigo);
  font-size: 0.75rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.bc-counter-table {
  display: grid;
  gap: 0.75rem;
}

.bc-counter-row {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem 1rem;
}

.bc-counter-dim {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.bc-counter-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

/* Gated rows */
.bc-gated-row {
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  opacity: 0.45;
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

.bc-objection-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}

.bc-objection-q {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.bc-objection-a {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.bc-trap-list {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}
.bc-trap-item {
  background: rgba(99,102,241,0.06);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
  font-style: italic;
}

/* ── CTA crosssell bar ───────────────────────────────────────────────── */
.tool-cta-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.tool-cta-text h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.tool-cta-text p {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.tool-cta-btn {
  background: var(--indigo);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s;
}
.tool-cta-btn:hover { background: var(--indigo-dim); }

/* ── SEO block ───────────────────────────────────────────────────────── */
.tool-seo-block {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.tool-seo-block h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.tool-seo-cols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.tool-seo-col h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.tool-seo-col p {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.tool-seo-faq {
  margin-top: 2.5rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.faq-question {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.faq-answer {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.tool-seo-links {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.8;
}

.tool-seo-links a {
  color: var(--violet);
  text-decoration: none;
}
.tool-seo-links a:hover { text-decoration: underline; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.tools-footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.tools-footer a {
  color: var(--text-dim);
  text-decoration: none;
}
.tools-footer a:hover { color: var(--text); }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .tools-header { padding: 0.75rem 1rem; }
  .tool-form-card { padding: 1.25rem; }
  .tool-cta-bar { flex-direction: column; text-align: center; }
}
