/* Papertrail — editorial paper & ink skin, original to this project. */

:root {
  --paper: #f6f3ec;
  --paper-deep: #efeae0;
  --surface: #fffdf8;
  --ink: #161a1d;
  --ink-soft: #2c3237;
  --muted: #5d666c;
  --line: #e2dbcd;
  --line-strong: #cdc5b4;
  --accent: #b8431e;
  --accent-dark: #933414;
  --accent-tint: #f6e6dd;
  --teal: #1f6f63;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(22, 26, 29, .04), 0 20px 45px -30px rgba(22, 26, 29, .35);
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.1;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; }
b, strong { font-weight: 650; }
svg { display: block; }

.wrap {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark { color: var(--ink); display: grid; place-items: center; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.site-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: .9rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .18s, border-color .18s;
}

.site-nav a:hover { color: var(--ink); border-color: var(--accent); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 24px;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}

.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-small { padding: 9px 18px; font-size: .85rem; }
.btn-block { width: 100%; }

.btn-ink {
  background: var(--ink);
  color: var(--surface);
}
.btn-ink:hover { background: var(--ink-soft); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px -12px rgba(184, 67, 30, .8);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }

.btn:disabled {
  cursor: not-allowed;
  background: #ddd6c8;
  color: #857f72;
  box-shadow: none;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
  gap: 64px;
  align-items: start;
  padding-block: 72px 84px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -68px -120px auto auto;
  width: 620px;
  height: 520px;
  background:
    radial-gradient(closest-side, rgba(184, 67, 30, .09), transparent 72%),
    radial-gradient(closest-side, rgba(31, 111, 99, .07), transparent 70%);
  background-position: 0 0, 180px 160px;
  background-size: 520px, 420px;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: -1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.eyebrow-rule {
  display: inline-block;
  width: 26px;
  height: 1.5px;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.5rem);
  max-width: 22ch;
}

.hero h1 em {
  display: block;
  font-style: italic;
  color: var(--accent-dark);
  margin-top: 4px;
}

.lede {
  margin-top: 24px;
  max-width: 54ch;
  font-size: 1.06rem;
  color: var(--ink-soft);
}

.hero-points {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  gap: 13px;
  max-width: 56ch;
}

.hero-points li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  font-size: .95rem;
  color: var(--ink-soft);
}

.hero-points svg {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--teal);
}

.privacy-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  max-width: 56ch;
  font-size: .82rem;
  color: var(--muted);
}

.privacy-line svg { width: 17px; height: 17px; color: var(--teal); flex: none; }

/* ---------- Tool card ---------- */

.tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 26px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 92px;
}

.tool-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.tool-card-head h2 {
  font-size: 1.35rem;
}

.limit-pill {
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.experimental-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .62rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}

.experimental-pill svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(-45deg, rgba(22, 26, 29, .018) 0 10px, transparent 10px 20px),
    var(--paper);
  padding: 30px 22px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s, background-color .18s;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-dragging {
  border-color: var(--accent);
  background-color: var(--accent-tint);
  outline: none;
}

.dz-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  color: var(--ink-soft);
}

.dz-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 650;
}

.dz-sub {
  margin-top: 4px;
  font-size: .82rem;
  color: var(--muted);
}

.dz-browse {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.file-icon { width: 26px; height: 26px; color: var(--accent-dark); flex: none; }
.file-meta { display: grid; min-width: 0; line-height: 1.35; }
.file-meta strong {
  font-size: .88rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-meta span { font-size: .76rem; color: var(--muted); }

.icon-btn {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex: none;
}
.icon-btn:hover { background: var(--paper-deep); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }

.mode {
  border: none;
  padding: 0;
  margin: 20px 0 18px;
}

.mode legend {
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
}

.mode-grid { display: grid; gap: 9px; }

.mode-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 11px;
  align-items: start;
  text-align: left;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color .16s, background-color .16s;
}

.mode-option:hover { border-color: var(--line-strong); }

.mode-option[aria-checked="true"] {
  border-color: var(--ink);
  background: #fbf8f1;
  box-shadow: inset 0 0 0 1px var(--ink);
}

.mode-radio {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  position: relative;
}

.mode-option[aria-checked="true"] .mode-radio { border-color: var(--accent); }
.mode-option[aria-checked="true"] .mode-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}

