/* ==========================================================================
   Harbor Pines HOA — demo site styles
   Direction: coastal Long Island residential — dune sand, hydrangea blue,
   pitch-pine green, cedar shingle, beach-rose coral. Signature element is
   the hand-drawn plat-map illustration in the hero (Pine Loop Rd).
   ========================================================================== */

:root {
  /* palette */
  --sand:            #F3ECDC;
  --sand-deep:        #E8DDC3;
  --paper:            #FBF8F0;
  --ink:              #2B362A;
  --pine:             #3F5443;
  --pine-deep:        #28352A;
  --hydrangea:        #6C87A6;
  --hydrangea-light:  #CBD9E2;
  --dune-grass:       #8B9B6A;
  --shingle:          #8B6F52;
  --coral:            #C97458;
  --coral-deep:       #A85940;
  --line:             rgba(43, 54, 42, 0.16);

  /* type */
  --font-display: "Iowan Old Style", "Palatino Linotype", "URW Palladio L", "Book Antiqua", Georgia, serif;
  --font-body: "Seravek", "Gill Sans Nova", "Gill Sans MT", "Gill Sans", "Segoe UI", "Myriad Pro", sans-serif;
  --font-mono: "Courier New", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* fluid editorial type scale */
  --fs-hero: clamp(2.35rem, 1.6rem + 3.4vw, 4.1rem);
  --fs-h2:   clamp(1.7rem, 1.35rem + 1.6vw, 2.5rem);
  --fs-h3:   clamp(1.12rem, 1.02rem + 0.45vw, 1.35rem);
  --fs-lede: clamp(1.05rem, 0.98rem + 0.32vw, 1.2rem);

  --max-width: 1140px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--pine);
  color: var(--paper);
  padding: 10px 18px;
  z-index: 100;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  left: 0;
}

a { color: inherit; }

:focus-visible {
  outline: 2.5px solid var(--coral);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--pine-deep);
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--shingle);
  margin: 0 0 10px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(243, 236, 220, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--pine-deep);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.01em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--shingle);
}

.site-nav {
  display: flex;
  gap: 28px;
}

.site-nav a {
  text-decoration: none;
  font-size: 15px;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1.5px;
  background: var(--coral);
  transition: right 0.2s ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  right: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--pine-deep);
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav.is-open { max-height: 320px; }
  .site-nav a {
    padding: 14px 28px;
    border-top: 1px solid var(--line);
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: clamp(56px, 40px + 3vw, 88px) 0 clamp(48px, 36px + 2vw, 72px);
  overflow: clip;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero-copy h1 {
  font-size: var(--fs-hero);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
  max-width: 15ch;
}

.hero-lede {
  font-size: var(--fs-lede);
  max-width: 46ch;
  color: var(--ink);
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 3px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--pine);
  color: var(--paper);
}
.btn-primary:hover { background: var(--pine-deep); }

.btn-ghost {
  border-color: var(--pine);
  color: var(--pine-deep);
}
.btn-ghost:hover { background: var(--sand-deep); }

.hero-plan {
  display: flex;
  justify-content: center;
}

.plat-svg {
  width: 100%;
  max-width: 480px;
  height: auto;
}

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-copy h1 { max-width: none; }
  .hero-plan { order: -1; max-width: 360px; margin: 0 auto; }
}

/* ==========================================================================
   Section shell
   ========================================================================== */

.section {
  padding: 68px 0;
}

.section-tinted {
  background: var(--sand-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  margin-bottom: 40px;
  max-width: 60ch;
}

.section-head h2 {
  font-size: var(--fs-h2);
}

.section-note {
  margin-top: 12px;
  color: var(--shingle);
  font-size: 15px;
}

/* ==========================================================================
   Announcements — bulletin board
   ========================================================================== */

.notice-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.notice-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 26px 24px 24px;
  box-shadow: 0 1px 0 var(--line);
}

.notice-card:nth-child(1) { rotate: -0.6deg; }
.notice-card:nth-child(2) { rotate: 0.5deg; }
.notice-card:nth-child(3) { rotate: -0.3deg; }

.pin {
  position: absolute;
  top: -7px;
  left: 28px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 2px 3px rgba(0,0,0,0.2);
}

.notice-date {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--hydrangea);
  border: 1px solid var(--hydrangea);
  border-radius: 999px;
  padding: 3px 11px;
  margin-bottom: 14px;
}

.notice-card h3 {
  font-size: var(--fs-h3);
  line-height: 1.3;
  margin-bottom: 10px;
}

