/* CPMS — The Colorado Property Management Specialists, Inc.
   Palette sampled from the CPMS logo (Colorado flag). Type: Archivo variable (wdth 62–125, wght 100–900). */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #002768;
  --navy-deep: #001a47;
  --steel: #005387;
  --red: #bf0b32;
  --red-dark: #9a0828;
  --gold: #ffd801;
  --sky: #bfd4e1;
  --snow: #f3f6fa;
  --ink: #14213d;
  --muted: #4a5874;
  --white: #ffffff;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(3.5rem, 7vw, 6rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  text-rendering: optimizeLegibility;
}

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

a { color: var(--steel); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--navy);
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-stretch: 78%;
  line-height: 1.08;
  letter-spacing: 0;
  word-spacing: 0.1em;
  color: var(--navy);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.5rem, 4.6vw + 1rem, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 2vw + 1rem, 2.6rem); font-weight: 760; }
h3 { font-size: 1.3rem; font-weight: 700; font-stretch: 88%; line-height: 1.2; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--gold); color: var(--navy); font-weight: 700;
  padding: 0.6rem 1rem; border-radius: 4px; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Utility bar ---------- */
.utility { background: var(--navy-deep); color: #dbe6f0; font-size: 0.875rem; }
.utility .wrap { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; align-items: center; justify-content: space-between; padding-block: 0.45rem; }
.utility-contact { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.utility a { color: #fff; text-decoration: none; }
.utility a:hover { text-decoration: underline; color: #fff; }
.utility .utility-pay { color: var(--gold); font-weight: 650; }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--sky); position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 0.75rem; }
.brand { display: block; flex: none; }
.brand img { width: auto; height: 80px; }

.nav-toggle {
  display: none;
  font: inherit; font-weight: 650; font-stretch: 85%;
  color: var(--navy); background: none;
  border: 2px solid var(--navy); border-radius: 4px;
  padding: 0.45rem 0.8rem; cursor: pointer;
}
.nav-toggle-bars { display: inline-block; width: 1.1rem; height: 2px; background: currentColor; position: relative; vertical-align: middle; margin-right: 0.5rem; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.25rem; }
.site-nav a {
  display: block; padding: 0.5rem 0.75rem;
  font-weight: 600; font-stretch: 88%; font-size: 1.0625rem;
  color: var(--ink); text-decoration: none; border-radius: 4px;
}
.site-nav a:hover { color: var(--navy); background: var(--snow); }
.site-nav a[aria-current="page"] { color: var(--navy); box-shadow: inset 0 -3px 0 var(--red); border-radius: 0; }
.site-nav .nav-cta { margin-left: 0.5rem; }
.site-nav .nav-cta a { background: var(--red); color: #fff; padding-inline: 1rem; }
.site-nav .nav-cta a:hover { background: var(--red-dark); color: #fff; }
.site-nav .nav-cta a[aria-current="page"] { box-shadow: none; border-radius: 4px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--sky); box-shadow: 0 12px 24px -12px rgba(0, 26, 71, 0.25); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 0.5rem var(--gutter) 1rem; gap: 0; }
  .site-nav a { padding: 0.8rem 0.25rem; border-bottom: 1px solid var(--snow); border-radius: 0; }
  .site-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--red); padding-left: 0.9rem; }
  .site-nav .nav-cta { margin: 0.75rem 0 0; }
  .site-nav .nav-cta a { text-align: center; border-radius: 4px; border: 0; }
  .brand img { height: 52px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 700; font-stretch: 85%; font-size: 1.0625rem; line-height: 1.2;
  padding: 0.85rem 1.35rem; border-radius: 4px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.75); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--navy); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Ridge (the mountain line from the logo) ---------- */
.ridge { display: block; width: 100%; height: clamp(36px, 6vw, 84px); color: var(--white); margin-top: -1px; }
.ridge-snow { color: var(--snow); }

