/*
 * Base styles for every page. Propshaft's `stylesheet_link_tag :app` includes
 * every stylesheet in this directory, so page-specific styles belong in their
 * own file rather than here.
 */

:root {
  --surface: #14100e;
  --surface-raised: #1e1815;
  --border: #3a2f29;
  --ink: #f2ece7;
  --ink-muted: #b3a49a;
  --rust: #c1552b;
  --sand: #d8a15c;
  --measure: 68rem;
}

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: var(--sand);
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.lede {
  color: var(--ink-muted);
  font-size: 1.125rem;
  max-width: 46rem;
}

/* The end of every page. Quiet, like the bar at the top. */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.site-footer__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2.25rem;
}

.site-footer__who,
.site-footer__deed {
  margin: 0 0 0.4rem;
}

.site-footer__who strong {
  color: var(--ink);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

/* Off screen until it has focus, then the first thing on the page. */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 10;
  background: var(--ink);
  color: var(--surface);
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

/* R12: the honesty banner leads every page, so it is styled to be read, not
   dismissed as chrome. */
.environment-banner {
  background: var(--rust);
  color: #fff;
  padding: 0.7rem 1.25rem;
  font-size: 0.95rem;
  text-align: center;
}

.environment-banner strong {
  font-weight: 700;
}

/* How buying works: one numbered list shared by the home page, the catalog
   and the parcel page (shared/_how_buying_works). The numbers are the point --
   it is a sequence -- so they are drawn as counters a reader can see. */
.buying-steps {
  counter-reset: buying-step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.buying-steps__step {
  counter-increment: buying-step;
  position: relative;
  padding-left: 2.1rem;
  color: var(--ink-muted);
}

.buying-steps__step::before {
  content: counter(buying-step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.45rem;
  height: 1.45rem;
  border: 1px solid var(--sand);
  border-radius: 50%;
  color: var(--sand);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35rem;
  text-align: center;
}

.buying-steps__name {
  color: var(--ink);
  font-weight: 600;
}

.buying-steps--compact {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

/* The site bar: where a reader can go, and who they are. Under the honesty
   banner on every page, and deliberately quiet: it is chrome, and the banner
   above it is the thing that must be read. One flex row with two ends; the
   session end is in session.css, alongside the sign-in page it belongs with. */
.site-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.55rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-raised);
  font-size: 0.9rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
}

.site-nav__home {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: inline-block;
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
  color: var(--ink-muted);
  text-decoration: none;
}

.site-nav__link:hover,
.site-nav__home:hover {
  color: var(--sand);
}

/* The page the reader is on, marked in the bar rather than removed from it. A
   link that vanishes when it is current makes the bar change shape from page
   to page, and a reader learns where things are by their staying put. */
.site-nav__link[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--sand);
}

.site-nav__home[aria-current="page"] {
  color: var(--sand);
}
