/* ============================================================
   Hanover Falls HOA  |  Public Site Stylesheet  v3
   Fonts: Fraunces (display) + Nunito Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,600&family=Nunito+Sans:wght@300;400;500;600;700&display=swap');

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --forest:      #1E3D2F;
  --forest-deep: #122518;
  --forest-mid:  #2D5C42;
  --sage:        #6B8F71;
  --sage-lt:     #C8DAC9;
  --cream:       #F6F3ED;
  --cream2:      #EDE9E0;
  --cream3:      #E3DDD1;
  --gold:        #A8802A;
  --gold-lt:     #E8D49A;
  --ink:         #1A1814;
  --ink2:        #3D3830;
  --ink3:        #7A7268;
  --ink4:        #A89F94;
  --white:       #FDFCF9;
  --border:      rgba(30,61,47,.12);
  --border-md:   rgba(30,61,47,.22);
  --shadow-sm:   0 2px 8px rgba(26,24,20,.08);
  --shadow-md:   0 6px 24px rgba(26,24,20,.10);
  --shadow-lg:   0 16px 48px rgba(26,24,20,.13);
  --r:           8px;
  --r-lg:        14px;
  --serif:       'Fraunces', Georgia, serif;
  --sans:        'Nunito Sans', system-ui, sans-serif;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink2);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Typography ──────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--forest-deep);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { max-width: 68ch; }
p + p { margin-top: .9rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container        { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 2rem; }
section           { padding: 5rem 0; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: .65rem 1.5rem;
  border-radius: var(--r);
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .03em;
  cursor: pointer;
  border: none;
  transition: all .18s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-forest       { background: var(--forest); color: var(--white); }
.btn-forest:hover { background: var(--forest-deep); }
.btn-gold         { background: var(--gold); color: var(--white); }
.btn-gold:hover   { background: #8A6818; }
.btn-outline      { background: transparent; color: var(--forest); border: 1.5px solid var(--forest); }
.btn-outline:hover{ background: var(--forest); color: var(--white); }
.btn-outline-white{ background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.5); }
.btn-outline-white:hover { background: rgba(255,255,255,.12); border-color: var(--white); }
.btn-lg  { padding: .85rem 2rem; font-size: .92rem; }
.btn-sm  { padding: .42rem 1rem; font-size: .78rem; }
.btn-full{ width: 100%; justify-content: center; }

/* ── Header ──────────────────────────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(18,37,24,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 68px;
  gap: 2rem;
}

.site-logo { display: flex; flex-direction: column; line-height: 1.15; flex-shrink: 0; }
.site-logo .logo-name {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .01em;
}
.site-logo .logo-sub {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sage-lt);
  opacity: .75;
}

.main-nav { display: flex; align-items: center; gap: .2rem; flex: 1; justify-content: center; }
.main-nav a {
  font-size: .84rem;
  font-weight: 600;
  color: rgba(255,255,255,.72);
  padding: .45rem .85rem;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.main-nav a:hover,
.main-nav a.active { color: var(--white); background: rgba(255,255,255,.08); }

.header-ctas        { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }

.btn-board-login {
  background: var(--gold);
  color: var(--white);
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 700;
  padding: .48rem 1.1rem;
  border-radius: 6px;
  letter-spacing: .04em;
  border: none;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.btn-board-login:hover { background: #8A6818; }

.btn-resident-login {
  background: rgba(255,255,255,.10);
  color: var(--white);
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 700;
  padding: .48rem 1.1rem;
  border-radius: 6px;
  letter-spacing: .04em;
  border: 1.5px solid rgba(255,255,255,.28);
  transition: all .15s;
  cursor: pointer;
  white-space: nowrap;
}
.btn-resident-login:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.5); }

.mobile-menu-btn { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; padding: .3rem; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 7rem 0 6rem;
  background-color: var(--forest-deep);
  /* hero-bg-image set inline via PHP when image is available */
}

/* Overlay so text is always readable over any photo */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(12,28,18,.82) 0%,
    rgba(18,37,24,.60) 55%,
    rgba(18,37,24,.35) 100%
  );
  z-index: 0;
}

/* Fallback decorative layer when no photo */
.hero-overlay-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 40%, rgba(107,143,113,.18) 0%, transparent 60%),
    radial-gradient(ellipse at 10% 80%, rgba(168,128,42,.10) 0%, transparent 50%);
  z-index: 0;
}

.hero-inner { position: relative; z-index: 1; }

.hero-tag {
  display: inline-block;
  background: rgba(168,128,42,.20);
  color: var(--gold-lt);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: .35rem .9rem;
  border-radius: 99px;
  border: 1px solid rgba(168,128,42,.30);
  margin-bottom: 1.4rem;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  max-width: 16ch;
  margin-bottom: 1.2rem;
  font-weight: 600;
  text-shadow: 0 2px 20px rgba(0,0,0,.25);
}

.hero h1 em { font-style: italic; color: var(--sage-lt); }

.hero-lead {
  font-size: 1.05rem;
  color: rgba(255,255,255,.72);
  max-width: 52ch;
  margin-bottom: 2.2rem;
  line-height: 1.75;
  font-weight: 300;
}

