/* Recently Deleted: support and privacy pages.
   The game's "desk" world: dark wood under one warm light, paper and manila on top,
   serif body and typewriter labels, one red for stamps and pencil. Tokens mirror
   App/Menus/MenuDesign.swift (Desk) and App/Design/Aster.swift (CaseFile).
   Shape rule (same as the app): paper things have 3px corners; phone screens keep
   the device's own radius. Always dark, like the game. */

:root {
  color-scheme: dark;

  --desk: #0c0b0a;
  --wood: #1a1512;
  --wood-light: #2a211b;
  --chalk: #ede6d8;
  --chalk-soft: rgba(237, 230, 216, 0.74);
  --chalk-faint: rgba(237, 230, 216, 0.5);
  --hairline: rgba(237, 230, 216, 0.14);

  --paper: #f3eee3;
  --paper-deep: #e8e0cf;
  --manila: #d8c29a;
  --manila-deep: #c4ac80;
  --cardboard: #5e4e3c;
  --cardboard-deep: #4b3e30;
  --ink: #2a2622;
  --ink-soft: rgba(42, 38, 34, 0.72);
  --rule: rgba(42, 38, 34, 0.14);
  --red: #b23a3a;
  --red-on-desk: #e27a6f;
  --glow: #b9ccf2;

  --serif: ui-serif, "Newsreader", "New York", Georgia, serif;
  --typed: "Courier Prime", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 3px;
  --gutter: clamp(16px, 4vw, 32px);
  --page: 1120px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--desk);
  background-image:
    radial-gradient(120% 70% at 50% -10%, rgba(74, 58, 44, 0.62), rgba(26, 21, 18, 0.35) 45%, transparent 75%),
    linear-gradient(180deg, var(--wood) 0%, var(--desk) 60%);
  background-repeat: no-repeat;
  color: var(--chalk);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* Film grain on the desk: a fixed, non-interactive layer so scrolling never repaints it. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body > * { position: relative; z-index: 1; }

img { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: currentColor;
  transition: text-decoration-color 160ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-color: var(--red-on-desk); }
  .paper a:hover,
  .sheet a:hover { text-decoration-color: var(--red); }
}

:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--typed);
  font-weight: 700;
  border-radius: var(--radius);
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }

.typed {
  font-family: var(--typed);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  min-height: 44px;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--hairline);
}

.topbar nav {
  display: flex;
  gap: 4px;
}
.topbar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 10px;
  color: var(--chalk-soft);
  text-decoration: none;
  font-family: var(--typed);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.topbar nav a[aria-current="page"] { color: var(--chalk); }
@media (hover: hover) and (pointer: fine) {
  .topbar nav a:hover { color: var(--chalk); }
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
  padding-block: clamp(24px, 5vw, 64px) clamp(56px, 8vw, 104px);
}

.stamp {
  display: inline-block;
  margin-bottom: 22px;
  padding: 6px 12px 5px;
  border: 2px solid currentColor;
  border-radius: var(--radius);
  color: var(--red-on-desk);
  font-family: var(--typed);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(-3deg);
  transform-origin: left center;
}

