/* H-Town Trusted — Envato-style directory look.
   Warm off-white, deep charcoal, one red accent. No purple, no gradients. */

:root {
  --bg: #FAF9F6;
  --card: #ffffff;
  --ink: #1A1A1A;
  --muted: #6b6b6b;
  --faint: #e8e4de;
  --red: #DC2626;
  --red-dark: #b91c1c;
  --green: #166534;
  --sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); }
.sr-only { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.btn:hover { background: var(--red-dark); color: #fff; }
.btn-pill { border-radius: 999px; }
.btn-ghost { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
.btn-ghost:hover { background: var(--red); color: #fff; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--faint);
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.logo {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.logo-break { display: none; }
.main-nav { display: none; gap: 1.5rem; margin-left: auto; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.main-nav a:hover { color: var(--red); }
.site-header .btn { margin-left: auto; }
@media (min-width: 820px) {
  .main-nav { display: flex; }
  .site-header .btn { margin-left: 0; }
}

/* ---------- Hero ---------- */

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2.5rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.hero-sub { color: var(--muted); font-size: 1.1rem; margin-top: 0.75rem; }

.search-pill {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  padding: 0.75rem;
  max-width: 900px;
  margin: 2rem auto 0;
}
.search-pill input,
.search-pill select {
  width: 100%;
  border: none;
  outline: none;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.7rem 0.75rem;
  background: transparent;
  color: var(--ink);
}
.pill-divider { display: none; }
@media (min-width: 760px) {
  .search-pill { flex-direction: row; align-items: center; border-radius: 999px; padding: 0.5rem 0.5rem 0.5rem 1rem; }
  .search-pill input { flex: 2; }
  .search-pill select { flex: 1; }
  .pill-divider { display: block; width: 1px; height: 2rem; background: var(--faint); }
}

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.25rem; }
.chip {
  background: #fff;
  border: 1px solid var(--faint);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
}
.chip:hover { border-color: var(--red); color: var(--red); }

/* ---------- Sections ---------- */

.section { max-width: 1180px; margin: 0 auto; padding: 2.5rem 1.25rem 0; }
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.section h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.2; letter-spacing: -0.01em; }
.section > p { color: #333; max-width: 42rem; margin-top: 0.6rem; }
.panel {
  background: #fff;
  border: 1px solid var(--faint);
  border-radius: 16px;
  padding: 2rem 1.5rem;
}
/* Panel sections override .section padding, which zeroes the gap to the
   previous section — restore breathing room above panel boxes. */
.section.panel { margin-top: 2.5rem; }

/* ---------- Category tiles ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
@media (min-width: 820px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile {
  background: #fff;
  border: 1px solid var(--faint);
  border-radius: 14px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--ink);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.tile:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09); transform: translateY(-2px); }
.tile-letter {
  display: block;
  width: 3rem;
  height: 3rem;
  line-height: 3rem;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.1);
  color: var(--red);
  font-size: 1.4rem;
  font-weight: 800;
}
.tile-name { display: block; font-weight: 700; font-size: 1rem; }
.tile-count { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
@media (min-width: 700px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--card);
  border: 1px solid var(--faint);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1); transform: translateY(-2px); }

.card-head {
  background: rgba(220, 38, 38, 0.08);
  padding: 1.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.card-letter {
  width: 3rem;
  height: 3rem;
  line-height: 3rem;
  text-align: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  flex-shrink: 0;
}
.card-cat { font-weight: 700; font-size: 1.05rem; }

.card-photo img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.card-photo.photo-broken { display: none; }

.card-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.featured-label {
  align-self: flex-start;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.card-name { font-size: 1.3rem; line-height: 1.2; }
.card-name a { color: var(--ink); text-decoration: none; }
.card-name a:hover { color: var(--red); }
.status-pill {
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.status-pill.open { background: #dcfce7; color: var(--green); }
.status-pill.closed { background: #fee2e2; color: var(--red); }
.card-tags { color: var(--red); font-weight: 700; font-size: 0.9rem; }
.card-meta { font-size: 0.95rem; color: #333; line-height: 1.65; }
.card-meta a { color: var(--ink); }
.card-meta a:hover { color: var(--red); }
.card-desc { color: #333; }
.card-services { font-size: 0.92rem; color: #333; }
.card-badges { margin-top: 0.3rem; }
.card-checked { font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; }
#new-this-week[hidden] { display: none; }
.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  margin-right: 0.4rem;
}
.badge-verified {
  color: #fff;
  background: var(--red);
  border: 1.5px solid var(--red);
}
.badge-listed {
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--ink);
}
.tier-legend { font-size: 0.92rem; color: #333; margin-top: 0.75rem; }
.tier-legend .badge { margin: 0 0.15rem; }
.card-links { font-size: 0.9rem; margin-top: 0.3rem; }
.card-report { font-size: 0.82rem; margin-top: auto; padding-top: 0.5rem; }
.card-report a { color: var(--muted); }

.empty-slot {
  border: 1.5px dashed #ccc;
  border-radius: 14px;
  padding: 2rem 1.25rem;
  text-align: center;
  grid-column: 1 / -1;
}
.empty-slot p { color: var(--muted); font-style: italic; }
.empty-slot .empty-note { font-style: normal; font-size: 0.95rem; margin: 0.75rem 0 1rem; }
.empty-slot .btn { margin-top: 1rem; }
.no-results { color: var(--muted); font-style: italic; padding: 2rem 0; grid-column: 1 / -1; }

/* ---------- Toolbar ---------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: end;
  margin-top: 1.25rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--faint);
  border-radius: 12px;
}
.result-count { font-weight: 700; margin-right: auto; }
.toolbar-field { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.toolbar-field select {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  padding: 0.5rem 0.6rem;
  border: 1.5px solid var(--faint);
  border-radius: 8px;
  background: #fff;
  outline: none;
}
.toolbar-field select:focus { border-color: var(--red); }
.toolbar-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; cursor: pointer; padding-bottom: 0.5rem; }
.toolbar-check input { width: 1.1rem; height: 1.1rem; accent-color: var(--red); }

/* ---------- Steps ---------- */

.steps { list-style: none; display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { background: #fff; border: 1px solid var(--faint); border-radius: 14px; padding: 1.5rem; }

.guides-note { font-style: italic; color: var(--muted); }

/* ---------- Forms ---------- */

.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.7rem 0.6rem;
  border: 1.5px solid var(--faint);
  border-radius: 8px;
  background: #fff;
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--red); }
.field-hint { font-size: 0.85rem; color: var(--muted); font-style: italic; }
.field-wide { grid-column: 1 / -1; }
.check-label { display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; cursor: pointer; }
.check-label input { width: 1.1rem; height: 1.1rem; accent-color: var(--red); }
.form-note { font-style: italic; color: var(--muted); font-size: 0.95rem; }
.form-status { min-height: 1.5em; font-size: 0.95rem; }
.form-status.success { color: var(--green); }
.form-status.error { color: var(--red); }

#newsletter-form, #add-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
#newsletter-form .btn, #add-form .btn { justify-self: start; }
@media (min-width: 820px) {
  #add-form { grid-template-columns: 1fr 1fr; }
  #newsletter-form { grid-template-columns: 1fr 1fr; max-width: 42rem; }
}

/* ---------- Claim flow ---------- */

.card-claim { margin-top: 0.75rem; }
.claim-btn {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red);
  background: transparent;
  border: 1.5px solid var(--red);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}
.claim-btn:hover { background: var(--red); color: #fff; }

/* ---------- Featured checkout ---------- */

.notice-banner {
  max-width: 1180px;
  margin: 1.5rem auto 0;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1.5px solid var(--red);
  border-radius: 12px;
}
.notice-banner[hidden] { display: none; }
.card-featured { margin-top: 0.75rem; }
.featured-btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  border: 1.5px solid var(--red);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  text-decoration: none;
}
.featured-btn:hover { background: var(--red-dark); color: #fff; }
.panel-cta { margin-top: 1.25rem; }
#panel-featured-btn[hidden] { display: none; }
#claim-listing-picker[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: rgba(0, 0, 0, 0.55);
  overflow-y: auto;
}
.modal[hidden] { display: none; }
.modal-panel {
  position: relative;
  width: 100%;
  max-width: 34rem;
  background: #fff;
  border-radius: 16px;
  padding: 2rem 1.5rem;
}
.modal-panel > p { margin-top: 0.6rem; }
.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
}
.modal-close:hover { color: var(--ink); }
#claim-form { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
#claim-form .btn { justify-self: start; }

/* ---------- Footer ---------- */

.footer { background: #141414; color: #ddd; margin-top: 3.5rem; }
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  display: grid;
  gap: 2rem;
}
@media (min-width: 820px) { .footer-inner { grid-template-columns: repeat(3, 1fr); } }
.footer a { color: #fff; }
.footer-small { color: #aaa; font-size: 0.9rem; margin-top: 0.5rem; }
.footer-bar {
  border-top: 1px solid #333;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 1.25rem 1.5rem;
  font-size: 0.85rem;
  color: #aaa;
}
