/* Plainsmen Apartments — custom styles on top of Tailwind (Play CDN).
   Palette: spruce green, warm bark/oak, sand, ink. */

:root {
  --spruce: #2f5d50;
  --spruce-dark: #234a40;
  --spruce-light: #5b8a78;
  --spruce-pale: #e7efe9;
  --bark: #b8915f;
  --bark-light: #d8c3a0;
  --sand: #faf8f4;
  --ink: #1f2933;
}

html { scroll-behavior: smooth; }
body { font-family: "Inter", system-ui, -apple-system, sans-serif; }
h1, h2, h3, h4, .font-display { font-family: "Outfit", "Inter", system-ui, sans-serif; }

/* Anchor offset so sticky-nav doesn't cover section headings. */
section[id], [id].anchor { scroll-margin-top: 84px; }

/* ---------- Hero backdrop: soft spruce gradient + tree band ---------- */
.hero-bg {
  background:
    radial-gradient(120% 90% at 80% -10%, rgba(91, 138, 120, 0.18), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--sand) 100%);
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Photo gallery placeholders ----------
   Each figure has a labeled gradient. A real <img> sits on top; if the file
   is missing it fires onerror and hides itself, revealing the placeholder. */
.photo {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--spruce-pale), var(--bark-light));
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  font-size: .9rem;
  color: var(--spruce-dark);
  opacity: .75;
  z-index: 0;
}
.photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo img.is-missing { display: none; }

/* ---------- Community board ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1;
  padding: .3rem .55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.chip--announcement { background: var(--spruce-pale); color: var(--spruce-dark); }
.chip--event        { background: #e3edf4; color: #345a73; }
.chip--forsale      { background: #f6ecdc; color: #704621; }
.chip--recommendation { background: #e6f1ea; color: #2f6b4c; }
.chip--lostfound    { background: #efe9f6; color: #5b4a86; }
.chip--general      { background: #eceef1; color: #475569; }

.board-card {
  background: #fff;
  border: 1px solid #eceae4;
  border-radius: 1rem;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 1px 2px rgba(31, 41, 51, .04);
  transition: box-shadow .2s ease, transform .2s ease;
}
.board-card:hover { box-shadow: 0 6px 18px rgba(31, 41, 51, .07); }

.cat-filter.is-active {
  background: var(--spruce);
  color: #fff;
  border-color: var(--spruce);
}

/* Visible keyboard focus for all interactive elements (WCAG 2.4.7). */
a:focus-visible,
button:focus-visible,
select:focus-visible,
summary:focus-visible,
.cat-filter:focus-visible {
  outline: 2px solid var(--spruce);
  outline-offset: 2px;
}

/* ---------- Misc ---------- */
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .spin { animation: none; }
  /* Tailwind's `transition` utility (buttons, the compose chevron, etc.) */
  .transition { transition: none !important; }
}
