/* Westbury Court HOA — brand & layout */

:root {
  /* Board palette: Dark Tyrian Blue / Light Glaucous Blue / White / Black */
  --wc-ink: #000000;
  --wc-muted: #3d4a52;
  --wc-paper: #ffffff;
  --wc-paper-deep: #d7e6eb;
  --wc-sea: #12354e;
  --wc-sea-deep: #0c2436;
  --wc-sea-soft: #a5c8d1;
  --wc-sun: #c5dde4;
  --wc-white: #ffffff;
  --wc-max: 1120px;
  --wc-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--wc-ink);
  background:
    radial-gradient(1200px 480px at 10% -10%, rgba(165, 200, 209, 0.22), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(18, 53, 78, 0.04), transparent 55%),
    #ffffff;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
}

h1,
h2,
h3,
h4,
.entry-title,
.ast-archive-title {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--wc-sea-deep);
}

a {
  color: var(--wc-sea);
  transition: color 0.2s var(--wc-ease);
}

a:hover,
a:focus {
  color: var(--wc-sea-deep);
}

/* Header */
.site-header,
.main-header-bar,
.ast-primary-header-bar {
  background: var(--wc-sea) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.main-header-menu > .menu-item > .menu-link,
.ast-header-account-wrap,
.site-title a,
.site-title a:hover,
.ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link {
  color: #f4f1ea !important;
}

.main-header-menu > .menu-item.current-menu-item > .menu-link,
.main-header-menu > .menu-item > .menu-link:hover,
.main-header-menu > .menu-item.focus > .menu-link {
  color: var(--wc-sun) !important;
}

/* Dropdowns: dark text on white (not the header cream color) */
.main-header-menu .sub-menu {
  background: #fff !important;
  border: 1px solid var(--wc-paper-deep);
  box-shadow: 0 12px 28px rgba(18, 53, 78, 0.14);
}

.main-header-menu .sub-menu .menu-link,
.ast-builder-menu-1 .main-header-menu .sub-menu .menu-link {
  color: var(--wc-sea-deep) !important;
  background: #fff !important;
}

.main-header-menu .sub-menu .menu-link:hover,
.main-header-menu .sub-menu .current-menu-item > .menu-link,
.ast-builder-menu-1 .main-header-menu .sub-menu .menu-link:hover {
  color: var(--wc-sea) !important;
  background: var(--wc-sea-soft) !important;
}

.custom-logo-link img,
.site-logo-img .custom-logo {
  max-height: 52px;
  width: auto;
}

/* Buttons */
.wp-block-button__link,
.westbury-btn,
button.westbury-btn,
input[type="submit"] {
  background: var(--wc-sea) !important;
  color: var(--wc-white) !important;
  border: 0 !important;
  border-radius: 2px !important;
  padding: 0.85rem 1.4rem !important;
  font-family: "Source Sans 3", sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  transition: transform 0.25s var(--wc-ease), background 0.25s var(--wc-ease), box-shadow 0.25s var(--wc-ease);
  box-shadow: 0 8px 20px rgba(18, 53, 78, 0.22);
}

.wp-block-button.is-style-outline .wp-block-button__link,
.westbury-btn--ghost {
  background: transparent !important;
  color: var(--wc-white) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.75) !important;
  box-shadow: none;
}

.westbury-btn--secondary {
  background: var(--wc-sea-soft) !important;
  color: var(--wc-ink) !important;
  box-shadow: none;
}

.wp-block-button__link:hover,
.westbury-btn:hover,
input[type="submit"]:hover {
  background: var(--wc-sea-deep) !important;
  color: var(--wc-white) !important;
  transform: translateY(-2px);
}

.westbury-btn--secondary:hover {
  background: var(--wc-sea) !important;
  color: var(--wc-white) !important;
}

/* Hero — full-bleed with real LCP image */
.westbury-hero {
  position: relative;
  min-height: min(92vh, 760px);
  display: flex;
  align-items: flex-end;
  color: var(--wc-white);
  background-color: var(--wc-sea-deep);
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  overflow: hidden;
}

.westbury-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  margin: 0;
  border: 0;
  /* Reserve space for Desktop CLS — element is absolute but intrinsic size aids LCP scoring */
  aspect-ratio: 16 / 9;
  max-width: none;
}

.westbury-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 53, 78, 0.25) 0%, rgba(18, 53, 78, 0.55) 45%, rgba(12, 36, 54, 0.9) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Hide duplicate page title "Home" above the hero */
.westbury-home .entry-header,
.home.page .entry-header,
.home .ast-article-single > .entry-header {
  display: none !important;
}

/* Hide Astra "Powered by" copyright; child theme credit remains */
.ast-footer-copyright,
.ast-small-footer-section-1 {
  display: none !important;
}