/* ---------- Home hero ---------- */
.hero { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch; min-height: 30rem; }
.hero-copy { padding: clamp(3rem, 6vw, 5.5rem) var(--gutter) clamp(4.5rem, 8vw, 7rem) max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); display: flex; flex-direction: column; justify-content: center; }
.hero h1 { color: #fff; font-stretch: 72%; margin-bottom: 0.4em; max-width: 13ch; }
.hero-lede { font-size: clamp(1.1rem, 0.6vw + 1rem, 1.3rem); line-height: 1.55; color: #e3ecf5; max-width: 40ch; margin-bottom: 1.75rem; }
.hero-photo { position: relative; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 60%; }
.hero .ridge { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 2.75rem var(--gutter) 2.5rem; }
  .hero-photo { height: 13rem; }
  .hero h1 { max-width: 16ch; }
}

/* ---------- Residents panel ---------- */
.residents { position: relative; z-index: 3; margin-top: clamp(-3.5rem, -4vw, -1.5rem); }
.residents-panel { background: var(--white); border: 1px solid var(--sky); border-top: 5px solid var(--gold); border-radius: 6px; box-shadow: 0 18px 40px -24px rgba(0, 26, 71, 0.45); display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); }
.residents-title { min-width: 13.5rem; padding: 1.5rem 1.75rem; border-right: 1px solid var(--sky); display: flex; flex-direction: column; justify-content: center; }
.residents-title h2 { font-size: 1.5rem; margin: 0 0 0.2rem; }
.residents-title p { margin: 0; color: var(--muted); font-size: 0.95rem; max-width: 18ch; }
.resident-action { display: block; padding: 1.5rem 1.75rem; text-decoration: none; color: var(--ink); border-right: 1px solid var(--sky); }
.resident-action:last-child { border-right: 0; }
.resident-action strong { display: block; font-size: 1.2rem; font-weight: 700; font-stretch: 85%; color: var(--navy); margin-bottom: 0.25rem; text-decoration: underline; text-decoration-color: var(--sky); text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
.resident-action span { display: block; color: var(--muted); font-size: 0.95rem; line-height: 1.45; }
.resident-action:hover { background: var(--snow); color: var(--ink); }
.resident-action:hover strong { text-decoration-color: var(--red); }

@media (max-width: 960px) {
  .residents-panel { grid-template-columns: 1fr; }
  .residents-title { border-right: 0; border-bottom: 1px solid var(--sky); padding: 1.25rem 1.5rem; }
  .residents-title p { max-width: none; }
  .resident-action { border-right: 0; border-bottom: 1px solid var(--sky); padding: 1.1rem 1.5rem; }
  .resident-action:last-child { border-bottom: 0; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section-snow { background: var(--snow); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.5rem 2rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--ink); }
.more-link { font-weight: 650; font-stretch: 88%; }

/* About split */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.award { margin: 0; padding: 1.25rem; border: 1px solid var(--sky); border-radius: 6px; background: var(--white); text-align: center; }
.award img { width: 150px; margin: 0 auto 0.75rem; }
.award figcaption { font-size: 0.9rem; line-height: 1.4; color: var(--muted); }
.award figcaption strong { display: block; color: var(--navy); font-stretch: 88%; font-size: 1rem; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } .award { max-width: 18rem; } }

/* Service groups */
.service-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 4vw, 3rem); }
.service-group h3 { padding-bottom: 0.6rem; border-bottom: 3px solid var(--navy); margin-bottom: 0.9rem; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { position: relative; padding: 0.45rem 0 0.45rem 1.75rem; border-bottom: 1px solid var(--sky); }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: ""; position: absolute; left: 0.1rem; top: 0.95rem;
  width: 0.85rem; height: 0.45rem; border-left: 3px solid var(--red); border-bottom: 3px solid var(--red);
  transform: rotate(-45deg);
}
@media (max-width: 860px) { .service-groups { grid-template-columns: 1fr; } }

