/* ============================================================
   Sherloq — SQL Formatter Online page styles
   (page-specific; loaded after styles.css)
   ============================================================ */

/* ---- Hero ---- */
.tool-hero {
  padding: 150px 0 30px;
  overflow: hidden;
}
.tool-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}
.tool-hero-left { text-align: center; }
.tool-hero-left h1 {
  font-size: 46px;
  font-weight: 700;
  color: #fff;
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.hero-dialect {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 500;
  color: var(--text-soft);
}
.btn-wide {
  min-width: 288px;
  justify-content: center;
}
.tool-cta { margin-top: 38px; }
.free-note {
  margin-top: 24px;
  font-size: 17px;
  color: var(--text-soft);
}
.fine-print {
  margin-top: 26px;
  font-size: 11px;
  font-style: italic;
  color: var(--text-muted);
}
.fine-print a { color: var(--blue); }
.fine-print a:hover { text-decoration: underline; }
.tool-hero-right img {
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
  border-radius: 16px;
}

/* ---- Inline tool ---- */
.tool { padding: 50px 0 20px; scroll-margin-top: 90px; }
.tool-panel {
  max-width: 920px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 26px 28px 28px;
}
.tool-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.tool-toolbar label {
  font-size: 15px;
  color: var(--text-muted);
}
.db-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}
.db-pick select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-elev);
  color: var(--text-soft);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  padding: 8px 30px 8px 12px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%238e8e9e' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 11px center;
}
.db-pick select:focus { outline: none; border-color: var(--pink); }
.tool-input {
  width: 100%;
  min-height: 200px;
  resize: vertical;
  background: #0c0c0f;
  border: 1px solid var(--border-softer);
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.65;
}
.tool-input::placeholder { color: #55555f; }
.tool-input:focus { outline: none; border-color: rgba(255, 56, 147, 0.55); }
.tool-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
}
.tool-note {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- Output ---- */
.tool-output { display: none; margin-top: 22px; }
.tool-output.show { display: block; }
.output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.output-head span {
  font-size: 15px;
  color: var(--text-muted);
}
.copy-btn { padding: 8px 16px; font-size: 14px; }
.copy-btn.copied { background: rgba(46, 204, 113, 0.2); }
#formattedOut {
  background: #0c0c0f;
  border: 1px solid var(--border-softer);
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
}
#formattedOut .kw { color: #4aa3ff; font-weight: 600; }
#formattedOut .str { color: #f0883e; }
#formattedOut .fn { color: #d580ff; }

/* ---- How it works ---- */
.how {
  padding: 120px 0 40px;
  text-align: center;
}
.how h2 {
  font-size: 38px;
  font-weight: 700;
  color: var(--text-soft);
}
.how-sub {
  margin-top: 38px;
  font-size: 26px;
  font-weight: 500;
  color: var(--text-soft);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 56px;
}
.step .num {
  font-size: 52px;
  font-weight: 700;
  color: var(--pink);
  line-height: 1;
}
.step p {
  max-width: 330px;
  margin: 20px auto 0;
  font-size: 17px;
  color: var(--text-soft);
  line-height: 1.55;
}

/* ---- Editor CTA ---- */
.editor-cta { padding: 130px 0 150px; }
.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.editor-left { text-align: center; }
.editor-left h2 {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  line-height: 1.22;
  letter-spacing: -0.01em;
}
.editor-right img {
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
  border-radius: 16px;
}

/* ---- Responsive ---- */
@media (max-width: 1000px) {
  .tool-hero-grid,
  .editor-grid { grid-template-columns: 1fr; }
  .tool-hero-right,
  .editor-right { order: 2; }
  .steps { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 640px) {
  .tool-hero { padding-top: 120px; }
  .tool-hero-left h1 { font-size: 30px; }
  .hero-dialect { font-size: 19px; }
  .editor-left h2 { font-size: 30px; }
  .how h2 { font-size: 30px; }
  .how-sub { font-size: 20px; }
  .btn-wide { min-width: 0; width: 100%; }
  .tool-toolbar { flex-direction: column; align-items: flex-start; }
}
