/* ============================================================
   CUTOUT — Background Remover
   styles.css
   ============================================================ */

/* ── 1. CSS Variables (light + dark) ── */
:root {
  --ink: #14161A;
  --paper: #FAFAF8;
  --paper-dim: #F1F0EC;
  --line: #E4E4E0;
  --accent: #5B5FEF;
  --accent-dim: #EEEEFD;
  --success: #1F9D6B;
  --danger: #D14343;
  --muted: #6B6E76;
  --toggle-bg: #E4E4E0;
}
[data-theme="dark"] {
  --ink: #F0F0EE;
  --paper: #111214;
  --paper-dim: #1A1C1F;
  --line: #2C2E32;
  --accent: #7B7FFF;
  --accent-dim: #1E1F3A;
  --success: #2ECC8A;
  --danger: #F06565;
  --muted: #888C96;
  --toggle-bg: #2C2E32;
}

/* ── 2. Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background 0.2s ease, color 0.2s ease;
}
.mono { font-family: 'JetBrains Mono', monospace; }

/* ── 3. Layout ── */
.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px clamp(24px, 5vw, 72px) 80px;
}

/* ── 4. Header ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background:
    linear-gradient(45deg, transparent 45%, var(--accent) 45%, var(--accent) 55%, transparent 55%),
    conic-gradient(var(--paper-dim) 0 90deg, transparent 0 360deg);
  background-size: 8px 8px, 100% 100%;
  border: 1.5px solid var(--ink);
}
.tag {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── 5. Dark Mode Toggle ── */
.theme-toggle {
  background: var(--toggle-bg);
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--line); }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  width: 16px;
  height: 16px;
}
.icon-sun  { display: block; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun  { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ── 6. Hero ── */
h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 10px;
}
.sub {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 32px;
  max-width: 54ch;
}

/* ── 7. Dropzone ── */
.dropzone {
  border: 1.5px dashed var(--ink);
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  background: var(--paper);
  position: relative;
}
.dropzone.drag {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.dropzone:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.dz-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
}
.dz-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
}
.dz-sub {
  font-size: 13px;
  color: var(--muted);
}
.dz-formats {
  margin-top: 18px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
input[type="file"] { display: none; }

/* ── 8. Privacy Note ── */
.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--paper-dim);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.privacy-note svg { flex-shrink: 0; margin-top: 2px; }

/* ── 9. Error Box ── */
.error-box {
  margin-top: 16px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--danger) 10%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--paper));
  border-radius: 10px;
  font-size: 13px;
  color: var(--danger);
  display: none;
}
.error-box.show { display: block; }

/* ── 10. Status Card ── */
.status-card {
  display: none;
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  padding: 28px;
  margin-top: 8px;
}
.status-card.show { display: block; }
.status-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid var(--paper-dim);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status-text {
  font-weight: 600;
  font-size: 14px;
}
.status-detail {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.progress-track {
  margin-top: 18px;
  height: 6px;
  border-radius: 99px;
  background: var(--paper-dim);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.25s ease;
}
.steps {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
}
.step {
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--line);
  font-weight: 600;
}
.step.active { color: var(--accent); }
.step.done   { color: var(--success); }

/* ── 11. Result Card ── */
.result-card {
  display: none;
  margin-top: 8px;
}
.result-card.show { display: block; }
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.result-title {
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge-ok {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: color-mix(in srgb, var(--success) 12%, var(--paper));
  color: var(--success);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
}
.badge-ok::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
}
.reset-link {
  font-size: 12.5px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: inherit;
}

/* ── 12. Before/After Slider ── */
.compare {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  background-image:
    linear-gradient(45deg,  var(--line) 25%, transparent 25%),
    linear-gradient(-45deg, var(--line) 25%, transparent 25%),
    linear-gradient(45deg,  transparent 75%, var(--line) 75%),
    linear-gradient(-45deg, transparent 75%, var(--line) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  user-select: none;
  touch-action: none;
}
.compare img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.compare .before-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--paper-dim);
}
.compare .before-layer img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
}
.slider-handle {
  position: absolute;
  top: 0; bottom: 0;
  width: 0;
  cursor: ew-resize;
}
.slider-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--paper);
  left: -1px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}