.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,.12);
}

.hero-stat .value {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: .3rem;
}
.hero-stat .label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
}

/* ── Info blocks ─────────────────────────────────────────────────────────── */
.info-section { background: var(--white); }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2px;
  border: 2px solid var(--cream3);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.info-block {
  background: var(--white);
  padding: 2.4rem 2rem;
  border-right: 2px solid var(--cream3);
  transition: background .2s;
}
.info-block:last-child { border-right: none; }
.info-block:hover { background: var(--cream); }
.info-block-icon { width: 44px; height: 44px; background: var(--cream2); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 1rem; }
.info-block h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.info-block p  { font-size: .9rem; color: var(--ink3); line-height: 1.65; max-width: none; }

/* ── Section divider ─────────────────────────────────────────────────────── */
.section-label { display: flex; align-items: center; gap: 1rem; margin-bottom: 2.5rem; }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Board cards ─────────────────────────────────────────────────────────── */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 1.5rem; margin-top: 3rem; }

.board-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: box-shadow .2s, transform .2s;
}
.board-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.board-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  overflow: hidden;
  border: 3px solid var(--cream2);
}

.board-avatar img { width: 100%; height: 100%; object-fit: cover; }

.board-avatar-initials {
  width: 100%;
  height: 100%;
  background: var(--forest);
  color: var(--white);
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.board-card h3   { font-size: 1.05rem; margin-bottom: .3rem; }
.board-role {
  display: inline-block;
  background: var(--cream2);
  color: var(--forest);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .22rem .75rem;
  border-radius: 99px;
  margin-bottom: .8rem;
}
.board-card .bio     { font-size: .85rem; color: var(--ink3); line-height: 1.6; max-width: none; }
.board-card .contact { margin-top: 1rem; font-size: .82rem; color: var(--sage); font-weight: 600; }

/* ── Events ──────────────────────────────────────────────────────────────── */
.events-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }

.event-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  background: var(--white);
  padding: 1.5rem 1.8rem;
  transition: background .15s;
}
.event-row:hover { background: var(--cream); }

.event-date-block { text-align: center; background: var(--forest); color: var(--white); border-radius: var(--r); padding: .7rem .5rem; }
.event-date-block .month { font-size: .65rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .75; display: block; }
.event-date-block .day   { font-family: var(--serif); font-size: 2rem; font-weight: 700; line-height: 1; display: block; }
.event-date-block .year  { font-size: .65rem; opacity: .6; display: block; margin-top: .1rem; }

.event-info h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.event-meta    { font-size: .82rem; color: var(--ink3); display: flex; flex-wrap: wrap; gap: .6rem; }
.event-tag     { display: inline-block; background: var(--cream2); color: var(--ink3); font-size: .72rem; font-weight: 600; padding: .18rem .65rem; border-radius: 99px; }
.event-tag.featured { background: rgba(168,128,42,.15); color: var(--gold); }

/* ── Documents ───────────────────────────────────────────────────────────── */
.doc-category       { margin-bottom: 3rem; }
.doc-category-title { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink4); margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .7rem; }
.doc-list           { display: flex; flex-direction: column; gap: 2px; }

.doc-row { display: flex; align-items: center; gap: 1rem; background: var(--white); border: 1px solid var(--border); border-radius: var(--r); padding: 1rem 1.2rem; transition: border-color .15s, box-shadow .15s; }
.doc-row:hover { border-color: var(--sage-lt); box-shadow: var(--shadow-sm); }

.doc-icon       { width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.doc-icon.pdf   { background: rgba(192,48,48,.10); }
.doc-icon.docx  { background: rgba(29,90,182,.10); }
.doc-icon.other { background: var(--cream2); }

.doc-info            { flex: 1; min-width: 0; }
.doc-info .doc-title { font-size: .92rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: .15rem; }
.doc-info .doc-meta  { font-size: .78rem; color: var(--ink4); }

.doc-download { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; color: var(--forest); background: var(--cream); border: 1px solid var(--border-md); border-radius: 6px; padding: .38rem .85rem; transition: background .15s, border-color .15s; flex-shrink: 0; }
.doc-download:hover { background: var(--forest); color: var(--white); border-color: var(--forest); }

/* ── Page hero ───────────────────────────────────────────────────────────── */
.page-hero { background: var(--forest); padding: 3.5rem 0 3rem; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 80% 50%, rgba(107,143,113,.15) 0%, transparent 60%); pointer-events: none; }
.page-hero h1      { color: var(--white); position: relative; }
.page-hero .eyebrow{ position: relative; }
.page-hero p       { color: rgba(255,255,255,.58); font-size: .95rem; margin-top: .5rem; position: relative; }

.breadcrumb       { font-size: .8rem; color: rgba(255,255,255,.45); margin-bottom: .8rem; display: flex; align-items: center; gap: .4rem; }
.breadcrumb a     { color: rgba(255,255,255,.45); transition: color .15s; }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span  { opacity: .4; }

