/* ── TerritoryIQ Brand Tokens ── */
:root {
  --global-palette1: #0F172A;
  /* Deep Navy — headings, primary nav */
  --global-palette2: #0051d5;
  /* Storm Blue — links, accents, CTAs */
  --global-palette3: #316bf3;
  /* Secondary container */
  --global-palette4: #45464d;
  /* Body text variant */
  --global-palette5: #191c1e;
  /* Primary body text */
  --global-palette6: #f7f9fb;
  /* Site background */
  --global-palette7: #ffffff;
  /* Card / module surface */
  --global-palette8: #c6c6cd;
  /* Borders / outlines */
  --global-palette9: #F97316;
  /* Warning Orange — primary CTA */

  --global-body-font-family: 'Inter', sans-serif;
  --global-heading-font-family: 'Inter', sans-serif;
  --global-body-font-size: 16px;
  --global-body-line-height: 1.5;
}

:root {
  --navy: #0F172A;
  --blue: #0051d5;
  --orange: #F97316;
  --surface: #f7f9fb;
  --outline: #c6c6cd;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--surface);
  color: #191c1e;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 20px;
}

.icon-filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Grid pattern background */
.grid-pattern {
  background-image:
    linear-gradient(to right, rgba(14, 26, 46, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14, 26, 46, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes floatBadge {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes pulseRing {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 81, 213, 0.35);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(0, 81, 213, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 81, 213, 0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(0.85);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

.anim-fade-up {
  animation: fadeUp 0.65s ease both;
}

.anim-fade-up-d1 {
  animation: fadeUp 0.65s ease 0.1s both;
}

.anim-fade-up-d2 {
  animation: fadeUp 0.65s ease 0.2s both;
}

.anim-fade-up-d3 {
  animation: fadeUp 0.65s ease 0.3s both;
}

.anim-fade-up-d4 {
  animation: fadeUp 0.65s ease 0.45s both;
}

.anim-fade-in {
  animation: fadeIn 0.8s ease both;
}

.anim-float {
  animation: floatBadge 3s ease-in-out infinite;
}

.anim-float-slow {
  animation: floatBadge 4s ease-in-out 0.5s infinite;
}

.anim-slide-in {
  animation: slideIn 0.6s ease both;
}

.anim-count-up {
  animation: countUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.pulse-ring {
  animation: pulseRing 2.5s ease-out infinite;
}

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-d1 {
  transition-delay: 0.1s;
}

.reveal-d2 {
  transition-delay: 0.2s;
}

.reveal-d3 {
  transition-delay: 0.3s;
}

.reveal-d4 {
  transition-delay: 0.4s;
}

/* 3D card */
.perspective-card {
  perspective: 1800px;
}

.report-3d {
  transform: rotateY(-18deg) rotateX(8deg);
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
  will-change: transform;
}

/* Hero badge pulse */
.badge-pill {
  background: linear-gradient(135deg, #131b2e 0%, #1e3a5f 100%);
}

/* Nav glass */
.nav-glass {
  background: rgba(247, 249, 251, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Comparison table rows */
.matrix-row:nth-child(even) {
  background-color: #f8fafc;
}

.matrix-row {
  transition: background 0.2s;
}

.matrix-row:hover {
  background-color: #eef2ff;
}

/* CTA button shimmer */
.btn-shimmer {
  background: linear-gradient(90deg, var(--orange) 0%, #fbbf24 50%, var(--orange) 100%) !important;
  background-size: 200% auto !important;
  transition: background-position 0.5s ease, transform 0.15s, box-shadow 0.2s !important;
}

.btn-shimmer:hover {
  background-image: linear-gradient(90deg, var(--orange) 0%, #fbbf24 50%, var(--orange) 100%) !important;
  background-position: right center !important;
  box-shadow: 0 8px 32px rgba(249, 115, 22, 0.35) !important;
  transform: translateY(-1px) !important;
}

.btn-shimmer:active {
  transform: scale(0.97) !important;
}

/* Pipeline connector line */
.pipeline-line {
  background: linear-gradient(to right, transparent, #c6c6cd, transparent);
}

/* Score bar fill animation */
.score-bar-fill {
  width: 0;
}

.score-bar-fill.animate {
  animation: fillScoreBar 1.2s cubic-bezier(0.25, 1, 0.5, 1) both;
}

#scoreBar.animate {
  animation-delay: 0.5s;
}

@keyframes fillScoreBar {
  from {
    width: 0;
  }
  to {
    width: 94%;
  }
}

/* Card hover lift */
.card-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

/* Stat counter */
.stat-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 48px;
  font-weight: 700;
  line-height: 56px;
  letter-spacing: -0.02em;
}

/* Form inputs overrides to prevent parent theme conflicts */
#leadForm input.form-input,
#leadForm select.form-input {
  width: 100% !important;
  border: 1px solid var(--outline) !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important;
  outline: none !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  background-color: #ffffff !important;
  color: #191c1e !important;
  height: auto !important;
  line-height: 1.4 !important;
  box-shadow: none !important;
}

#leadForm select.form-input {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2345464d' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E") !important;
  background-position: right 12px center !important;
  background-repeat: no-repeat !important;
  background-size: 1.25rem auto !important;
  padding-right: 40px !important;
}

#leadForm input.form-input:focus,
#leadForm select.form-input:focus {
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px rgba(0, 81, 213, 0.1) !important;
}

/* Label specificity overrides */
#leadForm label.text-label-caps {
  display: block !important;
  margin-bottom: 6px !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  line-height: 12px !important;
  letter-spacing: 0.05em !important;
  color: #45464d !important;
}

/* Mobile scale */
@media (max-width: 768px) {
  .text-display-lg {
    font-size: 36px !important;
    line-height: 44px !important;
  }

  .text-headline-lg {
    font-size: 26px !important;
    line-height: 34px !important;
  }
}

/* Force headings on light backgrounds to off-black to match original HTML */
body h1, body h2, body h3, body h4, body h5, body h6 {
  color: #191c1e;
}

.ff-el-form-control,
.ff-el-form-control:hover,
.fluentform input[type="text"],
.fluentform input[type="email"],
.fluentform input[type="tel"],
.fluentform select,
.fluentform textarea {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #191c1e !important;
    border: 1px solid #c6c6cd !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    outline: none !important;
    box-shadow: none !important;
    width: 100% !important;
    transition: border-color 0.2s !important;
}
.ff-el-form-control:focus,
.fluentform input:focus,
.fluentform select:focus {
    background-color: #ffffff !important;
    border-color: #0051d5 !important;
    box-shadow: 0 0 0 3px rgba(0,81,213,0.1) !important;
}
.ff-el-group label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #45464d;
    margin-bottom: 4px;
    display: block;
}
.fluentform .ff-el-group {
    margin-bottom: 16px;
}
.fluentform .ff-btn-submit,
.fluentform .ff-btn-submit:hover,
.fluentform .ff-btn-submit:focus,
.fluentform .ff-btn-submit:active,
.fluentform button[type="submit"],
.fluentform .ff-el-form-submit button,
.fluentform .ff-el-form-submit input[type="submit"] {
    width: 100% !important;
    background: linear-gradient(90deg, #F97316 0%, #fbbf24 50%, #F97316 100%) !important;
    background-size: 200% auto !important;
    color: #ffffff !important;
    padding: 16px 32px !important;
    border-radius: 12px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 16px !important;
    transition: background-position 0.5s ease, 
                transform 0.15s ease, 
                box-shadow 0.2s ease !important;
    box-shadow: none !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    line-height: 1.4 !important;
}

.fluentform .ff-btn-submit:hover,
.fluentform button[type="submit"]:hover {
    background-position: right center !important;
    box-shadow: 0 8px 32px rgba(249,115,22,0.35) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

.fluentform .ff-btn-submit:active,
.fluentform button[type="submit"]:active {
    transform: scale(0.97) !important;
    box-shadow: none !important;
}

.fluentform .ff-el-form-submit {
    margin-top: 8px !important;
}
.ff-message-success {
    background: #f0fdf4;
    border: 1px solid #16a34a;
    color: #15803d;
    padding: 16px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}
.ff-errors-head {
    color: #ba1a1a;
    font-size: 12px;
    margin-top: 4px;
}
.nominatim-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #c6c6cd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.nominatim-suggestions li {
    padding: 10px 16px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #191c1e;
    cursor: pointer;
    list-style: none;
    border-bottom: 1px solid #f2f4f6;
}
.nominatim-suggestions li:last-child {
    border-bottom: none;
}
.nominatim-suggestions li:hover {
    background: #eef2ff;
    color: #0051d5;
}
.nominatim-suggestions li span {
    font-size: 11px;
    color: #76777d;
    display: block;
    margin-top: 2px;
}

/* Terms & Conditions checkbox links (Fluent Forms) — brand blue */
.fluentform .ff-el-group a {
    color: #0051d5;
    text-decoration: underline;
    font-weight: 600;
}
.fluentform .ff-el-group a:hover {
    color: #0F172A;
}