/* ==========================================================================
   Crown Oaks Townhomes Association
   Palette drawn from oak woodland in shade: bark, moss, limestone, acorn.
   Two typefaces only — Newsreader for display, Atkinson Hyperlegible for
   everything read at length (it was designed for low-vision readers, which
   matters for a community document library).
   ========================================================================== */

:root {
  --ink:      #16201a;
  --ink-soft: #40493f;
  --moss:     #4a6147;
  --acorn:    #8a6a3f;
  --paper:    #e9ebe2;
  --card:     #f6f6f1;
  --rule:     #cbcec1;
  --rule-dim: #dcdfd4;

  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body: "Atkinson Hyperlegible", "Helvetica Neue", Arial, sans-serif;

  --shell: 68rem;
  --gap: clamp(3.5rem, 7vw, 6.5rem);
}

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

/* Images must never be sized by their HTML width/height attributes. Those
   attributes are kept so the browser can reserve space before the file loads,
   but `height: auto` is what lets CSS take over the actual sizing. Without it,
   an aspect-ratio rule below is ignored and the image renders at full file
   height. */
img, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}
@media (max-width: 30rem) { .shell { width: min(100% - 1.75rem, var(--shell)); } }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: .75rem 1.25rem; z-index: 99; border-radius: 0 0 4px 0;
}
.skip:focus { left: 0; top: 0; }

:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 3px;
}

/* --- masthead ------------------------------------------------------------ */

.masthead {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-dim);
}

.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 4.5rem;
}

.mark {
  display: flex; align-items: center; gap: .7rem;
  text-decoration: none; color: var(--ink);
}
.mark__glyph { width: 1.6rem; height: 1.6rem; flex: none; }
.glyph-cap  { fill: var(--moss); }
.glyph-nut  { fill: var(--acorn); }
.glyph-stem { stroke: var(--moss); stroke-width: 1.4; stroke-linecap: round; fill: none; }

.mark__text {
  font-family: var(--display);
  font-size: 1.28rem; font-weight: 500; letter-spacing: .005em;
  line-height: 1.05; display: flex; flex-direction: column;
}
.mark__sub {
  font-family: var(--body);
  font-size: .6rem; font-weight: 400; letter-spacing: .15em;
  text-transform: uppercase; color: var(--ink-soft);
  margin-top: .22rem;
}

.masthead__nav { display: flex; gap: 1.6rem; }
.masthead__nav a {
  font-size: .82rem; letter-spacing: .05em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-soft);
  padding-block: .35rem;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.masthead__nav a:hover { color: var(--ink); border-bottom-color: var(--acorn); }
@media (max-width: 34rem) {
  .masthead__nav { gap: 1rem; }
  .masthead__nav a { font-size: .72rem; letter-spacing: .03em; }
  .mark__sub { display: none; }
}
@media (max-width: 27rem) {
  .masthead__inner { flex-wrap: wrap; min-height: 0; padding-block: .7rem; row-gap: .5rem; }
  .masthead__nav { width: 100%; justify-content: space-between; gap: .5rem; }
  .mark__text { font-size: 1.15rem; }
}

/* --- photography ---------------------------------------------------------
   Sizes are set by the four variables below. Change them here and every
   photograph on the site follows.

   --banner-h      how tall the top banner is at this screen size
   --banner-focus  which part of the banner survives the crop
                   (`center`, `center 35%` to favour the top, etc.)
   --shot-ratio    shape of the pool and tennis photos, e.g. 4/3, 3/2, 16/9
   -------------------------------------------------------------------------- */

:root {
  --banner-h: 200px;
  --banner-focus: center;
  --shot-ratio: 4 / 3;
}
@media (min-width: 34rem)  { :root { --banner-h: 260px; } }
@media (min-width: 48rem)  { :root { --banner-h: 340px; } }
@media (min-width: 64rem)  { :root { --banner-h: 420px; } }
@media (min-width: 90rem)  { :root { --banner-h: 480px; } }