.notice-card p {
  font-size: 15px;
  color: var(--ink);
}

@media (max-width: 900px) {
  .notice-board { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .notice-board { grid-template-columns: 1fr; }
  .notice-card { rotate: 0 !important; }
}

/* ==========================================================================
   Amenities — pinned plat-map moment.
   The plan sticks in view while the loop's six stops advance beside it; each
   stop's badge and its matching map marker fill in as the pin timeline
   reaches it. Base state (no pin support / reduced motion / no JS): a plain
   two-column list next to a static map, every stop already fully legible.
   ========================================================================== */

.amenities { overflow: clip; }

.amenities-track { --m-pin-length: 360vh; }
.amenities-pin {
  --m-pin-height: 100vh;
  padding-block: clamp(2.5rem, 1.8rem + 3vw, 4.5rem);
}

.amenities-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 2vw, 56px);
  align-items: center;
}

.amenities-map {
  display: flex;
  justify-content: center;
}

.plat-svg-large {
  width: 100%;
  max-width: 460px;
  height: auto;
}

.marker-dot {
  fill: var(--paper);
  stroke: var(--coral);
  stroke-width: 1.75;
  transform-box: fill-box;
  transform-origin: center;
}
.marker-num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  fill: var(--coral-deep);
}

.amenity-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px 30px;
}

.amenity-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.step-badge {
  order: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--coral);
  background: var(--paper);
  color: var(--coral-deep);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  flex: none;
}

.amenity-step .amenity-icon {
  order: 2;
  width: 22px;
  height: 22px;
  color: var(--pine);
  margin: 0;
  flex: none;
}

.amenity-step h3 {
  order: 3;
  flex-basis: 100%;
  font-size: var(--fs-h3);
  margin: 4px 0 2px;
}

.amenity-step p {
  order: 4;
  flex-basis: 100%;
  font-size: 14px;
  color: var(--ink);
  margin: 0;
}

/* Pin choreography: badge and marker fill together, keyed to each stop's
   slice of the pin timeline. Text itself never dims, only the badge/marker
   fill and a small lift carry the motion, so a paused scroll always reads. */
@keyframes amenity-step-rise {
  0%   { transform: translate3d(0, 14px, 0); }
  30%  { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
@keyframes amenity-badge-fill {
  0% {
    background: var(--paper);
    border-color: rgba(201, 116, 88, 0.5);
    color: var(--coral-deep);
  }
  30%, 100% {
    background: var(--coral);
    border-color: var(--coral);
    color: var(--paper);
  }
}
@keyframes amenity-marker-fill {
  0% {
    fill: var(--paper);
    stroke: var(--coral);
    transform: scale(1);
  }
  30%, 100% {
    fill: var(--coral);
    stroke: var(--coral-deep);
    transform: scale(1.3);
  }
}
@keyframes amenity-marker-text {
  0%   { fill: var(--coral-deep); }
  30%, 100% { fill: var(--paper); }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .amenity-step,
    .amenity-step .step-badge {
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --m-pin;
    }
    .amenity-step { animation-name: amenity-step-rise; }
    .amenity-step .step-badge { animation-name: amenity-badge-fill; }

    .map-marker .marker-dot,
    .map-marker .marker-num {
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --m-pin;
    }
    .map-marker .marker-dot { animation-name: amenity-marker-fill; }
    .map-marker .marker-num { animation-name: amenity-marker-text; }

    .amenity-step:nth-child(1), .amenity-step:nth-child(1) .step-badge,
    .map-marker:nth-child(1) .marker-dot, .map-marker:nth-child(1) .marker-num { animation-range: contain 0% contain 18%; }
    .amenity-step:nth-child(2), .amenity-step:nth-child(2) .step-badge,
    .map-marker:nth-child(2) .marker-dot, .map-marker:nth-child(2) .marker-num { animation-range: contain 15% contain 33%; }
    .amenity-step:nth-child(3), .amenity-step:nth-child(3) .step-badge,
    .map-marker:nth-child(3) .marker-dot, .map-marker:nth-child(3) .marker-num { animation-range: contain 30% contain 48%; }
    .amenity-step:nth-child(4), .amenity-step:nth-child(4) .step-badge,
    .map-marker:nth-child(4) .marker-dot, .map-marker:nth-child(4) .marker-num { animation-range: contain 45% contain 63%; }
    .amenity-step:nth-child(5), .amenity-step:nth-child(5) .step-badge,
    .map-marker:nth-child(5) .marker-dot, .map-marker:nth-child(5) .marker-num { animation-range: contain 60% contain 78%; }
    .amenity-step:nth-child(6), .amenity-step:nth-child(6) .step-badge,
    .map-marker:nth-child(6) .marker-dot, .map-marker:nth-child(6) .marker-num { animation-range: contain 75% contain 96%; }
  }
}

/* Below 900px the pin is dropped: a static map above a plain stacked list
   reads far better on a phone than a long pinned scroll. */
@media (max-width: 900px) {
  .amenities-track { min-height: 0 !important; }
  .amenities-pin {
    position: static !important;
    min-height: 0 !important;
    display: block !important;
  }
  .amenities-grid { grid-template-columns: 1fr; }
  .amenities-map { margin-bottom: 8px; }
  .plat-svg-large { max-width: 340px; }
  .amenity-steps { grid-template-columns: 1fr; }
  .amenity-step,
  .amenity-step .step-badge,
  .map-marker .marker-dot,
  .map-marker .marker-num {
    animation: none !important;
    transform: none !important;
  }
  .step-badge { background: var(--coral); border-color: var(--coral); color: var(--paper); }
  .marker-dot { fill: var(--coral); stroke: var(--coral-deep); }
  .marker-num { fill: var(--paper); }
}

/* ==========================================================================
   Documents
   ========================================================================== */

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.doc-row { border-bottom: 1px solid var(--line); }

.doc-link {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 6px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease, padding-left 0.15s ease;
}

.doc-link:hover,
.doc-link:focus-visible {
  background: var(--sand-deep);
  padding-left: 14px;
}

.doc-icon {
  flex: none;
  width: 30px;
  height: 30px;
  color: var(--shingle);
}
.doc-icon svg { width: 100%; height: 100%; }

.doc-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.doc-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--pine-deep);
}

