
:root {
  --brand-primary: #0f4c81;
  --brand-primary-dark: #0a3559;
  --brand-primary-light: #1a6ba8;
  --brand-accent: #f97316;
  --brand-accent-dark: #ea580c;
  --brand-bg-tint: #f8fafc;
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv02','cv03','cv04','cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4 { letter-spacing: -0.02em; font-weight: 700; }
h1 { line-height: 1.05; }
h2 { line-height: 1.15; }
::selection { background-color: var(--brand-accent); color: white; }
:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 3px; border-radius: 4px; }

/* Container */
.container-main { max-width: 80rem; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
@media (min-width: 640px) { .container-main { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .container-main { padding-left: 2rem; padding-right: 2rem; } }
.container-prose { max-width: 48rem; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
@media (min-width: 640px) { .container-prose { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .container-prose { padding-left: 2rem; padding-right: 2rem; } }

/* Typography helpers */
.eyebrow { display: inline-block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; }
@media (min-width: 640px) { .eyebrow { font-size: 0.875rem; } }
.h-display { font-size: 2.25rem; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
@media (min-width: 640px) { .h-display { font-size: 3rem; } }
@media (min-width: 1024px) { .h-display { font-size: 3.75rem; } }
.h-section { font-size: 1.875rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
@media (min-width: 640px) { .h-section { font-size: 2.25rem; } }
@media (min-width: 1024px) { .h-section { font-size: 3rem; } }
.h-card { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
@media (min-width: 640px) { .h-card { font-size: 1.25rem; } }
.body-lg { font-size: 1.125rem; line-height: 1.7; color: #475569; }
@media (min-width: 640px) { .body-lg { font-size: 1.25rem; } }
.body-md { font-size: 1rem; line-height: 1.7; color: #475569; }
@media (min-width: 640px) { .body-md { font-size: 1.125rem; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.875rem 1.5rem; border-radius: 0.75rem; font-weight: 600; font-size: 1rem;
  transition: all 0.2s ease-out; min-height: 48px; cursor: pointer;
  text-decoration: none; line-height: 1.2;
}
.btn:focus { outline: none; }
.btn-primary {
  background-color: var(--brand-accent); color: white;
  box-shadow: 0 10px 25px -5px color-mix(in srgb, var(--brand-accent) 35%, transparent),
              0 4px 10px -3px color-mix(in srgb, var(--brand-accent) 20%, transparent);
}
.btn-primary:hover {
  background-color: var(--brand-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 20px 35px -10px color-mix(in srgb, var(--brand-accent) 45%, transparent),
              0 8px 16px -4px color-mix(in srgb, var(--brand-accent) 30%, transparent);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background-color: white; color: #0f172a; border: 2px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-secondary:hover { border-color: #94a3b8; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.btn-secondary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--brand-primary); }
.btn-ghost:hover { background-color: color-mix(in srgb, var(--brand-primary) 6%, transparent); }
.btn-lg { padding: 1rem 2rem; font-size: 1.125rem; min-height: 56px; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; min-height: 36px; }

/* Card */
.card {
  background-color: white; border-radius: 1rem; border: 1px solid rgba(226, 232, 240, 0.6);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); transition: all 0.3s ease-out;
}
.card-elevated:hover { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15); border-color: #e2e8f0; transform: translateY(-4px); }
.card-pad { padding: 1.5rem; }
.card-pad-sm { padding: 1.25rem; }
@media (min-width: 640px) { .card-pad { padding: 2rem; } .card-pad-sm { padding: 1.5rem; } }

/* Nav link */
.nav-link {
  padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500;
  color: #334155; transition: color 0.15s, background-color 0.15s; text-decoration: none;
}
.nav-link:hover { color: var(--brand-primary); background-color: #f8fafc; }
.nav-link-active { color: var(--brand-primary); background-color: #f8fafc; }

/* Section */
.section { padding-top: 4rem; padding-bottom: 4rem; }
@media (min-width: 640px) { .section { padding-top: 5rem; padding-bottom: 5rem; } }
@media (min-width: 1024px) { .section { padding-top: 6rem; padding-bottom: 6rem; } }
.section-tight { padding-top: 3rem; padding-bottom: 3rem; }
@media (min-width: 640px) { .section-tight { padding-top: 4rem; padding-bottom: 4rem; } }

/* Gradient backgrounds */
.bg-hero-radial {
  background:
    radial-gradient(ellipse at 30% 0%, color-mix(in srgb, var(--brand-primary) 12%, transparent) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, color-mix(in srgb, var(--brand-accent) 8%, transparent) 0%, transparent 50%),
    #ffffff;
}
.bg-tint { background: var(--brand-bg-tint); }
.text-primary { color: var(--brand-primary); }
.bg-primary { background: var(--brand-primary); }
.border-primary { border-color: var(--brand-primary); }
.text-accent { color: var(--brand-accent); }
.bg-accent { background: var(--brand-accent); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease-out, transform 0.7s ease-out; will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Accordion */
details.accordion { border-bottom: 1px solid #e2e8f0; padding: 1rem 0; }
details.accordion summary {
  font-weight: 600; color: #0f172a; cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 0;
}
details.accordion summary::-webkit-details-marker { display: none; }
details.accordion summary::after {
  content: ''; width: 20px; height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.2' stroke='%230f4c81'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; transition: transform 0.3s ease; flex-shrink: 0;
}
details.accordion[open] summary::after { transform: rotate(180deg); }
details.accordion .acc-body { color: #475569; line-height: 1.7; padding-top: 0.75rem; animation: accGrow 0.3s ease-out; }
@keyframes accGrow { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* Mobile menu drawer */
.mobile-drawer {
  position: fixed; inset: 0; z-index: 50; background-color: white;
  transform: translateX(100%); transition: transform 0.3s ease-out;
}
@media (min-width: 1024px) { .mobile-drawer { display: none; } }
.mobile-drawer.is-open { transform: translateX(0); }
body.menu-open { overflow: hidden; }

/* Sticky mobile CTA bar (demos) */
.mobile-cta-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background-color: white; border-top: 1px solid #e2e8f0;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
  padding: 0.75rem; display: flex; gap: 0.5rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}
@media (min-width: 768px) { .mobile-cta-bar { display: none; } }
.mobile-cta-bar .btn { flex: 1; font-size: 0.875rem; padding: 0.75rem; min-height: 44px; }

/* Demo banner */
.demo-banner {
  color: white; font-size: 0.75rem; padding: 0.5rem 1rem; text-align: center; font-weight: 500;
  background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
}
@media (min-width: 640px) { .demo-banner { font-size: 0.875rem; } }

/* Chatbot widget */
.chatbot-button {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 40;
  width: 3.5rem; height: 3.5rem; border-radius: 9999px;
  background-color: var(--brand-accent); color: white;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; cursor: pointer; border: none;
  box-shadow: 0 25px 50px -12px color-mix(in srgb, var(--brand-accent) 45%, transparent);
}
.chatbot-button:hover { transform: scale(1.1); background-color: var(--brand-accent-dark); }
@media (max-width: 768px) { .chatbot-button { bottom: 5rem; } }

/* Form */
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: #334155; margin-bottom: 0.375rem; }
.form-input {
  display: block; width: 100%; border-radius: 0.75rem;
  border: 1px solid #cbd5e1; padding: 0.75rem 1rem; font-size: 1rem;
  background-color: white; min-height: 48px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input::placeholder { color: #94a3b8; }
.form-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 12%, transparent);
}
.form-textarea { resize: vertical; min-height: 120px; }

/* Stat */
.stat-num { font-size: 1.875rem; font-weight: 700; letter-spacing: -0.02em; color: var(--brand-primary); }
@media (min-width: 640px) { .stat-num { font-size: 2.25rem; } }
@media (min-width: 1024px) { .stat-num { font-size: 3rem; } }
.stat-label { font-size: 0.875rem; color: #64748b; margin-top: 0.25rem; }

/* Gallery */
.gallery-item { position: relative; overflow: hidden; border-radius: 1rem; background-color: #e2e8f0; aspect-ratio: 4/3; cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .overlay {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.2), transparent);
  display: flex; align-items: flex-end; padding: 1.25rem;
}
.gallery-item:hover .overlay { opacity: 1; }

/* Skip link */
.skip-link { position: absolute; top: -3rem; left: 1rem; z-index: 50; background-color: var(--brand-primary); color: white; padding: 0.5rem 1rem; border-radius: 0.375rem; transition: top 0.2s; text-decoration: none; }
.skip-link:focus { top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}


/* === PGRG MOBILE FIX v1 (sticky CTA + chatbot non-overlap) === */
/* Hide stray empty wrappers if they ever recur (defensive). */
.mobile-cta-bar:empty { display: none !important; }

/* CTA bar — robust touch targets + safe-area + no overflow */
.mobile-cta-bar {
  padding: 0.625rem 0.625rem;
  padding-bottom: max(0.625rem, calc(env(safe-area-inset-bottom, 0px) + 0.25rem));
  gap: 0.5rem;
  align-items: stretch;
}
.mobile-cta-bar .btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.625rem 0.5rem;
  font-size: 0.9375rem;
  min-height: 48px;
  white-space: nowrap;
  overflow: hidden;
  gap: 0.375rem;
}
.mobile-cta-bar .btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 100%;
}
.mobile-cta-bar .btn svg {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
}

/* Chatbot button: position ABOVE the CTA bar with safe-area math */
@media (max-width: 767.98px) {
  .chatbot-button {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 5.5rem);
    right: 0.875rem;
    width: 3rem;
    height: 3rem;
  }
  .chatbot-button svg { width: 1.375rem; height: 1.375rem; }

  /* Chatbot panel must clear the CTA bar too */
  [data-chatbot-panel] {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 5rem) !important;
    right: 0.625rem !important;
    width: calc(100vw - 1.25rem) !important;
    max-width: 380px;
    height: auto !important;
    max-height: calc(100vh - env(safe-area-inset-bottom, 0px) - 7rem) !important;
  }

  /* Reserve scroll space so footer + content aren't hidden behind sticky bar */
  body { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 4.25rem); }
}

/* Demos opted into a sticky-bar so default chatbot floats — make sure no overflow ANYWHERE on mobile */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video { max-width: 100%; height: auto; }
/* === END PGRG MOBILE FIX v1 === */


/* === PGRG MOBILE FIX v2 (broader selectors — buttons in CTA bar lack .btn class) === */
.mobile-cta-bar > a,
.mobile-cta-bar > button,
.mobile-cta-bar .btn-primary,
.mobile-cta-bar .btn-secondary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.375rem !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  padding: 0.625rem 0.5rem !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  min-height: 48px !important;
  border-radius: 0.625rem !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-decoration: none !important;
  cursor: pointer !important;
  text-align: center !important;
}
.mobile-cta-bar > a > span,
.mobile-cta-bar > button > span,
.mobile-cta-bar .btn-primary > span,
.mobile-cta-bar .btn-secondary > span {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: inline-block !important;
  max-width: calc(100% - 24px) !important;
}
.mobile-cta-bar svg {
  flex-shrink: 0 !important;
  width: 1.125rem !important;
  height: 1.125rem !important;
}
.mobile-cta-bar .btn-secondary {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #e2e8f0 !important;
}
.mobile-cta-bar .btn-primary {
  background-color: var(--brand-accent) !important;
  color: #ffffff !important;
  border: 1.5px solid var(--brand-accent) !important;
}
/* === END v2 === */
