/* ================================================================
   TQ Construction — master.css
   Global styles: variables, reset, navbar, footer, buttons, AI button
   ================================================================ */

/* === 1. FONTS & CSS VARIABLES === */

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

:root {
  --brand-color:    #0d1d33;
  --pompadour-dark: #070e1a;
  --yellow:         #f5c518;
  --secondary:      #1a3055;
  --white:          #ffffff;
  --light-bg:       #f8f9fa;
  --text-dark:      #1a1a1a;
  --text-muted:     #6c757d;

  --section-pad-desktop: 100px;
  --section-pad-tablet:  70px;
  --section-pad-mobile:  50px;

  --container-max: 1200px;
  --border-radius: 8px;
  --transition:    0.3s ease;

  --topbar-h: 40px;
}


/* === 2. RESET & BASE === */

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  /* anchor jumps land below the fixed top bar + navbar instead of under them */
  scroll-padding-top: calc(var(--topbar-h) + 96px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ── Global scroll reveal animation (revealed by master.js) ── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto; /* release the compositor hint once revealed */
}

/* Gentle stagger so cards in a row cascade in rather than snapping together */
.fade-in.visible:nth-child(2) { transition-delay: 0.08s; }
.fade-in.visible:nth-child(3) { transition-delay: 0.16s; }
.fade-in.visible:nth-child(4) { transition-delay: 0.24s; }
.fade-in.visible:nth-child(5) { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .fade-in.visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

body {
  font-family: 'Jost', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}


/* === 3. TYPOGRAPHY === */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.2rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.eyebrow {
  font-family: 'Jost', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 0.75rem;
  display: block;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.05rem;
  max-width: 560px;
}


/* === 4. BUTTONS === */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border-radius: 0;
}

.btn-primary {
  background-color: var(--brand-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--yellow);
  color: var(--white);
}

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

.btn-outline:hover {
  background: var(--white);
  color: var(--brand-color);
}

.btn-outline-dark {
  background: transparent;
  color: var(--brand-color);
  border: 2px solid var(--brand-color);
}

.btn-outline-dark:hover {
  background: var(--brand-color);
  color: var(--white);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 30px;
  padding: 12px 28px;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-yellow {
  background-color: var(--yellow);
  color: var(--white);
}

.btn-yellow:hover {
  background-color: var(--brand-color);
  color: var(--white);
}


/* === 5. LAYOUT HELPERS === */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-pad-desktop) 0;
}

.section-light {
  background-color: var(--light-bg);
}

.section-dark {
  background-color: var(--brand-color);
}

.section-black {
  background-color: var(--pompadour-dark);
}

.section-header {
  margin-bottom: 3rem;
}

.section-header.centered {
  text-align: center;
}

.section-header.centered .section-subtitle {
  margin: 0 auto;
}

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

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

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

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }


/* === 6. NAVBAR === */

/* === TOP UTILITY BAR === */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--topbar-h);
  z-index: 9100;
  background: var(--pompadour-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1.5rem;
}

.top-bar-contact {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: nowrap;
  overflow: hidden;
}

.top-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.top-bar-item svg { color: var(--yellow); flex: none; }
.top-bar-item:hover { color: var(--yellow); }

.top-bar-socials {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: none;
}

.top-bar-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
  transition: color 0.25s ease, background 0.25s ease;
}

.top-bar-socials a:hover {
  color: var(--pompadour-dark);
  background: var(--yellow);
}

.navbar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  width: 100%;
  height: 88px;
  z-index: 9000;
  display: flex;
  align-items: center;
  transition: background-color 0.4s ease, height 0.4s ease, box-shadow 0.4s ease;
}

.navbar.scrolled-half {
  background: rgba(255, 255, 255, 0.55);
  height: 70px;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 24px rgba(13, 29, 51, 0.06);
}

.navbar.scrolled-full {
  background: rgba(255, 255, 255, 0.75);
  height: 60px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 24px rgba(13, 29, 51, 0.08);
}

/* 3-column grid layout: left links | center logo | right actions */
.navbar-wrap {
  display: grid;
  grid-template-columns: 1fr 0.7fr 1fr;
  align-items: center;
  width: 100%;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.navbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
}

/* Logo */
.navbar-logo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  background: #022658;
  border-radius: 30px;
  /* fallback for logo transparency */
}

.navbar-logo img {
  height: 75px;
  width: auto;
  transition: height 0.4s ease, opacity 0.4s ease;
  background:transparent;
}

/* Logo crossfade on scroll — applies on every page (master, not page-specific) */
.logo-white { opacity: 1; transition: opacity 0.3s ease; }
.logo-dark  { opacity: 0; position: absolute; left: 0; top: 0; transition: opacity 0.3s ease; }
.navbar.scrolled-half .logo-white,
.navbar.scrolled-full .logo-white { opacity: 0.15; }
.navbar.scrolled-half .logo-dark,
.navbar.scrolled-full .logo-dark  { opacity: 1; }

