/* Detective Renter — prototype styles.
   Mobile first, one accent (amber) on a deep navy, generous tap targets. */

:root {
  --navy-900: #0d1729;
  --navy-800: #131f36;
  --navy-700: #1b2a4a;
  --ink: #16203a;
  --paper: #faf8f3;
  --line: #e3ddd0;
  --amber: #e2b04a;
  --amber-dark: #8a5f1c; /* AA on paper: 5.30 */
  --green: #1f7a4d;
  --red: #a83232;
  --muted: #5f6b80;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(13, 23, 41, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); }
h2 { font-size: clamp(1.35rem, 3.4vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--navy-700); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.skip {
  position: absolute; left: -999px; top: 0; background: #fff; padding: .6rem 1rem; z-index: 20;
}
.skip:focus { left: .5rem; top: .5rem; }

/* ---------- header / footer ---------- */

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem clamp(1rem, 4vw, 2.5rem);
  background: var(--navy-900); color: #fff;
  position: sticky; top: 0; z-index: 10;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: #fff; }
.brand img { border-radius: 10px; }
/* Wordmark set like the Detective Shopper logo: heavy, tight, with an amber rule. */
.brand-rule { width: 3px; height: 26px; border-radius: 2px; background: var(--amber); }
.brand-name { font-weight: 800; letter-spacing: -.015em; font-size: 1.15rem; }

.site-nav { display: flex; gap: .25rem; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  color: #dfe5f0; text-decoration: none; font-size: .875rem; padding: .45rem .6rem; border-radius: 999px;
}
.site-nav a:hover, .site-nav a:focus-visible { background: rgba(255,255,255,.1); color: #fff; }

.site-footer {
  border-top: 1px solid var(--line); margin-top: 4rem;
  padding: 2rem clamp(1rem, 4vw, 2.5rem);
  font-size: .875rem;
}
.site-footer nav { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- layout ---------- */

.wrap { max-width: 68rem; margin: 0 auto; padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2.5rem); outline: none; }
.narrow { max-width: 42rem; }
.grid { display: grid; gap: 1rem; }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1.1fr .9fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.5rem); box-shadow: var(--shadow);
}
.card.flat { box-shadow: none; }

.hero { padding: clamp(1.5rem, 6vw, 3.5rem) 0 1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700; color: var(--amber-dark); margin-bottom: .6rem; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 38rem; }

/* ---------- controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: .7rem 1.15rem; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  background: var(--navy-700); color: #fff;
}
.btn:hover { background: var(--navy-800); }
.btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.btn.secondary { background: #fff; color: var(--navy-700); border-color: var(--line); }
.btn.secondary:hover { background: #f4f1e9; }
.btn.amber { background: var(--amber); color: #1a1408; }
.btn.amber:hover { background: #d6a23c; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.hint { font-size: .8rem; color: var(--muted); margin-top: .25rem; }
input[type="text"], input[type="email"], input[type="tel"], select {
  width: 100%; min-height: 46px; padding: .6rem .75rem; font: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(226, 176, 74, .45); outline-offset: 1px; border-color: var(--amber-dark);
}
.field { margin-bottom: 1rem; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-size: .875rem; font-weight: 400; }
.check input { margin-top: .25rem; width: 1.05rem; height: 1.05rem; }

.dropzone {
  border: 2px dashed #cfc6b4; border-radius: var(--radius); background: #fff;
  padding: clamp(1.25rem, 5vw, 2.5rem); text-align: center; transition: border-color .15s, background .15s;
}
.dropzone.dragging { border-color: var(--amber-dark); background: #fdf7e9; }
.dropzone .big { font-weight: 700; margin-bottom: .25rem; }

/* ---------- code / qr ---------- */

.code-badge {
  display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.25rem, 4vw, 1.6rem); font-weight: 700; letter-spacing: .12em;
  background: var(--navy-900); color: #fff; padding: .6rem 1rem; border-radius: 12px;
}
.qr { display: block; width: min(240px, 60vw); height: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .5rem; }
.qr-row { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: flex-start; }

.letter {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; max-width: 34rem;
}
.letter h3 { margin-bottom: .15rem; }
.letter .slogan { color: var(--amber-dark); font-weight: 650; margin-bottom: 1rem; }

/* ---------- tables / lists ---------- */

