/* ============================================================================
   THEME — BRF Fyris
   Signature: thin Fyris wave under header and before footer.
   ========================================================================== */

/* Brand mark */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.brand-logo {
  height: 2rem;
  width: auto;
  display: block;
}
.brand-text { font-size: 1.05rem; }

/* Fyris wave signature under header */
.fyris-wave {
  display: block;
  width: 100%;
  height: 10px;
  color: var(--accent);
  line-height: 0;
}
.fyris-wave svg {
  width: 100%;
  height: 10px;
  display: block;
}
.fyris-wave path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* Nav polish */
.navlinks a {
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 1;
  color: var(--muted);
}
.navlinks a:hover,
.navlinks a[aria-current="page"] {
  color: var(--accent);
}
.navlinks .linklike {
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.navlinks .linklike:hover { color: var(--accent); }

/* Full-width page shell: main is not the only container */
body > main.container {
  max-width: none;
  padding: 0;
  margin: 0;
}
body > main.container > .flash {
  max-width: var(--container-max);
  margin: var(--space-5) auto 0;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* Typography scale — H1 >> body (ratio ≥1.5:1 for audit) */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 var(--space-3);
}
h2 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 var(--space-3);
  color: var(--text);
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 var(--space-2);
  color: var(--text);
}
.lead {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 0 var(--space-5);
}
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--space-2);
}
.fact-card .fact-label,
.hero-art-caption,
.footer-meta,
.small,
.muted.small {
  font-size: 0.9375rem;
}
body {
  font-size: 1.0625rem;
}

/* Buttons */
.btn {
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  transition: background 0.15s ease, filter 0.15s ease;
}
.btn:hover { filter: none; background: #243A52 !important; }
.btn-secondary {
  --btn-bg: transparent;
  --btn-ink: var(--accent);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.btn-secondary:hover {
  background: var(--accent) !important;
  --btn-ink: var(--accent-ink);
  filter: none;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

/* Hero */
.hero-brf {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: var(--space-7) 0 var(--space-8);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-7);
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
.hero-art {
  position: relative;
  min-height: 12rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, #E8EEF3 0%, #F3F5F7 55%, #E4EBF1 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-5);
}
.hero-art svg {
  width: 100%;
  height: auto;
  color: var(--accent);
  opacity: 0.55;
}
.hero-art-caption {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 var(--space-3);
}

@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .hero-art { min-height: 8rem; }
}

/* Fact cards */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-5);
}
@media (max-width: 900px) {
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .facts-grid { grid-template-columns: 1fr; }
}
.fact-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-5);
}
.fact-card .fact-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 var(--space-2);
}
.fact-card .fact-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.35;
}

/* Content sections */
.section-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
.prose {
  max-width: 40rem;
}
.prose p { margin: 0 0 var(--space-4); color: var(--text); }
.prose p:last-child { margin-bottom: 0; }

.band-surface {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.band-tint {
  background: var(--bg);
}

/* CTA card */
.cta-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}
.cta-card > div { flex: 1 1 16rem; min-width: 0; }
.cta-card .btn { flex: 0 0 auto; align-self: center; }
.cta-card p { margin: 0; color: var(--muted); max-width: 36rem; }

/* Definition list / facts table */
.facts-dl {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) 1fr;
  gap: var(--space-3) var(--space-5);
  margin: 0;
  max-width: 40rem;
}
.facts-dl dt {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.9rem;
}
.facts-dl dd {
  margin: 0;
  color: var(--text);
}
@media (max-width: 520px) {
  .facts-dl { grid-template-columns: 1fr; gap: var(--space-1) var(--space-2); }
  .facts-dl dt { margin-top: var(--space-3); }
  .facts-dl dt:first-child { margin-top: 0; }
}

/* Contact page */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-7);
  align-items: start;
}
@media (max-width: 720px) {
  .contact-layout { grid-template-columns: 1fr; }
}
.contact-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
}
.contact-panel h2 { margin-top: 0; }