/* ── Alert banner ────────────────────────────────────────────────────────── */
.alert-banner { background: var(--gold); color: var(--white); text-align: center; padding: .6rem 1rem; font-size: .82rem; font-weight: 600; }
.alert-banner a { color: var(--white); text-decoration: underline; }

/* ── Announcements ───────────────────────────────────────────────────────── */
.announcements  { background: var(--cream2); }
.announce-list  { display: flex; flex-direction: column; gap: 1px; }
.announce-item  { background: var(--white); border-radius: var(--r); padding: 1.4rem 1.6rem; display: flex; gap: 1.2rem; align-items: flex-start; border: 1px solid var(--border); }
.announce-dot   { width: 10px; height: 10px; border-radius: 50%; background: var(--forest); margin-top: .55rem; flex-shrink: 0; }
.announce-item h4 { font-size: 1rem; margin-bottom: .25rem; }
.announce-item p  { font-size: .88rem; color: var(--ink3); max-width: none; }
.announce-date    { font-size: .75rem; color: var(--ink4); margin-top: .3rem; font-weight: 600; }

/* ── Public forms ────────────────────────────────────────────────────────── */
.public-form-wrap {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2.4rem 2.4rem 2rem;
  box-shadow: var(--shadow-sm);
}

.form-row        { margin-bottom: 1.2rem; }
.form-row label  { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--ink2); margin-bottom: .4rem; }
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: .6rem .85rem;
  border: 1px solid var(--border-md);
  border-radius: var(--r);
  font-family: var(--sans);
  font-size: .92rem;
  color: var(--ink);
  background: var(--cream);
  outline: none;
  transition: border-color .2s, background .2s;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus { border-color: var(--forest); background: var(--white); }
.form-row textarea { resize: vertical; min-height: 110px; }

.form-hint { font-size: .78rem; color: var(--ink4); margin-top: .3rem; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-success { background: rgba(29,110,96,.08); border: 1px solid rgba(29,110,96,.25); color: var(--forest); border-radius: var(--r); padding: 1rem 1.2rem; font-size: .9rem; font-weight: 500; display: none; margin-bottom: 1.2rem; }
.form-error   { background: rgba(192,48,48,.08); border: 1px solid rgba(192,48,48,.2);  color: #C03030; border-radius: var(--r); padding: 1rem 1.2rem; font-size: .9rem; display: none; margin-bottom: 1.2rem; }

/* ── Drop zone ───────────────────────────────────────────────────────────── */
.drop-zone { border: 2px dashed var(--border-md); border-radius: var(--r); padding: 1.5rem; text-align: center; color: var(--ink3); cursor: pointer; transition: border-color .2s, background .2s; }
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--forest); background: rgba(30,61,47,.03); }
.drop-zone input[type=file] { display: none; }
.drop-zone p { font-size: .85rem; max-width: none; }

.file-list  { display: flex; flex-direction: column; gap: 6px; margin-top: .8rem; }
.file-item  { display: flex; align-items: center; gap: 8px; font-size: .82rem; background: var(--cream2); border-radius: 6px; padding: .4rem .8rem; color: var(--ink2); }
.file-item button { margin-left: auto; background: none; border: none; color: #C03030; cursor: pointer; font-size: 1rem; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
#site-footer { background: var(--forest-deep); color: rgba(255,255,255,.55); padding: 3.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 1.5rem; }
.footer-brand .logo-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: var(--white); margin-bottom: .4rem; }
.footer-brand p { font-size: .85rem; line-height: 1.65; max-width: 36ch; }
.footer-col h4 { font-family: var(--sans); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.35); margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .55rem; }
.footer-col a  { font-size: .88rem; transition: color .15s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; font-size: .78rem; }

/* ── Card ────────────────────────────────────────────────────────────────── */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.8rem; box-shadow: var(--shadow-sm); }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.text-center   { text-align: center; }
.text-center p { margin-left: auto; margin-right: auto; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.no-events { text-align: center; padding: 4rem 1rem; color: var(--ink4); }
.loading-state { text-align: center; padding: 3rem 1rem; color: var(--ink4); font-style: italic; }

/* ── Mobile nav ──────────────────────────────────────────────────────────── */
.mobile-nav { display: none; position: fixed; inset: 0; z-index: 300; background: rgba(18,37,24,.97); flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem; }
.mobile-nav.open { display: flex; }
.mobile-nav a { font-family: var(--serif); font-size: 1.8rem; font-weight: 600; color: rgba(255,255,255,.7); transition: color .15s; }
.mobile-nav a:hover { color: var(--white); }
.mobile-nav-close { position: absolute; top: 1.5rem; right: 1.5rem; background: none; border: none; color: rgba(255,255,255,.6); font-size: 1.8rem; cursor: pointer; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .event-row { grid-template-columns: 72px 1fr; }
  .event-row > .btn { display: none; }
  .form-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .container, .container-narrow { padding: 0 1.1rem; }
  section { padding: 3rem 0; }
  .hero   { padding: 4rem 0 3.5rem; }
  .hero-stats { gap: 1.5rem; }
  .board-grid { grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
  .public-form-wrap { padding: 1.6rem 1.2rem; }
}
