/* ============================================================
   bg-eraser — styles.css
   Premium SaaS design system. No frameworks, pure modern CSS.
   ============================================================ */

/* ── RESET & BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Color system */
  --clr-brand:        #6366f1;
  --clr-brand-dark:   #4f46e5;
  --clr-brand-light:  #818cf8;
  --clr-brand-bg:     #eef2ff;
  --clr-violet:       #8b5cf6;

  --clr-surface:      #ffffff;
  --clr-surface-2:    #f8fafc;
  --clr-surface-3:    #f1f5f9;
  --clr-border:       #e2e8f0;
  --clr-border-2:     #cbd5e1;

  --clr-text-primary:   #0f172a;
  --clr-text-secondary: #475569;
  --clr-text-muted:     #94a3b8;
  --clr-text-inverse:   #ffffff;

  --clr-success:  #10b981;
  --clr-warning:  #f59e0b;
  --clr-error:    #ef4444;

  /* Dark hero bg */
  --clr-hero-bg:  #0f172a;
  --clr-hero-mid: #1e293b;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Typography */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.1), 0 4px 8px rgba(0,0,0,.05);
  --shadow-xl:  0 20px 50px rgba(0,0,0,.14), 0 8px 16px rgba(0,0,0,.07);
  --shadow-brand: 0 4px 20px rgba(99,102,241,.35);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.7, 0, 0.84, 0);
  --duration-fast:   150ms;
  --duration-normal: 250ms;
  --duration-slow:   400ms;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--clr-text-primary);
  background: var(--clr-surface-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, label { cursor: pointer; font: inherit; border: none; background: none; }
ul, ol { list-style: none; }

/* ── UTILITIES ── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border-width: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

.hidden { display: none !important; }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* ── GRADIENT TEXT ── */
.gradient-text {
  background: linear-gradient(135deg, var(--clr-brand-light) 0%, var(--clr-violet) 60%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  transition:
    background var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out),
    color var(--duration-fast);
  white-space: nowrap;
  border: 1.5px solid transparent;
  text-decoration: none;
}

.btn:active { transform: translateY(1px); }

.btn-sm  { padding: 7px 14px; font-size: var(--text-xs); border-radius: var(--radius-sm); }
.btn-lg  { padding: 14px 28px; font-size: var(--text-base); border-radius: var(--radius-lg); }

.btn-primary {
  background: var(--clr-brand);
  color: var(--clr-text-inverse);
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover {
  background: var(--clr-brand-dark);
  box-shadow: 0 6px 24px rgba(99,102,241,.45);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--clr-text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--clr-surface-3);
  color: var(--clr-text-primary);
}

.btn-outline {
  background: transparent;
  color: var(--clr-brand);
  border-color: var(--clr-brand);
}
.btn-outline:hover {
  background: var(--clr-brand-bg);
}

/* ════════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--clr-border);
  height: 64px;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.logo-icon {
  display: flex;
  flex-shrink: 0;
}

.logo-text {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--clr-text-primary);
  letter-spacing: -0.02em;
}
.logo-text strong {
  font-weight: 900;
  color: var(--clr-brand);
}

.logo-sm .logo-text { font-size: var(--text-lg); }

/* Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--clr-text-secondary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast), background var(--duration-fast);
}
.nav-link:hover {
  color: var(--clr-text-primary);
  background: var(--clr-surface-3);
}

/* ════════════════════════════════════════════════════
   HERO
════════════════════════════════════════════════════ */
.hero {
  background: var(--clr-hero-bg);
  background-image:
    radial-gradient(ellipse at 20% 60%, rgba(99,102,241,.18) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 30%, rgba(139,92,246,.14) 0%, transparent 50%);
  padding: var(--space-20) 0 var(--space-16);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.3);
  color: var(--clr-brand-light);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--clr-brand-light);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(2rem, 5vw, var(--text-6xl));
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #f8fafc;
  margin-bottom: var(--space-5);
}

.hero-subtitle {
  font-size: clamp(var(--text-base), 2vw, var(--text-lg));
  color: #94a3b8;
  max-width: 600px;
  margin-inline: auto;
  line-height: 1.7;
  margin-bottom: var(--space-8);
}

.hero-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: #cbd5e1;
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

/* ════════════════════════════════════════════════════
   AD SLOTS
════════════════════════════════════════════════════ */
.ad-slot {
  position: relative;
  background:
    repeating-linear-gradient(
      45deg,
      var(--clr-surface-3) 0px,
      var(--clr-surface-3) 12px,
      var(--clr-surface-2) 12px,
      var(--clr-surface-2) 24px
    );
  border: 1.5px dashed var(--clr-border-2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color var(--duration-normal);
}
.ad-slot:hover { border-color: var(--clr-brand-light); }

.ad-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  background: rgba(255,255,255,.75);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  pointer-events: none;
  user-select: none;
}

.ad-leaderboard {
  height: 90px;
  max-width: 728px;
  margin-inline: auto;
  margin-block: var(--space-8);
}

.ad-square {
  width: 100%;
  min-height: 250px;
}

