/* =============================================================================
 * Rivergate Quarters — shared styles
 * -----------------------------------------------------------------------------
 * Clean, professional apartment-rental look: white + cool light-gray on a
 * single deep-navy accent. Charcoal text. One accent color only — navy — used
 * for the header, footer, buttons, links, and headings. No second color.
 *
 * To re-theme the whole site, change the color/type variables in :root below.
 * ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Karla:wght@300;400;500;600;700&family=Playfair+Display:wght@500;600;700;800&display=swap');

:root {
  /* --- Brand colors -------------------------------------------------------
   * Single navy accent + neutral grays + white. Navy anchors the header,
   * footer, buttons, links, and headings, so everything matches. Change
   * --navy and the whole site re-themes. */
  --navy: #1e3a5f;          /* primary accent — header, footer, buttons, headings */
  --navy-deep: #16293f;     /* darker navy — hovers & link text */
  --navy-tile: #e8eef4;     /* soft blue-gray tint behind icons */
  --cream: #f4f6f8;         /* page background — cool light gray */
  --sand: #ffffff;          /* card surface — clean white */
  --ink: #1f2933;           /* main text — charcoal slate */
  --muted: #5b6770;         /* secondary text */
  --line: #e3e7ec;          /* hairline borders */
  --line-soft: #eef1f4;
  --star: #e0a32e;          /* rating gold (rating badge only) */
  --ok: #2f7d54;
  --err: #b4452f;

  /* --- Type --- */
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* --- Spacing / layout --- */
  --maxw: 1140px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(31, 41, 51, 0.05), 0 1px 3px rgba(31, 41, 51, 0.06);
  --shadow: 0 6px 24px rgba(31, 41, 51, 0.09);
  --shadow-lg: 0 18px 48px rgba(31, 41, 51, 0.16);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.12; font-weight: 700; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
a { color: var(--navy-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }

img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 62ch; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Small eyebrow label above section headings */
.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: .6rem;
}

/* =========================================================================
 * Header / navigation
 * ====================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(30, 58, 95, 0.97); /* navy — same as the footer */
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.brand__logo { width: 34px; height: 34px; flex: none; }
.brand__name { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; line-height: 1.05; letter-spacing: .01em; }
.brand__name small { display: block; font-family: var(--sans); font-weight: 500; font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: #aebfd2; }

.nav__links { display: flex; align-items: center; gap: 2px; }
.nav__links a {
  color: #e3ecea; text-decoration: none; font-size: .94rem; font-weight: 500; white-space: nowrap;
  padding: 9px 11px; border-radius: 8px; transition: background .18s var(--ease), color .18s var(--ease);
}
.nav__links a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.nav__links a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.14); }
.nav__links .btn { margin-left: 8px; padding: 9px 18px; }
.nav__toggle {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22); color: #fff; border-radius: 10px; cursor: pointer;
}
/* Bulletproof: never show the hamburger above phone width, no matter what. */
@media (min-width: 561px) { .nav__toggle { display: none !important; } }
.nav__toggle svg { width: 22px; height: 22px; }

/* =========================================================================
 * Buttons
 * ====================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px; border: 1.5px solid transparent;
  font-family: var(--sans); font-size: 1rem; font-weight: 700; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: transform .15s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(30, 58, 95, 0.24); }
.btn--primary:hover { background: var(--navy-deep); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(30, 58, 95, 0.30); }
.btn--secondary { background: var(--sand); color: var(--navy-deep); border-color: var(--line); }
.btn--secondary:hover { background: #fff; border-color: var(--navy); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost { background: rgba(255,255,255,.10); color: #fff; border-color: rgba(255,255,255,.6); backdrop-filter: blur(4px); }
.btn--ghost:hover { background: rgba(255,255,255,.2); transform: translateY(-2px); }
.btn--block { display: flex; width: 100%; }
.btn--sm { padding: 9px 16px; font-size: .9rem; }

/* =========================================================================
 * Rating badge
 * ====================================================================== */
.rating {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--sand); color: var(--ink);
  border-radius: 999px; padding: 9px 18px; box-shadow: var(--shadow); border: 1px solid var(--line-soft);
  font-size: .95rem;
}
.rating__g { font-weight: 700; color: var(--navy-deep); }
.rating__stars { color: var(--star); letter-spacing: 1px; font-size: 1.05rem; }
.rating__num { font-weight: 700; }
.rating__sep { width: 1px; height: 18px; background: var(--line); }

/* =========================================================================
 * Hero — full viewport height with background image slot
 * ====================================================================== */