.hero h1 {
  font-size: clamp(2.25rem, 5.2vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.hero .lede {
  margin: 22px 0 30px;
  max-width: 36ch;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.5;
  color: var(--chalk-soft);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 10px 24px -12px rgba(0, 0, 0, 0.8);
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: #fffaf0; }
}
.button svg { width: 16px; height: 16px; }

/* The phone on the desk, lit by its own screen, with its evidence tag. */
.evidence {
  position: relative;
  justify-self: center;
  width: min(100%, 320px);
  padding: 8px 0 56px;
}
.evidence::before {
  content: "";
  position: absolute;
  inset: -12% -30% 0;
  background: radial-gradient(closest-side, rgba(185, 204, 242, 0.16), transparent 72%);
  pointer-events: none;
}

.phone {
  position: relative;
  margin: 0;
  padding: 9px;
  border-radius: 46px;
  background: linear-gradient(160deg, #26272b, #0f1012 55%, #1b1c20);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 40px 60px -30px rgba(0, 0, 0, 0.9),
    0 18px 30px -18px rgba(0, 0, 0, 0.7);
  transform: rotate(-4deg);
}
.phone img {
  width: 100%;
  aspect-ratio: 660 / 1434;
  border-radius: 38px;
  background: #0e0f13;
}

.tag {
  position: absolute;
  left: -34px;
  bottom: 4px;
  width: 196px;
  padding: 14px 16px 12px 30px;
  background: var(--manila);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 14px 24px -14px rgba(0, 0, 0, 0.85);
  transform: rotate(5deg);
  line-height: 1.3;
}
.tag::before {
  /* the eyelet the string goes through */
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--desk);
  box-shadow: 0 0 0 3px var(--manila-deep);
}
.tag strong {
  display: block;
  color: var(--red);
  font-family: var(--typed);
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
}
.tag em {
  display: block;
  margin: 3px 0 2px;
  font-size: 0.9375rem;
}
.tag span {
  display: block;
  font-family: var(--typed);
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

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

.section { padding-block: clamp(56px, 8vw, 104px); }

.section-title {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  max-width: 22ch;
}
.section-intro {
  margin: 14px 0 0;
  max-width: 58ch;
  color: var(--chalk-soft);
  font-size: 1.125rem;
}

/* How a case works: a typed report on the left, two screens on the right. */
.method {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  margin-top: 40px;
}

.paper {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 30px 50px -30px rgba(0, 0, 0, 0.95),
    0 8px 18px -10px rgba(0, 0, 0, 0.6);
}

.report {
  margin: 0;
  padding: clamp(24px, 4vw, 40px);
  transform: rotate(-0.6deg);
}
.report-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
}
.report ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.report li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
}
.report li + li { padding-top: 4px; }
.report .typed { color: var(--red); padding-top: 0.28em; }
.report p { margin: 0; font-size: 1.0625rem; line-height: 1.55; }

.screens {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 470px;
  justify-self: center;
  width: 100%;
}
.screens figure { margin: 0; }
.screens figure:nth-child(2) { margin-top: 64px; }
.screen {
  padding: 6px;
  border-radius: 32px;
  background: #121316;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 30px 44px -26px rgba(0, 0, 0, 0.95);
}
.screen img {
  width: 100%;
  aspect-ratio: 660 / 1434;
  border-radius: 27px;
  background: #0e0f13;
}
.screens figcaption {
  margin-top: 12px;
  color: var(--chalk-faint);
  font-size: 0.9375rem;
  font-style: italic;
  text-align: center;
}

/* The cases: folders stacked on the desk, like the app's case list. */
.folders {
  display: grid;
  gap: 18px;
  margin-top: 56px;
  max-width: 880px;
}

.folder {
  position: relative;
  margin-top: 26px;
  padding: 26px clamp(20px, 4vw, 36px) 24px;
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  background: var(--manila);
  color: var(--ink);
  box-shadow: 0 24px 36px -26px rgba(0, 0, 0, 0.95);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 28px;
  align-items: center;
}
.folder::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 0;
  width: 132px;
  height: 25px;
  background: inherit;
  border-radius: var(--radius) var(--radius) 0 0;
}
.folder .no {
  position: absolute;
  top: -19px;
  left: 20px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}
.folder[data-tab="2"] { border-radius: var(--radius); }
.folder[data-tab="2"]::before { left: calc(50% - 66px); }
.folder[data-tab="2"] .no { left: calc(50% - 46px); }
.folder[data-tab="3"] { border-radius: var(--radius) 0 var(--radius) var(--radius); }
.folder[data-tab="3"]::before { left: auto; right: 0; }
.folder[data-tab="3"] .no { left: auto; right: 42px; }

.folder h3 { font-size: clamp(1.375rem, 2.6vw, 1.75rem); }
.folder .line {
  margin: 6px 0 10px;
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.45;
  max-width: 48ch;
}
.folder .meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--ink-soft);
}
.folder .price {
  grid-column: 2;
  grid-row: 1 / span 3;
  justify-self: end;
}

.folder.locked {
  background: linear-gradient(180deg, var(--cardboard) 0%, var(--cardboard-deep) 100%);
  color: var(--chalk);
}
.folder.locked::before { background: var(--cardboard); }
.folder.locked .no,
.folder.locked .meta { color: var(--chalk-soft); }

