/* ReviewLocator — visitor site. "Signage" treatment.
   Archivo Black for signage-scale headings, Familjen Grotesk for body.
   Both must be self-hosted: the CSP allows no external assets. Drop
   the woff2 files in public/fonts/ and these @font-face rules pick
   them up; until then the stacks fall back to the system UI font. */

@font-face {
  font-family: "Archivo Black";
  src: url("/fonts/archivo-black.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Familjen Grotesk";
  src: url("/fonts/familjen-grotesk-var.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --rf-blue: #003DA5;
  --rf-blue-dark: #002d78;
  --rf-gold: #F6BE00;
  /* Brand blue is a background colour. --accent is the same blue used as
     FOREGROUND on a surface; dark mode lightens it so it stays readable. */
  --accent: #003DA5;
  /* Surface a white-on-blue button sits on. Stays light in dark mode so the
     primary CTA on the blue error field keeps its contrast. */
  --on-dark-surface: #ffffff;
  --ink: #16191f;
  --muted: #5b6472;
  --line: #dde2ea;
  --surface: #ffffff;
  --bg: #F5F7FB;
  --tint: #EAEEF5;
  --danger: #b3261e;
  --radius: 14px;
  --display: "Archivo Black", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--body);
}
/* Locating and error run as full blue fields; app.js toggles this. */
body.on-dark { background: var(--rf-blue); color: #fff; }
[hidden] { display: none !important; }
.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;
}

/* ---------- chrome ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 22px 18px;
  background: var(--rf-blue); color: #fff;
  border-bottom: 3px solid rgba(255, 255, 255, .9);
}
.wordmark { font-family: var(--display); font-size: 15px; letter-spacing: .02em; text-transform: uppercase; }
.tag { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
main {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 20px 36px;
  display: flex;
  flex-direction: column;
}
.stage { display: flex; flex-direction: column; flex: 1; }
.pagefoot {
  padding: 0 22px calc(22px + env(safe-area-inset-bottom, 0px));
  max-width: 560px; margin: 0 auto; width: 100%;
  color: var(--muted); font-size: 12px;
}
body.on-dark .pagefoot { color: rgba(255, 255, 255, .6); }

/* ---------- typography ---------- */
h1 {
  font-family: var(--display);
  margin: 0 0 14px;
  font-size: 36px; line-height: .98; letter-spacing: -.02em;
  text-transform: uppercase;
}
.lead { margin: 0; font-size: 17px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
body.on-dark .lead { color: rgba(255, 255, 255, .85); }
.greeting {
  margin: 0 0 14px;
  font-size: 13px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: #fff;
}
.eyebrow {
  margin: 0 0 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: #fff;
}
.subhead {
  margin: 0 0 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}

/* ---------- locating ---------- */
#stage-locating { align-items: center; text-align: center; padding-top: 16px; }
#stage-locating h1 { font-size: 40px; }
#stage-locating .lead { max-width: 280px; }
.chickens { display: flex; gap: 10px; margin-bottom: 30px; }
.chickens .picon { width: 34px; height: 34px; animation: chew 1.2s ease-in-out infinite; }
.chickens .picon:nth-child(2) { animation-delay: .18s; }
.chickens .picon:nth-child(3) { animation-delay: .36s; }
@keyframes chew {
  0%, 100% { opacity: .28; transform: scale(.84); }
  50% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .chickens .picon { animation-duration: 3s; }
}

/* ---------- store result ---------- */
/* Bleeds past main's padding so the blue block runs edge to edge. */
.storehead {
  margin: -28px -20px 24px;
  padding: 24px 22px 26px;
  background: var(--rf-blue);
  color: #fff;
  border-bottom: 3px solid rgba(255, 255, 255, .9);
}
.storehead h1 { font-size: 52px; line-height: .9; letter-spacing: -.03em; margin: 0; }
.address { margin: 12px 0 0; font-size: 16px; line-height: 1.4; color: rgba(255, 255, 255, .9); }
.meta { margin: 4px 0 0; font-size: 15px; color: rgba(255, 255, 255, .78); }

.primary, a.primary {
  display: flex; align-items: center; gap: 15px;
  width: 100%; padding: 19px 20px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; text-align: left; text-decoration: none;
  font: 700 18px var(--body);
  box-shadow: 0 6px 18px rgba(0, 61, 165, .14);
}
.primary:hover, a.primary:hover { background: var(--tint); }
.primary-label { flex: 1; min-width: 0; }
.primary-title { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.primary-sub { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.primary .arrow { font-size: 22px; font-weight: 700; color: var(--accent); }
/* On a blue field the primary button inverts to white-on-blue. */
body.on-dark .primary {
  justify-content: space-between;
  background: var(--on-dark-surface);
  color: var(--rf-blue);
  border-color: transparent;
}
body.on-dark .primary .arrow { color: var(--rf-blue); }
body.on-dark .primary .arrow { font-size: 20px; }

.linkgrid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.linkgrid a {
  display: flex; flex-direction: column; gap: 10px; height: 100%;
  padding: 15px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none;
  font-size: 14px; font-weight: 600; line-height: 1.25;
}
.linkgrid a:hover { border-color: var(--accent); }

.notice {
  padding: 15px 17px; border-radius: var(--radius);
  background: #fff8e1; border: 1px solid #f0dca0; color: #6b5600; font-size: 14px;
}

/* Yelp tier: same anatomy as .primary, deliberately lighter. */
.secondary-cta {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 16px 18px;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius);
  text-decoration: none;
}
.secondary-cta:hover { border-color: var(--accent); background: var(--tint); }
.secondary-label { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.secondary-cta .arrow { font-size: 20px; font-weight: 700; color: var(--accent); }
.subhead.spaced { margin-top: 24px; }

/* ---------- platform icons ---------- */
/* The sprite is markup, not a visual element. display:none would stop Safari
   resolving <use>, so it is collapsed to zero size instead. */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.picon { flex: 0 0 auto; display: block; border-radius: 7px; }

/* ---------- search ---------- */
.search-row { display: flex; gap: 8px; }
.search-row input {
  flex: 1; min-width: 0; padding: 15px 16px;
  font: 500 16px var(--body);
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink);
}
.search-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.search-row button {
  padding: 15px 20px; font: 700 16px var(--body); color: #fff;
  background: var(--rf-blue); border: 0; border-radius: 12px; cursor: pointer;
}
.search-row button:hover { background: var(--rf-blue-dark); }
.results { margin-top: 20px; }
.results ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.results button {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); font: inherit; color: var(--ink);
}
.results button:hover { border-color: var(--accent); }
.results .num {
  flex: 0 0 auto; min-width: 46px;
  font-family: var(--display); font-size: 22px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em; color: var(--accent);
}
.results .lines { flex: 1; min-width: 0; }
.results .line1 { display: block; font-size: 15px; font-weight: 600; }
.results .line2 { display: block; font-size: 13px; color: var(--muted); }
.results .arrow { font-size: 19px; color: var(--accent); }
.results .empty { color: var(--muted); padding: 6px 2px; }

/* ---------- error ---------- */
.bang {
  width: 52px; height: 52px; margin-bottom: 26px;
  border-radius: var(--radius); border: 2px solid rgba(255, 255, 255, .45);
  display: grid; place-items: center;
  font-family: var(--display); font-size: 26px; line-height: 1;
}
#stage-error .lead { margin-bottom: 30px; }

/* ---------- misc ---------- */
.link-btn {
  background: none; border: 0; padding: 8px 0; cursor: pointer;
  color: var(--accent); font: 600 15px var(--body); text-decoration: underline;
}
.ghost-btn {
  width: 100%; padding: 16px; cursor: pointer;
  font: 600 16px var(--body); color: #fff; background: transparent;
  border: 1.5px solid rgba(255, 255, 255, .45); border-radius: 12px;
}
.ghost-btn:hover { background: rgba(255, 255, 255, .12); }
.spacer { flex: 1; }
.footer-actions { margin-top: 22px; text-align: center; }
.result-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line);
}
.result-foot .stamp { font-size: 12px; color: var(--muted); }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
body.on-dark button:focus-visible, body.on-dark a:focus-visible { outline-color: #fff; }

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eceff5; --muted: #a0a9b8; --line: #2c333f;
    --surface: #1a1f28; --bg: #11151c; --tint: #222834;
    /* 7.4:1 on --surface, 8.6:1 on --bg. The brand blue would be 1.7:1. */
    --accent: #8FB4EE;
  }
  /* The on-dark primary is a light button on the blue field in both schemes. */
  :root { --on-dark-surface: #ffffff; }
  .search-row input, .filters input { background: var(--surface); }
  .primary { box-shadow: none; }
  .notice { background: #2b2410; border-color: #4a3c14; color: #f0d99a; }
}
