/* put-that-there.com — one stylesheet for the marketing page, the app, and the
   server-rendered download pages. Light and dark both first-class. */

:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f2efe9;
  --ink: #1a1917;
  --ink-soft: #5f5a51;
  --line: #e2ddd3;
  --accent: #d9531e;
  --accent-ink: #ffffff;
  --danger: #b4231b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(26, 25, 23, 0.06), 0 8px 24px rgba(26, 25, 23, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14140f;
    --surface: #1d1d18;
    --surface-2: #262620;
    --ink: #f2efe6;
    --ink-soft: #a8a294;
    --line: #34342c;
    --accent: #ff7a45;
    --accent-ink: #1a1108;
    --danger: #ff6b5e;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 5vw, 48px);
  border-bottom: 1px solid var(--line);
}

.topbar nav { display: flex; align-items: center; gap: 12px; }

.wordmark {
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  font-size: 18px;
}

.wordmark span { color: var(--accent); }

.who { color: var(--ink-soft); font-size: 14px; }

.hero {
  max-width: 720px;
  margin: clamp(48px, 10vw, 96px) auto 0;
  padding: 0 clamp(16px, 5vw, 48px);
  text-align: center;
}

.hero h1 {
  font-size: clamp(40px, 8vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
}

.hero h1 em { color: var(--accent); font-style: normal; }

.lede { font-size: clamp(17px, 2.4vw, 20px); color: var(--ink-soft); margin: 0 0 28px; }

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-width: 1000px;
  margin: clamp(40px, 8vw, 80px) auto;
  padding: 0 clamp(16px, 5vw, 48px);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card h2 { font-size: 17px; margin: 0 0 8px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }

.meta { color: var(--ink-soft); font-size: 14px; }
.meta.small { font-size: 13px; }
.meta.revoked { color: var(--danger); }

.button, .btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-ink);
}

.button.small { padding: 7px 14px; font-size: 14px; }
.btn { padding: 7px 12px; font-size: 14px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost, .button.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn.danger { background: transparent; color: var(--danger); border-color: var(--line); }
.btn:disabled { opacity: 0.5; cursor: progress; }

.app {
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) clamp(16px, 5vw, 48px) 80px;
}

.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(28px, 6vw, 56px) 24px;
  text-align: center;
  transition: border-color 120ms ease, background 120ms ease;
}

.dropzone.hot { border-color: var(--accent); background: var(--surface-2); }
.dropzone-title { font-size: 20px; font-weight: 650; margin: 0 0 6px; }
.dropzone .meta { margin: 0; }

.linklike { color: var(--accent); cursor: pointer; text-decoration: underline; }

.expiry { margin-top: 18px; font-size: 14px; color: var(--ink-soft); }
.expiry select {
  font: inherit;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

/* Question gate: setup in the dropzone, editor on a file row, and the public
   answer form on the download page. */
.gate-setup { margin-top: 16px; font-size: 14px; }
.checkline { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); cursor: pointer; }
.gate-fields, .gate-form { display: grid; gap: 8px; margin-top: 12px; text-align: left; }
.gate-fields input, .gate-form input, .gate-input {
  font: inherit;
  font-size: 14px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
}
.gate-fields input { max-width: 520px; margin: 0 auto; }
.gate-form { margin-top: 12px; }
.gate-form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gate-form .meta { margin: 0; }
.meta.gated { margin-top: 6px; color: var(--accent); }

.gate-question { font-size: 21px; line-height: 1.3; margin: 0 0 18px; overflow-wrap: anywhere; }
.gate-input { margin-bottom: 12px; text-align: center; }
.gate-error { color: var(--danger); font-size: 14px; margin: 14px 0 0; }

.quota { margin: 20px 0 8px; }
.quota-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  border: 1px solid var(--line);
}
.quota-bar span { display: block; height: 100%; width: 0; background: var(--accent); }
.quota .meta { margin: 6px 0 0; }

.uploads, .files { list-style: none; margin: 0; padding: 0; }

.upload {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 12px;
}

.upload.failed { border-color: var(--danger); }
.upload .file-name { margin: 0 0 8px; }
.upload .meta { margin: 6px 0 0; }

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 120ms linear;
}

.section-title { font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); margin: 34px 0 12px; }

.file {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.file-main { min-width: 260px; flex: 1 1 320px; }
.file-name { font-weight: 620; margin: 0 0 4px; overflow-wrap: anywhere; }
.file-main .meta { margin: 0; }

.sharelink {
  margin-top: 10px;
  width: 100%;
  font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

.file-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.empty { color: var(--ink-soft); padding: 18px 2px; }

/* Server-rendered download + error pages */
body.centered {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
}

body.centered .card, body.centered main {
  max-width: 520px;
  width: 100%;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow);
}

.eyebrow { text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; color: var(--ink-soft); margin: 0 0 10px; }
.filename { font-size: 24px; margin: 0 0 8px; overflow-wrap: anywhere; }
body.centered .button { margin: 18px 0 10px; }

footer, .sitefoot {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 24px;
  color: var(--ink-soft);
  font-size: 14px;
}
