/* Nursery Drive document archive — shared styles */

:root {
  --paper: #faf8f2;      /* aged map paper */
  --ink: #22302a;        /* survey ink */
  --red: #b5252b;        /* Land Registry title-plan red edging */
  --line: #d9d3c4;       /* hairline rules */
  --muted: #6e7a70;      /* secondary text */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Public Sans", -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3.5rem 1.25rem 4rem;
}

main { width: 100%; max-width: 640px; }

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

h1 {
  font-family: "Bitter", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

/* Signature: red dashed "boundary line", as drawn on a title plan */
.boundary {
  border: none;
  border-top: 2px dashed var(--red);
  width: 6rem;
  margin: 0 0 1.5rem;
}

.lede { color: var(--muted); margin-bottom: 2.5rem; max-width: 46ch; }

/* ---- Landing page: two equal buttons ---- */
.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.choice {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.25rem;
  padding: 1.4rem 1.3rem 1.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 120ms ease, transform 120ms ease;
}

.choice:hover, .choice:focus-visible { border-color: var(--red); }
.choice:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.choice .name {
  font-family: "Bitter", Georgia, serif;
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.25;
}

.choice .hint {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---- Document pages: pills ---- */
.group-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2rem 0 0.75rem;
}

.pills { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.pill {
  display: inline-block;
  padding: 0.5rem 1.05rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  transition: border-color 120ms ease;
}

.pill:hover, .pill:focus-visible { border-color: var(--red); color: var(--red); }
.pill:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.back {
  display: inline-block;
  margin-bottom: 2.25rem;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--muted);
}
.back:hover { color: var(--red); }

footer {
  margin-top: auto;
  padding-top: 3rem;
  font-size: 0.75rem;
  color: var(--muted);
  width: 100%;
  max-width: 640px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.footer-contact a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
}

.footer-contact a:hover,
.footer-contact a:focus-visible {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* ---- Contact & Community card (button variant of .choice) ---- */
button.choice {
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}

/* ---- Contact modal ---- */
dialog {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.75rem 1.6rem 1.4rem;
  width: min(92vw, 420px);
  margin: auto; /* global reset strips the UA default that centres <dialog> */
  text-align: center;
}

dialog::backdrop {
  background: rgba(34, 48, 42, 0.45);
}

dialog h2 {
  font-family: "Bitter", Georgia, serif;
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

dialog .boundary { margin: 0 auto 1.25rem; }

.modal-text {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.modal-icons {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.icon-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color 120ms ease;
}

.icon-btn:hover, .icon-btn:focus-visible { border-color: var(--red); }
.icon-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.copy-addr {
  font: inherit;
  font-size: 0.8rem;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 1px dotted var(--muted);
  cursor: pointer;
  padding: 0;
}

.copy-addr:hover, .copy-addr:focus-visible { color: var(--red); border-bottom-color: var(--red); }

.modal-close {
  font: inherit;
  font-size: 0.8rem;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 1px dotted var(--muted);
  cursor: pointer;
  padding: 0;
  display: block;
  margin-left: auto;
}

.modal-close:hover, .modal-close:focus-visible { color: var(--red); border-bottom-color: var(--red); }

@media (max-width: 480px) {
  .choices { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}