.doc-desc {
  font-size: 14px;
  color: var(--shingle);
}

.doc-meta {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--hydrangea);
  white-space: nowrap;
}

@media (max-width: 620px) {
  .doc-link { flex-wrap: wrap; }
  .doc-meta { margin-left: 48px; }
}

/* ==========================================================================
   Board & contact
   ========================================================================== */

.board-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start;
}

.board-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.board-member {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 16px 18px;
}

.avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pine);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
}

.board-member:nth-child(3n+1) .avatar { background: var(--pine); }
.board-member:nth-child(3n+2) .avatar { background: var(--hydrangea); }
.board-member:nth-child(3n+3) .avatar { background: var(--coral); }

.member-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--pine-deep);
}

.member-role {
  display: block;
  font-size: 13px;
  color: var(--shingle);
}

.contact-card {
  background: var(--pine);
  color: var(--sand);
  padding: 30px 28px;
  border-radius: 3px;
}

.contact-card h3 {
  color: var(--sand);
  font-size: 17px;
  margin-bottom: 16px;
}

.contact-line {
  font-size: 14.5px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.contact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hydrangea-light);
  margin-bottom: 2px;
}

@media (max-width: 860px) {
  .board-layout { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .board-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Dues
   ========================================================================== */

.dues-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.ledger-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 28px 26px;
  font-family: var(--font-mono);
}

.ledger-row {
  display: flex;
  justify-content: space-between;
  font-size: 14.5px;
  padding: 7px 0;
}

.ledger-total {
  font-size: 17px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--pine-deep);
  padding-bottom: 12px;
}

.ledger-divider {
  border-top: 1px dashed var(--line);
  margin: 10px 0;
}

.dues-info h3 {
  font-size: 18px;
  margin-bottom: 16px;
}

.pay-methods {
  margin: 0 0 20px;
  padding-left: 20px;
}

.pay-methods li {
  margin-bottom: 12px;
  font-size: 15px;
}

.dues-note {
  font-size: 14px;
  color: var(--shingle);
}

@media (max-width: 780px) {
  .dues-layout { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--pine-deep);
  color: var(--sand);
  padding: 40px 0 30px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: -9px -10px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 14px;
  color: var(--hydrangea-light);
  padding: 9px 10px;
  min-height: 40px;
}
.footer-links a:hover { color: var(--sand); }

.footer-disclaimer {
  width: 100%;
  margin-top: 10px;
  font-size: 12.5px;
  color: rgba(243, 236, 220, 0.6);
  border-top: 1px solid rgba(243, 236, 220, 0.15);
  padding-top: 18px;
}
