/* ═══════════════════════════════════════════
   Bay Area Builders Exchange Foundation, Inc.
   Placeholder Site — v2 Blueprint Edition
   ═══════════════════════════════════════════ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy: #1b2a4a;
  --navy-deep: #111d36;
  --gold: #e5a31e;
  --gold-light: #f2c24d;
  --orange: #cf5519;
  --sky: #3d8ec9;
  --white: #ffffff;
  --off-white: #f7f8fa;
  --gray-100: #e9ecf1;
  --gray-200: #d4d9e2;
  --gray-400: #8d96a7;
  --gray-600: #4f5a6b;
  --gray-800: #2a3245;
  --grid-color: rgba(27, 42, 74, .045);
  --grid-accent: rgba(27, 42, 74, .07);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Montserrat', system-ui, sans-serif;
  line-height: 1.2;
}

/* ─────────────────────────────
   BLUEPRINT GRID BACKGROUND
   ───────────────────────────── */
.blueprint-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-accent) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-accent) 1px, transparent 1px),
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size:
    240px 240px,
    240px 240px,
    48px 48px,
    48px 48px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 35%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 35%, black 0%, transparent 100%);
}

/* ─────────────────────────────
   NAV
   ───────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .4s, box-shadow .4s;
}

.nav.scrolled {
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 0 var(--gray-100), 0 4px 24px rgba(27, 42, 74, .06);
  backdrop-filter: blur(16px);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}

.nav__brand img {
  height: 40px;
  width: auto;
}

.nav__brand span {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: .95rem;
  color: var(--navy);
  letter-spacing: .3px;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  color: var(--gray-600);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  transition: color .2s;
}

.nav__links a:hover {
  color: var(--navy);
}

/* ─────────────────────────────
   HERO
   ───────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem 4rem;
}

.hero__logo-wrapper {
  position: relative;
  margin-bottom: 2.5rem;
  animation: logoReveal 1s ease-out both;
}

.hero__logo {
  width: 240px;
  height: auto;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 12px 40px rgba(27, 42, 74, .12));
}

.hero__name {
  font-size: clamp(.85rem, 1.5vw, 1rem);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: .75rem;
  opacity: 0;
  animation: fadeUp .7s .25s ease-out forwards;
}

.hero__tagline {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--navy-deep);
  margin-bottom: 1rem;
  max-width: 700px;
  opacity: 0;
  animation: fadeUp .7s .4s ease-out forwards;
}

.hero__tagline em {
  font-style: normal;
  color: var(--gold);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: rgba(27, 42, 74, .05);
  border: 1px solid var(--gray-100);
  color: var(--gray-600);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: .5rem 1.3rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp .7s .5s ease-out forwards;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero__desc {
  font-size: clamp(.95rem, 1.8vw, 1.12rem);
  color: var(--gray-600);
  max-width: 480px;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp .7s .65s ease-out forwards;
}

.hero__actions {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fadeUp .7s .8s ease-out forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  padding: .9rem 2.2rem;
  border-radius: 60px;
  text-decoration: none;
  letter-spacing: .4px;
  transition: transform .25s, box-shadow .25s;
  cursor: pointer;
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(27, 42, 74, .2);
}

.btn--primary:hover {
  box-shadow: 0 8px 32px rgba(27, 42, 74, .3);
}

.btn--outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--gray-200);
}

.btn--outline:hover {
  border-color: var(--navy);
  box-shadow: 0 4px 16px rgba(27, 42, 74, .08);
}

.btn svg {
  width: 16px;
  height: 16px;
  transition: transform .2s;
}

.btn:hover svg {
  transform: translateX(2px);
}

/* ─────────────────────────────
   DIVIDER
   ───────────────────────────── */
.divider {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
}

.divider__line {
  width: 100%;
  max-width: 1000px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray-200), transparent);
}

.divider__diamond {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--white);
  border: 2px solid var(--gray-200);
  transform: rotate(45deg);
}

/* ─────────────────────────────
   PILLARS
   ───────────────────────────── */
.pillars {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
  max-width: 1060px;
  margin: 0 auto;
}

.pillars__header {
  text-align: center;
  margin-bottom: 3rem;
}

.pillars__label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}

.pillars__label::before,
.pillars__label::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
  opacity: .4;
}

.pillars__title {
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  font-weight: 800;
  color: var(--navy);
}

.pillars__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.pillar-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  padding: 2.25rem 1.75rem;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  overflow: hidden;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .3s;
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(27, 42, 74, .07);
  border-color: transparent;
}

.pillar-card:hover::before {
  opacity: 1;
}

.pillar-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  background: var(--icon-bg);
  color: var(--accent);
}

.pillar-card__icon svg {
  width: 24px;
  height: 24px;
}

.pillar-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .5rem;
}

.pillar-card__desc {
  font-size: .9rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ─────────────────────────────
   CONTACT
   ───────────────────────────── */
.contact {
  position: relative;
  z-index: 1;
  padding: 4rem 2rem 5rem;
  text-align: center;
}

.contact__card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--off-white);
  border: 1px solid var(--gray-100);
  border-radius: 20px;
  padding: 3rem 2.5rem;
}

.contact__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.contact__icon svg {
  width: 22px;
  height: 22px;
}

.contact__heading {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: .5rem;
}

.contact__text {
  color: var(--gray-600);
  font-size: .95rem;
  margin-bottom: 1.75rem;
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  transition: color .2s;
}

