/* Site chrome — header, footer and shared buttons, mirroring Portico's
   components/Header, components/Footer and MobileHeader so model.edificex.ai
   reads as part of edificex.ai. Breakpoints follow Portico: 1024 / 900 / 720 / 540. */

html,
body {
  background: var(--bg-0);
  color: var(--text);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 0 auto;
  width: 100%;
}

::selection {
  background: var(--brand-line);
  color: var(--text);
}

/* ─────────────── Buttons (Portico launchBtn / ghostBtn / bookCallBtn) ─────────────── */
.btn-primary,
.btn-ghost,
.btn-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  min-height: 36px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  padding: 8px 18px;
  color: var(--text-on-brand);
  background: var(--grad-brand);
  border: 0;
  box-shadow: var(--brand-shadow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: var(--brand-shadow-hover);
}
.btn-primary svg { transition: transform 0.18s ease; }
.btn-primary:hover svg { transform: translateX(2px); }

.btn-ghost {
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  background: var(--surface-glass);
  border-color: var(--brand-line);
}

.btn-book {
  color: var(--brand);
  background: var(--brand-tint-1);
  border: 1px solid var(--border-accent);
}
.btn-book:hover,
.btn-book:focus-visible {
  background: var(--brand-tint-2);
  border-color: var(--brand-line-strong);
}

.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.site-nav__link:focus-visible,
.site-header__toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ─────────────── Header ─────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface-glass);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.site-header__bar {
  max-width: 1320px;
  margin: 0 auto;
  height: 64px;
  padding: 0 32px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 32px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-brand__mark {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-brand);
  box-shadow: 0 0 0 1px var(--border-accent), var(--brand-shadow);
}
.site-brand__mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--white-sheen), transparent 60%);
  pointer-events: none;
}
.site-brand__mark img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.site-brand__text {
  height: 22px;
  display: flex;
  align-items: center;
}
.site-brand__text img {
  height: 100%;
  width: auto;
}
.site-brand__text--sm { height: 16px; }

.site-menu {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.site-nav__link {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.18s ease, background 0.18s ease;
}
.site-nav__link:hover { color: var(--brand); background: var(--surface-strong); }
.site-nav__link--current { color: var(--brand); font-weight: 600; }

.site-cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.site-cta__form { margin: 0; }

.site-header__toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.site-header__toggle svg { width: 22px; height: 22px; }
.site-header__toggle-close { display: none; }
.site-header[data-open="true"] .site-header__toggle-open { display: none; }
.site-header[data-open="true"] .site-header__toggle-close { display: inline; }

@media (max-width: 1024px) {
  .site-header__bar {
    height: 60px;
    padding: 0 16px;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .site-header__toggle { display: inline-flex; }

  .site-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .site-header[data-open="true"] .site-menu { display: grid; }
  /* The open menu owns the screen: the AI chat launcher and an already-open chat panel step aside
     (the panel keeps its state and returns when the menu closes). */
  body:has(.site-header[data-open="true"]) .edx-chat-launcher,
  body:has(.site-header[data-open="true"]) .edx-chat-panel { display: none; }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .site-nav__link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    font-size: 15px;
  }

  .site-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .site-cta .btn-primary,
  .site-cta .btn-ghost,
  .site-cta .btn-book,
  .site-cta__form,
  .site-cta__form .btn-primary {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
  }
}

/* ─────────────── Footer ─────────────── */
.site-footer {
  flex-shrink: 0;
  background: var(--bg-1);
  color: var(--text-2);
  padding: 56px 48px 28px;
  margin-top: 96px;
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
  gap: 64px;
  padding-bottom: 40px;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 360px;
}

.site-footer__tagline {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  font-weight: 500;
  color: var(--text-muted);
}

.site-footer__social { display: flex; gap: 8px; }

.site-footer__social-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.site-footer__social-btn svg { width: 16px; height: 16px; }
.site-footer__social-btn:hover {
  color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-1px);
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.site-footer__title {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}

.site-footer__link {
  width: fit-content;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.15s ease;
}
.site-footer__link:hover { color: var(--brand); }
.site-footer__link--sm { font-size: 12px; }

.site-footer__bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer__copy {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.site-footer__legal {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-footer__network {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}

.site-footer__network-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.site-footer__disclaimer {
  margin: 0;
  max-width: 720px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-faint);
}

@media (max-width: 860px) {
  .site-footer__inner { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 720px) {
  .site-footer { padding: 48px 24px 24px; margin-top: 64px; }
}

@media (max-width: 540px) {
  .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
}
