/* Old-internet friendly: beige paper, soft round type, no gradients,
   no cards. One accent. Pages share this file. */

@font-face {
  font-family: 'Comic Neue';
  src: url('/fonts/comic-neue-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Comic Neue';
  src: url('/fonts/comic-neue-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #f2ecdd;         /* beige paper */
  --ink: #3b352a;        /* warm dark brown text */
  --dim: #8a7f68;
  --accent: #2e6e4e;     /* quiet green for links */
  --line: #d8cfb8;
  --soft: #faf6ea;       /* raised beige */
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 'Comic Neue', 'Comic Sans MS', 'Chalkboard SE', Verdana, sans-serif;
}

main, nav.tools, header.site-head { max-width: 760px; margin: 0 auto; padding-left: 22px; padding-right: 22px; }

/* Header + tabs */
header.site-head { padding-top: 22px; }
.brand-row { display: flex; align-items: baseline; gap: 14px; }
.brand-line { font-weight: 700; font-size: 19px; color: var(--ink); display: inline-block; }
.brand-line em { font-style: normal; color: var(--accent); }
.home-link { font-size: 14px; color: var(--accent); margin-left: 10px; }
nav.tabs {
  margin: 12px 0 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  font-size: 15px;
}
nav.tabs a { color: var(--dim); text-decoration: none; }
nav.tabs a:not(:last-child)::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 0.9em;
  margin-left: 14px;
  background: var(--line);
  vertical-align: -0.12em;
}
nav.tabs a:hover { color: var(--accent); text-decoration: underline; }
nav.tabs a.youarehere { color: var(--ink); font-weight: 700; }

/* Landing */
.home { padding-top: 54px; padding-bottom: 90px; }
.home h1 { font-size: 34px; line-height: 1.3; margin: 0 0 14px; font-weight: 700; }
.home .lede { font-size: 19px; margin: 0 0 30px; max-width: 34em; }
.home .open { margin: 0 0 22px; }
.biglink {
  display: inline-block;
  background: var(--soft);
  border: 2px solid var(--ink);
  border-radius: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 21px;
  text-decoration: none;
  padding: 12px 26px;
}
.biglink:hover { background: #ffffff; }
.home .aside { color: var(--dim); font-size: 14px; }

/* Tool pages */
main { padding-bottom: 70px; }
h1 { font-size: 28px; line-height: 1.3; margin: 26px 0 10px; }
h2 { font-size: 20px; margin-top: 34px; }
p, li { color: #57503f; }
a { color: var(--accent); }
ol.steps, ul { padding-left: 24px; }
ol.steps li, ul li { margin: 9px 0; }
dl.faq dt { font-weight: 700; margin-top: 18px; color: var(--ink); }
dl.faq dd { margin: 3px 0 0; color: var(--dim); }
.trust {
  margin-top: 44px;
  padding: 14px 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--dim);
  font-size: 15px;
}
.cta {
  display: inline-block;
  background: var(--soft);
  border: 2px solid var(--ink);
  border-radius: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  padding: 10px 22px;
  margin: 18px 0 6px;
}
.cta:hover { background: #ffffff; }
.ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.soon { color: var(--dim); font-size: 15px; }

footer.site {
  text-align: center;
  color: var(--dim);
  font-size: 14px;
  padding: 26px;
  border-top: 1px solid var(--line);
}
footer.site em { font-style: normal; color: var(--accent); }

/* Quick-tool pages */
#tool-root { max-width: 760px; margin: 0 auto; padding: 0 22px 30px; }
.panel {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.panel h2 { margin: 0 0 12px; font-size: 17px; }
.dropzone {
  border: 2px dashed var(--dim);
  border-radius: 12px;
  padding: 34px 18px;
  text-align: center;
  color: var(--dim);
  white-space: pre-line;
  margin-bottom: 12px;
}
.dropzone button { display: block; margin: 12px auto 0; }
.slot2-label { font-size: 14px; color: var(--dim); margin: 14px 0 6px; }
.fileinfo { font-size: 14px; color: var(--dim); margin-bottom: 10px; overflow-wrap: anywhere; }
#preview-media, img#preview-media { display: block; max-width: 100%; max-height: 340px; margin: 0 auto 12px; border-radius: 8px; background: #000; }
video#preview-media, audio#preview-media { width: 100%; }

/* Overlay-image placement editor: image box dragged directly on the preview */
.overlay-stage { position: relative; width: fit-content; max-width: 100%; margin: 0 auto 12px; }
.overlay-stage > #preview-media { margin: 0; width: auto; max-width: 100%; max-height: 420px; }
.overlay-box { position: absolute; cursor: move; touch-action: none; outline: 2px solid var(--accent); outline-offset: -1px; border-radius: 2px; }
.overlay-box img { display: block; width: 100%; height: 100%; pointer-events: none; }
.overlay-handle { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid var(--soft); cursor: nwse-resize; touch-action: none; }
.field { margin-bottom: 12px; }
.field label { display: flex; justify-content: space-between; color: var(--dim); font-size: 14px; margin-bottom: 2px; }
.field input[type="range"] { width: 100%; }
.actions { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.plainlink { color: var(--accent); font-size: 14px; }
.status { margin-top: 8px; color: var(--dim); font-size: 14px; }
.status progress { width: 100%; }
.histrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.histrow span { flex: 1; }
.histrow button { font-size: 13px; padding: 3px 9px; }
.histrow a { color: var(--accent); font-size: 13px; }
.filelist { margin-bottom: 10px; }
.clearbtn { font-size: 12px; padding: 2px 8px; margin-bottom: 8px; color: var(--dim); }
.clearbtn:hover { color: var(--ink); }

/* Crop tool overlay */
.crop-preview {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 auto 12px;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  touch-action: none;
}
.crop-preview video, .crop-preview img { display: block; width: 100%; height: auto; }
.crop-rect {
  position: absolute;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  border: 2px solid #fff;
  cursor: move;
  touch-action: none;
}
.crop-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 1px solid #444;
  border-radius: 3px;
}
.crop-handle-nw { left: -8px; top: -8px; cursor: nwse-resize; }
.crop-handle-ne { right: -8px; top: -8px; cursor: nesw-resize; }
.crop-handle-sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.crop-handle-se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.crop-inputs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}
.crop-inputs label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: var(--dim);
}
.crop-inputs input { width: 100%; }
.field select {
  font: inherit;
  padding: 7px 8px;
  color: var(--ink);
  background: var(--paper, #fff);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.panel.result { border-color: var(--accent); }
.panel.result h2 { color: var(--accent); }
.panel.result video, .panel.result img { display: block; max-width: 100%; max-height: 380px; margin: 0 auto 12px; border-radius: 8px; background: #000; }
.panel.result audio { width: 100%; }
ul.tools-list { list-style: none; padding: 0; max-width: 34em; }
ul.tools-list li { margin: 10px 0; font-size: 17px; }
ul.tools-list a { font-weight: 700; }
.crop-preview { min-height: 120px; }
.overlay-stage { position: relative; overflow: hidden; min-height: 120px; }
.overlay-stage video, .overlay-stage img { display: block; width: 100%; height: auto; }
.overlay-box video { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }

/* Trim tool: filmstrip range selector */
.trim-strip { position: relative; height: 72px; margin: 10px 0; overflow: hidden; border-radius: 4px; background: #16181d; touch-action: none; cursor: crosshair; }
.trim-thumbs { display: flex; height: 100%; gap: 2px; }
.trim-thumb { flex: 1; min-width: 0; height: 100%; object-fit: cover; background: #222; }
.trim-sel { position: absolute; top: 0; bottom: 0; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.62); outline: 2px solid var(--accent); outline-offset: -2px; }
.trim-handle { position: absolute; top: 0; bottom: 0; width: 20px; margin-left: -10px; cursor: ew-resize; }
.trim-handle::before { content: ''; position: absolute; top: 0; bottom: 0; left: 7px; right: 7px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55); }
.trim-handle::after { content: ''; position: absolute; top: 50%; left: 1px; right: 1px; height: 24px; transform: translateY(-50%); background-color: #fff; background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)); background-size: 10px 2px; background-repeat: no-repeat; background-position: center; border-radius: 5px; border: 1px solid rgba(0, 0, 0, 0.55); box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5); }
.trim-handle:hover::after { background-color: var(--accent); }
.trim-play { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); opacity: 0.95; }
.trim-times { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.trim-times span { color: var(--dim); font-size: 14px; }
.trim-times input { width: 88px; }

/* Waveform visualizer live preview */
.wave-preview { display: block; margin: 10px auto; max-width: 100%; max-height: 420px; width: auto; height: auto; background: #000; border-radius: 4px; cursor: pointer; }

/* Visualizer: Visualization + Video Resolution selects */
.viz-fields { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.viz-fields .field { flex: 1; min-width: 200px; margin-bottom: 0; }
.field select { width: 100%; font: inherit; padding: 6px 8px; }
.field input[type="color"] { width: 100%; height: 36px; padding: 2px 4px; cursor: pointer; }