.free {
  display: inline-block;
  padding: 7px 14px 6px;
  border: 2px solid var(--red);
  border-radius: var(--radius);
  color: var(--red);
  font-family: var(--typed);
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 1rem;
  text-transform: uppercase;
  transform: rotate(-6deg);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--typed);
  font-weight: 700;
  font-size: 0.9375rem;
  white-space: nowrap;
}
.chip svg { width: 13px; height: 13px; }

.pass {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 28px;
  align-items: center;
  max-width: 880px;
  margin-top: 12px;
  padding: 22px clamp(20px, 4vw, 36px);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--red-on-desk);
  border-radius: var(--radius);
  background: rgba(26, 21, 18, 0.6);
}
.pass h3 { font-size: 1.3125rem; }
.pass p { margin: 4px 0 0; color: var(--chalk-soft); max-width: 54ch; }
.fine {
  margin-top: 22px;
  color: var(--chalk-faint);
  font-size: 0.9375rem;
}

/* House rules: plain statements on the desk, two columns. */
.rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px clamp(32px, 6vw, 72px);
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid var(--hairline);
  max-width: 980px;
}
.rules h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.rules p { margin: 0; color: var(--chalk-soft); max-width: 44ch; }

/* Help: one sheet of paper with questions that open in place. */
.sheet {
  margin-top: 40px;
  max-width: 820px;
  padding: clamp(22px, 4vw, 44px);
}
.contact {
  margin: 0 0 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule);
  font-size: 1.125rem;
}
.contact a { font-weight: 600; }

.faq details { border-bottom: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 200ms var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq .answer { padding: 0 0 18px; max-width: 62ch; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Document pages (privacy) ---------- */

.doc {
  max-width: 800px;
  margin: 8px auto 0;
  padding: clamp(24px, 5vw, 56px);
}
.doc h1 { font-size: clamp(2rem, 4.6vw, 2.75rem); }
.doc .dated {
  margin: 10px 0 28px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}
.doc h2 {
  margin: 38px 0 12px;
  font-size: 1.375rem;
}
.doc p,
.doc li { font-size: 1.0625rem; line-height: 1.65; }
.doc ul { margin: 0 0 1em; padding-left: 1.2em; }
.doc li { margin-bottom: 0.45em; }
.doc li::marker { color: var(--red); }

.brief {
  margin: 0 0 8px;
  padding: 20px 22px 6px;
  background: var(--paper-deep);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
}
.brief .typed { display: block; margin-bottom: 10px; color: var(--red); }

.signals {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 10px 20px;
  margin: 16px 0 20px;
}
.signals dt {
  font-family: var(--typed);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 0.3em;
}
.signals dd { margin: 0; }

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

.footer {
  margin-top: clamp(40px, 6vw, 72px);
  padding-block: 28px 40px;
  border-top: 1px solid var(--hairline);
  color: var(--chalk-faint);
  font-size: 0.9375rem;
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 28px;
}
.footer p { margin: 0; }
.footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--chalk-soft);
}

/* ---------- 404 ---------- */

.lost {
  display: grid;
  place-items: start;
  gap: 18px;
  padding-block: clamp(48px, 12vw, 140px);
  max-width: 640px;
}
.lost h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); }
.lost p { color: var(--chalk-soft); font-size: 1.125rem; margin: 0; }

/* ---------- Narrow screens ---------- */

@media (max-width: 860px) {
  .hero,
  .method { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 12px; }
  .hero h1 { max-width: 16ch; }
  .evidence { width: min(74%, 270px); margin-top: 8px; }
  .tag { left: -22px; }
  .screens { max-width: 420px; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .brand span { font-size: 1.0625rem; }
  .topbar nav a { padding-inline: 8px; }
  .report { transform: none; }
  .report li { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 0; }
  .report li + li { padding-top: 6px; }
  .folder,
  .pass { grid-template-columns: minmax(0, 1fr); }
  .folder .price { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
  .folder[data-tab="2"]::before { left: calc(50% - 66px); }
  .folder[data-tab="3"] .no { right: 34px; }
  .free { transform: rotate(-3deg); }
  .rules { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .signals { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .signals dd { margin-bottom: 12px; }
  .tag { width: 178px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { transition: none !important; }
}
