/* ============================================================
   BGRemove AI — Homepage redesign (remove.bg style)
   ============================================================ */

/* ── Variables ──────────────────────────────────────────── */
:root {
  --rb-blue:       #0066ff;
  --rb-blue-hover: #0052cc;
  --rb-text:       #1a1a2e;
  --rb-muted:      #64748b;
  --rb-border:     #e2e8f0;
  --rb-bg:         #ffffff;
  --rb-bg2:        #f8fafc;
  --rb-radius:     16px;
  --rb-shadow:     0 4px 24px rgba(0,0,0,.08);
}

/* ── Reset / base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--rb-text);
  background: var(--rb-bg);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Site header ────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--rb-border);
  box-shadow: 0 1px 8px rgba(0,0,0,.05);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.site-branding .site-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--rb-text);
}

.site-branding .logo-icon { color: var(--rb-blue); font-size: 1.4rem; }

.primary-nav { flex: 1; }

.primary-nav ul, .primary-nav .menu {
  display: flex;
  list-style: none;
  gap: 4px;
}

.primary-nav a {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: .93rem;
  font-weight: 500;
  color: var(--rb-muted);
  transition: color .2s, background .2s;
}

.primary-nav a:hover, .primary-nav .current-menu-item a {
  color: var(--rb-text);
  background: var(--rb-bg2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* hide dark mode toggle on clean theme */
.theme-toggle { display: none !important; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  border-radius: 10px;
  transition: background .2s, color .2s, box-shadow .2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--rb-blue);
  color: #fff;
  padding: 10px 22px;
  font-size: .93rem;
}

.btn-primary:hover { background: var(--rb-blue-hover); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--rb-muted);
  border: 1.5px solid var(--rb-border);
  padding: 9px 20px;
  font-size: .93rem;
}

.btn-ghost:hover { border-color: #94a3b8; color: var(--rb-text); background: var(--rb-bg2); }

.btn-sm { padding: 7px 16px; font-size: .85rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 12px; }

/* mobile menu toggle — hide by default */
.mobile-menu-toggle { display: none; }
.mobile-nav { display: none; }

/* ── Hero ───────────────────────────────────────────────── */
.rb-hero {
  padding: 64px 0 80px;
  overflow: hidden;
}

.rb-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

/* left */
.rb-hero-text h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  margin-bottom: 20px;
  color: var(--rb-text);
}

.rb-free-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .95rem;
  color: var(--rb-muted);
  margin-bottom: 10px;
}

.rb-free-badge .badge-pill {
  display: inline-block;
  background: var(--rb-blue);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
}

.rb-hero-example {
  display: flex;
  align-items: flex-end;
  margin-top: 32px;
  height: 220px;
  position: relative;
}

.rb-hero-example img {
  height: 210px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 32px rgba(0,0,0,.12));
  position: relative;
  z-index: 1;
}

/* right — upload box */
.rb-upload-card {
  background: #fff;
  border: 2px dashed #cbd5e1;
  border-radius: 24px;
  padding: 48px 36px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,.07);
  transition: border-color .2s;
  cursor: pointer;
}

.rb-upload-card:hover, .rb-upload-card.is-dragover {
  border-color: var(--rb-blue);
  box-shadow: 0 8px 40px rgba(0,102,255,.1);
}

.rb-upload-card .btn-upload {
  background: var(--rb-blue);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  display: inline-block;
  margin-bottom: 16px;
  transition: background .2s;
}

.rb-upload-card .btn-upload:hover { background: var(--rb-blue-hover); }

.rb-upload-card .upload-or {
  font-size: .93rem;
  color: var(--rb-muted);
  margin-bottom: 4px;
}

.rb-upload-card .upload-hint-link {
  font-size: .87rem;
  color: var(--rb-blue);
}

.rb-upload-card .upload-hint-link:hover { text-decoration: underline; }

/* ── Results (inside upload card) ──────────────────────── */

/* Override tool.css dark/glassmorphism styles */
.rb-upload-card .tool-results,
.tool-results {
  margin-top: 24px;
  text-align: center;
}

/* Override tool.css grid layout on result-card */
.rb-upload-card .result-card,
.result-card {
  display: block !important;           /* kills tool.css grid-template-columns:1fr 1fr */
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 20px !important;
  margin-bottom: 0 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.result-previews {
  display: flex !important;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: nowrap;
}

.result-preview {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--rb-border);
  background: #ffffff !important;
  flex: 1 1 0;
  min-width: 0;
  max-width: 220px;
}