.type-strip { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; list-style: none; padding: 0; margin: 0; }
.type-strip li { font-weight: 650; font-stretch: 85%; color: var(--navy); background: var(--snow); border: 1px solid var(--sky); padding: 0.35rem 0.85rem; border-radius: 999px; }

/* ---------- Communities ---------- */
.community-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 1.5rem 1.25rem; }
.community a { display: block; text-decoration: none; color: var(--ink); }

.community-media { display: block; aspect-ratio: 16 / 10; border: 1px solid var(--sky); border-radius: 6px; overflow: hidden; background: var(--white); }
.community-media img { width: 100%; height: 100%; object-fit: cover; }
.community-media.is-logo img { object-fit: contain; padding: 0.9rem; }
.community-name { display: block; margin-top: 0.6rem; font-weight: 680; font-stretch: 88%; font-size: 1.08rem; line-height: 1.25; color: var(--navy); }
.community-url { display: block; font-size: 0.85rem; color: var(--muted); overflow-wrap: anywhere; }
.community a:hover .community-media { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.community a:hover .community-name { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }

.finder { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem 1.5rem; margin-bottom: 2rem; padding: 1.25rem 1.5rem; background: var(--snow); border: 1px solid var(--sky); border-radius: 6px; }
.finder label { display: block; font-weight: 650; font-stretch: 88%; color: var(--navy); margin-bottom: 0.35rem; }
.finder input { width: min(24rem, 100%); }
.finder-count { margin: 0; color: var(--muted); }
@media (max-width: 600px) {
  .community-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 0.85rem; }
  .community-name { font-size: 1rem; }
  .community-url { display: none; }
  .community-media.is-logo img { padding: 0.5rem; }
}
.finder-empty { padding: 1.5rem; border: 1px dashed var(--sky); border-radius: 6px; }

