/* TheBlackoutFiles
   Idea: an archive drawer of folder tabs. Cool field-paper ground, deep green ink,
   manila tabs as the one bold element, signal red used only for "offline". */

/* Fonts are self-hosted (no Google Fonts requests -> no GDPR issue). SIL Open Font License. */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-italic.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #e4e6df;
  --paper-2: #eef0ea;
  --ink: #1d2a25;
  --ink-soft: #46524b;
  --manila: #d8b76a;
  --manila-dark: #b8964a;
  --moss: #56634a;
  --signal: #a83a2c;
  --line: #c3c8bc;

  --sans: "Archivo", "Arial Narrow", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: 2.5rem;
  --step-4: clamp(2.6rem, 6.2vw, 4.9rem);

  --wrap: 72rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.6;
}

a { color: var(--ink); text-underline-offset: 0.18em; }
a:hover { color: var(--moss); }

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--sans);
  line-height: 1.05;
  margin: 0 0 0.5em;
}

h2 {
  font-size: var(--step-3);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--step-1);
  font-weight: 700;
}

p { margin: 0 0 1em; max-width: 36em; }

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

/* ---------- top bar ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
}

.wordmark {
  font-family: var(--sans);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.status::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgb(168 58 44 / 0.18);
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
  padding: clamp(2rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
}

.hero h1 {
  font-size: var(--step-4);
  font-weight: 800;
  font-stretch: 118%;
  letter-spacing: -0.025em;
  line-height: 0.98;
  margin-bottom: 0.45em;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
}

.buy {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 1rem 1.6rem;
  background: var(--ink);
  color: var(--paper-2);
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--step-1);
  text-decoration: none;
  border-radius: 3px;
  transition: background-color 0.15s ease;
}

.buy:hover { background: var(--moss); color: var(--paper-2); }

.buy-note {
  margin-top: 0.85rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* the drawer: folder tabs */

.drawer {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.drawer li {
  position: relative;
  margin-top: -0.55rem;
  padding: 0.95rem 1.1rem 1.35rem;
  background: var(--manila);
  border: 1px solid var(--manila-dark);
  border-radius: 6px 6px 0 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--step-0);
  box-shadow: 0 -1px 0 rgb(255 255 255 / 0.35) inset;
}

/* each tab sits at a different offset, like a real index drawer */
.drawer li:nth-child(3n + 1) { margin-right: 22%; }
.drawer li:nth-child(3n + 2) { margin-left: 11%; margin-right: 11%; }
.drawer li:nth-child(3n + 3) { margin-left: 22%; }

.drawer li:nth-child(even) { background: #dcbf7a; }
.drawer li:last-child { padding-bottom: 1.1rem; border-radius: 6px; }

.drawer span {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--step--1);
  color: #5b4a22;
}

@media (prefers-reduced-motion: no-preference) {
  .drawer li {
    animation: file-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(var(--i) * 70ms + 150ms);
  }
  @keyframes file-in {
    from { transform: translateY(1.2rem); opacity: 0; }
    to { transform: none; opacity: 1; }
  }
}

/* ---------- sections ---------- */

.band {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  border-top: 1px solid var(--line);
}

.band--light { background: var(--paper-2); }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 5vw, 4rem);
}

.topics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2rem;
}

.topics li {
  padding-left: 1rem;
  border-left: 4px solid var(--manila);
}

.topics h3 { margin-bottom: 0.25rem; }
.topics p { margin: 0; color: var(--ink-soft); font-size: var(--step--1); }

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

.steps li { counter-increment: step; }

.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--sans);
  font-weight: 800;
  font-stretch: 125%;
  font-size: var(--step-3);
  line-height: 1;
  color: var(--manila-dark);
  margin-bottom: 0.5rem;
}

.steps p { color: var(--ink-soft); }

/* price block */

.price {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  padding: clamp(1.75rem, 4vw, 3rem);
  background: var(--ink);
  color: var(--paper-2);
  border-radius: 6px;
}

.price h2 { color: var(--paper-2); }
.price p { color: #c9d0c6; }

.price-tag {
  font-family: var(--sans);
  font-weight: 800;
  font-stretch: 118%;
  font-size: var(--step-4);
  line-height: 1;
  margin-bottom: 1rem;
}

.price .buy { background: var(--manila); color: var(--ink); }
.price .buy:hover { background: #e7c97f; color: var(--ink); }
.price .buy-note { color: #c9d0c6; }

.price ul { margin: 0; padding-left: 1.1rem; }
.price li { margin-bottom: 0.35rem; }

/* FAQ */

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
  max-width: 48rem;
}

.faq summary {
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--step-1);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0.75rem 0 0; color: var(--ink-soft); }

/* footer */

.site-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 2rem 1.25rem 3rem;
  justify-content: center;
  font-family: var(--sans);
  font-size: var(--step--1);
  border-top: 1px solid var(--line);
}

.site-foot a { color: var(--ink-soft); }

/* ---------- simple pages (legal + download page) ---------- */

