/* Uplands Neighbourhood Association — site styles
   Palette from the original Elementor kit:
   primary/text #232323, accent cream #F1E5C8, white #FFFFFF */

:root {
  --ink: #232323;
  --cream: #f1e5c8;
  --cream-soft: #f8f1e0;
  --white: #ffffff;
  --muted: #6b6b6b;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --max-width: 1080px;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.7;
  font-size: 1.075rem;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h1 { font-size: 3rem; font-weight: 500; }
h2 { font-size: 2.2rem; font-weight: 500; }
h3 { font-size: 1.5rem; font-weight: 500; }
h4 { font-size: 1.2rem; font-weight: 600; }

@media (max-width: 760px) {
  h1 { font-size: 2.3rem; }
  h2 { font-size: 1.8rem; }
}

.muted { color: var(--muted); font-size: 0.92rem; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 4px solid var(--cream);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 10;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
}
.brand-mark {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.95rem;
}

.site-nav a:hover { background: var(--cream-soft); }
.site-nav a.active { background: var(--cream); font-weight: 600; }

#nav-toggle, .nav-toggle-btn { display: none; }

@media (max-width: 760px) {
  .nav-toggle-btn {
    display: block;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
  }
  .site-nav { display: none; width: 100%; flex-direction: column; }
  #nav-toggle:checked ~ .site-nav { display: flex; }
}

/* Hero */
.hero { position: relative; }
.hero img { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(35, 35, 35, 0.35);
  padding: 1.5rem;
}
.hero-overlay h1 {
  color: var(--white);
  text-align: center;
  max-width: 18em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.page-hero {
  background: var(--cream);
  padding: 5rem 1.25rem;
  text-align: center;
}
.page-hero p { max-width: 44em; margin: 0 auto; }

/* Sections */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

.section.alt {
  max-width: none;
  background: var(--cream-soft);
}
.section.alt > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.lede { font-size: 1.25rem; max-width: 48em; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.section.alt.split { display: grid; }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
}

.framed {
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.card {
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 6px 24px rgba(35, 35, 35, 0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(35, 35, 35, 0.16);
}

.card img { width: 100%; height: 160px; object-fit: cover; }
.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.card-body time { color: var(--muted); font-size: 0.85rem; }
.card-body h3 { margin: 0; }
.card-body p { margin: 0; flex: 1; font-size: 0.95rem; }

/* Buttons */
.button {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  padding: 0.75rem 1.8rem;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.2s ease, transform 0.2s ease;
}
.button:hover { background: #444; transform: translateY(-1px); }

/* Stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.stat strong {
  display: block;
  font-size: 3.4rem;
  font-family: var(--serif);
  font-weight: 500;
}
.stat p { font-size: 0.92rem; color: var(--muted); }

/* Document list */
.doc-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.doc-list a {
  display: block;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(35, 35, 35, 0.08);
  text-decoration: none;
  font-weight: 600;
}
.doc-list a:hover { background: var(--cream-soft); }
.section:not(.alt) .doc-list a { background: var(--cream-soft); }

/* Interactive neighbourhood map */
.hood-map-layout {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 320px);
  gap: 2.5rem;
  align-items: start;
}
.section.alt .hood-map-layout {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}
.hood-map-layout--lots {
  grid-template-columns: minmax(260px, 400px) 1fr;
  max-width: var(--max-width);
  margin: 0 auto;
}
@media (max-width: 760px) {
  .hood-map-layout { grid-template-columns: 1fr; }
  .hood-map-layout--lots .hood-map { order: 2; }
}

.hood-map {
  margin: 0 auto;
  max-width: 320px;
}
.hood-map svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.hood-map figcaption {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  min-height: 1.5em;
}

.hood-zone {
  cursor: pointer;
  outline: none;
}
.hood-zone-tile {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.hood-zone:hover .hood-zone-tile,
.hood-zone.is-active .hood-zone-tile {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 14px rgba(35, 35, 35, 0.4));
}

.hood-zone.is-uplands .hood-zone-shape {
  stroke: var(--ink);
  stroke-width: 1.5;
}

.hood-zone-label {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  text-anchor: middle;
  pointer-events: none;
}

/* Lot map: zones are tighter, so labels appear on hover instead */
.hood-map--lots { max-width: 400px; }
.hood-map--lots .hood-zone-label {
  font-size: 18px;
  stroke: var(--white);
  stroke-width: 4px;
  paint-order: stroke;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.hood-map--lots .hood-zone:hover .hood-zone-label,
.hood-map--lots .hood-zone.is-active .hood-zone-label {
  opacity: 1;
}

.hood-legend {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.4rem 1rem;
}
.hood-legend li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius);
  cursor: default;
}
.hood-legend li:hover { background: var(--white); }
.hood-legend li.is-uplands { font-weight: 700; }
.hood-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(35, 35, 35, 0.25);
  flex: none;
}

/* What's New topics */
.section-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1rem 1.25rem 0;
}
.section-nav a {
  text-decoration: none;
  background: var(--cream-soft);
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  font-size: 1rem;
}
.section-nav a:hover { background: var(--cream); }

.topic { scroll-margin-top: 90px; }
.topic article time { color: var(--muted); font-size: 0.9rem; }
.topic h2 {
  border-bottom: 3px solid var(--cream);
  padding-bottom: 0.3rem;
}

details {
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(35, 35, 35, 0.08);
}
details summary {
  cursor: pointer;
  font-weight: 600;
  font-family: var(--serif);
}
details[open] summary { margin-bottom: 0.5rem; }

/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 720px;
}
.form.narrow { margin: 0 auto; }
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.92rem;
  font-weight: 600;
}
.form input, .form select, .form textarea {
  padding: 0.6rem 0.7rem;
  border: 1px solid #c9c2b0;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 400;
}

/* Footer */
.site-footer {
  border-top: 4px solid var(--cream);
  text-align: center;
  padding: 1.5rem 1.25rem 2rem;
  margin-top: 2rem;
}
.site-footer nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.site-footer a { text-decoration: none; font-size: 0.95rem; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { color: var(--muted); font-size: 0.88rem; margin: 0; }
