/* Single site stylesheet — ALL styling lives here (no inline styles ever).
   Design tokens are lifted from the WordPress/Divi source at
   hallowell-hoa.com: brand green #183414 (headings, links, buttons, footer),
   Fraunces headings over Montserrat body, 7px button radius, 1.75 body
   leading. One breakpoint collapses the nav and grids; keep the 900px value
   in sync with main.js if you change it. */

/* fonts -------------------------------------------------------------- */
/* Self-hosted latin woff2. The source loaded four Google families
   (Fraunces, Montserrat, Inter, Playfair Display) and only ever rendered
   two — Playfair was scoped to text modules containing no headings, and
   Inter was never applied. Montserrat ships as one variable file covering
   the whole weight axis. */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-400-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-var-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --color-primary: #183414;
  --color-primary-hover: rgba(24, 52, 20, .77);
  --color-ink: #0e0c19;
  --color-text: #000;
  --color-text-soft: #3c3a47;
  --color-muted: #666;
  --color-link-alt: #22577a;
  --color-light: #f5f7fa;
  --font-body: "Montserrat", Helvetica, Arial, sans-serif;
  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: #fff;
  font-family: var(--font-body); font-weight: 400;
  color: var(--color-text); line-height: 1.75; font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: 400;
  color: var(--color-primary); line-height: 1.2; margin: 0 0 .5em;
}
h1 { font-size: clamp(1.75rem, 4.06vw, 3.25rem); line-height: 1; }
h2 { font-size: clamp(1.5rem, 3.9vw, 3.125rem); line-height: 1.2; }
h3 { font-size: clamp(1.25rem, 2.19vw, 1.75rem); line-height: 1.4; }
h4 { font-size: 1.25rem; }
img { max-width: 100%; height: auto; }
a { color: var(--color-primary); }
a:hover { color: var(--color-link-alt); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 800px; }
.center { text-align: center; }
.flow > * + * { margin-top: 1em; }

.btn, .site-nav .btn {
  display: inline-block; background: var(--color-primary); color: #fff;
  padding: 6px 20px; border: 2px solid transparent; border-radius: 7px;
  font-size: 1.25rem; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background-color .2s, letter-spacing .2s;
}
.btn:hover {
  background: var(--color-primary-hover); color: #fff; letter-spacing: 1px;
}

/* header / nav ------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 10; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.1); }
.site-header__inner {
  max-width: var(--container); margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.site-header__logo { display: flex; align-items: center; text-decoration: none; }
.site-header__logo img { width: 210px; height: auto; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--color-primary); }
.site-nav { display: flex; gap: 4px; align-items: center; }
.nav-item { position: relative; }
.nav-top {
  display: block; padding: 8px 14px; color: var(--color-text);
  text-decoration: none; font-weight: 600; font-size: .95rem;
}
.nav-top.is-active, .nav-top:hover { color: var(--color-primary); }
.subnav {
  display: none; position: absolute; top: 100%; left: 0; min-width: 220px;
  margin: 0; padding: 8px 0; list-style: none; background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.12); border-radius: 4px;
}
.has-sub:hover .subnav, .has-sub.is-open .subnav { display: block; }
.subnav a { display: block; padding: 8px 16px; text-decoration: none; color: var(--color-text); }
.subnav a:hover { background: var(--color-light); }

/* sections ----------------------------------------------------------- */
.section { padding: 56px 0; }
.section--light { background: var(--color-light); }
.section__title { text-align: center; margin-bottom: 32px; }
.section__intro { max-width: 800px; margin: 0 auto 40px; text-align: center; }

/* home hero: background photo under the source's white gradient wash --- */
.home-hero {
  /* Measured on the source at 1280px: 128px of space above the logo, a 28px
     gap to the h1, 128px below it — 687px of hero in total. */
  padding: clamp(48px, 10vw, 128px) 0; text-align: center;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.71) 0%, rgba(255,255,255,.52) 99%),
    url("/images/hero-community.webp");
  background-size: cover; background-position: 50% 50%;
}
.home-hero__logo { width: 717px; max-width: 90%; height: auto; margin-bottom: 28px; }
.home-hero h1 { color: var(--color-primary); margin: 0; }

