/* ==========================================================================
   Compresor IMG — ProfeDeEF
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  color: var(--ink);
  background: var(--bg);
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2 { text-wrap: balance; line-height: 1.15; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--cream); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 500;
}
.skip-link:focus { top: 1rem; }

:root {
  --bg: #F4EEDB;
  --cream: #FFFFFF;
  --ink: #1B3A5C;
  --ink-soft: #3C4C5C;
  --accent: #2E7D32;
  --accent-dark: #1F5F23;
  --border: #D6C59C;
  --danger: #B3261E;

  --sans: "Inter", system-ui, sans-serif;
  --display: "Poppins", var(--sans);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12202E; --cream: #1B3247; --ink: #F4EEDB; --ink-soft: #C9D3DC; --border: #2E4A61;
  }
}

.wrap { max-width: 960px; margin-inline: auto; padding-inline: 1.25rem; }

/* Header */
.site-header { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--ink); display: flex; align-items: center; gap: .5rem; }
.brand-mark { color: var(--accent); font-size: 1.3rem; }
.site-nav a { font-size: .9rem; font-weight: 500; color: var(--ink-soft); transition: color .2s var(--ease-out); }
.site-nav a:hover { color: var(--accent); }

/* Hero */
.hero { padding: 2.5rem 0 1.25rem; text-align: center; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 4vw, 2.5rem); color: var(--ink); letter-spacing: -0.01em; }
.hero .subtitle { margin-top: .6rem; color: var(--ink-soft); font-size: 1.05rem; max-width: 640px; margin-inline: auto; }

/* Tool card */
.tool-section { padding-block: 1.5rem 2rem; }
.tool-card {
  background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: 0 2px 18px rgba(27, 58, 92, 0.06);
}

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .4rem; padding: 2.25rem 1rem; border: 2px dashed var(--border); border-radius: 12px;
  cursor: pointer; text-align: center; transition: border-color .2s var(--ease-out), background .2s var(--ease-out);
  color: var(--ink-soft);
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--accent); background: rgba(46,125,50,0.05); }
.dropzone-icon { color: var(--accent); }
.dropzone-title { font-weight: 600; color: var(--ink); font-size: 1.02rem; }
.dropzone-sub { font-size: .85rem; }

.quality-control { margin-top: 1.25rem; }
.quality-control label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); display: block; margin-bottom: .4rem; }
.quality-control input[type="range"] { width: 100%; accent-color: var(--accent); }
.quality-labels { display: flex; justify-content: space-between; font-size: .78rem; color: var(--ink-soft); margin-top: .2rem; }

.file-list { margin-top: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
.file-row {
  display: grid; grid-template-columns: 48px 1fr auto; gap: .85rem; align-items: center;
  padding: .7rem .85rem; background: var(--bg); border-radius: 10px; border: 1px solid var(--border);
}
.file-thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--border); }
.file-info { min-width: 0; }
.file-name { font-size: .88rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: .78rem; color: var(--ink-soft); margin-top: .15rem; }
.file-meta .saved { color: var(--accent-dark); font-weight: 600; }
.file-progress { height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; margin-top: .4rem; }
.file-progress-bar { height: 100%; background: var(--accent); width: 0%; transition: width .2s var(--ease-out); }
.file-actions { display: flex; align-items: center; gap: .5rem; }
.file-download {
  font-size: .82rem; font-weight: 600; color: #fff; background: var(--accent);
  padding: .4rem .75rem; border-radius: 8px; white-space: nowrap;
}
.file-download:hover { opacity: .9; }
.file-error { color: var(--danger); font-size: .8rem; }

.batch-actions { display: flex; gap: .75rem; margin-top: 1.25rem; }
.batch-actions.is-hidden { display: none; }
.btn-primary, .btn-secondary {
  flex: 1; padding: .75rem 1rem; border-radius: 10px; font-weight: 600; font-size: .9rem;
  text-align: center; transition: transform .15s var(--ease-out), opacity .15s var(--ease-out);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); opacity: .93; }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.privacy-badge { margin-top: 1.25rem; font-size: .85rem; color: var(--ink-soft); text-align: center; }
.limits-note { margin-top: .35rem; font-size: .78rem; color: var(--ink-soft); text-align: center; opacity: .8; }

/* Ad slots */
.ad-slot { min-height: 90px; margin-block: 1.5rem; border: 1px dashed var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.ad-label { font-size: .8rem; color: var(--ink-soft); opacity: .6; }

/* Content */
.content-section { padding-block: 1rem 3rem; }
.content-section h2 { font-family: var(--display); font-size: 1.4rem; margin-top: 2rem; margin-bottom: .75rem; color: var(--ink); }
.content-section p { color: var(--ink-soft); margin-bottom: .75rem; }
.steps { padding-left: 1.25rem; color: var(--ink-soft); }
.steps li { margin-bottom: .5rem; }
.steps strong { color: var(--ink); }

details { border: 1px solid var(--border); border-radius: 10px; padding: .8rem 1rem; margin-bottom: .6rem; background: var(--cream); }
details summary { font-weight: 600; cursor: pointer; color: var(--ink); font-size: .95rem; }
details p { margin-top: .5rem; margin-bottom: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; font-size: .85rem; color: var(--ink-soft); }
.site-footer nav { display: flex; gap: 1rem; }
.site-footer a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}

/* No-JS fallback message */
.no-js-note { display: none; }