.westbury-hero__inner {
  position: relative;
  z-index: 2;
  width: min(var(--wc-max), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 4.5rem 0 3.5rem;
}

.westbury-hero__brand {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  margin: 0 0 0.75rem;
  color: #fff;
  max-width: 14ch;
}

.westbury-hero__lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 36ch;
  margin: 0 0 1.75rem;
  color: rgba(255, 255, 255, 0.95);
  opacity: 0;
  transform: translateY(14px);
  animation: wcRise 0.7s var(--wc-ease) 0.12s forwards;
}

.westbury-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(14px);
  animation: wcRise 0.7s var(--wc-ease) 0.28s forwards;
}

@keyframes wcRise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.westbury-section {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
}

.westbury-section__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wc-sea);
  margin-bottom: 0.5rem;
}

.westbury-section__label--on-dark,
.westbury-band .westbury-section__label {
  color: #e8f2f5;
}

.westbury-section h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin: 0 0 0.75rem;
}

.westbury-section > p,
.westbury-lead {
  color: var(--wc-muted);
  max-width: 60ch;
  font-size: 1.08rem;
}

.westbury-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.westbury-split img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}

.westbury-band {
  background: var(--wc-sea);
  color: #f4f1ea;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.westbury-band h2,
.westbury-band h3 {
  color: #fff;
}

.westbury-band p {
  color: rgba(244, 241, 234, 0.88);
}

.westbury-band__inner {
  width: min(var(--wc-max), calc(100% - 2.5rem));
  margin: 0 auto;
}

.westbury-links {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.65rem;
}

.westbury-links a {
  display: block;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
  border-left: 3px solid var(--wc-sun);
  transition: background 0.2s var(--wc-ease), transform 0.2s var(--wc-ease);
}

.westbury-links a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateX(4px);
}

/* Directory / numbers */
.westbury-directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.westbury-directory__item {
  padding: 1.1rem 0;
  border-top: 1px solid var(--wc-paper-deep);
}

.westbury-directory__item strong {
  display: block;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.05rem;
  color: var(--wc-sea-deep);
  margin-bottom: 0.25rem;
}

.westbury-directory__item span {
  color: var(--wc-muted);
  font-size: 0.98rem;
}

/* Doc list (members) */
.westbury-docs {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.westbury-docs li {
  border-bottom: 1px solid var(--wc-paper-deep);
}

.westbury-docs a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0.15rem;
  text-decoration: none;
  color: var(--wc-ink);
  font-weight: 500;
}

.westbury-docs a:hover {
  color: var(--wc-sea);
}

.westbury-docs a span {
  color: var(--wc-muted);
  font-size: 0.85rem;
  font-weight: 400;
  white-space: nowrap;
}

.westbury-docs-empty {
  color: var(--wc-muted);
  margin-top: 1.25rem;
}

/* Gallery */
.westbury-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.westbury-gallery figure {
  margin: 0;
  overflow: hidden;
}

.westbury-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--wc-ease);
}

.westbury-gallery figure:hover img {
  transform: scale(1.04);
}

/* Floor plans */
.westbury-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.westbury-plans figure {
  margin: 0;
}

.westbury-plans img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--wc-white);
  border: 1px solid var(--wc-paper-deep);
}

.westbury-plans figcaption {
  margin-top: 0.5rem;
  font-family: Fraunces, Georgia, serif;
  color: var(--wc-sea-deep);
}

/* Reveal on scroll */
.wc-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--wc-ease), transform 0.7s var(--wc-ease);
}

.wc-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Members gate */
.westbury-gate {
  max-width: 420px;
  margin: 3rem auto;
  padding: 2rem 0;
}

.westbury-gate h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.westbury-gate p {
  color: var(--wc-muted);
  margin-bottom: 1.25rem;
}

.westbury-gate form {
  display: grid;
  gap: 0.75rem;
}

.westbury-gate input[type="password"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #c9c2b6;
  border-radius: 2px;
  background: #fff;
  font-size: 1rem;
}

.westbury-gate .westbury-gate__error {
  color: #9b2c2c;
  font-size: 0.95rem;
}

/* Board upload portal (front-end, no wp-admin) */
.westbury-board-panel {
  width: min(720px, calc(100% - 2rem));
  margin: 2.5rem auto 4rem;
}

.westbury-board-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.westbury-board-panel__head h1 {
  margin: 0 0 0.5rem;
}

.westbury-board-panel__logout {
  color: var(--wc-muted);
  font-size: 0.95rem;
}

.westbury-board-panel__ok {
  background: var(--wc-sea-soft);
  color: var(--wc-sea-deep);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.westbury-board-panel__card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--wc-paper-deep);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
}

.westbury-board-panel__card h2 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

.westbury-board-form {
  display: grid;
  gap: 0.45rem;
}