/* page hero (interior pages) ----------------------------------------- */
.page-hero { padding: 48px 0; background: var(--color-primary); color: #fff; }
.page-hero h1 { margin: 0; color: #fff; }
.page-hero__img { border-radius: 6px; }

/* split rows: text beside a photo ------------------------------------ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split--wide-left { grid-template-columns: 3fr 2fr; }
.split img { border-radius: 6px; display: block; width: 100%; height: auto; }

/* photo strip -------------------------------------------------------- */
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.photo-strip img { border-radius: 6px; display: block; width: 100%; height: auto; }

/* amenity blocks ----------------------------------------------------- */
.amenity { display: grid; gap: 40px; align-items: center; margin-top: 48px; }
.amenity--split { grid-template-columns: 3fr 2fr; }
.amenity--pair { grid-template-columns: 1fr 1fr; }
.amenity img { border-radius: 6px; display: block; width: 100%; height: auto; }
.amenity h3 { margin-top: 0; }
.amenity__body { color: var(--color-text-soft); }
.amenity__body > * + * { margin-top: 1em; }

/* contact cards ------------------------------------------------------ */
.contact-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  box-shadow: 0 2px 18px 0 rgba(0,0,0,.3); border-radius: 6px;
  background: #fff; overflow: hidden; margin-top: 40px;
}
/* Left-aligned with a 40px brand-green icon, matching the source's blurbs —
   the icons there come from FontAwesome/ETmodules; these are inline SVG. */
.contact-card { padding: 32px 28px; text-align: left; }
.contact-card + .contact-card { border-left: 1px solid #e8eae8; }
.contact-card__icon {
  display: block; width: 40px; height: 40px; margin-bottom: 14px;
  fill: var(--color-primary);
}
.contact-card h3 { font-size: 1.35rem; margin-bottom: .35em; }
.contact-card p { margin: 0; line-height: 1.6; }
.contact-card a { color: var(--color-link-alt); text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }

/* The block also renders below the body copy on interior pages. */
.management-block { margin-top: 64px; }

/* emergency notice --------------------------------------------------- */
.emergency {
  max-width: 800px; margin: 48px auto 0; padding: 25px;
  border-radius: 6px; box-shadow: 0 2px 18px 0 rgba(0,0,0,.3); background: #fff;
  border-top: 4px solid var(--color-primary);
}
.emergency h2 { font-size: clamp(1.25rem, 2.4vw, 1.75rem); }
.emergency > * + * { margin-top: 1em; }

/* long-page relief -----------------------------------------------------
   The pool page is 2,100+ words and the source carried no imagery, so the
   rules read as one wall of text. These give it rhythm without touching a
   word of the copy. Scoped to .page-body so the short pages are unaffected. */
.page-body > img.page-hero__img { width: 100%; margin-bottom: 8px; }

/* section rhythm: a short brand rule above each major heading */
.page-body h2 {
  margin-top: 2.2em; padding-top: .8em;
  border-top: 3px solid var(--color-primary);
}
.page-body h2:first-of-type { margin-top: 1.4em; }
.page-body h3 { margin-top: 1.8em; }

/* address panel */
.pool-location {
  background: var(--color-light); border-left: 4px solid var(--color-primary);
  border-radius: 6px; padding: 20px 24px; margin: 24px 0;
}
.pool-location p { margin: 0; }
.pool-location p + p { margin-top: .35em; font-weight: 600; }

/* membership pricing */
.price-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0; }
.price-card {
  background: #fff; border: 1px solid #e8eae8; border-top: 4px solid var(--color-primary);
  border-radius: 6px; padding: 20px 22px;
}
.price-card p { margin: 0; }
.price-card strong {
  display: block; font-family: var(--font-heading); font-weight: 400;
  font-size: 1.35rem; color: var(--color-primary); margin-bottom: .25em;
}

/* schedule download */
.schedule-download {
  display: flex; justify-content: center;
  background: var(--color-light); border-radius: 6px;
  padding: 24px; margin: 24px 0;
}

/* numbered rules: the two policy sections are 1,200 words of <ol>, and plain
   markers give the eye nothing to hold onto */
.page-body ol { list-style: none; counter-reset: rule; padding-left: 0; }
.page-body ol > li {
  counter-increment: rule; position: relative;
  padding-left: 46px; margin-bottom: 1.1em;
}
.page-body ol > li::before {
  content: counter(rule);
  position: absolute; left: 0; top: .1em;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--color-primary); color: #fff;
  font-family: var(--font-body); font-size: .8rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.page-body ol ul { margin-top: .6em; }
.page-body ol ul li { margin-bottom: .4em; }

/* pool schedule ------------------------------------------------------ */
/* Four seasonal schedules side by side. The grid breaks out of the 800px
   prose column so two columns of times stay readable. */
.schedule-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px 48px;
  /* Break out of the 800px prose column — two columns of times need the
     room — without widening the body copy or the rules below them. */
  width: min(1100px, calc(100vw - 40px));
  margin: 32px 0 32px 50%; transform: translateX(-50%);
}
.schedule > :first-child { margin-top: 0; }
.schedule h3 { margin-bottom: .4em; }
.schedule h5 { font-size: 1rem; margin-bottom: .6em; color: var(--color-text); }
.schedule ul { margin: 0 0 1em; padding-left: 1.2em; }

/* cards / grid ------------------------------------------------------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  display: block; background: #fff; border: 1px solid #e3e7ee; border-radius: 6px;
  padding: 24px; text-decoration: none; color: var(--color-text);
}
.card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }

/* articles ----------------------------------------------------------- */
.article-hero { padding: 48px 0 16px; }
.article-meta { color: var(--color-muted); font-size: .9rem; }
.article-body h2 { margin-top: 1.5em; }
blockquote {
  border-left: 4px solid var(--color-primary); margin: 1em 0;
  padding: .25em 0 .25em 1em; color: var(--color-muted);
}

/* analytics ---------------------------------------------------------- */
.tag-ns { display: none; visibility: hidden; }

/* embeds ------------------------------------------------------------- */
.video-wrap { position: relative; padding-top: 56.25%; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.form-wrap iframe { width: 100%; min-height: 600px; border: 0; }
.table-wrap { overflow-x: auto; }

/* footer ------------------------------------------------------------- */
.site-footer { background: var(--color-primary); color: #fff; margin-top: 56px; }
.site-footer a { color: #fff; }
.site-footer__main { max-width: var(--container); margin: 0 auto; padding: 51px 20px; }
.site-footer__logo img { width: 1024px; max-width: 100%; height: auto; }
.site-footer__note { margin: 20px 0 0; text-align: center; }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.2); padding: 16px 20px;
  text-align: center; font-size: .85rem;
}

/* responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    box-shadow: 0 8px 16px rgba(0,0,0,.12);
  }
  .site-nav.is-open { display: flex; }
  .subnav { position: static; box-shadow: none; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .split, .split--wide-left,
  .amenity--split, .amenity--pair,
  .price-cards,
  .schedule-grid { grid-template-columns: 1fr; }
  .photo-strip { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .contact-card + .contact-card { border-left: 0; border-top: 1px solid #e8eae8; }
  .management-block { margin-top: 48px; }
}