.navbar.scrolled-full .navbar-logo img,
.navbar.scrolled-half .navbar-logo img {
  height: 55px;
  width: auto;
}

.navbar-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  transition: color 0.4s ease;
  white-space: nowrap;
}

.navbar.scrolled-half .navbar-logo-text,
.navbar.scrolled-full .navbar-logo-text {
  color: var(--brand-color);
}

/* Nav links */
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-link > a,
.navbar-left > a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--white);
  transition: color var(--transition);
  position: relative;
  white-space: nowrap;
}

.navbar.scrolled-half .nav-link > a,
.navbar.scrolled-half .navbar-left > a,
.navbar.scrolled-full .nav-link > a,
.navbar.scrolled-full .navbar-left > a {
  color: var(--brand-color);
}

.nav-line {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--yellow);
  transition: width var(--transition);
}

.nav-link:hover .nav-line,
.nav-link.active .nav-line {
  width: 100%;
}

/* Dropdown */
.navbar-dropdown {
  position: relative;
}

.dropdown-menu {
  display: block;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  background: var(--white);
  min-width: 220px;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 8px 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  pointer-events: none;
  z-index: 100;
}

.navbar-dropdown:hover .dropdown-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-color);
  transition: background var(--transition), color var(--transition);
}

.dropdown-menu a:hover {
  background: var(--light-bg);
  color: var(--yellow);
}

/* Phone wrap */
.phone-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-wrap svg {
  flex-shrink: 0;
  stroke: var(--white);
  transition: stroke var(--transition);
}

.navbar.scrolled-half .phone-wrap svg,
.navbar.scrolled-full .phone-wrap svg {
  stroke: var(--brand-color);
}

.navbar-phone {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  transition: color var(--transition);
  white-space: nowrap;
}

.navbar.scrolled-half .navbar-phone,
.navbar.scrolled-full .navbar-phone {
  color: var(--brand-color);
}

/* Hamburger button (mobile) — staggered bar widths like clone */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}

.nav-top,
.nav-middle,
.nav-bottom {
  height: 2px;
  background: var(--white);
  transition: background var(--transition);
  display: block;
}

.nav-top    { width: 12px; }
.nav-middle { width: 20px; }
.nav-bottom { width: 20px; }

.navbar.scrolled-half .nav-top,
.navbar.scrolled-half .nav-middle,
.navbar.scrolled-half .nav-bottom,
.navbar.scrolled-full .nav-top,
.navbar.scrolled-full .nav-middle,
.navbar.scrolled-full .nav-bottom {
  background: var(--brand-color);
}


/* === 7. HAMBURGER OVERLAY === */

.hamburger-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  display: flex;
  justify-content: flex-end;
}

.hamburger-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.hamburger-panel {
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: rgba(13, 29, 51, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.hamburger-overlay.is-open .hamburger-panel {
  transform: translateX(0);
}

.hamburger-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger-close:hover {
  transform: rotate(90deg);
  opacity: 0.7;
}

.hamburger-nav {
  list-style: none;
  margin-top: 2rem;
}

.hamburger-nav li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hamburger-nav a {
  display: block;
  padding: 18px 0;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.02em;
  transition: color var(--transition), padding-left var(--transition);
}

.hamburger-nav a:hover {
  color: var(--yellow);
  padding-left: 8px;
}

.hamburger-footer-info {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hamburger-footer-info p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.hamburger-footer-info a {
  color: var(--yellow);
  font-weight: 600;
}


/* === 8. FOOTER === */

.footer {
  background-color: var(--pompadour-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 1rem;
  max-width: 280px;
}

.footer-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
}

.footer-col h4 {
  font-family: 'Jost', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 1.2rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-col ul a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

.footer-col ul a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.35);
  transition: color var(--transition);
}

.footer-bottom a:hover {
  color: var(--white);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.2rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--white);
}


/* === 9. SOUND UNLOCK TOAST === */

#sound-toast {
  position: fixed;
  bottom: 90px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(7, 14, 26, 0.88);
  color: #fff;
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 10px 16px;
  border-radius: 50px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 9000;
  cursor: pointer;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: auto;
}

#sound-toast svg {
  flex-shrink: 0;
  color: var(--yellow);
}

#sound-toast.toast-hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

/* === 10. AI BUTTON & MODAL === */

.ai-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  height: 58px;
  padding: 0 20px 0 8px;
  border-radius: 34px;
  background: var(--brand-color);
  border: 1px solid rgba(245, 197, 24, 0.45);
  color: var(--white);
  cursor: pointer;
  z-index: 8000;
  display: flex;
  align-items: center;
  gap: 11px;
  box-shadow: 0 8px 26px rgba(13, 29, 51, 0.4);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  animation: ai-pulse 3s infinite;
}