.westbury-board-form label {
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: 0.35rem;
}

.westbury-board-form input[type="text"],
.westbury-board-form select,
.westbury-board-form input[type="file"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #c9c2b6;
  border-radius: 2px;
  background: #fff;
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 0.35rem;
  color: var(--wc-ink);
}

.westbury-board-form input[type="text"] {
  padding: 0.75rem 0.9rem;
  min-height: 2.75rem;
}

.westbury-board-form select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.75rem 2.5rem 0.75rem 0.9rem;
  min-height: 2.85rem;
  height: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2312354e' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 12px 8px;
  cursor: pointer;
}

.westbury-board-form input[type="file"] {
  padding: 0.55rem 0;
  border: 0;
  background: transparent;
}

.westbury-board-form .westbury-btn {
  margin-top: 0.75rem;
  justify-self: start;
}

.westbury-board-doclist li {
  border-bottom: 1px solid var(--wc-paper-deep);
}

.westbury-board-doclist__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 0;
}

.westbury-board-doclist__row strong {
  display: block;
}

.westbury-board-doclist__row span {
  color: var(--wc-muted);
  font-size: 0.88rem;
}

.westbury-board-panel__delete {
  background: transparent;
  border: 1px solid #c9c2b6;
  color: #9b2c2c;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.westbury-board-panel__delete:hover {
  border-color: #9b2c2c;
}

/* Footer */
.site-footer,
.ast-footer-overlay,
.footer-adv {
  background: var(--wc-sea) !important;
  color: rgba(244, 241, 234, 0.85);
}

.site-footer a {
  color: #f4f1ea;
}

.westbury-credit {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(244, 241, 234, 0.88);
  margin: 0.5rem 0 0;
}

.westbury-credit a,
.westbury-credit__link {
  color: #fff !important;
  text-decoration: underline;
}

/* Click-to-load embed facades */
.westbury-facade {
  position: relative;
  width: 100%;
  background: var(--wc-sea-deep);
  overflow: hidden;
}

.westbury-facade__btn {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
  position: relative;
  color: #fff;
  font: inherit;
  text-align: center;
}

.westbury-facade__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.westbury-facade__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 48px;
  margin: -24px 0 0 -34px;
  background: #c4302b;
  border-radius: 10px;
}

.westbury-facade__play::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 14px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}

.westbury-facade__maps-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 1.5rem;
  background:
    radial-gradient(800px 280px at 20% 20%, rgba(165, 200, 209, 0.28), transparent 55%),
    var(--wc-sea);
}

.westbury-facade__maps-label strong {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
}

.westbury-facade__maps-label span {
  color: #e8f2f5;
  max-width: 28ch;
}

.westbury-facade iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.westbury-gallery img,
.westbury-plans img,
.westbury-split figure img {
  width: 100%;
  height: auto;
  display: block;
}

.westbury-credit a:hover,
.westbury-credit__link:hover {
  color: #fff !important;
}

/* Content width polish */
.ast-container,
.entry-content > .westbury-section,
.entry-content > .alignwide {
  max-width: var(--wc-max);
}

.entry-content .westbury-hero + * {
  margin-top: 0;
}

/* Contact form */
.westbury-contact {
  display: grid;
  gap: 0.55rem;
  max-width: 560px;
}

.westbury-contact label {
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: 0.35rem;
  color: var(--wc-ink);
}

.westbury-contact input[type="text"],
.westbury-contact input[type="email"],
.westbury-contact textarea,
.westbury-contact select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #c9c2b6;
  border-radius: 2px;
  background: #fff;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--wc-ink);
  margin-bottom: 0.25rem;
}

.westbury-contact input[type="text"],
.westbury-contact input[type="email"],
.westbury-contact textarea {
  padding: 0.75rem 0.9rem;
  min-height: 2.75rem;
}

.westbury-contact select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.75rem 2.5rem 0.75rem 0.9rem;
  min-height: 2.85rem;
  height: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2312354e' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 12px 8px;
  cursor: pointer;
}

.westbury-contact textarea {
  min-height: 8rem;
  resize: vertical;
}

.westbury-contact .westbury-btn {
  margin-top: 0.5rem;
  justify-self: start;
}

/* Only one desktop builder menu visible */
.ast-builder-menu-2,
.ast-builder-menu-3 {
  display: none !important;
}

/* Mobile */
@media (max-width: 900px) {
  .westbury-split,
  .westbury-plans,
  .westbury-gallery {
    grid-template-columns: 1fr;
  }

  .westbury-gallery img {
    height: 200px;
  }

  .westbury-hero {
    min-height: 78vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .westbury-hero__lead,
  .westbury-hero__actions,
  .wc-reveal {
    opacity: 1;
    transform: none;
  }
}