/* ==========================================================================
   tnmh.net — Page Styles (home router, inventory grid, contact)
   Tokens/header/footer/phone-bar live in nav.css
   ========================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: var(--paper); color: var(--text); }
body { -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
main { padding-top: 58px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* --------------------------------------------------------------------------
   HOMEPAGE — two-button router
   -------------------------------------------------------------------------- */
.hero {
  background: var(--ink);
  padding: 28px 16px 20px;
  text-align: center;
}
.hero-eyebrow {
  color: rgba(255,255,255,.55);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.hero-title {
  color: #fff;
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 800;
  margin-top: 8px;
  line-height: 1.25;
}
.hero-sub {
  color: rgba(255,255,255,.6);
  font-size: .95rem;
  margin-top: 8px;
}

.router {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 780px;
  margin: 0 auto;
  padding: 18px 16px 32px;
}
@media (min-width: 700px) {
  .router { flex-direction: row; padding: 28px 24px 48px; gap: 20px; }
}

.router-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  border-radius: 18px;
  padding: 28px 22px;
  min-height: 44vh;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
@media (min-width: 700px) {
  .router-btn { flex-direction: column; align-items: flex-start; justify-content: flex-end; min-height: 420px; padding: 36px; }
}
.router-btn:active { transform: scale(.98); }
.router-btn:hover { box-shadow: 0 14px 36px rgba(0,0,0,.28); }

.router-btn--new { background: linear-gradient(155deg, var(--blue) 0%, var(--blue-dark) 100%); }
.router-btn--repo { background: linear-gradient(155deg, var(--amber) 0%, var(--amber-dark) 100%); color: var(--ink); }

.router-btn-icon { font-size: 2.6rem; line-height: 1; flex-shrink: 0; }
.router-btn-text { flex: 1; }
.router-btn-label { font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; }
.router-btn-sub { font-size: .92rem; opacity: .88; margin-top: 6px; line-height: 1.4; max-width: 280px; }
.router-btn-arrow {
  font-size: 1.6rem;
  font-weight: 700;
  align-self: center;
  opacity: .8;
}
@media (min-width: 700px) {
  .router-btn-arrow { display: none; }
  .router-btn-icon { font-size: 3.2rem; }
  .router-btn-label { font-size: 1.9rem; }
}

.trust-strip {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 16px 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.trust-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper2);
  color: var(--text-soft);
  font-size: .85rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 999px;
}
.trust-chip a { text-decoration: none; color: inherit; }

/* --------------------------------------------------------------------------
   FOR-SALE — toggle + grid
   -------------------------------------------------------------------------- */
.fs-hero {
  background: var(--ink);
  padding: 20px 16px 18px;
}
.fs-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.fs-title { color: #fff; font-size: clamp(1.2rem, 4vw, 1.6rem); font-weight: 800; }
.fs-count { color: rgba(255,255,255,.55); font-size: .88rem; margin-top: 4px; }

.toggle-group {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  background: rgba(255,255,255,.08);
  padding: 5px;
  border-radius: 12px;
}
.toggle-btn {
  flex: 1;
  text-align: center;
  padding: 12px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.7);
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.toggle-btn.on--new { background: var(--blue); color: #fff; }
.toggle-btn.on--repo { background: var(--amber); color: var(--ink); }

.fs-grid-wrap { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; }
.fs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.home-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
}
.card-photo { position: relative; aspect-ratio: 4/3; background: var(--paper2); }
.card-photo-inner { width: 100%; height: 100%; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-soft); font-size: .85rem; font-weight: 600;
}
.loc-badge, .price-badge, .promo-tag, .id-badge {
  position: absolute;
  font-size: .72rem;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(18,20,27,.82);
  color: #fff;
}
.loc-badge { top: 10px; left: 10px; }
.price-badge { top: 10px; right: 10px; background: var(--green); color: #06331a; font-size: .85rem; padding: 6px 10px; }
.promo-tag { bottom: 10px; left: 10px; background: var(--amber); color: var(--ink); }
.id-badge { bottom: 10px; right: 10px; background: rgba(0,0,0,.55); }

.card-body { padding: 14px 14px 4px; }
.card-nickname { font-weight: 800; font-size: 1.02rem; }
.card-subtitle { color: var(--text-soft); font-size: .84rem; margin-top: 2px; }
.card-specs { display: flex; gap: 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--paper2); }
.spec { text-align: center; flex: 1; }
.spec-val { font-weight: 800; font-size: .98rem; }
.spec-key { font-size: .68rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: .5px; }