.ai-btn:hover {
  transform: translateY(-2px);
  background: var(--secondary);
  box-shadow: 0 12px 34px rgba(13, 29, 51, 0.5);
  animation: none;
}

.ai-btn-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--brand-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-btn-status {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2ecc71;
  border: 2px solid var(--brand-color);
}

.ai-btn-label {
  font-family: 'Jost', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding-right: 2px;
}

@keyframes ai-pulse {
  0%, 100% { box-shadow: 0 8px 26px rgba(13, 29, 51, 0.4), 0 0 0 0 rgba(245, 197, 24, 0.45); }
  50%       { box-shadow: 0 8px 26px rgba(13, 29, 51, 0.4), 0 0 0 12px rgba(245, 197, 24, 0); }
}

/* Teaser bubble */
.ai-teaser {
  position: fixed;
  bottom: 92px;
  right: 20px;
  z-index: 7999;
  background: var(--brand-color);
  color: var(--white);
  border-radius: 12px 12px 4px 12px;
  padding: 14px 36px 14px 16px;
  max-width: 240px;
  box-shadow: 0 8px 28px rgba(13, 29, 51, 0.35);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.ai-teaser::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--brand-color);
}

.ai-teaser--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.ai-teaser--hide {
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  pointer-events: none;
}

.ai-teaser p {
  margin: 0;
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--white);
}

.ai-teaser-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  transition: color var(--transition);
}

.ai-teaser-close:hover {
  color: var(--white);
}

/* AI Modal */
.ai-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 14, 26, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.ai-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ai-modal {
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.ai-modal-header {
  background: var(--brand-color);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.ai-modal-header h3 {
  font-family: 'Jost', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  margin: 0;
}

.ai-header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Jost', sans-serif;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

.ai-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}

.ai-modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color var(--transition);
  flex-shrink: 0;
}

.ai-modal-close:hover {
  color: var(--white);
}

/* ── Chat messages area ─────────────────────────────────────── */
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 260px;
  max-height: 400px;
  scroll-behavior: smooth;
}

.ai-chat-messages:empty::before {
  content: 'Ask Leon anything about LJH Construction...';
  display: block;
  text-align: center;
  color: #adb5bd;
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  margin: auto;
  padding: 40px 20px;
}

.ai-chat-messages::-webkit-scrollbar {
  width: 4px;
}
.ai-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}
.ai-chat-messages::-webkit-scrollbar-thumb {
  background: #d0d5dd;
  border-radius: 4px;
}

.ai-message {
  display: flex;
}

.ai-message--user {
  justify-content: flex-end;
}

.ai-message--assistant {
  justify-content: flex-start;
}

.ai-message-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-family: 'Jost', sans-serif;
  font-size: 0.875rem;
  line-height: 1.55;
}

.ai-message-bubble p {
  margin: 0;
  color: inherit;
  font-size: inherit;
}

.ai-message-bubble a {
  text-decoration: underline;
  word-break: break-all;
}

.ai-message--user .ai-message-bubble {
  background: var(--brand-color);
  color: var(--white);
  border-radius: 16px 16px 4px 16px;
}

.ai-message--user .ai-message-bubble a {
  color: var(--yellow);
}

.ai-message--assistant .ai-message-bubble {
  background: #f0f2f5;
  color: var(--text-dark);
  border-radius: 16px 16px 16px 4px;
}

.ai-message--assistant .ai-message-bubble a {
  color: var(--brand-color);
}

/* Typing indicator */
.ai-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
}

.ai-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ca3af;
  display: inline-block;
  animation: ai-bounce 1.3s infinite;
}

.ai-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-typing span:nth-child(3) { animation-delay: 0.30s; }

@keyframes ai-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-5px); }
}

/* ── Chat input bar ─────────────────────────────────────────── */
.ai-chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #e9ecef;
  flex-shrink: 0;
  background: var(--white);
}

.ai-chat-input {
  flex: 1;
  border: 1px solid #d0d5dd;
  border-radius: 24px;
  padding: 9px 16px;
  font-family: 'Jost', sans-serif;
  font-size: 0.875rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color var(--transition);
  background: #f8f9fa;
}

.ai-chat-input:focus {
  border-color: var(--brand-color);
  background: var(--white);
}

.ai-chat-input::placeholder {
  color: #adb5bd;
}

.ai-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-color);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
}

.ai-chat-send:hover:not(:disabled) {
  background: var(--secondary);
  transform: scale(1.05);
}

.ai-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* === 10. PAGE HERO BANNER (inner pages) === */