.app-head { padding: 1.25rem; width: min(100%, 46rem); margin-inline: auto; }

.app-main {
  width: min(100% - 2.5rem, 42rem);
  margin: 1rem auto 4rem;
}

.app-main h1 {
  font-size: var(--step-3);
  font-weight: 800;
  font-stretch: 112%;
}

.app-main h2 { font-size: var(--step-2); margin-top: 2rem; }

.files {
  list-style: none;
  margin: 1.5rem 0 0.75rem;
  padding: 0;
  border-top: 1px solid var(--line);
}

.files li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--line);
}

.files a { font-family: var(--sans); font-weight: 700; }
.files span { color: var(--ink-soft); white-space: nowrap; }

.total, .small { font-size: var(--step--1); color: var(--ink-soft); }
.tips li { margin-bottom: 0.4rem; }

.todo {
  background: #f3e3b8;
  border-left: 4px solid var(--manila-dark);
  padding: 0.75rem 1rem;
  font-size: var(--step--1);
}

/* ---------- responsive ---------- */

@media (max-width: 52rem) {
  .hero, .two-col, .price { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero { align-items: start; }
}

@media (max-width: 36rem) {
  .topics { grid-template-columns: 1fr; }
  .drawer li:nth-child(n) { margin-left: 0; margin-right: 0; }
  .drawer li:nth-child(3n + 2) { margin-left: 6%; }
  .drawer li:nth-child(3n + 3) { margin-left: 12%; }
}

/* ================= conversion rework additions ================= */

.hero-copy h1 { max-width: 13em; }

.questions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.questions li {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--step-1);
  line-height: 1.3;
  padding: 0.9rem 1rem 0.9rem 1.1rem;
  background: var(--paper);
  border-left: 4px solid var(--manila);
  border-radius: 0 4px 4px 0;
}

/* folder window mock (replace with a real screenshot later) */
.finder {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 14px 30px -18px rgb(29 42 37 / 0.45);
  font-family: var(--sans);
}

.finder-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  background: #d6d9d0;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-soft);
}

.finder-bar span {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #b9bdb2;
}

.finder-bar span:last-of-type { margin-right: 0.5rem; }

.finder ul { list-style: none; margin: 0; padding: 0.4rem 0; }

.finder li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  font-weight: 500;
}

.finder li::before {
  content: "";
  flex: none;
  width: 1.4rem;
  height: 1.05rem;
  background: var(--manila);
  border-radius: 2px 5px 2px 2px;
  box-shadow: inset 0 3px 0 var(--manila-dark);
}

.finder li:nth-child(odd) { background: rgb(216 183 106 / 0.12); }

.samples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.samples img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; }
.samples figcaption { font-size: var(--step--1); color: var(--ink-soft); margin-top: 0.4rem; }
.shot { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }

/* price block, reworked */
.price { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }

.price .checks { list-style: none; margin: 0; padding: 0; }

.checks li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.6rem;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.45em;
  width: 0.75rem;
  height: 0.4rem;
  border-left: 2px solid var(--manila);
  border-bottom: 2px solid var(--manila);
  transform: rotate(-45deg);
}

.price-side { padding-left: clamp(0rem, 3vw, 2rem); border-left: 1px solid rgb(242 239 228 / 0.18); }
.price-tag { margin-bottom: 0.25rem; }
.price-sub { margin-bottom: 1.25rem; }
.price .buy { width: 100%; text-align: center; }

.before {
  margin: 1.75rem 0 0;
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--step-1);
  max-width: none;
}

/* sticky buy bar (phones only) */
.sticky-buy {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  background: var(--ink);
  color: var(--paper-2);
  font-family: var(--sans);
  box-shadow: 0 -8px 20px -10px rgb(0 0 0 / 0.4);
}

.sticky-buy[hidden] { display: none; }
.sticky-buy .buy { margin: 0; padding: 0.75rem 1.1rem; font-size: var(--step-0); background: var(--manila); color: var(--ink); }

@media (min-width: 52.01rem) {
  .sticky-buy { display: none !important; }
}

/* phone-first hero: headline, price and button on the first screen */
@media (max-width: 52rem) {
  .hero { padding-top: 0.75rem; gap: 2rem; }
  .hero h1 { font-size: clamp(2.1rem, 9.4vw, 3.2rem); font-stretch: 108%; }
  .lede { font-size: var(--step-0); }
  .buy-row .buy { display: block; text-align: center; }
  .drawer span { display: none; }
  .drawer li { padding: 0.75rem 1rem 1.05rem; }
  .price { grid-template-columns: 1fr; }
  .price h2 { font-size: var(--step-2); }
  .price-side { padding-left: 0; border-left: 0; }
  .samples { grid-template-columns: 1fr 1fr; }
  .site-foot { padding-bottom: 6rem; }
}

/* private stats page */
.stats { width: 100%; border-collapse: collapse; font-family: var(--sans); margin-top: 1rem; }
.stats th, .stats td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.stats tfoot td { font-weight: 700; }