.card-footer { display: flex; gap: 8px; padding: 12px 14px 14px; }
.btn-info {
  flex: 1;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 11px;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
}
.btn-call {
  width: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green);
  border-radius: 9px;
  text-decoration: none;
  color: #06331a;
  font-size: 1.1rem;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-soft);
}
.empty-state h2 { font-size: 1.2rem; margin-bottom: 8px; color: var(--text); }
.empty-state a {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  background: var(--green); color: #06331a; padding: 11px 20px; border-radius: 8px;
  font-weight: 700; font-size: .9rem; text-decoration: none;
}

/* New-homes note (no pricing shown, per sales policy) */
.new-note {
  background: #EAF1FF;
  color: var(--blue-dark);
  font-size: .82rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  margin: 16px auto 0;
  max-width: 1100px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   MODAL — Get Info form
   -------------------------------------------------------------------------- */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(18,20,27,.6);
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  width: 100%;
  max-width: 480px;
  border-radius: 16px 16px 0 0;
  max-height: 88vh;
  overflow-y: auto;
}
@media (min-width: 700px) {
  .modal-overlay { align-items: center; }
  .modal { border-radius: 16px; }
}
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 18px 10px; gap: 10px; }
.modal-eyebrow { font-size: .82rem; color: var(--text-soft); font-weight: 600; }
.modal-title { color: var(--text); }
.modal-subtitle { font-size: .8rem; color: var(--text-soft); margin-top: 2px; }
.modal-close { background: var(--paper2); border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 1rem; cursor: pointer; flex-shrink: 0; }
.modal-form { padding: 0 18px 18px; }

/* --------------------------------------------------------------------------
   CONTACT PAGE
   -------------------------------------------------------------------------- */
.contact-hero { background: var(--ink); padding: 32px 16px 26px; text-align: center; }
.contact-hero h1 { color: #fff; font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 800; }
.contact-hero p { color: rgba(255,255,255,.6); margin-top: 8px; font-size: .95rem; }

.contact-wrap { max-width: 900px; margin: 0 auto; padding: 28px 16px 60px; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .contact-wrap { grid-template-columns: 1fr 1fr; gap: 24px; padding: 40px 24px 70px; } }

.contact-card { background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.contact-card h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-soft); margin-bottom: 10px; }
.contact-card a.big-link { display: block; font-size: 1.3rem; font-weight: 800; color: var(--blue); text-decoration: none; margin-bottom: 4px; }
.contact-card p { color: var(--text-soft); font-size: .9rem; line-height: 1.6; }
.contact-card address { font-style: normal; }

.contact-form-card { grid-column: 1 / -1; background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.contact-form-card h2 { font-size: 1.1rem; font-weight: 800; margin-bottom: 14px; }

/* --------------------------------------------------------------------------
   404 PAGE
   -------------------------------------------------------------------------- */
.err-wrap { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.err-code { font-size: 4rem; font-weight: 800; color: var(--paper2); line-height: 1; }
.err-wrap h1 { font-size: 1.4rem; margin-top: 12px; }
.err-wrap p { color: var(--text-soft); margin-top: 8px; max-width: 340px; }
.err-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; justify-content: center; }
.err-actions a {
  text-decoration: none; padding: 12px 20px; border-radius: 9px; font-weight: 700; font-size: .9rem;
}
.err-actions a.primary { background: var(--blue); color: #fff; }
.err-actions a.secondary { background: var(--paper2); color: var(--text); }