.mode-text { display: grid; gap: 1px; }
.mode-text strong { font-size: .9rem; font-weight: 650; }
.mode-text small { font-size: .78rem; color: var(--muted); line-height: 1.45; }

.status { margin-top: 14px; }
.progress {
  height: 5px;
  border-radius: 999px;
  background: var(--paper-deep);
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #d9764d);
  animation: slide 1.25s ease-in-out infinite;
}
@keyframes slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(310%); }
}
.status p {
  margin-top: 8px;
  font-size: .8rem;
  color: var(--muted);
}

.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid #e6c3b4;
  border-radius: var(--radius-sm);
  background: #fbeee8;
  color: #7d2c11;
  font-size: .84rem;
}
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert[hidden] { display: none; }

.result {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #cfe0d5;
  border-radius: var(--radius);
  background: #f1f7f2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}
.result[hidden] { display: none; }

.result-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: grid;
  place-items: center;
}
.result-icon svg { width: 20px; height: 20px; }
.result-body { display: grid; gap: 2px; min-width: 0; }
.result-body strong { font-size: .92rem; }
.result-body p { font-size: .78rem; color: #46695c; }

.result .linkish {
  grid-column: 1 / -1;
  justify-self: start;
}

.linkish {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: .8rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.linkish:hover { color: var(--ink); }

.tool-foot {
  margin-top: 16px;
  text-align: center;
  font-size: .72rem;
  color: var(--muted);
}

/* ---------- Sections ---------- */

.section { padding-block: 88px; }

.section-tint {
  background: var(--paper-deep);
  border-block: 1px solid var(--line);
}

.section-head { max-width: 60ch; margin-bottom: 44px; }

.section-head .eyebrow { margin-bottom: 14px; }

.section-head h2 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
}

.section-lede {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1rem;
}

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: border-color .18s, transform .18s;
}

.feature:hover { border-color: var(--line-strong); transform: translateY(-2px); }

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.feature-icon svg { width: 28px; height: 28px; }

.feature h3 { font-size: 1.18rem; margin-bottom: 8px; }
.feature p { font-size: .9rem; color: var(--muted); }

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  counter-reset: step;
}

.steps li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.step-no {
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .1em;
}

.step-art {
  margin: 14px 0 16px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 10px;
}
.step-art svg { width: 100%; height: auto; }

.steps h3 { font-size: 1.08rem; margin-bottom: 6px; }
.steps p { font-size: .87rem; color: var(--muted); }

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: 10px;
  max-width: 860px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0 20px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 0;
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 650;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform .18s;
  line-height: 1;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p {
  padding: 0 0 18px;
  font-size: .92rem;
  color: var(--muted);
  max-width: 72ch;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 34px;
  background: var(--paper);
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--muted);
}

.brand-footer .brand-name { font-size: 1.05rem; }

.footer-inner nav {
  margin-left: auto;
  display: flex;
  gap: 20px;
}

.footer-inner a { text-decoration: none; }
.footer-inner nav a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding-block: 52px 68px; }
  .hero h1 { max-width: 20ch; }
  .tool-card { position: static; max-width: 620px; }
  .hero::before { display: none; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .wrap { width: min(100% - 32px, 1180px); }
  .header-inner { gap: 14px; height: 62px; }
  .site-nav { display: none; }
  .header-inner > .btn { margin-left: auto; }
  .hero { padding-block: 40px 56px; }
  .hero h1 { font-size: clamp(2.1rem, 9vw, 2.7rem); }
  .hero h1 em { white-space: normal; }
  .lede { font-size: 1rem; }
  .tool-card { padding: 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .section { padding-block: 60px; }
  .section-head { margin-bottom: 30px; }
  .result { grid-template-columns: auto 1fr; }
  .result .btn { grid-column: 1 / -1; justify-self: stretch; }
  .footer-inner nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .progress span { animation: none; width: 100%; opacity: .6; }
  .feature:hover { transform: none; }
}