/* Short landscape screens — a phone turned sideways shouldn't lose the page
   to a full-height photograph. */
@media (max-height: 30rem) and (orientation: landscape) {
  :root { --banner-h: 160px; }
}

.banner { margin: 0; }
.banner img {
  width: 100%;
  height: var(--banner-h);
  object-fit: cover;
  object-position: var(--banner-focus);
  background: var(--rule-dim);
  border-bottom: 1px solid var(--rule);
}

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1.75rem 2.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
@media (max-width: 26rem) {
  .shots { grid-template-columns: 1fr; }
}

.shot { margin: 0; min-width: 0; }
.shot img {
  width: 100%;
  aspect-ratio: var(--shot-ratio);
  object-fit: cover;
  background: var(--rule-dim);
  border-radius: 3px;
}

/* Very old mobile browsers without aspect-ratio: the image simply keeps its
   own proportions instead of being cropped to a uniform shape. */
@supports not (aspect-ratio: 4 / 3) {
  .shot img { height: auto; }
}

.shot figcaption {
  margin-top: .85rem;
  font-size: .89rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.shot figcaption strong { color: var(--ink); font-weight: 700; }

/* --- hero ---------------------------------------------------------------- */

.hero { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4.5rem); }

.eyebrow {
  margin: 0 0 1.6rem;
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--acorn);
}

.hero__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.6rem, 7.5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -.018em;
  max-width: 16ch;
}

.hero__lede {
  margin: 1.8rem 0 0;
  max-width: 46ch;
  font-size: clamp(1.02rem, 1.6vw, 1.14rem);
  color: var(--ink-soft);
}

.courts {
  list-style: none;
  display: flex; flex-wrap: wrap;
  margin: clamp(2.25rem, 5vw, 3.25rem) 0 0; padding: 1.1rem 0 0;
  border-top: 1px solid var(--rule);
  gap: .55rem 1.5rem;
}
.courts li {
  font-family: var(--display);
  font-size: clamp(1rem, 2vw, 1.22rem);
  font-weight: 400;
  color: var(--moss);
}
.courts li::after {
  content: "Court";
  font-family: var(--body);
  font-size: .58em; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-left: .4rem;
  vertical-align: .28em;
}
.courts__note {
  margin: .8rem 0 0;
  font-size: .85rem; color: var(--ink-soft);
}

/* --- section scaffolding ------------------------------------------------- */

.section { padding-block: var(--gap); }
.section--intro { padding-block: clamp(2.5rem, 5vw, 3.75rem) var(--gap); }
.section--living { background: var(--card); border-block: 1px solid var(--rule); }
.section--docs { border-bottom: 1px solid var(--rule); }
.section--contact { padding-bottom: calc(var(--gap) * .8); }

/* --- introductory blurb --------------------------------------------------- */

.intro__lead {
  margin: 0;
  max-width: 40ch;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.35rem, 2.9vw, 1.95rem);
  line-height: 1.32;
  letter-spacing: -.008em;
}

.intro__body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1.5rem 3rem;
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
}
.intro__body p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

.intro__pull {
  margin: clamp(2rem, 4vw, 2.75rem) 0 0;
  padding-left: 1.4rem;
  max-width: 54ch;
  border-left: 2px solid var(--acorn);
  font-size: .97rem;
  line-height: 1.6;
}

.section__head { max-width: 44ch; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }

.section__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  letter-spacing: -.012em;
  line-height: 1.1;
}
.section__intro {
  margin: .9rem 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* --- the document stack: authority reads top to bottom ------------------- */

.stack { border-top: 1px solid var(--rule); }

.tier {
  display: grid;
  grid-template-columns: 15rem 1fr;
  gap: 2.5rem;
  padding-block: clamp(2rem, 4vw, 2.9rem);
  border-bottom: 1px solid var(--rule);
  transition: opacity .6s ease, transform .6s ease;
}
.tier.is-waiting { opacity: 0; transform: translateY(14px); }

.tier__kicker {
  display: inline-block;
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--paper);
  background: var(--moss);
  padding: .3rem .6rem;
  border-radius: 2px;
}
.tier__note {
  margin: .9rem 0 0;
  font-size: .84rem; line-height: 1.55; color: var(--ink-soft);
}