/* ---------- Page header (inner pages) ---------- */
.page-hero { background: var(--navy); color: #fff; position: relative; }
.page-hero .wrap { padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.page-hero h1 { color: #fff; font-stretch: 72%; font-size: clamp(2.4rem, 3.6vw + 1rem, 3.75rem); margin-bottom: 0.3em; }
.page-hero p { color: #e3ecf5; font-size: 1.15rem; max-width: 58ch; margin: 0; }
.page-hero .ridge { position: absolute; left: 0; right: 0; bottom: 0; }

/* ---------- Team ---------- */
.team-layout { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.team-index { position: sticky; top: 1.5rem; font-size: 0.95rem; }
.team-index h2 { font-size: 1.1rem; font-stretch: 88%; margin-bottom: 0.5rem; }
.team-index ol { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.team-index li a { display: block; padding: 0.3rem 0; text-decoration: none; color: var(--ink); }
.team-index li a:hover { color: var(--navy); text-decoration: underline; }
.team-group + .team-group { margin-top: 3rem; }
.team-group > h2 { font-size: 1.6rem; padding-bottom: 0.5rem; border-bottom: 3px solid var(--navy); }
.person { padding: 1.5rem 0; border-bottom: 1px solid var(--sky); scroll-margin-top: 1.5rem; }
.person:last-child { border-bottom: 0; }
.person h3 { font-size: 1.5rem; font-stretch: 80%; margin-bottom: 0.15rem; }
.person-role { font-weight: 600; color: var(--steel); margin: 0 0 0.6rem; }
.creds { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 0 0 0.85rem; }
.creds li { font-size: 0.82rem; font-weight: 700; color: var(--navy); border: 1px solid var(--navy); border-radius: 3px; padding: 0.1rem 0.45rem; }
.glossary { margin-top: 3rem; padding: 1.5rem; background: var(--snow); border-radius: 6px; font-size: 0.95rem; }
.glossary h2 { font-size: 1.2rem; font-stretch: 88%; }
.glossary dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 0 0 1rem; }
.glossary dt { font-weight: 700; color: var(--navy); }
.glossary dd { margin: 0; }
.glossary p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .team-layout { grid-template-columns: 1fr; } .team-index { position: static; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-list { margin: 0; display: grid; gap: 1.1rem; }
.contact-list div { padding-bottom: 1.1rem; border-bottom: 1px solid var(--sky); }
.contact-list dt { font-weight: 700; font-stretch: 88%; color: var(--navy); margin-bottom: 0.15rem; }
.contact-list dd { margin: 0; }
.map-frame { margin-top: var(--section); border: 1px solid var(--sky); border-radius: 6px; overflow: hidden; height: clamp(18rem, 32vw, 28rem); background: var(--snow); }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
form.form-card.form-wide { max-width: 52rem; }
.form-card { background: var(--white); border: 1px solid var(--sky); border-radius: 6px; padding: clamp(1.25rem, 3vw, 2rem); }
.form-card h2 { font-size: 1.6rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; min-width: 0; }
legend { font-size: 1.25rem; font-weight: 700; font-stretch: 85%; color: var(--navy); padding: 0; margin-bottom: 0.9rem; width: 100%; border-bottom: 2px solid var(--navy); padding-bottom: 0.4rem; }
.field { margin-bottom: 1rem; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.req { color: var(--red); }
.hint { font-size: 0.9rem; color: var(--muted); margin-top: 0.25rem; }
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 0.7rem 0.8rem; border: 1px solid #8fa3b8; border-radius: 4px; background: var(--white);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--navy); }
textarea { min-height: 8rem; resize: vertical; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.field-row-3 { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 620px) { .field-row, .field-row-3 { grid-template-columns: 1fr; } }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.choices label { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 500; cursor: pointer; }
.choices input { width: 1.1rem; height: 1.1rem; accent-color: var(--navy); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 1rem; padding: 0.9rem 1rem; border-radius: 4px; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-success { background: #e7f5ec; color: #145a32; border: 1px solid #9fd5b2; }
.form-status.is-error { background: #fdecef; color: var(--red-dark); border: 1px solid #f1a9b8; }
.form-status.is-info { background: var(--snow); color: var(--navy); border: 1px solid var(--sky); }

/* ---------- Callout / CTA band ---------- */
.cta-band { background: var(--navy); color: #e3ecf5; }
.cta-band .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: center; padding-block: clamp(3rem, 6vw, 4.5rem); }
.cta-band h2 { color: #fff; }
.cta-band p { margin: 0; }
.cta-facts { margin: 0; display: grid; gap: 0.9rem; }
.cta-facts dt { font-weight: 700; font-stretch: 88%; color: var(--gold); }
.cta-facts dd { margin: 0; color: #fff; }
.cta-facts a { color: #fff; }
@media (max-width: 820px) { .cta-band .wrap { grid-template-columns: 1fr; } }

.notice { padding: 1.25rem 1.5rem; border-left: 5px solid var(--gold); background: var(--snow); border-radius: 0 6px 6px 0; }
.notice p:last-child { margin-bottom: 0; }

.prose { max-width: 44rem; }
.prose h2 { margin-top: 2.25rem; }
.prose h2:first-child { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #c9d6e3; font-size: 0.95rem; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; padding-block: 3.5rem 2.5rem; }
.footer-logo { background: #fff; display: inline-block; padding: 0.6rem 0.8rem; border-radius: 4px; margin-bottom: 1.25rem; }
.footer-logo img { height: 56px; width: auto; }
.site-footer h2 { color: #fff; font-size: 1.1rem; font-stretch: 88%; margin-bottom: 0.75rem; }
.site-footer a { color: #fff; }
.site-footer address { font-style: normal; line-height: 1.7; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.areas { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1.5rem; }
.areas li { padding: 0.12rem 0; break-inside: avoid; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.15); padding-block: 1.25rem; font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .utility, .site-nav, .nav-toggle, .ridge, .residents, .map-frame, .cta-band .btn { display: none !important; }
  .hero, .page-hero, .cta-band, .site-footer { background: none !important; color: #000 !important; }
  .hero h1, .page-hero h1, .cta-band h2 { color: #000 !important; }
}
