/* Canonical condo association sites — themeable component system.
   Each building sets its own palette + fonts via CSS variables (in default.html),
   so the three read as distinct custom sites, not one template. Boffo-style
   component patterns; no build step (container stays Ruby-only). */

:root {
  --brand: #1f3d34; --brand-dark: #142a24; --accent: #a87d3c;
  --surface: #f6f4ee; --surface-2: #ffffff; --ink: #1b211d;
  --muted: #6c6757; --line: #e3ded2;
  --display: Georgia, serif; --body: system-ui, sans-serif;
  --radius: 12px; --radius-lg: 20px; --maxw: 1120px;
  --shadow: 0 1px 2px rgba(20,30,25,.05), 0 10px 30px rgba(20,30,25,.07);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--surface); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1,h2,h3,h4 { font-family: var(--display); line-height: 1.12; color: var(--brand-dark); letter-spacing: -.01em; margin: 0; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.sect { padding: 64px 0; scroll-margin-top: 76px; }
.sect--tight { padding: 40px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 700; color: var(--accent); }
.h2 { font-size: clamp(24px, 3.2vw, 34px); margin-bottom: 8px; }
.lede { color: var(--muted); max-width: 64ch; font-size: 17px; }

/* Demo ribbon */
.ribbon { background: var(--brand-dark); color: #fff; font-size: 12.5px; text-align: center; padding: 7px 16px; font-weight: 500; }
.ribbon a { color: #fff; text-decoration: underline; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; font-weight: 600; font-size: 15px; font-family: var(--body); padding: 12px 20px; border-radius: 10px; text-decoration: none; border: 1px solid transparent; transition: transform .05s ease, filter .15s ease; }
.btn:hover { color: #fff; filter: brightness(1.07); transform: translateY(-1px); }
.btn--brand { background: var(--brand); }
.btn--ghost { background: transparent; border-color: currentColor; color: var(--brand); }
.btn--ghost:hover { background: rgba(0,0,0,.04); color: var(--brand); }
.btn--light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); }
.btn--light:hover { background: rgba(255,255,255,.22); color: #fff; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--brand-dark); }
.logo .seal { width: 36px; height: 36px; border-radius: 9px; flex: none; background: var(--brand); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 16px; }
.logo b { font-family: var(--display); font-size: 18px; font-weight: 700; display: block; line-height: 1.1; }
.logo small { color: var(--muted); font-size: 11.5px; letter-spacing: .04em; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
/* :not(.btn) so the nav-link color doesn't override .btn's white text (the Owner Login button) */
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; padding: 7px 11px; border-radius: 8px; white-space: nowrap; }
.site-nav a:not(.btn):hover { background: rgba(0,0,0,.05); color: var(--brand); }
.site-nav .btn { padding: 8px 14px; font-size: 13.5px; margin-left: 6px; color: #fff; }

/* Hero */
.hero { color: #f3f1ea; position: relative; overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; padding-top: 76px; padding-bottom: 84px; }
.hero h1 { color: #fff; font-size: clamp(34px, 5.5vw, 58px); margin: 8px 0 14px; max-width: 18ch; }
.hero p.sub { color: rgba(255,255,255,.86); font-size: clamp(16px,2vw,20px); max-width: 56ch; margin: 0 0 26px; }
.hero .eyebrow { color: #fff; opacity: .85; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.badges { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 30px; }
.badge { display: inline-flex; align-items: baseline; gap: 8px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 100px; padding: 8px 16px; color: #fff; font-size: 13.5px; }
.badge b { font-family: var(--display); font-size: 17px; }
/* hero variants */
.hero--coastal { background: linear-gradient(160deg, #0e4a52 0%, #14606b 55%, #1d7e7a 100%); }
.hero--coastal::after { content:""; position:absolute; inset:0; background: radial-gradient(120% 90% at 80% -10%, rgba(255,255,255,.18), transparent 60%); z-index:1; }
.hero--tower { background: linear-gradient(165deg, #0b1020 0%, #131a30 50%, #1c2540 100%); }
.hero--tower::after { content:""; position:absolute; inset:0; background:
  repeating-linear-gradient(90deg, transparent 0 38px, rgba(255,255,255,.025) 38px 39px),
  repeating-linear-gradient(0deg, transparent 0 38px, rgba(255,255,255,.025) 38px 39px); z-index:1; }
.hero--garden { background: linear-gradient(160deg, #20402a 0%, #2c5738 55%, #3a6b44 100%); }
.hero--garden::after { content:""; position:absolute; inset:0; background: radial-gradient(100% 80% at 15% 110%, rgba(255,255,255,.14), transparent 55%); z-index:1; }
.hero--harbor { background: linear-gradient(150deg, #08363a 0%, #0e5450 52%, #0b6b63 100%); }
.hero--harbor::after { content:""; position:absolute; inset:0; background: radial-gradient(110% 85% at 88% -5%, rgba(184,134,47,.30), transparent 55%); z-index:1; }

/* Generic card grid */
.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card .ico { width: 42px; height: 42px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand); display: grid; place-items: center; font-size: 20px; margin-bottom: 12px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* About split */
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.split .panel { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow); }
.split .panel .kv { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.split .panel .kv:first-child { border-top: none; }
.split .panel .kv .v { font-weight: 600; }

/* Stat band */
.statband { background: var(--brand-dark); color: #fff; }
.statband .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 22px; padding: 40px 24px; text-align: center; }
.statband .n { font-family: var(--display); font-size: 38px; color: #fff; }
.statband .l { color: rgba(255,255,255,.72); font-size: 13.5px; }

/* News */
.news { display: grid; gap: 14px; }
.news .item { background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 16px 20px; }
.news .item .date { color: var(--muted); font-size: 13px; }
.news .item h3 { font-size: 17px; margin: 3px 0 4px; }
.news .item p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* Records / compliance module */
.compliance-band { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cp-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--brand); background: var(--surface-2); border: 1px solid var(--line); border-radius: 100px; padding: 5px 13px; }
.cp-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: #2f7d4f; }
.records { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow); }
.records li { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-top: 1px solid var(--line); }
.records li:first-child { border-top: none; }
.records .doc-ico { flex: none; width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.records .pub .doc-ico { background: #e8f3ec; color: #2f7d4f; }
.records .gated .doc-ico { background: #eee9df; color: var(--muted); }
.records .doc-main { flex: 1; min-width: 0; }
.records .doc-title { font-weight: 600; color: var(--ink); }
.records .doc-note { color: var(--muted); font-size: 13px; }
.records .doc-date { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip { flex: none; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 100px; text-transform: uppercase; letter-spacing: .03em; }
.chip--pub { color: #2f7d4f; background: #e8f3ec; }
.chip--gated { color: var(--muted); background: #eee9df; }
.split-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.note-line { font-size: 13.5px; color: var(--muted); margin-top: 10px; }

/* Records center (filter / search / sort / archive) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.rec-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 22px 0 6px; }
.rec-search { flex: 1 1 260px; }
.rec-search input { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font: inherit; color: var(--ink); }
.rec-search input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.rec-facets { display: flex; flex-wrap: wrap; gap: 7px; flex: 1 1 100%; order: 3; }
.chip-btn { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 100px; padding: 5px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip-btn:hover { border-color: var(--brand); color: var(--ink); }
.chip-btn.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-btn .n { font-variant-numeric: tabular-nums; opacity: .7; font-weight: 700; }
.chip-btn.is-on .n { opacity: .9; }
.rec-tools { display: flex; align-items: center; gap: 14px; }
.rec-sort select { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); }
.rec-archived { font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; cursor: pointer; }
.rec-count { font-size: 13px; color: var(--muted); margin: 8px 0 14px; font-variant-numeric: tabular-nums; }
.rec-list .rec--archived { opacity: .72; }
.rec-list .rec--archived .doc-ico { background: transparent; border: 1px dashed var(--line); }
.archived-tag { text-transform: uppercase; letter-spacing: .04em; font-size: 10.5px; font-weight: 700; color: var(--accent); }
.rec-empty { justify-content: center; color: var(--muted); font-size: 14px; padding: 28px 18px !important; }
.resale-val { font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--ink); margin: 4px 0 0; }
@media (max-width: 640px) {
  .rec-tools { flex: 1 1 100%; order: 4; justify-content: space-between; }
}

/* Integration treatments (link vs embed) */
.integration { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.intopt { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 20px; }
.intopt .tag { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.intopt h3 { font-size: 17px; margin: 6px 0 8px; }
.intopt p { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.embed-frame { border: 2px dashed color-mix(in srgb, var(--accent) 55%, #fff); border-radius: 10px; background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 12px, color-mix(in srgb,var(--surface) 70%, #fff) 12px, color-mix(in srgb,var(--surface) 70%, #fff) 24px); padding: 26px; text-align: center; color: var(--muted); }
.embed-frame .pill { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }

/* Board */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px; }
.member { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.member .role { color: var(--accent); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.member .name { font-family: var(--display); font-size: 18px; margin: 2px 0 8px; }
.member .cert { font-size: 12.5px; color: var(--muted); display: flex; gap: 7px; }
.member .cert .dot { width: 7px; height: 7px; border-radius: 50%; background: #2f7d4f; flex: none; margin-top: 6px; }
.member__avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--surface); border: 1px solid var(--line); display: block; margin-bottom: 10px; }
.member .cert--flag .dot { background: var(--accent); }

/* Portal / request CTA */
.portal { background: var(--brand); color: #fff; border-radius: var(--radius-lg); padding: 34px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.portal h2 { color: #fff; }
.portal p { color: rgba(255,255,255,.85); margin: 0; max-width: 60ch; }
.portal .row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* Resale */
.resale .card .meta { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* FAQ */
.faq details { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); font-size: 14.5px; margin: 0 0 14px; }

/* Footer */
.site-foot { background: var(--brand-dark); color: rgba(255,255,255,.74); padding: 40px 0 30px; font-size: 13.5px; margin-top: 10px; }
.site-foot .top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.12); }
.site-foot h4 { color: #fff; font-size: 14px; margin-bottom: 10px; }
.site-foot a { color: rgba(255,255,255,.8); display: block; padding: 3px 0; }
.site-foot .disclaim { color: rgba(255,255,255,.55); font-size: 12px; max-width: 90ch; margin-top: 18px; }

/* Index gallery */
.lead-xl { font-size: clamp(18px,2.4vw,22px); color: var(--muted); max-width: 70ch; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 20px; }
.tile { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .06s ease, box-shadow .15s ease; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(20,30,25,.14); }
.tile .top { padding: 22px; color: #fff; }
.tile .top .units { font-size: 13px; opacity: .85; }
.tile .top h3 { color: #fff; font-size: 22px; margin-top: 4px; }
.tile .body { padding: 20px; display: grid; gap: 8px; }
.tile .arch { font-size: 14.5px; color: var(--muted); }
.tile .go { color: var(--accent); font-weight: 700; font-size: 14px; }
.tile-coastal .top { background: linear-gradient(150deg,#0e4a52,#1d7e7a); }
.tile-tower .top { background: linear-gradient(150deg,#0b1020,#1c2540); }
.tile-garden .top { background: linear-gradient(150deg,#20402a,#3a6b44); }
.tile-harbor .top { background: linear-gradient(150deg,#08363a,#0b6b63); }

@media (max-width: 820px) {
  .split, .split-cols, .integration { grid-template-columns: 1fr; }
  .site-foot .top { grid-template-columns: 1fr; }
  .site-head .wrap { flex-wrap: wrap; }
}

/* ---- Photo gallery (borrowed from pembrokecottage, improved: captions + lightbox) ---- */
.photo-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
@media (min-width: 1024px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
.photo-card { position: relative; display: block; width: 100%; padding: 0; margin: 0; border: 0; cursor: pointer; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--line); }
.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.photo-card:hover img, .photo-card:focus-visible img { transform: scale(1.05); }
.photo-card__overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 12px 14px; background: linear-gradient(180deg, transparent 52%, rgba(6,40,52,.5)); transition: background .2s ease; }
.photo-card:hover .photo-card__overlay, .photo-card:focus-visible .photo-card__overlay { background: linear-gradient(180deg, rgba(6,40,52,.12) 0%, rgba(6,40,52,.62)); }
.photo-card__cap { color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .01em; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.photo-card__zoom { color: #fff; font-size: 15px; line-height: 1; opacity: 0; transform: scale(.8); transition: opacity .2s ease, transform .2s ease; }
.photo-card:hover .photo-card__zoom, .photo-card:focus-visible .photo-card__zoom { opacity: .95; transform: scale(1); }
.photo-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6,20,26,.94); display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1100px, 94vw); max-height: 86vh; border-radius: 10px; box-shadow: 0 24px 64px rgba(0,0,0,.55); }
.lightbox__cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.82); font-size: 13px; padding: 0 16px; }
.lightbox__btn { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox__btn:hover { background: rgba(255,255,255,.22); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 18px; top: 50%; transform: translateY(-50%); }
@media (prefers-reduced-motion: reduce) { .photo-card img { transition: none; } }

/* Brand logo (drops in via _data logo:; falls back to the letter-seal until present) */
.logo-img { height: 52px; width: auto; display: block; }
.footer-logo { height: 56px; width: auto; display: block; margin-bottom: 14px; }
@media (max-width: 560px) { .logo-img { height: 46px; } .footer-logo { height: 46px; } }