.ad-banner {
  height: 60px;
  margin-top: var(--space-10);
  margin-bottom: var(--space-6);
}

/* ════════════════════════════════════════════════════
   WORKSPACE
════════════════════════════════════════════════════ */
.workspace {
  padding-bottom: var(--space-12);
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-6);
  align-items: start;
}

/* ── Main Panel ── */
.main-panel {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-height: 440px;
}

/* ── Upload Zone ── */
.upload-zone {
  padding: var(--space-16) var(--space-8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px dashed var(--clr-border-2);
  border-radius: var(--radius-xl);
  margin: var(--space-5);
  transition:
    border-color var(--duration-normal) var(--ease-out),
    background var(--duration-normal) var(--ease-out);
  outline: none;
}
.upload-zone:focus-visible {
  border-color: var(--clr-brand);
  box-shadow: 0 0 0 3px rgba(99,102,241,.2);
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--clr-brand);
  background: var(--clr-brand-bg);
}

.upload-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
  pointer-events: none;
}
.upload-zone-inner .btn { pointer-events: all; }

.upload-icon {
  transition: transform var(--duration-normal) var(--ease-out);
}
.upload-zone:hover .upload-icon { transform: translateY(-4px); }

.upload-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--clr-text-primary);
}

.upload-desc {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
}

.upload-privacy-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  color: var(--clr-text-muted);
  margin-top: var(--space-1);
}

/* ── Preview Panel ── */
.preview-panel {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Tab bar */
.tab-bar {
  display: flex;
  gap: var(--space-2);
  background: var(--clr-surface-3);
  padding: var(--space-1);
  border-radius: var(--radius-md);
  width: fit-content;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 7px 16px;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--clr-text-muted);
  transition: all var(--duration-fast) var(--ease-out);
  border: none;
  background: none;
  cursor: pointer;
}
.tab-btn:hover { color: var(--clr-text-primary); }
.tab-btn.active {
  background: var(--clr-surface);
  color: var(--clr-brand);
  box-shadow: var(--shadow-sm);
}

