/* Veksle — brutalist converter site (v4 style: hard borders, offset shadows, mono labels) */

:root {
  --bg: #f5f2ea;
  --surface: #ffffff;
  --ink: #111111;
  --text-dim: #555550;
  --accent: #ffd400;
  --working: #ff8c00;
  --done: #0a7d3e;
  --error: #c0261f;
  --mono: Consolas, "Cascadia Mono", "Courier New", monospace;
  --shadow: 6px 6px 0 var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* beats the display rules set on .options etc. */
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Segoe UI", system-ui, sans-serif; line-height: 1.55; }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; }
h2 { font-size: 1.6rem; font-weight: 900; margin: 0 0 1.5rem; }
code { font-family: var(--mono); background: var(--bg); border: 2px solid var(--ink); padding: 0 0.3em; }
.container { max-width: 1000px; margin: 0 auto; padding: 0 1.25rem; }
section[id] { scroll-margin-top: 90px; } /* clear the sticky header on anchor jumps */

/* header */
.site-header { background: var(--surface); border-bottom: 3px solid var(--ink); position: sticky; top: 0; z-index: 10; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.8rem; padding-bottom: 0.8rem; }
.wordmark { font-family: var(--mono); font-size: 1.2rem; font-weight: 900; text-decoration: none; }
.wordmark .arrow { background: var(--accent); padding: 0 0.15em; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; font-family: var(--mono); font-size: 0.85rem; font-weight: 700; }
.site-nav a { text-decoration: none; }
.site-nav a:hover:not(.btn) { background: var(--accent); }

/* buttons */
.btn {
  display: inline-block; padding: 0.6rem 1.4rem; border: 3px solid var(--ink);
  background: var(--surface); color: var(--ink); font-size: 1rem; font-weight: 800;
  font-family: inherit; cursor: pointer; text-decoration: none; box-shadow: var(--shadow);
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(6px, 6px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--accent); }
.btn:disabled { background: var(--bg); color: var(--text-dim); transform: none; box-shadow: var(--shadow); cursor: default; }
.btn-small { padding: 0.25rem 0.7rem; font-size: 0.8rem; box-shadow: 3px 3px 0 var(--ink); }
.btn-small:hover { box-shadow: 2px 2px 0 var(--ink); }

/* hero */
.hero { padding: 3rem 0 1.75rem; }
.hero h1 { font-size: 3rem; line-height: 1.05; margin: 0 0 0.75rem; font-weight: 900; letter-spacing: -0.02em; }
.hero h1 mark { background: var(--accent); padding: 0 0.15em; }
.hero p { font-size: 1.15rem; color: var(--text-dim); margin: 0; max-width: 46ch; }

/* converter card */
.converter-section { padding: 0 0 3rem; }
.converter { background: var(--surface); border: 3px solid var(--ink); box-shadow: var(--shadow); padding: 1.5rem; }
.converter-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.converter-head h2 { margin: 0; font-family: var(--mono); font-size: 1.15rem; }
.badge { background: var(--ink); color: var(--accent); font-family: var(--mono); font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.6rem; white-space: nowrap; }

.dropzone {
  display: block; width: 100%; border: 3px dashed var(--ink); background: var(--surface);
  padding: 3rem 1rem; text-align: center; cursor: pointer;
  font-weight: 800; font-family: var(--mono); font-size: 0.9rem;
}
.dropzone:hover, .dropzone.dragover { background: var(--accent); }
.dropzone .drop-icon { font-size: 2.4rem; display: block; margin-bottom: 0.5rem; }
.dropzone .drop-label { display: block; }
.dropzone .drop-sub { display: block; margin-top: 0.5rem; font-size: 0.75rem; font-weight: 700; color: var(--text-dim); }
.dropzone.dragover .drop-sub { color: var(--ink); }

.drop-error { margin: 1rem 0 0; border: 3px solid var(--ink); background: var(--error); color: #fff; padding: 0.5rem 0.9rem; font-family: var(--mono); font-size: 0.8rem; font-weight: 700; }

/* picked file + settings */
.picked { margin-top: 1.5rem; border: 3px solid var(--ink); }
.picked-file { display: flex; align-items: center; gap: 0.9rem; background: var(--ink); color: var(--surface); padding: 0.6rem 0.9rem; font-family: var(--mono); font-size: 0.9rem; font-weight: 700; }
.picked-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picked-size { margin-left: auto; color: var(--accent); white-space: nowrap; }
.picked-controls { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; padding: 1.1rem 0.9rem 0.6rem; }
.form-inline { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; font-family: var(--mono); font-size: 0.85rem; }
.form-inline select { padding: 0.45rem 0.6rem; border: 3px solid var(--ink); background: var(--bg); font-family: var(--mono); font-size: 0.9rem; }
.form-inline select:focus { outline: none; background: #fff8cc; }
.picked-controls .btn { margin-left: auto; }
.hint { margin: 0; padding: 0 0.9rem 1rem; font-size: 0.82rem; color: var(--text-dim); }

.chip { display: inline-block; padding: 0.15rem 0.6rem; border: 2px solid var(--ink); font-family: var(--mono); font-size: 0.75rem; font-weight: 700; }
.chip.working { background: var(--working); color: #fff; }
.chip.done { background: var(--done); color: #fff; }

.remove { border: none; background: none; color: inherit; font-family: var(--mono); font-size: 1rem; font-weight: 900; cursor: pointer; padding: 0 0.3rem; }
.remove:hover { background: var(--accent); color: var(--ink); }
.remove:disabled { opacity: 0.4; cursor: default; background: none; color: inherit; }

/* progress */
.progress { margin-top: 1.5rem; }
.progress-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; font-family: var(--mono); font-size: 0.8rem; font-weight: 700; }
.bar { height: 14px; border: 3px solid var(--ink); background: var(--surface); }
.bar span { display: block; height: 100%; width: 0; background: var(--working); transition: width 0.15s linear; }

/* result + viewer */
.result { margin-top: 1.5rem; }
.result-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.result-summary { font-family: var(--mono); font-size: 0.8rem; font-weight: 700; color: var(--text-dim); }
.result-head .btn { margin-left: auto; }

.viewer { position: relative; border: 3px solid var(--ink); background: var(--bg); overflow: hidden; }
.viewer-canvas { height: 460px; }
.viewer-canvas canvas { display: block; max-width: 100%; }
.viewer-overlay {
  position: absolute; inset: 0 0 32px 0; display: flex; flex-direction: column; gap: 1rem;
  align-items: center; justify-content: center; background: var(--bg);
  font-family: var(--mono); font-size: 0.85rem; font-weight: 800; text-align: center; padding: 1rem;
}
.viewer-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 32px; display: flex;
  align-items: center; justify-content: space-between; gap: 1rem; padding: 0 0.9rem;
  background: var(--ink); color: var(--surface); font-family: var(--mono); font-size: 0.7rem; font-weight: 700;
}
.viewer-help { color: var(--accent); }

.log { margin-top: 1.25rem; border: 3px solid var(--ink); background: var(--surface); }
.log summary { cursor: pointer; padding: 0.6rem 0.9rem; font-family: var(--mono); font-size: 0.8rem; font-weight: 800; }
.log summary:hover { background: var(--accent); }
.log[open] summary { border-bottom: 3px solid var(--ink); }
.log pre { margin: 0; padding: 0.9rem; overflow-x: auto; font-family: var(--mono); font-size: 0.78rem; line-height: 1.45; }

.trust-row { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; gap: 1rem; flex-wrap: wrap; font-family: var(--mono); font-size: 0.8rem; font-weight: 700; }
.trust-row li { border: 2px solid var(--ink); background: var(--surface); padding: 0.25rem 0.7rem; }

/* tool grid */
.tools { padding: 3rem 0; border-top: 3px solid var(--ink); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.tool-card {
  position: relative; display: block; width: 100%; text-align: left; background: var(--surface);
  border: 3px solid var(--ink); padding: 1.5rem; box-shadow: var(--shadow);
  color: var(--ink); font-family: inherit; font-size: 1rem;
}
button.tool-card { cursor: pointer; }
button.tool-card:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--ink); background: var(--accent); }
button.tool-card.active { background: var(--accent); }
.tool-card .t-icon { font-size: 1.8rem; font-family: var(--mono); }
.tool-card h3 { margin: 0.6rem 0 0.35rem; font-weight: 900; font-family: var(--mono); font-size: 1rem; }
.tool-card p { margin: 0; color: var(--text-dim); font-size: 0.92rem; }

/* steps */
.steps { padding: 3rem 0; border-top: 3px solid var(--ink); }
.step-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.step-grid li { background: var(--surface); border: 3px solid var(--ink); padding: 1.5rem; box-shadow: var(--shadow); }
.step-grid .num { display: inline-flex; width: 2.2rem; height: 2.2rem; align-items: center; justify-content: center; background: var(--accent); border: 3px solid var(--ink); font-weight: 900; font-family: var(--mono); }
.step-grid h3 { margin: 0.75rem 0 0.4rem; font-weight: 900; font-size: 1rem; }
.step-grid p { margin: 0; color: var(--text-dim); font-size: 0.95rem; }

/* faq */
.faq { padding: 3rem 0; border-top: 3px solid var(--ink); }
.qa { border: 3px solid var(--ink); background: var(--surface); box-shadow: var(--shadow); margin-bottom: 1rem; }
.qa:last-child { margin-bottom: 0; }
.qa summary { cursor: pointer; padding: 0.8rem 1rem; font-weight: 800; font-size: 1rem; }
.qa summary:hover { background: var(--accent); }
.qa[open] summary { background: var(--accent); border-bottom: 3px solid var(--ink); }
.qa-body { padding: 1rem; }
.qa-body p { margin: 0; max-width: 68ch; color: var(--text-dim); }
.qa-body strong { background: var(--accent); color: var(--ink); padding: 0 0.2em; font-weight: 800; }

/* about */
.about { padding: 3rem 0; border-top: 3px solid var(--ink); }
.about p { margin: 0 0 1.1rem; max-width: 68ch; color: var(--text-dim); }
.about p:last-child { margin-bottom: 0; }
.about strong { background: var(--accent); color: var(--ink); padding: 0 0.2em; font-weight: 800; }

.site-footer { border-top: 3px solid var(--ink); padding: 1.5rem 0; font-family: var(--mono); font-size: 0.8rem; font-weight: 700; }

@media (max-width: 700px) {
  .hero h1 { font-size: 2.1rem; }
  .site-nav a:not(.btn) { display: none; }
  .picked-controls .btn, .result-head .btn { margin-left: 0; width: 100%; }
  .viewer-canvas { height: 320px; }
  .viewer-help { display: none; }
}