.hero {
  position: relative;
  min-height: calc(100svh - 65px);
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff; overflow: hidden;
  padding: 80px 24px;
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  /* SWAP: drop public/images/hero-placeholder.jpg to set the hero photo */
  background-image: url('/images/hero-placeholder.jpg');
  background-size: cover; background-position: center;
}
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(16, 28, 45, 0.55) 0%, rgba(16, 28, 45, 0.32) 40%, rgba(16, 28, 45, 0.85) 100%),
    linear-gradient(90deg, rgba(16, 28, 45, 0.35), rgba(16, 28, 45, 0.10));
}
.hero__inner { position: relative; z-index: 2; max-width: 760px; }
.hero__kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase;
  color: #f1e3d4; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  padding: 7px 16px; border-radius: 999px; margin-bottom: 22px; backdrop-filter: blur(4px);
}
.hero h1 { color: #fff; font-size: clamp(2.5rem, 6vw, 4.2rem); text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.hero__blurb { font-size: clamp(1.05rem, 2vw, 1.3rem); color: #eef2f6; max-width: 600px; margin: 0 auto 30px; }
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__rating { margin-top: 32px; }
.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 2;
  color: rgba(255,255,255,.85); display: inline-flex; flex-direction: column; align-items: center;
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; gap: 6px; text-decoration: none;
}
.hero__scroll svg { width: 20px; height: 20px; animation: bob 1.8s var(--ease) infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* =========================================================================
 * Cards & grids
 * ====================================================================== */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--sand); border: 1px solid var(--line-soft);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.card__body { padding: 22px; }

/* Icon feature tile (amenities, "why us") */
.feature { text-align: left; padding: 26px; background: var(--sand); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease); }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line); }
.feature__icon {
  width: 50px; height: 50px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--navy-tile); color: var(--navy); margin-bottom: 14px;
}
.feature__icon svg { width: 26px; height: 26px; }
.feature h3 { margin-bottom: 6px; color: var(--navy); }
.feature p { margin: 0; color: var(--muted); font-size: .98rem; }

/* Photo tiles */
.photo {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  background: #e6e3d6; border-radius: var(--radius); border: 1px solid var(--line-soft);
}
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-grid figure { margin: 0; }
.gallery-grid a { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.gallery-grid a:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gallery-grid figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }

/* Alternating feature band */
.band { background: var(--sand); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

/* =========================================================================
 * Forms
 * ====================================================================== */
.form { max-width: 480px; margin: 0 auto; }
.form--wide { max-width: 680px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 7px; font-size: .95rem; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 14px; font-size: 1rem; font-family: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.16);
}
.field small { color: var(--muted); font-weight: 400; }
.form-note { font-size: .9rem; color: var(--muted); }

/* Radio groups (Yes/No questions on the application) */
.radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.radio {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 16px; border: 1.5px solid var(--line); border-radius: 999px;
  font-weight: 600; font-size: .95rem; background: #fff; transition: border-color .15s var(--ease), background .15s var(--ease);
}
.radio:hover { border-color: var(--navy); }
.radio input { accent-color: var(--navy); margin: 0; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--navy); background: var(--navy-tile); }