/* Image stage */
.image-stage {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--clr-border);
  overflow: hidden;
  min-height: 320px;
  background: var(--clr-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-pane {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  min-height: 320px;
}

.stage-img {
  max-width: 100%;
  max-height: 560px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

/* Checkerboard for transparency */
.checkerboard {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
    linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

/* Loading overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(248,250,252,.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-8);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  min-width: 260px;
  text-align: center;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--clr-brand-bg);
  border-top-color: var(--clr-brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--clr-text-primary);
}

.loading-progress {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  min-height: 20px;
}

.loading-hint {
  font-size: var(--text-xs);
  color: var(--clr-text-muted);
  opacity: 0.7;
  max-width: 220px;
  text-align: center;
  line-height: 1.5;
}

.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--clr-surface-3);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--clr-brand), var(--clr-violet));
  border-radius: var(--radius-full);
  transition: width 0.3s var(--ease-out);
}

/* Error overlay */
.error-overlay {
  position: absolute;
  inset: 0;
  background: rgba(248,250,252,.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.error-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-8);
  background: var(--clr-surface);
  border: 1px solid #fecaca;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 320px;
  text-align: center;
}

.error-msg {
  font-size: var(--text-sm);
  color: var(--clr-error);
  font-weight: 500;
}

/* Action bar */
.action-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Support / Thank-you card */
.support-card {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  background: linear-gradient(135deg, #fefce8 0%, #fff7ed 100%);
  border: 1.5px solid #fde68a;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-top: var(--space-2);
  animation: fade-in-up var(--duration-slow) var(--ease-out);
}

.support-card-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.support-card-body strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: #92400e;
  margin-bottom: var(--space-2);
}
.support-card-body p {
  font-size: var(--text-sm);
  color: #78350f;
  line-height: 1.6;
}
.support-card-body em {
  font-style: normal;
  font-weight: 600;
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Result meta line */
.result-meta {
  font-size: var(--text-xs);
  color: var(--clr-text-muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ════════════════════════════════════════════════════
   BEFORE / AFTER COMPARE SLIDER
════════════════════════════════════════════════════ */
.compare {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 560px;
  line-height: 0;
  user-select: none;
  touch-action: none;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: ew-resize;
}

.compare-img {
  display: block;
  max-width: 100%;
  max-height: 560px;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Base layer = original (full width) */
.compare-base { position: relative; z-index: 1; }

/* Top layer = result over checkerboard, clipped by JS clip-path */
.compare-top {
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: inset(0 50% 0 0);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0; /* matches container */
}
.compare-top .compare-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Divider handle */
.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 3;
  width: 2px;
  transform: translateX(-50%);
  cursor: ew-resize;
  outline: none;
}
.compare-handle-line {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}
.compare-handle-grip {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--clr-brand);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-fast) var(--ease-out);
  line-height: 1;
}
.compare.dragging .compare-handle-grip,
.compare-handle:focus-visible .compare-handle-grip {
  transform: translate(-50%, -50%) scale(1.12);
}

/* ════════════════════════════════════════════════════
   ADSENSE — keep dashed placeholder visible behind/empty unit
════════════════════════════════════════════════════ */
.ad-slot ins.adsbygoogle {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
/* When AdSense fills the unit it paints over the dashed box & label. */

/* ════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  position: sticky;
  top: 80px;
}

/* Info card */
.info-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.info-card-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--clr-text-primary);
  margin-bottom: var(--space-4);
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.step {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.step-num {
  width: 26px;
  height: 26px;
  background: var(--clr-brand-bg);
  color: var(--clr-brand);
  border-radius: 50%;
  font-size: var(--text-xs);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.step strong {
  font-size: var(--text-sm);
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}
.step p {
  font-size: var(--text-xs);
  color: var(--clr-text-secondary);
  line-height: 1.5;
}

/* Privacy card */
.privacy-card {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.privacy-icon {
  background: #dcfce7;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.privacy-card strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: #14532d;
  margin-bottom: 4px;
}
.privacy-card p {
  font-size: var(--text-xs);
  color: #166534;
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════
   FEATURES
════════════════════════════════════════════════════ */
.features {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  padding: var(--space-16) 0;
}

.section-title {
  font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl));
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--clr-text-primary);
  text-align: center;
  margin-bottom: var(--space-10);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
}

.feature-card {
  padding: var(--space-6);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--duration-normal) var(--ease-out), border-color var(--duration-normal);
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--clr-brand-light);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: var(--clr-brand-bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--clr-brand);
}

.feature-card h3 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--clr-text-primary);
}

.feature-card p {
  font-size: var(--text-sm);
  color: var(--clr-text-secondary);
  line-height: 1.6;
}

/* ════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════ */
.site-footer {
  background: var(--clr-hero-bg);
  color: #94a3b8;
  padding-top: var(--space-10);
  padding-bottom: var(--space-8);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-6);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand .logo-text { color: #f8fafc; }
.footer-brand .logo-text strong { color: var(--clr-brand-light); }

.footer-tagline {
  font-size: var(--text-xs);
  color: #64748b;
  margin-top: var(--space-2);
}

.footer-nav {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  font-size: var(--text-sm);
  color: #94a3b8;
  transition: color var(--duration-fast);
}
.footer-link:hover { color: #f8fafc; }

.footer-copy {
  text-align: right;
}
.footer-copy p { font-size: var(--text-xs); color: #64748b; }

.footer-dsgvo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: var(--text-xs) !important;
  color: #4ade80 !important;
}

/* Dedicated legal pages (impressum.html / datenschutz.html) */
.legal-page {
  max-width: 820px;
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
}
.legal-back {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--clr-brand);
  margin-bottom: var(--space-6);
}
.legal-back:hover { color: var(--clr-brand-dark); }
.legal-page h1 {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--clr-text-primary);
  margin-bottom: var(--space-4);
}
.legal-page h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--clr-text-primary);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}
.legal-page p {
  font-size: var(--text-base);
  color: var(--clr-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-3);
}
.legal-page a { color: var(--clr-brand); text-decoration: underline; }
.legal-page a:hover { color: var(--clr-brand-dark); }
.legal-note {
  font-size: var(--text-sm) !important;
  color: var(--clr-text-muted) !important;
  font-style: italic;
}
.legal-highlight {
  background: var(--clr-brand-bg);
  border: 1px solid #c7d2fe;
  border-left: 4px solid var(--clr-brand);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  color: #3730a3;
  line-height: 1.7;
  margin-block: var(--space-5);
}

/* Legacy dark legal sections (unused by current pages, kept for compatibility) */
.legal-section {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
  border-top: 1px solid rgba(255,255,255,.06);
}
.legal-section h2 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: var(--space-4);
}
.legal-section p {
  font-size: var(--text-sm);
  color: #64748b;
  line-height: 1.8;
}
.legal-section a {
  color: var(--clr-brand-light);
  text-decoration: underline;
}
.legal-section a:hover { color: #c7d2fe; }

/* ════════════════════════════════════════════════════
   RESPONSIVE — Tablet (≤ 1024px)
════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }

  .ad-square {
    min-height: 200px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-copy { text-align: center; }
  .footer-dsgvo { justify-content: center; }
}

/* ════════════════════════════════════════════════════
   RESPONSIVE — Mobile (≤ 640px)
════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .header-nav .nav-link { display: none; }

  .hero { padding: var(--space-12) 0 var(--space-10); }
  .hero-title { font-size: 2rem; }

  .hero-trust-badges {
    flex-direction: column;
    align-items: center;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .upload-zone { padding: var(--space-10) var(--space-5); }

  .action-bar { flex-direction: column; align-items: stretch; }
  .action-bar .btn { justify-content: center; }

  .tab-bar { width: 100%; }
  .tab-btn { flex: 1; justify-content: center; }

  .support-card { flex-direction: column; }

  .footer-nav { flex-direction: column; align-items: center; gap: var(--space-3); }

  .ad-leaderboard { height: 60px; }
}

/* ════════════════════════════════════════════════════
   FOCUS MANAGEMENT
════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--clr-brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