.contact__email:hover {
  color: var(--gold);
}

.contact__email svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--gold);
}

/* ─────────────────────────────
   FOOTER
   ───────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--gray-100);
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--white);
}

.footer__inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

.footer__logo {
  height: 44px;
  width: auto;
  opacity: .35;
  filter: grayscale(1);
  transition: opacity .3s, filter .3s;
}

.footer__logo:hover {
  opacity: .7;
  filter: grayscale(0);
}

.footer__copy {
  font-size: .8rem;
  color: var(--gray-400);
}

/* ─────────────────────────────
   MODAL
   ───────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}

.modal.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 29, 54, .45);
  backdrop-filter: blur(6px);
}

.modal__container {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 24px 80px rgba(17, 29, 54, .18);
  transform: translateY(16px) scale(.97);
  transition: transform .35s cubic-bezier(.22, .61, .36, 1);
}

.modal.is-open .modal__container {
  transform: translateY(0) scale(1);
}

.modal__header {
  position: relative;
  margin-bottom: 1.75rem;
}

.modal__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
}

.modal__subtitle {
  color: var(--gray-400);
  font-size: .9rem;
  margin-top: .25rem;
}

.modal__close {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--off-white);
  border-radius: 10px;
  color: var(--gray-600);
  cursor: pointer;
  transition: background .2s, color .2s;
}

.modal__close:hover {
  background: var(--gray-100);
  color: var(--navy);
}

.modal__close svg {
  width: 18px;
  height: 18px;
}

/* ── FORM ── */
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form__group {
  margin-bottom: 1rem;
}

.form__label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .4rem;
  letter-spacing: .3px;
}

.form__input {
  width: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .92rem;
  color: var(--gray-800);
  background: var(--off-white);
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  padding: .75rem 1rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.form__input::placeholder {
  color: var(--gray-400);
}

.form__input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27, 42, 74, .08);
}

.form__input.is-invalid {
  border-color: #d94040;
  box-shadow: 0 0 0 3px rgba(217, 64, 64, .08);
}

.form__textarea {
  resize: vertical;
  min-height: 110px;
}

.form__recaptcha {
  display: flex;
  justify-content: center;
}

.form__recaptcha .g-recaptcha {
  transform-origin: center;
}

@media (max-width: 380px) {
  .form__recaptcha .g-recaptcha {
    transform: scale(.88);
  }
}

.form__submit {
  width: 100%;
  justify-content: center;
  margin-top: .5rem;
  padding: 1rem;
}

.form__submit-loading {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.form__submit-loading[hidden] {
  display: none;
}

.spinner {
  width: 18px;
  height: 18px;
  animation: spin .8s linear infinite;
}

.form__feedback {
  font-size: .88rem;
  font-weight: 500;
  text-align: center;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .35s, opacity .35s, padding .35s, margin .35s;
}

.form__feedback.is-visible {
  max-height: 80px;
  opacity: 1;
  padding: .75rem 1rem;
  margin-bottom: .75rem;
}

.form__feedback--success {
  background: rgba(34, 160, 90, .08);
  color: #1a7a45;
  border: 1px solid rgba(34, 160, 90, .15);
}

.form__feedback--error {
  background: rgba(217, 64, 64, .08);
  color: #b13030;
  border: 1px solid rgba(217, 64, 64, .15);
}

/* ── MODAL SUCCESS STATE ── */
.modal__success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
}

.modal.is-success .modal__header,
.modal.is-success .modal__form {
  display: none;
}

.modal.is-success .modal__success {
  display: flex;
  animation: fadeUp .5s ease-out both;
}

.modal__success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 160, 90, .1);
  color: #22a05a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.modal__success-icon svg {
  width: 32px;
  height: 32px;
}

.modal__success-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: .4rem;
}

.modal__success-text {
  font-size: .95rem;
  color: var(--gray-600);
  max-width: 320px;
  line-height: 1.6;
}

.modal.is-fading .modal__container {
  animation: fadeOutScale .5s ease-in forwards;
}

.modal.is-fading .modal__backdrop {
  animation: fadeOutBackdrop .5s ease-in forwards;
}

@keyframes fadeOutScale {
  to { opacity: 0; transform: translateY(-10px) scale(.96); }
}

@keyframes fadeOutBackdrop {
  to { opacity: 0; }
}

body.modal-open {
  overflow: hidden;
}

/* ─────────────────────────────
   ANIMATIONS
   ───────────────────────────── */
@keyframes logoReveal {
  from { opacity: 0; transform: scale(.88); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.75); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─────────────────────────────
   SCROLL REVEAL
   ───────────────────────────── */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.pillars__grid .animate-in:nth-child(2) { transition-delay: .1s; }
.pillars__grid .animate-in:nth-child(3) { transition-delay: .2s; }

/* ─────────────────────────────
   RESPONSIVE
   ───────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 3.5rem 1.5rem 3rem; }
  .hero__logo { width: 180px; }
  .hero__logo-wrapper::before { width: 260px; height: 260px; }

  .modal { padding: 1rem; }
  .modal__container { padding: 1.75rem; border-radius: 16px; }
  .form__row { grid-template-columns: 1fr; }

  .pillars { padding: 3.5rem 1.5rem; }
  .pillars__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact__card { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .hero__logo { width: 150px; }
  .hero__actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}
