:root {
  --bg: #0b0d16;
  --panel: #141829;
  --panel-2: #1b2035;
  --border: #2a2f4a;
  --text: #f1f3fb;
  --text-dim: #9aa0c3;
  --purple: #7c6cff;
  --purple-2: #9b8cff;
  --cyan: #38bdf8;
  --cyan-2: #7dd3fc;
  --success: #34c98f;
  --radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1100px 520px at 15% -10%, rgba(124, 108, 255, 0.16), transparent 60%),
    radial-gradient(900px 460px at 100% 0%, rgba(56, 189, 248, 0.14), transparent 55%),
    linear-gradient(180deg, #0b0d16 0%, #0e1120 60%, #0b0d16 100%);
  color: var(--text);
  min-height: 100vh;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* --- Hero --- */
/* --- Site header / nav (shared pattern, duplicated with matching accent
   colors across every page's own stylesheet) --- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-logo {
  height: 34px;
  width: auto;
  display: block;
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.site-nav a:hover { color: var(--text); background: var(--panel-2); }

.site-nav a.active {
  color: white;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
}

.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(52, 201, 143, 0.2);
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 20%, var(--purple-2) 65%, var(--cyan-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0;
  max-width: 560px;
  color: var(--text-dim);
  font-size: 1.02rem;
  line-height: 1.55;
}

/* --- Tool cards --- */
.tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 860px) {
  .tools { grid-template-columns: 1fr; }
}

.tool-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  isolation: isolate;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: -40% -40% auto auto;
  width: 60%;
  height: 60%;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.35;
  z-index: -1;
}

.tool-card.card-purple::before { background: var(--purple); }
.tool-card.card-cyan::before { background: var(--cyan); }

.tool-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex: none;
}

.card-purple .tool-icon { background: linear-gradient(135deg, var(--purple), var(--purple-2)); box-shadow: 0 8px 22px -8px rgba(124, 108, 255, 0.7); }
.card-cyan .tool-icon { background: linear-gradient(135deg, var(--cyan), var(--cyan-2)); box-shadow: 0 8px 22px -8px rgba(56, 189, 248, 0.7); }

.tool-card-head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tool-card-head p {
  margin: 2px 0 0;
  color: var(--text-dim);
  font-size: 0.86rem;
}

.tool-features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tool-features li {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

/* --- Before/after slider --- */
.ba-widget {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ba-frame {
  --pos: 50%;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
  border: 1px solid var(--border);
  /* The base layer under both before/after — this is what actually reads
     as "transparent" wherever the after (or before) content has no fill,
     which is the whole point of the Background Remover examples. */
  background-image:
    linear-gradient(45deg, #232842 25%, transparent 25%),
    linear-gradient(-45deg, #232842 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #232842 75%),
    linear-gradient(-45deg, transparent 75%, #232842 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  background-color: #14172a;
}

.ba-example {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.ba-example.active {
  opacity: 1;
  pointer-events: auto;
}

.ba-before, .ba-after {
  position: absolute;
  inset: 0;
}

.ba-before svg, .ba-after svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ba-before {
  z-index: 1;
  /* Clipped to the LEFT of the handle, mirroring .ba-after below — without
     this, the (opaque) before content sits under the after layer across the
     *whole* frame, so it bleeds through any transparent pixels in the after
     content (e.g. the removed-background examples) instead of the
     checkerboard actually showing. */
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.ba-after {
  z-index: 2;
  clip-path: inset(0 0 0 var(--pos));
}

.ba-label {
  position: absolute;
  top: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(11, 13, 24, 0.72);
  color: var(--text);
  z-index: 3;
  pointer-events: none;
}

.ba-label.label-before { left: 10px; }
.ba-label.label-after { right: 10px; }

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 0;
  z-index: 4;
  pointer-events: none;
  transform: translateX(-50%);
}

.ba-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.85);
  transform: translateX(-50%);
}

.ba-handle-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: white;
  color: #14172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.ba-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ba-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.ba-dot.active {
  background: var(--text);
  transform: scale(1.25);
}

.tool-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 999px;
  padding: 13px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tool-cta:active { transform: scale(0.97); }

.card-purple .tool-cta {
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  color: white;
  box-shadow: 0 10px 26px -10px rgba(124, 108, 255, 0.7);
}

.card-cyan .tool-cta {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
  color: #052033;
  box-shadow: 0 10px 26px -10px rgba(56, 189, 248, 0.7);
}

/* --- Trust strip --- */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.84rem;
  font-weight: 600;
}

.trust-item .emoji { font-size: 1.1rem; }

/* --- Substantive content sections (home page) --- */
.content-block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px clamp(20px, 4vw, 40px);
}

.content-block h2, .how-it-works h2, .faq h2 {
  margin: 0 0 14px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.content-block p {
  color: #d7dbee;
  font-size: 0.94rem;
  line-height: 1.7;
  margin: 0 0 12px;
}

.content-block p:last-child { margin-bottom: 0; }
.content-block a { color: var(--cyan-2); }

.how-it-works .steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 760px) {
  .how-it-works .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .how-it-works .steps { grid-template-columns: 1fr; }
}

.step {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  color: white;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.step h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.step p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.84rem;
  line-height: 1.5;
}

.faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 18px;
}

.faq-item summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--text-dim);
  font-weight: 400;
  font-size: 1.1rem;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item p {
  margin: 0 0 16px;
  color: var(--text-dim);
  font-size: 0.86rem;
  line-height: 1.6;
}

.faq-item a { color: var(--cyan-2); }

.page-footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.78rem;
}

.legal-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
}

.legal-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.76rem;
}

.legal-links a:hover {
  color: var(--text);
  text-decoration: underline;
}
