/* ==========================================================================
   AI Watermark Remover - Dark-First Luxury & Bento Grid (June 2026)
   ========================================================================== */

/* Design System & Tokens */
:root {
  color-scheme: light dark;
  
  /* OKLCH Dark-First Palette */
  --color-surface-base: oklch(12% 0.01 260); /* Deep off-black */
  --color-surface-elevated: oklch(18% 0.01 260);
  --color-surface-highlight: oklch(24% 0.01 260);
  
  --color-text-primary: oklch(95% 0.01 260);
  --color-text-muted: oklch(65% 0.01 260);
  
  --color-accent: oklch(65% 0.22 230); /* Vibrant cyan/blue */
  --color-accent-subtle: color-mix(in oklch, var(--color-accent) 20%, transparent);
  
  --color-success: oklch(60% 0.15 145);
  --color-success-bg: color-mix(in oklch, var(--color-success) 15%, transparent);
  
  --color-warning: oklch(65% 0.20 45);
  --color-warning-bg: color-mix(in oklch, var(--color-warning) 15%, transparent);

  /* Fluid Typography Scale (clamp) */
  --font-base: system-ui, -apple-system, sans-serif;
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.8rem + 2.25vw, 3rem);

  /* Elevation */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.6);
}

/* Light mode overrides (dual-mode) */
@media (prefers-color-scheme: light) {
  :root {
    --color-surface-base: oklch(98% 0.01 260);
    --color-surface-elevated: oklch(100% 0 0);
    --color-surface-highlight: oklch(95% 0.01 260);
    --color-text-primary: oklch(15% 0.02 260);
    --color-text-muted: oklch(45% 0.02 260);
    --color-accent: oklch(55% 0.20 230);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  }
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-base);
  margin: 0;
  padding: 0;
  line-height: 1.7;
  background-color: var(--color-surface-base);
  color: var(--color-text-primary);
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
}

/* Accessibility Focus States (WCAG 2.2) */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}
@media (forced-colors: active) {
  :focus-visible { outline: 3px solid ButtonText; }
}
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 8px;
  z-index: 1000;
  transition: top 0.2s;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}
.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;
}

/* Typography */
h1, h2, h3, h4 {
  margin-top: 0;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity 0.2s;
}
a:hover {
  opacity: 0.8;
}

/* Header & Nav */
.site-header {
  background: var(--color-surface-elevated);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--color-surface-highlight);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in oklch, var(--color-surface-elevated) 85%, transparent);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--color-text-primary);
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
}
.logo-img {
  border-radius: 6px;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: var(--text-sm);
}
.nav-links a:hover {
  color: var(--color-text-primary);
}

/* Main Layout */
.container {
  max-width: 1000px;
  margin: 3rem auto;
  padding: 0 2rem;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 4rem;
  animation: fade-in 0.6s ease-out;
}
.hero h1 {
  font-size: var(--text-4xl);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--color-text-primary), var(--color-text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.trust-badge {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-size: var(--text-sm);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 2.5rem;
  border: 1px solid color-mix(in oklch, var(--color-accent) 40%, transparent);
}

/* Tool UI - Bento Grid & Container Queries */
.card-wrapper {
  container-type: inline-size;
  container-name: card;
}
.tool-ui {
  background: var(--color-surface-elevated);
  padding: 2.5rem;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-surface-highlight);
}
.upload-area {
  border: 2px dashed var(--color-surface-highlight);
  padding: 4rem 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 16px;
  background: var(--color-surface-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--color-accent);
  background: var(--color-accent-subtle);
}
.upload-icon {
  width: 48px;
  height: 48px;
  color: var(--color-text-muted);
  transition: color 0.3s;
}
.upload-area:hover .upload-icon, .upload-area.dragover .upload-icon {
  color: var(--color-accent);
}
.upload-area h3 {
  margin: 0;
  font-size: var(--text-lg);
}
.upload-area p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.controls {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}
@container card (min-width: 600px) {
  .controls {
    flex-wrap: nowrap;
  }
}
select, button {
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--color-surface-highlight);
  font-size: var(--text-base);
  font-family: inherit;
  background: var(--color-surface-base);
  color: var(--color-text-primary);
  transition: all 0.2s;
}
select {
  flex: 1;
  cursor: pointer;
}
button {
  background: var(--color-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
button:hover:not(:disabled) {
  background: color-mix(in oklch, var(--color-accent) 80%, black);
  transform: translateY(-1px);
}
button:disabled {
  background: var(--color-surface-highlight);
  color: var(--color-text-muted);
  cursor: not-allowed;
  transform: none;
}

/* Status & Results */
.status-box, .forensics-box, .result-box {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 12px;
  animation: slide-up 0.4s ease-out;
}
@starting-style {
  .status-box, .forensics-box, .result-box { opacity: 0; transform: translateY(8px); }
}
.status-box {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
  text-align: center;
  font-weight: 600;
  border: 1px solid color-mix(in oklch, var(--color-accent) 30%, transparent);
}
.forensics-box {
  background: #000;
  color: var(--color-success);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-align: left;
  white-space: pre-wrap;
  font-size: var(--text-sm);
  border: 1px solid var(--color-surface-highlight);
  overflow-x: auto;
}
.result-box {
  background: var(--color-success-bg);
  color: var(--color-success);
  text-align: center;
  border: 1px solid color-mix(in oklch, var(--color-success) 30%, transparent);
}
.btn-download {
  display: inline-block;
  background: var(--color-success);
  color: #fff !important;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  margin-top: 1rem;
  font-size: var(--text-base);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  opacity: 1;
}

/* Content Blocks (Scroll-Driven Animations if supported) */
.content-block, .blog-post {
  margin-top: 4rem;
}
.prose {
  max-width: 65ch;
  margin: 0 auto;
}
.prose h1, .prose h2, .prose h3 {
  color: var(--color-text-primary);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.prose h2 {
  font-size: var(--text-2xl);
  border-bottom: 1px solid var(--color-surface-highlight);
  padding-bottom: 0.5rem;
}
.prose h3 {
  font-size: var(--text-xl);
}
.prose p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}
.prose ul, .prose ol {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}
.prose li {
  margin-bottom: 0.5rem;
}
.prose strong {
  color: var(--color-text-primary);
}

.faq {
  background: var(--color-surface-elevated);
  padding: 2rem;
  border-radius: 16px;
  margin-top: 2rem;
  border: 1px solid var(--color-surface-highlight);
}
.faq h3 {
  margin-top: 0;
  font-size: var(--text-lg);
}

.author-meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  display: flex;
  gap: 0.5rem;
}

.legal-disclaimer {
  margin-top: 4rem;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-surface-highlight);
  padding-top: 2rem;
  text-align: center;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 3rem 2rem;
  margin-top: 5rem;
  border-top: 1px solid var(--color-surface-highlight);
  background: var(--color-surface-base);
  font-size: var(--text-sm);
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.footer-links a {
  color: var(--color-text-muted);
  font-weight: 500;
}
.footer-links a:hover {
  color: var(--color-text-primary);
}
.site-footer p {
  color: var(--color-text-muted);
  margin: 0;
}

/* Utilities */
.hidden { display: none !important; }

/* Keyframes */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}