.page-hero {
  height: 45vh;
  min-height: 320px;
  background: var(--brand-color);
  background-image: linear-gradient(rgba(7, 14, 26, 0.65), rgba(7, 14, 26, 0.65));
  display: flex;
  align-items: flex-end;
  padding-bottom: 3rem;
  padding-top: calc(100px + var(--topbar-h));
}

.page-hero-content {
  color: var(--white);
}

.page-hero-content h1 {
  margin-bottom: 0.5rem;
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.breadcrumb {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--yellow);
}

.breadcrumb span {
  margin: 0 6px;
}


/* === 11. UTILITIES === */

.text-center  { text-align: center; }
.text-white   { color: var(--white); }
.text-navy    { color: var(--brand-color); }
.text-yellow  { color: var(--yellow); }
.text-muted   { color: var(--text-muted); }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

.d-flex { display: flex; }
.gap-sm  { gap: 1rem; }
.gap-md  { gap: 2rem; }

.hide-mobile { display: flex; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* === 12. RESPONSIVE === */

@media screen and (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media screen and (max-width: 991px) {
  :root { --topbar-h: 0px; }

  .top-bar { display: none; }

  .navbar-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .navbar-left,
  .hide-mobile {
    display: none !important;
  }

  .navbar-center {
    flex: 1;
    display: flex;
    justify-content: flex-start;
  }

  .nav-hamburger {
    display: flex;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 767px) {
  :root {
    --section-pad-desktop: var(--section-pad-mobile);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .hamburger-panel {
    max-width: 100%;
    padding: 50px 24px;
  }
}

@media screen and (max-width: 479px) {
  .container {
    padding: 0 16px;
  }

  .ai-btn {
    bottom: 16px;
    right: 16px;
    height: 52px;
    padding: 5px;
    gap: 0;
  }

  .ai-btn-label { display: none; }

  .ai-btn-avatar { width: 42px; height: 42px; }

  .ai-modal {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
  }

  .ai-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .ai-chat-messages {
    max-height: 55vh;
  }
}

/* ================================================================
   STICKY MOBILE CTA  (injected by master.js)
   ================================================================ */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 940;
  display: flex;
  transform: translateY(110%);
  transition: transform 0.32s ease;
  box-shadow: 0 -4px 22px rgba(0,0,0,0.18);
}

.sticky-cta.is-visible { transform: translateY(0); }

.sticky-cta a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 15px 12px;
  font-family: 'Jost', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.sticky-cta-call {
  background: var(--white, #fff);
  color: var(--brand-color);
}

.sticky-cta-quote {
  background: var(--yellow);
  color: var(--brand-color);
}

.sticky-cta svg { flex: none; }

/* Mobile/tablet only — desktop has the header CTA + footer banner */
@media (min-width: 992px) {
  .sticky-cta { display: none; }
}


/* === NEWSLETTER POPUP ("TQ Talk") === */

.nl-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 14, 26, 0.7);
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nl-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nl-modal {
  position: relative;
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 40px 36px 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.3s ease;
}

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

.nl-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid #e2e5ea;
  border-radius: 50%;
  background: var(--white);
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.nl-close:hover {
  background: var(--brand-color);
  border-color: var(--brand-color);
  color: var(--white);
}

.nl-title {
  font-family: 'Jost', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--brand-color);
  margin: 0 0 14px;
}

.nl-title span { color: var(--yellow); }

.nl-sub {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 22px;
}

.nl-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nl-input {
  width: 100%;
  padding: 13px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-dark);
  border: 1px solid #d3d8e0;
  border-radius: var(--border-radius);
  outline: none;
  transition: var(--transition);
}

.nl-input:focus {
  border-color: var(--brand-color);
  box-shadow: 0 0 0 3px rgba(13, 29, 51, 0.12);
}

/* Honeypot — hidden from humans */
.nl-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.nl-error {
  font-size: 0.85rem;
  color: #c0392b;
  text-align: left;
}

.nl-submit {
  width: 100%;
  padding: 14px 16px;
  margin-top: 2px;
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  background: var(--brand-color);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.nl-submit:hover:not(:disabled) {
  background: var(--secondary);
}

.nl-submit:disabled {
  opacity: 0.7;
  cursor: default;
}

.nl-fine {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 18px 0 16px;
}

.nl-decline {
  display: inline-block;
  background: none;
  border: none;
  font-family: 'Jost', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand-color);
  cursor: pointer;
  text-decoration: none;
}

.nl-decline:hover { text-decoration: underline; }

/* Success state */
.nl-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--brand-color);
  color: var(--white);
  font-size: 2rem;
  line-height: 64px;
}

.nl-done { margin-top: 8px; }

@media (max-width: 479px) {
  .nl-modal { padding: 36px 22px 26px; }
  .nl-title { font-size: 1.45rem; }
}