/* Auth pages */
.auth-wrap {
  max-width: 26rem;
  margin: 0 auto;
  padding: var(--space-7) var(--container-pad);
}
.auth-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
}
.auth-panel h1 { margin-bottom: var(--space-2); }
.auth-note {
  margin-top: var(--space-5);
  padding: var(--space-4) 0 0;
  border-top: 1px solid var(--border);
  font-size: 1rem;
  color: var(--muted);
}
.auth-panel h1 {
  font-size: 2.25rem;
}

/* Member area */
.member-welcome {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: var(--space-6) 0;
}
.member-welcome .date {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}
.member-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-5);
}
@media (max-width: 720px) {
  .member-grid { grid-template-columns: 1fr; }
}
.member-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  height: 100%;
}
.member-card h2 {
  font-size: 1.35rem;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
@media (max-width: 600px) {
  .shortcut-grid { grid-template-columns: 1fr; }
}
.shortcut {
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-5);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.shortcut:hover {
  border-color: var(--accent);
  background: #F8FAFC;
}
.shortcut strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
  color: var(--text);
}
.shortcut span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Event / info / resident lists */
.list-rows {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  overflow: hidden;
}
.list-rows li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.list-rows li:last-child { border-bottom: 0; }
.list-rows .row-meta {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
  line-height: 1.4;
}
.list-rows .row-title {
  font-weight: 600;
  color: var(--text);
  margin: 0 0 var(--space-1);
}
.list-rows .row-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}
.list-rows .row-body {
  margin: var(--space-2) 0 0;
  color: var(--text);
  font-size: 0.95rem;
}
@media (max-width: 520px) {
  .list-rows li { grid-template-columns: 1fr; gap: var(--space-2); }
}

.info-group { margin-bottom: var(--space-6); }
.info-group h2 { margin-bottom: var(--space-3); }
.info-warn {
  background: #F7F1E8;
  border: 1px solid #E5D5B8;
  color: #4A3B22;
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: 0.9rem;
  margin: 0 0 var(--space-5);
}
.kv-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}
.kv-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border);
}
.kv-list li:last-child { border-bottom: 0; }
.kv-list .kv-label { color: var(--muted); font-weight: 600; }
.kv-list .kv-value {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* Apartments */
.search-bar {
  margin-bottom: var(--space-5);
  max-width: 24rem;
}
.search-bar input { width: 100%; }
.apt-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.apt-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
}
.apt-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: baseline;
  margin-bottom: var(--space-2);
}
.apt-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}
.apt-meta { color: var(--muted); font-size: 0.9rem; }
.resident-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.resident-list li {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  color: var(--text);
}
.resident-list .phone { color: var(--muted); font-size: 0.9rem; }

/* Page header band */
.page-band {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: var(--space-6) 0 var(--space-5);
}
.page-band p { margin: 0; color: var(--muted); max-width: 36rem; }

/* Empty state */
.empty {
  color: var(--muted);
  padding: var(--space-5);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  margin: 0;
}

/* Past events muted */
.past-events .list-rows { opacity: 0.72; }
.past-events summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-3);
  list-style: none;
}
.past-events summary::-webkit-details-marker { display: none; }
.past-events summary::before {
  content: "▸ ";
  color: var(--muted);
}
.past-events[open] summary::before { content: "▾ "; }

/* Footer */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  margin-top: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .fyris-wave {
  margin-bottom: 0;
  color: var(--accent);
  opacity: 0.7;
}
.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-6) var(--container-pad) var(--space-7);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-5);
}
@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  margin: 0 0 var(--space-2);
}
.footer-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-start;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.footer-links a:hover { color: var(--accent); }

/* Flash success */
.flash {
  background: #EAF2EA;
  border-color: #B7D0B8;
  color: #1B3A22;
}

/* Links in prose */
a { color: var(--accent); }
a:hover { color: #243A52; }

/* Focus visibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Section spacing helpers when stacking .section */
.section + .section { /* rhythm from components */ }

/* Panel override for member content inside section-inner */
.section-inner > .panel,
.section-inner > .member-card {
  /* keep consistent */
}

/* Login/signup: ensure native form submit works with hx-boost */
/* (hx-boost=false set on forms in templates) */