/* checkerboard on after image only */
.result-preview.result-after {
  background: repeating-conic-gradient(#d0d0d0 0% 25%, #fff 0% 50%) 0 0 / 18px 18px !important;
}

.result-preview img {
  width: 100% !important;
  height: 180px !important;
  object-fit: contain !important;
  display: block !important;
  max-height: none !important;
  background: transparent !important;
}

.preview-label {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: .72rem;
  font-weight: 600;
  background: rgba(0,0,0,.45);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  pointer-events: none;
  z-index: 1;
}

/* Override tool.css result-actions grid-column span */
.rb-upload-card .result-actions,
.result-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  max-width: 300px;
  margin: 0 auto !important;
  grid-column: unset !important;
}

/* Big blue Download PNG button */
.btn-download-png {
  display: block;
  width: 100%;
  background: var(--rb-blue);
  color: #fff;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 18px rgba(0,102,255,.25);
}

.btn-download-png:hover {
  background: var(--rb-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0,102,255,.35);
  color: #fff;
}

/* Ghost "Remove another" button */
.btn-new-image {
  display: block;
  width: 100%;
  background: #f1f5f9;
  color: #1e40af;
  text-align: center;
  font-size: .9rem;
  font-weight: 600;
  padding: 12px;
  border-radius: 10px;
  border: 2px solid #bfdbfe;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .01em;
  transition: border-color .2s, color .2s, background .2s, box-shadow .2s;
}

.btn-new-image:hover {
  background: #dbeafe;
  border-color: var(--rb-blue);
  color: var(--rb-blue);
  box-shadow: 0 2px 12px rgba(0,102,255,.12);
}



.progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--rb-blue);
  border-radius: 99px;
  transition: width .3s ease;
  width: 0;
}

.progress-label {
  font-size: .85rem;
  color: var(--rb-muted);
  text-align: center;
}

/* results inside card — managed above with !important overrides */

.result-error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  padding: 12px 16px;
  border-radius: 10px;
  color: #b32d2e;
  font-size: .88rem;
}

/* ── How it works ───────────────────────────────────────── */
.rb-how {
  padding: 72px 0;
  background: var(--rb-bg2);
}

.rb-section-title {
  text-align: center;
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -.02em;
}

.rb-section-sub {
  text-align: center;
  color: var(--rb-muted);
  font-size: 1rem;
  margin-bottom: 48px;
}

.rb-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.rb-step {
  text-align: center;
  padding: 32px 24px;
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--rb-border);
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.rb-step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--rb-blue);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.rb-step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.rb-step p  { font-size: .9rem; color: var(--rb-muted); line-height: 1.6; }

/* ── FAQ ────────────────────────────────────────────────── */
.rb-faq {
  padding: 72px 0;
}

.rb-faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 0;
}

.rb-faq-item {
  background: var(--rb-bg2);
  border: 1px solid var(--rb-border);
  border-radius: 14px;
  overflow: hidden;
}

.rb-faq-item summary {
  list-style: none;
  padding: 18px 20px;
  font-weight: 600;
  font-size: .97rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.rb-faq-item summary::-webkit-details-marker { display: none; }

.rb-faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--rb-blue);
  flex-shrink: 0;
  transition: transform .2s;
}

.rb-faq-item[open] summary::after { content: '−'; }

.rb-faq-item p {
  padding: 0 20px 18px;
  font-size: .91rem;
  color: var(--rb-muted);
  line-height: 1.7;
}

/* ── CTA band ───────────────────────────────────────────── */
.rb-cta {
  padding: 72px 0;
  background: var(--rb-blue);
  text-align: center;
}

.rb-cta h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.rb-cta p { color: rgba(255,255,255,.8); font-size: 1.05rem; margin-bottom: 28px; }

.rb-cta .btn-white {
  background: #fff;
  color: var(--rb-blue);
  padding: 14px 36px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: box-shadow .2s, transform .15s;
}

.rb-cta .btn-white:hover { box-shadow: 0 6px 24px rgba(0,0,0,.15); transform: translateY(-1px); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 56px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand .footer-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  display: block;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: .9rem;
  line-height: 1.6;
  max-width: 260px;
  margin-bottom: 20px;
}

.footer-col-title {
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 16px;
}

.footer-link-list {
  list-style: none;
}

.footer-link-list li { margin-bottom: 10px; }

.footer-link-list a {
  font-size: .9rem;
  color: #94a3b8;
  transition: color .2s;
}

.footer-link-list a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
}

.footer-bottom a { color: #94a3b8; }
.footer-bottom a:hover { color: #fff; }

.footer-legal { display: flex; gap: 20px; }

/* hide old glow */
.footer-glow { display: none; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .rb-hero-inner { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .rb-hero-example { justify-content: center; }
  .rb-steps { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .rb-faq-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .primary-nav { display: none; }
  .mobile-menu-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
  .mobile-menu-toggle span { width: 22px; height: 2px; background: var(--rb-text); border-radius: 2px; display: block; }
}

@media (max-width: 600px) {
  .rb-hero { padding: 40px 0 60px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .rb-upload-card { padding: 32px 20px; }
}