.slider-grip {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.compare-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ── 13. Action Buttons ── */
.actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.1s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  flex: 1;
  justify-content: center;
}
.btn-primary:hover { background: var(--ink); filter: brightness(1.15); }
.btn-secondary {
  background: var(--paper);
  color: var(--ink);
}
.btn-secondary:hover { background: var(--paper-dim); }

/* ── 14. Features Strip ── */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 48px;
}
@media (min-width: 700px) {
  .features { grid-template-columns: repeat(4, 1fr); }
}
.feature-item {
  padding: 18px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--paper-dim);
}
.feat-icon  { font-size: 20px; margin-bottom: 8px; }
.feat-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.feat-desc  { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ── 15. FAQ ── */
.faq-section { margin-top: 52px; }
.faq-heading {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.faq-item {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}
.faq-item:last-of-type { border-bottom: 1px solid var(--line); }
.faq-q {
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  padding: 14px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: '+';
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
  flex-shrink: 0;
}
details[open] .faq-q::after { content: '−'; }
.faq-a {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 16px;
  padding-right: 24px;
}

/* ── 16. Footer ── */
footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── 17. Site Navigation ── */
.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: -12px 0 40px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── 18. How It Works ── */
.how-it-works { margin-top: 52px; }
.section-heading {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.section-intro {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 68ch;
  margin: 0 0 24px;
}
.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 700px) { .steps-row { grid-template-columns: 1fr; } }
.step-item {
  padding: 18px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--paper-dim);
}
.step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.step-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.step-desc { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* ── 19. Use Cases ── */
.use-cases { margin-top: 52px; }
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 700px) { .usecase-grid { grid-template-columns: 1fr; } }
.usecase-item {
  padding: 18px;
  border-left: 2px solid var(--accent);
  background: var(--paper-dim);
  border-radius: 0 12px 12px 0;
}
.usecase-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.usecase-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ── 20. Footer (expanded) ── */
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 18px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11px;
}
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ── 21. Cookie Consent Banner ── */
/* Hidden by default — app.js only reveals this once a real AdSense
   client ID is configured, since there's nothing to consent to
   before then. This banner is a plain-language notice, NOT a
   TCF-certified CMP — EEA/UK/Switzerland ad personalization requires
   Google Funding Choices or another Google-certified CMP as well. */
.consent-banner {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 640px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  z-index: 999;
  font-size: 13px;
}
.consent-banner.show { display: block; }
.consent-banner p { margin: 0 0 12px; line-height: 1.5; }
.consent-banner a { color: var(--paper); text-decoration: underline; }
.consent-actions { display: flex; gap: 8px; justify-content: flex-end; }
.consent-banner .btn { padding: 8px 16px; font-size: 12.5px; }
.consent-banner .btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.consent-banner .btn-secondary { background: transparent; border-color: var(--muted); color: var(--paper); }

/* ── 22. Legal / Content Pages (about, privacy, terms, contact) ── */
.legal-page h1 { margin-bottom: 8px; }
.legal-page .updated { font-size: 12px; color: var(--muted); margin-bottom: 32px; }
.legal-page h2 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 32px 0 12px;
}
.legal-page p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 14px;
}
.legal-page ul { margin: 0 0 14px; padding-left: 20px; }
.legal-page li {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 8px;
}
.legal-page a { color: var(--accent); }
.legal-page .placeholder {
  background: color-mix(in srgb, var(--accent) 10%, var(--paper));
  border: 1px dashed var(--accent);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
}
.contact-email-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  margin: 8px 0 20px;
  text-decoration: none;
  color: var(--ink);
}
.contact-email-box:hover { background: var(--paper-dim); }

/* ── 23. Responsive ── */
@media (max-width: 480px) {
  h1 { font-size: 26px; }
  .dropzone { padding: 36px 16px; }
  .status-card { padding: 20px; }
  .features { grid-template-columns: 1fr; }
  .site-nav { gap: 12px 16px; }
}

/* ── 24. Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
  * { transition: none !important; }
}