.alert { padding: 13px 15px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .95rem; }
.alert--ok { background: #e6f3ec; color: var(--ok); border: 1px solid #bfe0cd; }
.alert--err { background: #fbe9e4; color: var(--err); border: 1px solid #f0c8bd; }
.hidden { display: none !important; }

/* =========================================================================
 * Panels (dashboard / admin)
 * ====================================================================== */
.panel {
  background: var(--sand); border: 1px solid var(--line-soft);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 26px; margin-bottom: 22px;
}
.rent-amount { font-size: 2.6rem; font-family: var(--serif); font-weight: 700; color: var(--navy); margin: 0; }
.pay-method { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; background: #fbf8f1; }
.pay-method h4 { margin: 0 0 5px; color: var(--navy-deep); font-family: var(--sans); font-size: 1rem; font-weight: 700; }
.pay-handle { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--navy-tile); padding: 3px 9px; border-radius: 6px; font-size: .92rem; }

.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.table .row-actions { white-space: nowrap; }
.btn-link { background: none; border: none; color: var(--navy-deep); cursor: pointer; text-decoration: underline; padding: 0; font-size: .9rem; font-family: inherit; }
.btn-danger { color: var(--err); }

.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.info-list li:last-child { border-bottom: none; }
.info-ico { width: 42px; height: 42px; flex: none; border-radius: 11px; background: var(--navy-tile); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; }
.info-ico svg { width: 22px; height: 22px; }
.info-list .label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.info-list .value { font-size: 1.15rem; color: var(--ink); }
.info-list .value a { color: var(--ink); text-decoration: none; }
.info-list .value a:hover { color: var(--navy); }

.map-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Applications list — collapsed "name + age" rows that expand on click */
.app-card { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: #fff; overflow: hidden; }
.app-card > summary {
  list-style: none; cursor: pointer; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  transition: background .15s var(--ease);
}
.app-card > summary:hover { background: var(--navy-tile); }
.app-card > summary::-webkit-details-marker { display: none; }
.app-card > summary::before {
  content: ''; width: 8px; height: 8px; flex: none;
  border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy);
  transform: rotate(-45deg); transition: transform .15s var(--ease);
}
.app-card[open] > summary::before { transform: rotate(45deg); }
.app-card[open] > summary { border-bottom: 1px solid var(--line-soft); }
.app-card .app-name { font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.app-card .app-meta { font-size: .85rem; color: var(--muted); font-weight: 600;
  background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.app-card .app-meta.app-date { margin-left: auto; background: none; border: none; padding: 0; font-weight: 500; }
.app-card .app-body { padding: 4px 16px 12px; }
/* Decision actions + status accents on application cards */
.app-card .app-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 0 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 8px; }
.app-card--approved { border-left: 4px solid var(--ok); }
.app-card--denied { border-left: 4px solid var(--err); }
.btn--approve { background: #fff; color: var(--ok); border-color: #bfe0cd; }
.btn--approve:hover { background: var(--ok); color: #fff; border-color: var(--ok); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--deny { background: #fff; color: var(--err); border-color: #e6b3a8; }
.btn--deny:hover { background: #fbe9e4; border-color: var(--err); transform: translateY(-2px); }
.app-card .app-group { margin-top: 12px; }
.app-card .app-group-title { font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 1.05rem; padding: 6px 0; border-bottom: 2px solid var(--navy-tile); margin-bottom: 2px; }
.app-card .app-row { padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.app-card .app-row:last-child { border-bottom: none; }
.app-card .app-row .label { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin-bottom: 2px; }

/* Weekly payment status pill (resident dashboard + admin table) */
.status-pill { display: inline-block; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .95rem; }
.status-pill--ok { background: #e6f3ec; color: var(--ok); border: 1px solid #bfe0cd; }
.status-pill--due { background: #fbecdf; color: #9a5b1f; border: 1px solid #f0d2b0; }
.status-pill--new { background: var(--navy-tile); color: var(--navy); border: 1px solid #cdd9e8; }
.status-pill--approved { background: #e6f3ec; color: var(--ok); border: 1px solid #bfe0cd; }
.status-pill--denied { background: #fbe9e4; color: var(--err); border: 1px solid #f0c8bd; }

/* Rules & Regulations list */
.rules-list { margin: 18px 0 0; padding-left: 1.2em; }
.rules-list li { margin-bottom: 16px; line-height: 1.6; }
.rules-list li::marker { color: var(--navy); font-weight: 700; }

/* =========================================================================
 * Footer
 * ====================================================================== */
.site-footer { background: var(--navy); color: #cdd7e2; margin-top: 0; padding: 56px 24px 28px; font-size: .95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-inner h4 { font-family: var(--serif); margin: 0 0 12px; color: #fff; font-size: 1.1rem; }
.footer-inner p { margin: 0 0 8px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand svg { width: 30px; height: 30px; }
.footer-brand span { font-family: var(--serif); font-size: 1.15rem; color: #fff; }
.footer-bottom { max-width: var(--maxw); margin: 30px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-size: .85rem; color: #9fb0c4; }

/* =========================================================================
 * Responsive
 * ====================================================================== */
@media (max-width: 880px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 26px; }
}
@media (max-width: 820px) {
  .section { padding: 60px 0; }
  .grid--3, .grid--4 { grid-template-columns: 1fr 1fr; }
}
/* Mid widths: tighten the nav and hide the Apply button (it's in the hero and
   on every page) so the full link list stays visible without a hamburger. */
@media (max-width: 780px) {
  .nav { padding: 12px 16px; }
  .nav__links a { padding: 8px 9px; font-size: .9rem; }
  .nav__links .btn { display: none; }
  .brand__name { font-size: 1.06rem; }
  .brand__name small { font-size: .58rem; letter-spacing: .18em; }
}
/* Hamburger menu only on true phone widths. */
@media (max-width: 560px) {
  .nav__links {
    display: none; position: absolute; top: calc(100% + 0px); right: 12px; left: 12px;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--navy-deep); padding: 12px; border-radius: 14px;
    box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.12);
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 13px 14px; font-size: .98rem; }
  .nav__links .btn { display: flex; margin: 6px 0 0; }
  .nav__toggle { display: inline-flex; }
}
@media (max-width: 520px) {
  .grid--2, .grid--3, .grid--4, .gallery-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .container { padding: 0 18px; }
}

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