.tier__docs { display: grid; gap: 1.75rem; align-content: start; }

.doc {
  display: grid;
  gap: .55rem;
  padding-left: 1.4rem;
  border-left: 2px solid var(--acorn);
}

.doc__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.32rem, 2.6vw, 1.72rem);
  line-height: 1.18;
  letter-spacing: -.008em;
}
.doc__what {
  margin: 0;
  max-width: 58ch;
  color: var(--ink-soft);
  font-size: .95rem;
}
.doc__meta {
  margin: .1rem 0 0;
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft);
}
.doc__fmt {
  border: 1px solid var(--rule);
  padding: .15rem .4rem; border-radius: 2px;
}
.doc__dot { margin-inline: .55rem; }

.doc__get {
  justify-self: start;
  margin-top: .5rem;
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .87rem; letter-spacing: .04em;
  text-decoration: none;
  color: var(--paper); background: var(--ink);
  padding: .62rem 1.15rem;
  border-radius: 2px;
  transition: background .2s ease;
}
.doc__get:hover { background: var(--moss); }
.doc__arrow { transition: transform .2s ease; }
.doc__get:hover .doc__arrow { transform: translateY(2px); }
.doc__get--out:hover .doc__arrow { transform: translate(2px, -2px); }

.doc--link { border-left-color: var(--moss); }

.doc__pendingnote { display: none; }

.doc--pending { border-left-color: var(--rule); }
.doc--pending .doc__title { color: var(--ink-soft); }
.doc--pending .doc__get { display: none; }
.doc--pending .doc__pendingnote {
  display: block;
  margin: .5rem 0 0;
  font-size: .82rem; font-style: italic;
  color: var(--acorn);
}

.disclaimer {
  margin: 2.5rem 0 0;
  max-width: 62ch;
  font-size: .84rem; line-height: 1.6; color: var(--ink-soft);
}
.disclaimer a { color: var(--moss); text-underline-offset: 3px; }

@media (max-width: 44rem) {
  .tier { grid-template-columns: 1fr; gap: 1.4rem; }
}

/* --- living here --------------------------------------------------------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 2.25rem 2.75rem;
}
.fact { border-top: 1px solid var(--rule); padding-top: 1.1rem; }
.fact__q {
  margin: 0 0 .5rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.25;
}
.fact p { margin: 0; font-size: .92rem; color: var(--ink-soft); }
.fact a { color: var(--moss); text-underline-offset: 3px; }
.fact a:hover { color: var(--ink); }

/* --- contact ------------------------------------------------------------- */

.contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.5rem 1.4rem;
}
.card--primary { background: var(--paper); border-color: var(--moss); }
.card--urgent { border-color: var(--acorn); }

.card__kicker {
  margin: 0 0 .55rem;
  font-size: .66rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--acorn);
}
.card__name {
  margin: 0 0 .85rem;
  font-family: var(--display);
  font-weight: 500; font-size: 1.18rem; line-height: 1.2;
}
.card__lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.card__lines a { color: var(--moss); text-underline-offset: 3px; }
.card__lines a:hover { color: var(--ink); }
.card__hint {
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); margin-left: .35rem;
}
.card__body { font-size: .87rem; color: var(--ink-soft); line-height: 1.5; }

/* --- footer -------------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem 3rem;
}
.foot__inner { display: grid; gap: .6rem; }
.foot__name {
  margin: 0;
  font-family: var(--display);
  font-size: 1rem;
}
.foot__legal {
  margin: 0;
  max-width: 58ch;
  font-size: .8rem; color: var(--ink-soft);
}
