/* ===========================================================================
   Love Tucumcari -- "hand-lettered neighbor"

   Taken from the tabletop ad and the heart logo: pure signature red on white,
   a warm sand secondary, black brush script, and the colored-pencil drawing
   of Tucumcari Mountain. The feel should be homemade in the good sense --
   like a flyer a neighbor made, not a corporate campaign.

   Red     #e01b22   the ad red
   Sand    #f0cc84   the logo background
   Ink     #17140f   the brush-script black

   Display face: Pacifico (Google, free) -- the closest free match to the
   logo's brush script. If the exact commercial face is wanted, run the logo
   through WhatTheFont; likely candidates are noted in the README.
   =========================================================================== */

:root {
  --font: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-head: "Zilla Slab", Georgia, serif;
  --font-logo: "Pacifico", "Segoe Script", cursive;

  --ink: #17140f;
  --ink-soft: #5c554a;
  --line: #ecdfc4;
  --bg: #ffffff;
  --bg-soft: #fdf6e8;

  --radius: 8px;
  --head-weight: 700;

  /* Hero is warm paper, not a red slab -- the ad is mostly white. */
  --hero-bg: #fdf6e8;
  --hero-ink: var(--ink);
  --footer-bg: #17140f;
  --logo-height: 60px;
}

/* The ad red is the identity, but as link text on the sand cards it lands at
   4.49:1 -- a hair under AA. Links use a fractionally deeper red. */
a { color: #c8121a; }
a:hover { color: var(--ink); }

/* ---- Header: logo, with a sand hairline under it ------------------------ */
.site-header { border-bottom: 2px solid var(--brand); }
.brand-name { font-family: var(--font-head); letter-spacing: -.01em; }
.brand-name::first-letter { color: var(--brand); }
.site-nav a { font-weight: 600; }

/* ---- The double rule frame from the ad ---------------------------------- */
.hero {
  border-bottom: 2px solid var(--brand);
  box-shadow: inset 0 0 0 3px var(--bg-soft), inset 0 0 0 5px var(--brand);
  padding: 56px 20px 235px;
}
.hero h1 {
  font-family: var(--font-logo);
  font-weight: 400;                 /* Pacifico has one weight; faux-bold distorts it */
  color: var(--brand);
  font-size: clamp(2.5rem, 6.5vw, 4rem);
  line-height: 1.35;
  text-shadow: 2px 2px 0 rgba(23,20,15,.16);
}
/* The ad's rallying cry, hearts and all, right under the script. */
.hero .lede-hearts {
  font-family: var(--font);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: clamp(.82rem, 2.1vw, 1.02rem);
  color: var(--ink);
  opacity: 1;
  max-width: none;
}
.lede-hearts .hh { color: var(--brand); padding: 0 .25em; }

/* The pencil drawing of Tucumcari Mountain. The town is named for the mesa,
   so the mesa is what shows: positioned on the summit, not the plains. */
.hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 200px;
  background: url("/assets/img/mountain.jpg") center 32% / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28%);
          mask-image: linear-gradient(to bottom, transparent, #000 28%);
  opacity: .6;
  pointer-events: none;
}
@media (min-width: 900px) {
  .hero { padding-bottom: 300px; }
  .hero::after { height: 280px; }
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .88rem;
  padding: 13px 28px;
}
/* On the pale hero the ghost button needs ink, not white. */
.btn-ghost { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---- Cards: heart bullets and a sand wash ------------------------------- */
.card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
}
.card h2 { color: var(--brand); }
.card h2::before { content: "\2665"; color: var(--brand); margin-right: .4em; font-size: .8em; }

.section-title { border-bottom-width: 3px; }

.band { background: var(--brand); color: #fff; border-top: 0; }
.band h2 { color: #fff; }
.band .btn { background: #fff; color: var(--brand); border-color: #fff; }
.band .btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Heart bullets in body copy, matching the ad's action list. */
.prose ul { list-style: none; padding-left: 0; }
.prose ul li { padding-left: 1.6em; position: relative; }
.prose ul li::before {
  content: "\2665"; color: var(--brand);
  position: absolute; left: 0; top: 0;
}

.site-footer { border-top: 5px solid var(--brand); }
.footer-name { font-family: var(--font-head); }

/* ---- Forms (project registry, volunteer, donations, tool admin) --------- */
.lt-form { max-width: 640px; }
.form-row { margin: 0 0 16px; }
.form-row label, .lt-form legend { display: block; font-weight: 600; margin-bottom: 5px; font-size: .95rem; }
.form-row .meta { display: block; font-weight: 400; margin-top: 4px; }
.lt-form input[type="text"], .lt-form input[type="email"], .lt-form input[type="tel"],
.lt-form input[type="password"], .lt-form input[type="date"], .lt-form input:not([type]),
.lt-form select, .lt-form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbbf9f;
  border-radius: 6px;
  padding: 10px 12px;
}
.lt-form textarea { resize: vertical; }
.lt-form input:focus-visible, .lt-form select:focus-visible, .lt-form textarea:focus-visible {
  outline: 3px solid var(--brand); outline-offset: 1px; border-color: var(--brand);
}
.form-2col { display: grid; gap: 0 18px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .form-2col { grid-template-columns: 1fr 1fr; } }
.lt-form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.lt-form .check { display: block; font-weight: 400; margin: 6px 0; }
.lt-form .check input { margin-right: 8px; }
.req { color: var(--brand); }
.captcha-row input { max-width: 130px; }

/* Honeypot: parked off-screen, never display:none (some bots skip those). */
.hp-wrap { position: absolute; left: -9999px; top: -9999px; height: 1px; overflow: hidden; }

.alert { padding: 14px 18px; border-radius: var(--radius); }
.alert-ok  { background: #eef7ec; border: 1px solid #4c9a41; }
.alert-err { background: #fdeeee; border: 1px solid var(--brand); }

/* ---- Registered-demand board -------------------------------------------- */
.board { list-style: none; margin: 0 0 1.4em; padding: 0; max-width: 560px; }
.board li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 2px; border-bottom: 1px solid var(--line);
}
.board-trade { font-weight: 600; }
.board-count { color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- Tool tables and status pills ---------------------------------------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.tool-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
.tool-table th, .tool-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tool-table thead th { background: var(--bg-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.tool-table tbody tr:last-child td { border-bottom: 0; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .88em; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 600; }
.pill-available { background: #eef7ec; color: #2c6425; }
.pill-out       { background: #fdf1dc; color: #8a5a10; }
.pill-repair    { background: #fdeeee; color: #a5121a; }
.pill-retired   { background: #eee; color: #666; }

/* ---- Tool admin ----------------------------------------------------------- */
.admin-grid { display: grid; gap: 22px; grid-template-columns: 1fr; margin: 22px 0 34px; }
@media (min-width: 900px) { .admin-grid { grid-template-columns: 1fr 1fr; } }
.admin-grid .card h2::before { content: none; }
.admin-grid .lt-form { max-width: none; }
.admin-meta { margin-bottom: 1em; }
.inline-form { display: inline; }
.linklike {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: #c8121a; text-decoration: underline; text-underline-offset: 2px;
}
.linklike:hover { color: var(--ink); }
