/*==============================================================================
  theme/01-global.css
  GLOBAL — Design tokens, typography, gutters, shared buttons, form overlay, 404
  Linked from templates/base.html in numbered order with the other theme modules.
==============================================================================*/

/* --------------------------------------------------------------------------
   GLOBAL — Design tokens, typography, shared container padding
   -------------------------------------------------------------------------- */
:root {
  --text: #0a2540;
  --muted: #4a5d73;
  --body: #0a2540;
  --bg: #f5f3ee;
  --primary: #c9a227;
  --primary-hover: #8b6914;
  --border: #f1f5f9;
  --subtext: #4a5d73;
  --accent-light: #6b7c93;
  --page-pad-x: 80px;
  --page-max: 1280px;
  /* Sitewide type: Outfit for body + headings */
  --font: "Outfit", sans-serif;
  --font-display: "Outfit", sans-serif;
}

/* Block casual image save / right-click / long-press (not a hard security boundary) */
html,
body {
  -webkit-touch-callout: none;
}

img,
picture,
svg,
video,
canvas,
.protect-media {
  -webkit-user-drag: none;
  user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
}

/* Canonical left/right page gutters — same as /about/ on every page */
.container,
.info_section .container,
.footer_section .container,
.hero-section__inner,
.trusted-logos__inner,
.site-header__inner {
  max-width: var(--page-max) !important;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-pad-x) !important;
  padding-right: var(--page-pad-x) !important;
  box-sizing: border-box;
}

body {
  font-family: var(--font) !important;
  font-optical-sizing: auto;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text) !important;
  background: var(--bg) !important;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: 76px;
  box-sizing: border-box;
  margin: 0;
}

html {
  height: 100%;
  background: var(--bg);
}

.page-main {
  flex: 1 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.site-footer-block {
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display) !important;
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* Ensure titles stay on the display font even when nested in body-font components */
.heading_container h2,
.hero-copy__line,
.hero-copy h1,
.site-footer__col h5,
.ba-page__header h1,
.ba-lightbox__title,
.video-lightbox__title,
.quote-section h1,
.about-page__header h1,
.contact-page__copy h1,
.legal-page__header h1,
.video-library__header h1,
.spec-detail__content h1,
.procedure-detail__content h1,
.site-intro__line,
.about-page__stat dt {
  font-family: var(--font-display) !important;
}

a {
  color: var(--text);
}

p,
.detail-box p,
.about_section .detail-box p,
.spec-card__body p,
.spec-detail__summary,
.spec-detail__item p,
.procedure-detail__intro,
.procedure-detail__section p,
.procedure-detail__section li,
.quote-section p,
.service_section .box .detail-box p,
.team_section p,
.contact_section p,
.video-library p {
  font-family: var(--font) !important;
  font-optical-sizing: auto;
  font-size: 15px !important;
  line-height: 1.55 !important;
  color: var(--body) !important;
}

.ba-lightbox__count {
  color: #c9a227 !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

/* Soft meta lines only (not main body copy) */
.quote-hint,
.quote-section__privacy {
  color: var(--muted) !important;
  font-size: 13px !important;
}

.heading_container h2 {
  text-transform: none;
  letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   SHARED BUTTONS — Primary / secondary CTAs used across pages
   -------------------------------------------------------------------------- */
.btn-primary,
.btn-secondary,
.btn_primary,
.btn-box a,
.team_section .btn-box a,
.about_section .detail-box a,
.service_section .box .detail-box a,
.contact_section .contact_form-container button,
.contact_section .contact_form-container input[type="submit"],
.header-btn,
.site-header__menu-btn,
button,
.btn {
  border-radius: 0 !important;
}

.btn-primary {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  background: var(--primary);
  color: #fff;
  height: 48px;
  padding: 0 24px;
  border-radius: 0;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.btn-primary:hover {
  color: #fff;
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(139, 105, 20, 0.28);
}

.btn-secondary {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  background: var(--bg);
  color: var(--primary);
  height: 48px;
  padding: 0 24px;
  border-radius: 0;
  border: 1px solid #e3e8ef;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary:hover {
  color: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* --------------------------------------------------------------------------
   FORM SEND OVERLAY — Shared Lottie while sending (contact + quote)
   -------------------------------------------------------------------------- */
.form-send-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2400;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(10, 37, 64, 0.38);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 1;
  transition: opacity 280ms ease;
}

.form-send-overlay.is-open {
  display: flex;
}

.form-send-overlay.is-leaving {
  opacity: 0;
}

.form-send-overlay__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: min(340px, 90vw);
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.form-send-overlay__anim {
  width: 150px;
  height: 150px;
  flex: 0 0 150px;
  display: grid;
  place-items: center;
  overflow: hidden;
  line-height: 0;
}

.form-send-overlay__anim dotlottie-wc {
  display: block;
  width: 150px !important;
  height: 150px !important;
  max-width: 150px !important;
  max-height: 150px !important;
  overflow: hidden;
}

body.form-send-overlay-open {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   404 ERROR PAGE
   -------------------------------------------------------------------------- */
.error-page {
  min-height: min(70vh, 720px);
  display: flex;
  align-items: center;
}

.error-page__inner {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  justify-items: center;
  text-align: center;
  max-width: 42rem;
  margin-inline: auto;
}

.error-page__media {
  width: min(100%, 22rem);
}

.error-page__video {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.error-page__code {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
}

.error-page__copy h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.15;
  color: var(--text);
}

.error-page__copy p {
  margin: 0 auto 1.5rem;
  max-width: 34ch;
  color: var(--muted);
  line-height: 1.55;
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  justify-content: center;
  align-items: center;
}

.error-page__link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  font-weight: 500;
}

.error-page__link:hover {
  color: var(--primary-hover);
}

@media (min-width: 768px) {
  .error-page__inner {
    max-width: 52rem;
  }

  .error-page__media {
    width: min(100%, 26rem);
  }
}

