/* Bella Vicenza HOA — public site styles
   Palette is drawn from the "BV" monogram (steel navy) with a warm Tuscan gold accent. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/inter-latin.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 600 700; font-display: swap; src: url("/fonts/playfair-display-latin.woff2") format("woff2"); }

:root {
    --navy-950: #0a1d36;
    --navy-900: #0f2a4a;
    --navy-800: #16385f;
    --navy-700: #1f4a6e;
    --navy-100: #e4edf5;
    --gold-500: #c39a4b;
    --gold-600: #9a6f27;
    --gold-100: #f5ecd9;
    --cream: #faf8f4;
    --cream-2: #f3eee5;
    --surface: #ffffff;
    --ink: #1b2733;
    --muted: #556270;
    --line: #e5dfd3;
    --ok: #2f7a4f;
    --radius: 14px;
    --shadow-sm: 0 1px 2px rgba(15, 42, 74, .06), 0 1px 3px rgba(15, 42, 74, .06);
    --shadow: 0 4px 12px rgba(15, 42, 74, .07), 0 12px 32px rgba(15, 42, 74, .08);
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
    --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 106.25%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--cream); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--navy-700); text-underline-offset: 3px; }
a:hover { color: var(--navy-900); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; }
p { margin: 0 0 1em; }
address { font-style: normal; }

:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; border-radius: 4px; }

.container { width: min(1140px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--gold-500); color: var(--navy-950); padding: 10px 16px; border-radius: 8px; font-weight: 600; transition: top .15s; }
.skip-link:focus { top: 12px; }

.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--navy-900); color: #fff; box-shadow: 0 2px 12px rgba(10, 29, 54, .35); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand img { border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; letter-spacing: .01em; }
.brand-sub { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-500); }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: rgba(255, 255, 255, .86); text-decoration: none; font-size: .92rem; font-weight: 500; padding: 8px 12px; border-radius: 8px; position: relative; }
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.site-nav a.is-active { color: #fff; }
.site-nav a.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--gold-500); border-radius: 2px; }

.nav-toggle { display: none; background: transparent; border: 1px solid rgba(255, 255, 255, .3); color: #fff; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }
    .site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--navy-900); flex-direction: column; align-items: stretch; padding: 8px 20px 20px; gap: 2px; border-top: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 12px 24px rgba(10, 29, 54, .35); display: none; }
    .site-nav.is-open { display: flex; }
    .site-nav a { padding: 14px 12px; font-size: 1.02rem; }
    .site-nav a.is-active::after { left: 12px; right: auto; width: 24px; bottom: 8px; }
}

/* ---------- Admin bar (only visible when signed in) ---------- */
.admin-bar { background: #1a1f26; color: #d7dde5; font-size: .82rem; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px max(20px, calc((100% - 1140px) / 2)); }
.admin-bar strong { color: #fff; }
.admin-bar a, .admin-bar button { color: #f3d9a0; background: none; border: 0; font: inherit; cursor: pointer; text-decoration: none; padding: 2px 4px; }
.admin-bar a:hover, .admin-bar button:hover { color: #fff; text-decoration: underline; }
.admin-bar-links { display: flex; gap: 14px; align-items: center; }
.admin-bar form { margin: 0; }

.edit-link { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--gold-600); text-decoration: none; background: var(--gold-100); border: 1px dashed var(--gold-500); padding: 3px 10px; border-radius: 999px; }
.edit-link:hover { background: #efe0bb; color: #6f4d15; }
.edit-row, .card-edit { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.card-edit { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.hero-edit { margin-top: 22px; }
.hero .edit-link { background: rgba(255, 255, 255, .9); }
.site-footer .edit-link { background: transparent; color: var(--gold-500); border-color: rgba(255, 255, 255, .3); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .12s, background .15s, color .15s, border-color .15s; line-height: 1.2; font-family: inherit; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy-900); color: #fff; }
.btn-primary:hover { background: var(--navy-700); color: #fff; }
.btn-outline { background: transparent; color: var(--navy-900); border-color: var(--navy-900); }
.btn-outline:hover { background: var(--navy-900); color: #fff; }
.btn-light { background: #fff; color: var(--navy-900); }
.btn-light:hover { background: var(--gold-100); color: var(--navy-950); }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--navy-950); isolation: isolate; }
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: center 40%; filter: brightness(2.1) contrast(1.05) saturate(1.15); z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 29, 54, .55) 0%, rgba(10, 29, 54, .3) 45%, rgba(10, 29, 54, .82) 100%); }
.hero-inner { padding: clamp(72px, 11vw, 132px) 0 clamp(96px, 12vw, 148px); max-width: 1140px; }
.eyebrow { font-size: .8rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-500); font-weight: 600; margin-bottom: 14px; }
.hero h1 { font-family: var(--font-head); font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 700; letter-spacing: -.01em; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.lede { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 40ch; margin: 18px 0 0; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 12px rgba(0, 0, 0, .4); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---------- At a glance ---------- */
.glance { position: relative; z-index: 5; margin-top: -60px; }
.glance ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.glance a { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border: 1px solid var(--line); height: 100%; transition: transform .15s, box-shadow .15s; }
.glance a:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 42, 74, .12), 0 18px 40px rgba(15, 42, 74, .1); }
.glance .icon { grid-row: 1 / span 3; width: 44px; height: 44px; padding: 11px; border-radius: 12px; background: var(--navy-100); color: var(--navy-700); }
.glance-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.glance strong { font-family: var(--font-head); font-size: 1.3rem; color: var(--navy-900); line-height: 1.25; }
.glance-sub { font-size: .85rem; color: var(--muted); }

@media (max-width: 640px) {
    .glance { margin-top: -44px; }
    .glance ul { gap: 10px; }
    .glance a { padding: 12px 14px; column-gap: 12px; }
    .glance .icon { width: 38px; height: 38px; padding: 9px; }
    .glance strong { font-size: 1.15rem; }
    .hero-inner { padding-bottom: 84px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.band { background: var(--navy-900); color: #fff; position: relative; }
.band .kicker { color: var(--gold-500); }
.band .section-head h2 { color: #fff; }
.band .edit-link { background: rgba(255, 255, 255, .92); }
.band-soft { background: var(--cream-2); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.kicker { font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-600); font-weight: 700; margin-bottom: 8px; }
.section-head h2 { font-family: var(--font-head); font-size: clamp(1.9rem, 4vw, 2.6rem); color: var(--navy-900); font-weight: 700; }
.section-head h2::after { content: ""; display: block; width: 56px; height: 3px; background: var(--gold-500); border-radius: 3px; margin-top: 14px; }
.section-intro { margin: 16px 0 0; color: var(--muted); font-size: 1.05rem; }
.empty { color: var(--muted); font-style: italic; }
.empty.small { font-size: .92rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 26px 28px; }
.card h3 { font-family: var(--font-head); font-size: 1.35rem; color: var(--navy-900); margin-bottom: 14px; font-weight: 700; }
.card-grid { display: grid; gap: 20px; }

.prose > :last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose h3, .prose h4 { font-size: 1.05rem; margin: 1.2em 0 .4em; font-family: var(--font-body); color: var(--navy-900); }
.prose blockquote { margin: 0 0 1em; padding-left: 16px; border-left: 3px solid var(--gold-500); color: var(--muted); }
.prose-checks ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.prose-checks li { position: relative; padding-left: 30px; margin: 0; }
.prose-checks li::before { content: ""; position: absolute; left: 0; top: .25em; width: 20px; height: 20px; border-radius: 50%; background: var(--gold-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a6f27' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* Notices */
.notices { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: stretch; }
.notice { display: flex; flex-direction: column; position: relative; }
.notice.is-pinned { border-color: var(--gold-500); background: linear-gradient(180deg, #fffdf8, #fff 40%); box-shadow: 0 0 0 1px var(--gold-500) inset, var(--shadow-sm); }
.notice-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.chip { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-600); background: var(--gold-100); padding: 4px 10px; border-radius: 999px; }
.pinned { font-size: .74rem; font-weight: 600; color: var(--gold-600); display: inline-flex; gap: 4px; align-items: center; }
.pinned .icon { fill: var(--gold-500); width: .95em; height: .95em; }
.notice h3 { font-size: 1.22rem; }
.notice .prose { font-size: .97rem; }
.notice .card-edit { margin-top: auto; }
.notice .prose { margin-bottom: 18px; }
.notice .prose:last-child { margin-bottom: 0; }

/* Meeting */
.meeting-card { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: start; padding: 32px; color: var(--ink); }
.date-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 116px; padding: 16px 18px; border-radius: 16px; background: var(--navy-900); color: #fff; text-align: center; line-height: 1; }
.date-tile-month { font-size: .8rem; letter-spacing: .2em; color: var(--gold-500); font-weight: 700; }
.date-tile-day { font-family: var(--font-head); font-size: 3.6rem; font-weight: 700; margin: 6px 0 4px; }
.date-tile-wd { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.meeting-body h3 { font-size: 1.7rem; margin-bottom: 16px; }
.meeting-facts { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.meeting-facts li { display: flex; gap: 12px; align-items: flex-start; }
.meeting-facts .icon { color: var(--gold-600); margin-top: .25em; width: 1.2em; height: 1.2em; }
.meeting-facts address span { display: block; }
.meeting-notes { color: var(--muted); }
.meeting-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.meeting-extra { margin-top: 24px; color: rgba(255, 255, 255, .9); max-width: 720px; }
.meeting-extra a { color: var(--gold-500); }
@media (max-width: 640px) {
    .meeting-card { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
    .date-tile { flex-direction: row; gap: 14px; justify-content: flex-start; min-width: 0; padding: 14px 18px; }
    .date-tile-day { font-size: 2.4rem; margin: 0; }
}

/* Resources */
.resource-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.resource { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); padding: 20px 22px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.resource:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--gold-500); color: var(--ink); }
.resource-icon, .contact-icon { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--navy-100); color: var(--navy-700); }
.resource-icon .icon, .contact-icon .icon { width: 22px; height: 22px; }
.resource-text, .contact-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; gap: 2px; }
.resource-text strong { color: var(--navy-900); font-size: 1.02rem; }
.resource-text span { font-size: .9rem; color: var(--muted); }
.resource-text em, .contact-text em { font-style: normal; font-size: .76rem; color: var(--gold-600); font-weight: 600; letter-spacing: .04em; margin-top: 2px; }
.resource-go { color: var(--muted); }
.resource:hover .resource-go { color: var(--gold-600); }

/* Living here */
.living-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.living-card h3 { display: flex; align-items: center; gap: 10px; }
.living-card h3 .icon { color: var(--gold-600); width: 1.1em; height: 1.1em; }
.subhead { font-family: var(--font-body); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; font-weight: 700; }
.date-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.date-chips li { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; font-size: .9rem; background: var(--cream); display: flex; flex-direction: column; line-height: 1.3; }
.date-chips li.next { border-color: var(--gold-500); background: var(--gold-100); }
.date-chips em { font-style: normal; font-size: .72rem; color: var(--gold-600); font-weight: 700; }
.season-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .95rem; }
.season-table th, .season-table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); }
.season-table thead th { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.season-table tbody th { font-weight: 600; color: var(--navy-900); }
.season-table small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.season-table tr:last-child th, .season-table tr:last-child td { border-bottom: 0; }
.season-table tr.is-now { background: var(--gold-100); }
.now-badge { margin-left: 8px; font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; background: var(--gold-500); color: var(--navy-950); padding: 2px 8px; border-radius: 999px; font-weight: 700; }

/* Contacts */
.contact-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.contact { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); padding: 18px 20px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.contact:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--gold-500); color: var(--ink); }
.contact-name { font-size: .85rem; color: var(--muted); }
.contact-text strong { font-size: 1.12rem; color: var(--navy-900); overflow-wrap: anywhere; }

/* Leadership */
.leadership-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; }
.board-list { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 14px; }
.board-list li { display: flex; align-items: center; gap: 14px; }
.board-list strong { display: block; color: var(--navy-900); }
.board-list em { font-style: normal; font-size: .88rem; color: var(--muted); }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--navy-800); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: .9rem; letter-spacing: .03em; flex: none; }

.mgmt-address { margin-bottom: 1em; }
.mgmt-address span { display: block; }
.mgmt-address span:first-child { font-weight: 600; color: var(--navy-900); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: rgba(255, 255, 255, .78); padding: 36px 0; font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.footer-copy { color: #fff; font-weight: 500; margin: 0 0 4px; }
.footer-note { margin: 0; font-size: .85rem; }
.footer-links { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.site-footer a { color: var(--gold-500); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* ---------- Sign-in & simple pages ---------- */
.narrow-page { min-height: 60vh; display: grid; place-items: center; padding: 56px 20px; }
.auth-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 36px; box-shadow: var(--shadow); }
.auth-card h1 { font-family: var(--font-head); font-size: 1.9rem; color: var(--navy-900); margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 24px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--navy-900); }
.field input[type=text], .field input[type=password], .field input[type=email] { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #cfc8ba; border-radius: 10px; background: #fff; color: var(--ink); }
.field input:focus { outline: 3px solid rgba(195, 154, 75, .45); border-color: var(--gold-500); }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.field-error, .validation-summary { color: #b3261e; font-size: .88rem; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .92rem; }
.alert-error { background: #fdecea; color: #8a1c14; border: 1px solid #f5c6c2; }
.alert-ok { background: #e8f5ee; color: #1d5a37; border: 1px solid #b9dfc9; }
.auth-card .btn { width: 100%; justify-content: center; }
.back-link { display: block; text-align: center; margin-top: 18px; font-size: .9rem; }

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
    .site-header, .admin-bar, .hero-media, .hero-actions, .nav-toggle, .edit-link, .edit-row, .card-edit, .meeting-actions, .skip-link, .site-footer .footer-links { display: none !important; }
    body { background: #fff; font-size: 11pt; }
    .hero, .band { background: #fff !important; color: #000 !important; }
    .hero::before { display: none; }
    .hero h1, .lede, .band .section-head h2 { color: #000; text-shadow: none; }
    .hero-inner { padding: 12px 0; }
    .glance { margin-top: 0; }
    .section { padding: 18px 0; }
    .card, .glance a { box-shadow: none; break-inside: avoid; }
    .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; word-break: break-all; }
}