.facts { list-style: none; padding: 0; margin: 0; }
.facts li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.facts li:last-child { border-bottom: 0; }
.facts dt, .facts .k { color: var(--muted); }
.facts .v { font-weight: 650; text-align: right; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { position: relative; padding-left: 2.5rem; margin-bottom: 1.1rem; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--navy-700); color: #fff; font-size: .85rem; font-weight: 700;
  display: grid; place-items: center;
}

.pill {
  display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .72rem;
  font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.pill.ok { background: #e6f3ec; color: var(--green); }
.pill.warn { background: #fbeecd; color: #7a5514; }
.pill.bad { background: #f8e3e3; color: var(--red); }
.pill.info { background: #e8edf7; color: var(--navy-700); }

.notice {
  border-left: 4px solid var(--amber); background: #fdf7e9; padding: .85rem 1rem; border-radius: 8px; font-size: .9rem;
}
.notice.error { border-color: var(--red); background: #fbeaea; }

.masked { filter: blur(4px); user-select: none; }
.locked {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; background: #fff;
}
.locked::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(250,248,243,.15), rgba(250,248,243,.9));
  pointer-events: none;
}

.price { font-size: clamp(1.6rem, 5vw, 2rem); font-weight: 750; }
.price small { font-size: .85rem; font-weight: 500; color: var(--muted); }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
  background: var(--navy-900); color: #fff; padding: .7rem 1.1rem; border-radius: 999px;
  font-size: .875rem; box-shadow: var(--shadow); z-index: 40; max-width: calc(100% - 2rem);
}

/* ---------- print ---------- */

@media print {
  .site-header, .site-nav, .site-footer, .btn, .toast, .no-print { display: none !important; }
  body { background: #fff; }
  .wrap { padding: 0; max-width: none; }
  .letter { border: 0; box-shadow: none; padding: 0; }
}

/* ---------- report source links (upload page) ---------- */

.report-source-links {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  padding: .9rem 1rem; margin: 0 0 1rem; font-size: .875rem;
}
.report-source-links p { margin: 0 0 .5rem; color: var(--muted); }
.report-source-links ul { margin: 0; padding-left: 1.1rem; }
.report-source-links li { margin-bottom: .3rem; }
.report-source-links li:last-child { margin-bottom: 0; }
.report-source-links a { color: var(--navy-700); }
.report-source-links a[href^="tel:"] { font-weight: 650; white-space: nowrap; }

/* ---------- sister-site switch ---------- */

.family-switch {
  border: 1px solid rgba(226, 176, 74, .55);
  color: #f3e6c8 !important;
}
.family-switch:hover, .family-switch:focus-visible {
  background: rgba(226, 176, 74, .16) !important;
  color: #fff !important;
}

/* ---------- faq ---------- */

.faq-list { margin: 0; }
.faq-list dt { font-weight: 700; margin-top: 1rem; }
.faq-list dd { margin: .3rem 0 0; color: var(--muted); font-size: .95rem; }

/* ---------- Accessibility pass (Tom, Nov 21 2026) ---------- */

/* Visible focus on every interactive element, not just buttons and inputs. */
a:focus-visible, [role="button"]:focus-visible, summary:focus-visible {
  outline: 3px solid var(--amber-dark);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 44px minimum tap targets on the nav, which was ~35px. */
.site-nav a { min-height: 44px; display: inline-flex; align-items: center; padding-inline: .7rem; }

/* The current page is announced, not just styled. */
.site-nav a[aria-current="page"] { background: rgba(255,255,255,.14); color: #fff; }

/* Respect the OS motion setting; nothing here depends on animation. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
}

/* Forced-colours mode: keep borders and text legible when the OS overrides the palette. */
@media (forced-colors: active) {
  .card, .dropzone, .letter, .locked, .report-source-links { border: 1px solid CanvasText; }
  .btn { border: 1px solid ButtonText; }
}

/* ---------- legal ---------- */

.legal-disclaimer { max-width: 46rem; margin-top: 1rem; line-height: 1.5; }
.legal h2 { margin-top: 1.75rem; }
.legal p, .legal li { max-width: 42rem; }
.legal-contacts { margin: 0 0 1rem; padding-left: 1.1rem; }
.legal-contacts li { margin-bottom: .25rem; }

/* Visually hidden, still announced: used for "(opens in a new tab)". */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* A field the audit flagged keeps a visible cue, not just an ARIA state. */
[aria-invalid="true"] { border-color: #a83232 !important; }
[aria-invalid="true"]:focus-visible { outline-color: #a83232; }
