/* =========================================================
   home.css — index.html page-specific styles only.
   Shared furniture lives in core.css (loaded first).
   Phase D5, 2026-07-29.
   ========================================================= */

/* =========================================================
   HERO — refined
   ========================================================= */
.hero {
  position: relative;
  padding: 6rem 2rem 5rem;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(ellipse 1000px 500px at 50% -10%,
    color-mix(in srgb, var(--gold) 14%, transparent), transparent 60%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg) 85%);
  border-bottom: 1px solid var(--border-subtle);
}

/* Animated grid */
/* Hero backgrounds — toggled via data-hero-bg */
html[data-hero-bg="grid"] .hero-grid {
  display: block;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 60px 60px;
}
html[data-hero-bg="dots"] .hero-grid {
  display: block;
  background-image: radial-gradient(circle, var(--border-navy) 1px, transparent 1.5px);
  background-size: 28px 28px;
  opacity: .5;
}
html[data-hero-bg="glow"] .hero-grid,
html[data-hero-bg="none"] .hero-grid { display: none; }

.hero-grid {
  position: absolute; inset: 0;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 85%);
  pointer-events: none;
  display: none;
}

.hero-content { position: relative; z-index: 1; max-width: 1500px; margin: 0 auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .4rem .9rem .4rem .5rem;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border: 1px solid var(--border-line);
  border-radius: var(--r-pill);
  font-size: .78rem; font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: .04em;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.eyebrow .eyebrow-icon {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  color: var(--navy-deep);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .7rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.025em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  text-wrap: pretty;
  max-width: 100%;
}
.hero h2 {
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--text-primary);
  margin-top: -.5rem;
  margin-bottom: 1.25rem;
  text-wrap: pretty;
}
.hero h1 .gold-text,
.hero h2 .gold-text {
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.hero-lede {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 860px;
  margin: 0 auto 1rem;
  text-wrap: pretty;
}
.hero-differentiator {
  font-size: .95rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: .02em;
  margin: .75rem auto 1.75rem;
  max-width: 600px; 
}
.hero-actions {
  display: flex; justify-content: center; gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

/* Both hero CTAs share one explicit width so unequal text length
   ("Schedule Free Consultation" vs "Try Free Security Check Tool")
   can't make one button visibly longer than the other. Both buttons
   render as a single line (inherits .btn's white-space:nowrap) as
   of the owner's 2026-08-12 direct edits, which replaced the
   originally-planned two-line manual break on the second button
   with one line. .btn-multiline still exists as a reusable
   flex-column centering wrapper for whichever button needs a
   multi-line label -- currently only wraps the second button's
   single span, so it isn't actively splitting anything right now.
   Padding/font-size are ~20% smaller than the shared .btn-lg
   defaults. Width (240px) is tightened as far as it safely can go
   while still fitting the longer button's current text on one line
   without overflowing -- narrower than this risks text spilling
   past the button's edge, since nowrap text can't shrink to fit. */
.hero-actions .hero-btn {
  width: 240px;
  padding: .72rem 1.28rem;
  font-size: .76rem;
  gap: .44rem;
}
.btn-multiline {
  display: flex; flex-direction: column; align-items: center;
  line-height: 1.3; text-align: center;
}

/* Metric line below CTAs */
.hero-metrics {
  margin-top: 1.5rem;
  display: inline-flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: .82rem;
  color: var(--text-muted);
}
.hero-metrics .mx {
  display: inline-flex; align-items: center; gap: .4rem;
}
.hero-metrics .mx strong { color: var(--text-primary); font-weight: 700; }
.hero-metrics .mx i { color: var(--emerald); font-size: .7rem; }

/* Trust strip */
.trust-strip {
  display: flex; justify-content: center; align-items: center;
  gap: 2.5rem;
  margin-top: 3.5rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}
.trust-item {
  display: flex; align-items: center; gap: .5rem;
  color: var(--text-muted);
  font-size: .84rem; font-weight: 500;
}
.trust-item i { color: var(--gold-dark); font-size: .95rem; }

/* Logo strip — marquee */
.logo-strip {
  padding: 1.85rem 0;
  background: linear-gradient(90deg, var(--navy-deep) 0%, var(--navy-mid) 50%, var(--navy-deep) 100%);
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--border-gold);
  overflow: hidden;
}
.logo-strip-inner {
  display: flex; align-items: center; gap: 2.25rem;
  max-width: 1600px; margin: 0 auto;
  padding: 0 2rem;
}
.logo-strip-label {
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--gold-light);
  flex-shrink: 0;
  white-space: nowrap;
  padding-right: 1.75rem;
  border-right: 1px solid var(--border-gold);
  line-height: 1.35;
}
html[data-theme="dark"] .logo-strip-label {
  color: var(--gold-light);
  border-right-color: var(--border-gold);
}
html[data-theme="dark"] .logo-strip {
  background: var(--navy-deep);
  border-top-color: var(--border-gold);
  border-bottom-color: var(--border-gold);
}
.logo-marquee {
  flex: 1;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent);
          mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent);
}
.logo-marquee-track {
  display: flex; align-items: center; gap: 3rem;
  width: max-content;
  animation: logo-scroll 40s linear infinite;
}
.logo-marquee:hover .logo-marquee-track { animation-play-state: paused; }
@keyframes logo-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.client-logo {
  display: inline-flex; align-items: center; gap: .55rem;
  color: rgba(255,255,255,.78);
  font-weight: 600; font-size: 1rem;
  letter-spacing: -.01em;
  opacity: .9;
  transition: opacity .2s, color .2s;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
}
.client-logo:hover { opacity: 1; color: #fff; }
.client-logo i { font-size: 1.1rem; color: var(--gold); }
.client-logo .logo-wordmark {
  font-family: 'Inter', sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .88rem;
  font-weight: 700;
}

/* =========================================================
   STATS — refined flip cards
   ========================================================= */
.stats-section { background: var(--bg); }

/* Live/cached data pill for stats */
.live-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .62rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--r-pill);
  background: rgba(15,26,38,.12);
  color: var(--navy-deep);
  border: 1px solid rgba(15,26,38,.22);
}
.live-pill .live-pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--navy-mid);
}
.live-pill.live {
  background: rgba(16,185,129,.18);
  color: #0d7a51;
  border-color: rgba(16,185,129,.55);
}
.live-pill.live .live-pill-dot {
  background: #22c55e;
  animation: live-pulse 1.5s ease-in-out infinite;
}
html[data-theme="dark"] .live-pill {
  background: rgba(255,255,255,.14);
  color: rgba(255,255,255,.8);
  border-color: rgba(255,255,255,.22);
}
html[data-theme="dark"] .live-pill .live-pill-dot { background: rgba(255,255,255,.55); }
html[data-theme="dark"] .live-pill.live { color: #6ee7b7; }
html[data-theme="dark"] .live-pill.live .live-pill-dot { background: #22c55e; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: var(--container);
  margin: 0 auto;
}

.stat-card {
  height: 240px;
  perspective: 1200px;
}
.stat-card-inner {
  position: relative;
  width: 100%; height: 100%;
  transition: transform .7s var(--ease-out);
  transform-style: preserve-3d;
}
/* Desktop only: hover flips the card */
@media (hover: hover) and (pointer: fine) {
  .stat-card:hover .stat-card-inner { transform: rotateY(180deg); }
}
/* JS-controlled flip — all devices, never conflicts with hover */
.stat-card.flipped .stat-card-inner { transform: rotateY(180deg); }

.stat-front, .stat-back {
  position: absolute; inset: 0;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: flex; flex-direction: column;
}
.stat-front {
  background:
    linear-gradient(155deg,
      color-mix(in srgb, var(--gold) 38%, var(--card-bg)) 0%,
      color-mix(in srgb, var(--gold-dark) 35%, var(--card-bg)) 60%,
      color-mix(in srgb, var(--gold-dark) 42%, var(--card-bg)) 100%);
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-sm);
  justify-content: space-between;
  transition: border-color .25s, box-shadow .25s, transform .25s;
  color: var(--navy-deep);
}
html[data-theme="dark"] .stat-front {
  background:
    linear-gradient(155deg,
      color-mix(in srgb, var(--gold) 22%, var(--card-bg)) 0%,
      color-mix(in srgb, var(--gold-dark) 28%, var(--card-bg)) 60%,
      var(--card-bg) 100%);
  color: var(--text-primary);
}
@media (hover: hover) and (pointer: fine) {
  .stat-card:hover .stat-front {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px var(--gold), 0 0 28px var(--gold-glow), var(--shadow-md);
    transform: translateY(-2px);
  }
}
.stat-card:focus-visible .stat-front {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 28px var(--gold-glow), var(--shadow-md);
  transform: translateY(-2px);
}
.stat-front .stat-number { color: var(--navy-deep); }
.stat-front .stat-number .unit { color: var(--navy-mid); }
.stat-front .stat-label { color: var(--navy-mid); font-weight: 600; }
.stat-front .stat-foot  { color: rgba(15,26,38,.62); }
html[data-theme="dark"] .stat-front .stat-number { color: var(--gold-light); }
html[data-theme="dark"] .stat-front .stat-number .unit { color: var(--gold-dark); }
html[data-theme="dark"] .stat-front .stat-label { color: var(--text-secondary); }
html[data-theme="dark"] .stat-front .stat-foot  { color: var(--text-muted); }
.stat-header {
  display: flex; align-items: center; justify-content: space-between;
}
.stat-icon-wrap {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--navy-deep);
  color: var(--gold-light);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
  border: 1px solid var(--navy-mid);
}
html[data-theme="dark"] .stat-icon-wrap {
  background: var(--gold);
  color: var(--navy-deep);
  border-color: var(--gold-dark);
}
.stat-front .stat-delta {
  color: var(--navy-deep);
  background: rgba(15,26,38,.10);
}
html[data-theme="dark"] .stat-front .stat-delta {
  color: var(--gold-light);
  background: rgba(207,168,92,.15);
}
.stat-delta {
  font-size: .72rem; font-weight: 700;
  color: var(--navy-mid);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--navy-mid) 10%, transparent);
  display: inline-flex; align-items: center; gap: 4px;
}
.stat-delta.up   { color: var(--navy-mid); background: color-mix(in srgb, var(--navy-mid) 10%, transparent); }
.stat-number {
  font-size: 2.6rem; font-weight: 800;
  color: var(--text-primary); line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  margin-top: auto;
}
.stat-number .unit { font-size: 1.4rem; font-weight: 600; color: var(--text-secondary); margin-left: 2px; }
.stat-label {
  font-size: .8rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: .35rem;
  margin-bottom: .35rem;
}
.stat-foot {
  display: flex; align-items: flex-start; justify-content: space-between;
  font-size: .7rem; color: var(--text-muted);
  letter-spacing: .05em; text-transform: uppercase;
}
.stat-foot .hint { display: inline-flex; align-items: center; gap: 4px; opacity: .8; }
#rwUpdated { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; flex-wrap: wrap; }
.rw-date { font-size: .6rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }

.stat-back {
  background: linear-gradient(155deg, var(--navy-surface), var(--navy-mid) 80%, var(--navy-deep));
  justify-content: space-between;
  border: 1px solid var(--border-gold);
  transform: rotateY(180deg);
  color: #fff;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
}
.stat-back-title {
  font-size: .72rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-light);
}
.stat-back p {
  font-size: .79rem;
  color: rgba(255,255,255,.88);
  line-height: 1.55;
  margin: .5rem 0;
}
.stat-back .detail {
  font-size: .78rem;
  color: rgba(255,255,255,.65);
  padding-top: .5rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.stat-source-link {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; color: var(--gold-light); font-weight: 600;
  transition: color .2s;
}
.stat-source-link:hover { color: #fff; }
.stat-source-link i { font-size: .7rem; }

/* =========================================================
   CTA BOXES
   ========================================================= */
.cta-section { background: var(--surface); }
.cta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1000px; margin: 0 auto;
}
.cta-card {
  background: var(--card-bg);
  border: 1px solid var(--border-line);
  border-radius: var(--r-lg);
  padding: 2.25rem;
  text-align: left;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease-out), box-shadow .3s, border-color .3s;
}
.cta-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .5;
}
.cta-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 30px var(--gold-glow), var(--shadow-lg);
}
.cta-icon-box {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--navy-mid) 8%, transparent);
  color: var(--navy-mid);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
html[data-theme="dark"] .cta-icon-box { color: var(--gold-light); background: color-mix(in srgb, var(--gold) 15%, transparent); }
.cta-card h3 {
  font-size: 1.15rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: .5rem;
}
.cta-card p {
  font-size: .9rem; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: 1.5rem;
}

/* =========================================================
   SERVICES — restructured
   Featured card + 6 smaller
   ========================================================= */
.services-section { background: var(--bg); }
.services-layout {
  max-width: var(--container); margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
/* Featured */
.service-feature {
  background: linear-gradient(160deg, var(--navy-surface), var(--navy-deep));
  border: 1px solid var(--border-gold);
  border-radius: var(--r-lg);
  padding: 2rem;
  color: #fff;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
html[data-theme="dark"] .service-feature {
  background: linear-gradient(160deg, #2A2416 0%, #1C1810 70%, #14110A 100%);
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 1px var(--border-gold), var(--shadow-lg);
}
html[data-theme="dark"] .service-feature::before {
  background: radial-gradient(circle, rgba(207,168,92,.28), transparent 65%);
}
.service-feature::before {
  content: ''; position: absolute; top: -40%; right: -20%;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold-glow), transparent 65%);
  pointer-events: none;
}
.service-feature-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .7rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
}
.service-feature-tag::before { content: ''; width: 20px; height: 1px; background: var(--gold); }
.service-feature h3 {
  font-size: 1.75rem; font-weight: 700;
  line-height: 1.2; letter-spacing: -.015em;
  margin-bottom: .75rem;
  text-wrap: balance;
}
.service-feature h3 em {
  font-style: normal; font-weight: 700; color: var(--gold);
}
.service-feature p {
  color: rgba(255,255,255,.8);
  font-size: .95rem; line-height: 1.65;
  margin-bottom: 1.5rem;
}
.service-feature-list {
  list-style: none; margin-bottom: 1.75rem;
  font-size: .88rem;
}
.service-feature-list li {
  display: flex; align-items: center; gap: .6rem;
  padding: .45rem 0;
  color: rgba(255,255,255,.88);
  border-bottom: 1px dashed rgba(255,255,255,.08);
}
.service-feature-list li:last-child { border-bottom: none; }
.service-feature-list i { color: var(--gold); font-size: .8rem; width: 14px; }
.service-feature .btn { align-self: flex-start; margin-top: auto; }

/* Right grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.service-card {
  background: var(--card-bg);
  border: 1px solid var(--border-line);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .3s var(--ease-out);
  display: flex; flex-direction: column;
}
.service-card::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity .3s;
}
.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 22px var(--gold-glow), var(--shadow-md);
}
.service-card:hover::after { opacity: 1; }

.service-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--navy-mid) 8%, transparent);
  color: var(--navy-mid);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: background .3s, color .3s, transform .3s;
}
html[data-theme="dark"] .service-icon { background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold-light); }
.service-card:hover .service-icon {
  background: var(--navy-mid); color: var(--gold-light);
  transform: rotate(-6deg) scale(1.05);
}
.service-card h4 {
  font-size: 1rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .4rem;
}
.service-card p {
  font-size: .85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.service-link {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--gold-dark); font-size: .8rem; font-weight: 600;
  margin-top: auto; padding-top: .75rem;
  transition: gap .2s, color .2s;
}
.service-link:hover { gap: .6rem; color: var(--gold); }
.service-link i { font-size: .7rem; }

/* =========================================================
   TESTIMONIAL — NEW
   ========================================================= */
.testimonial-section {
  background: var(--surface);
}
.testimonial-wrap {
  max-width: 900px; margin: 0 auto;
  text-align: center;
  position: relative;
}
.testimonial-quote-mark {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 6rem; line-height: 1; font-weight: 700;
  color: var(--gold);
  opacity: .35;
  margin-bottom: -1.5rem;
}
.testimonial-quote {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
  letter-spacing: -.01em;
  text-wrap: balance;
  margin-bottom: 2rem;
}
.testimonial-quote em { font-style: normal; font-weight: 700; color: var(--gold-dark); }
.testimonial-attr {
  display: inline-flex; align-items: center; gap: .85rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-line);
}
.testimonial-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-surface), var(--navy-deep));
  color: var(--gold-light);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .95rem;
  border: 2px solid var(--gold);
}
.testimonial-who {
  text-align: left;
  font-size: .86rem;
}
.testimonial-who strong { color: var(--text-primary); display: block; font-weight: 700; }
.testimonial-who span { color: var(--text-muted); }

.testimonial-nav {
  display: flex; justify-content: center; gap: .4rem;
  margin-top: 1.75rem;
}
.testimonial-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-navy);
  border: none; cursor: pointer;
  transition: width .3s, background .3s;
}
.testimonial-dot.active {
  width: 28px; border-radius: var(--r-pill);
  background: var(--gold);
}

/* =========================================================
   EXPERTISE
   ========================================================= */
.expertise-section {
  background: linear-gradient(180deg, var(--navy-mid), var(--navy-deep));
  color: #fff;
  border-top: 1px solid var(--border-gold);
}
.expertise-section .section-label { color: var(--gold-light); }
.expertise-section .section-label::before { background: var(--gold-light); }
.expertise-section .section-title { color: #fff; }
.expertise-section .section-sub { color: rgba(255,255,255,.7); }

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 2.5rem;
  max-width: var(--container);
  margin: 0 auto;
}
.expertise-item {
  display: flex; gap: 1rem;
  align-items: flex-start;
}
.expertise-item-icon {
  width: 42px; height: 42px; min-width: 42px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--gold) 15%, transparent);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: transform .3s, background .3s;
}
.expertise-item:hover .expertise-item-icon {
  transform: rotate(-6deg) scale(1.08);
  background: var(--gold); color: var(--navy-deep);
}
.expertise-item h4 {
  font-size: 1rem; font-weight: 700;
  color: #fff;
  margin-bottom: .35rem;
}
.expertise-item p {
  font-size: .88rem;
  color: rgba(255,255,255,.7);
  line-height: 1.55;
}

/* =========================================================
   CONTACT — conversion-focused
   ========================================================= */
.contact-section { background: var(--bg); }
.contact-layout {
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

.contact-aside .section-head { text-align: left; margin: 0 0 2rem; }
.contact-aside-list {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 1.25rem;
}
.contact-aside-item {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: 1rem; border-radius: var(--r-md);
  background: var(--card-bg);
  border: 1px solid var(--border-line);
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.contact-aside-item:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 20px var(--gold-glow);
  transform: translateY(-2px);
}
.contact-aside-item i {
  width: 36px; height: 36px; min-width: 36px;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--gold) 15%, transparent);
  color: var(--gold-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .95rem;
}
.contact-aside-item strong { display: block; color: var(--text-primary); font-weight: 700; font-size: .92rem; margin-bottom: 2px; }
.contact-aside-item span { color: var(--text-secondary); font-size: .85rem; }

.contact-form {
  background: var(--card-bg);
  border: 1px solid var(--border-line);
  border-radius: var(--r-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}
.contact-form-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 1.25rem; margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}
.contact-form-head h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.contact-form-head .response-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; font-weight: 600;
  color: var(--emerald);
  padding: .25rem .65rem;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--emerald) 12%, transparent);
}
.contact-form-head .response-badge .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--emerald);
  animation: live-pulse 1.6s ease-in-out infinite;
}

.qualify-group { margin-bottom: 1.25rem; }
.qualify-label {
  font-size: .8rem; font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .55rem;
  display: block;
}
.qualify-options {
  display: flex; flex-wrap: wrap; gap: .4rem;
}
.qualify-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .75rem;
  border: 1px solid var(--border-line);
  border-radius: var(--r-pill);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: .8rem; font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.qualify-chip:hover {
  border-color: var(--gold);
  color: var(--text-primary);
  box-shadow: 0 0 0 1px var(--gold), 0 0 12px var(--gold-glow);
}
.qualify-chip.selected {
  background: var(--navy-mid); color: #fff;
  border-color: var(--navy-mid);
}
.qualify-chip.selected i { color: var(--gold-light); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .3rem; }
.form-group label {
  font-size: .78rem; font-weight: 600;
  color: var(--text-primary);
}
.form-group label .opt { color: var(--text-muted); font-weight: 500; font-size: .72rem; margin-left: 4px; }
.form-group input,
.form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border-line);
  border-radius: var(--r-sm);
  padding: .7rem .85rem;
  color: var(--text-primary);
  font-family: inherit; font-size: .9rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group textarea {
  /* Matches the light color used on the dark-mode .btn-primary button
     (--text-primary) instead of a shade of the page's own dark navy -
     owner asked for the fields to read the same light tone as that button. */
  background: var(--text-primary);
  color: var(--navy-deep);
}
/* Base placeholder rule (color: var(--text-muted), #8196AD in dark theme)
   still reads fine against this new light background - no override needed. */
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group textarea { resize: vertical; min-height: 110px; }
.form-full { margin-bottom: 1rem; }

.form-reassure {
  display: flex; align-items: center; gap: .5rem;
  font-size: .78rem; color: var(--text-muted);
  margin-top: .75rem;
}
.form-reassure i { color: var(--emerald); }

.submit-btn {
  width: 100%; padding: .95rem;
  font-size: .95rem;
  margin-top: .5rem;
}

/* =========================================================
   TWEAKS PANEL
   ========================================================= */
.tweaks-panel {
  position: fixed; right: 1.25rem; bottom: 5rem;
  width: 280px;
  background: var(--bg);
  border: 1px solid var(--border-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  z-index: 400;
  overflow: hidden;
  display: none;
}
.tweaks-panel.open {
  display: block;
  animation: tweaks-in .25s var(--ease-out);
}
@keyframes tweaks-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tweaks-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface);
}
.tweaks-header h4 { font-size: .85rem; font-weight: 700; color: var(--text-primary); }
.tweaks-header .close-btn {
  width: 26px; height: 26px;
  border: none; background: none;
  color: var(--text-muted); cursor: pointer;
  border-radius: var(--r-sm);
  font-size: .9rem;
}
.tweaks-header .close-btn:hover { background: var(--surface-hover); color: var(--text-primary); }

.tweaks-body { padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.tweak-row { display: flex; flex-direction: column; gap: .4rem; }
.tweak-row label {
  font-size: .75rem; font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: .06em;
}
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border: 1px solid var(--border-line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
}
.seg button {
  border: none; background: none;
  padding: .5rem;
  font-size: .82rem;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.seg button.active {
  background: var(--navy-mid); color: #fff;
}
.seg button:not(.active):hover { background: var(--surface-hover); color: var(--text-primary); }

/* =========================================================
   NEW-TOOL PROMO POPUP (Baseline Security Check)
   First-visit-only interstitial promoting the free tool. See
   js/home.js for show/dismiss logic. z-index sits above the
   consent banner's 9999 so it can layer over it if both are
   present; reduced motion is handled by core.css's sitewide
   prefers-reduced-motion override, no extra handling needed here.
   ========================================================= */
.newtool-overlay {
  position: fixed; inset: 0; z-index: 10050;
  background: rgba(15,26,38,.64);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-out);
}
.newtool-overlay.shown { opacity: 1; pointer-events: auto; }

.newtool-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  max-width: 780px; width: 100%;
  background: var(--card-bg, var(--bg));
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: translateY(18px) scale(.97);
  transition: transform .38s var(--ease-out);
}
.newtool-overlay.shown .newtool-card { transform: translateY(0) scale(1); }

.newtool-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.14);
  color: #fff; cursor: pointer; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s var(--ease-out);
}
.newtool-close:hover { background: rgba(255,255,255,.24); }
.newtool-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.newtool-visual {
  position: relative;
  background:
    radial-gradient(120% 100% at 20% 0%, rgba(207,168,92,.20), transparent 60%),
    linear-gradient(160deg, var(--navy-deep), #142234 60%, var(--navy-mid));
  padding: 2.25rem 1.75rem;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #fff;
}
.newtool-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  align-self: flex-start;
  font-size: .68rem; letter-spacing: .09em; text-transform: uppercase;
  font-weight: 700;
  color: var(--navy-deep); background: var(--gold);
  padding: .35rem .7rem; border-radius: var(--r-pill);
}
.newtool-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--navy-deep);
  animation: newtoolPulse 1.8s ease-in-out infinite;
}
@keyframes newtoolPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.newtool-ladder { margin: 1.6rem 0 1.4rem; }
.newtool-ladder-label {
  font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.55); margin-bottom: .6rem; font-weight: 600;
}
.newtool-ladder-track { display: flex; gap: 4px; height: 10px; border-radius: var(--r-pill); overflow: hidden; }
.newtool-ladder-track span { flex: 1; }
.newtool-ladder-track .seg-1 { background: var(--crimson); }
.newtool-ladder-track .seg-2 { background: var(--amber); }
.newtool-ladder-track .seg-3 { background: #eab308; }
.newtool-ladder-track .seg-4 { background: var(--emerald); }
.newtool-ladder-words {
  display: flex; justify-content: space-between; margin-top: .55rem;
  font-size: .66rem; color: rgba(255,255,255,.5);
}
.newtool-ladder-nist {
  margin-top: .85rem; display: flex; align-items: center; gap: .45rem;
  font-size: .78rem; color: rgba(255,255,255,.85);
}
.newtool-ladder-nist i { color: var(--gold); font-size: .78rem; }

.newtool-visual-foot { font-size: .74rem; color: rgba(255,255,255,.45); line-height: 1.5; }

.newtool-content { padding: 2.5rem 2.25rem 2.25rem; display: flex; flex-direction: column; }
.newtool-eyebrow {
  font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold-dark); font-weight: 700; margin-bottom: .75rem;
}
html[data-theme="dark"] .newtool-eyebrow { color: var(--gold-light); }

.newtool-headline {
  font-size: clamp(1.5rem, 2.6vw, 1.85rem);
  line-height: 1.18; font-weight: 750;
  letter-spacing: -.01em; margin: 0 0 .85rem;
}
.newtool-headline em {
  font-style: normal; color: var(--gold-dark);
  background: linear-gradient(180deg, transparent 62%, var(--gold-glow) 62%);
}
html[data-theme="dark"] .newtool-headline em { color: var(--gold-light); }

.newtool-body {
  color: var(--text-secondary); font-size: .96rem; line-height: 1.6;
  margin: 0 0 1.5rem; max-width: 42ch;
}
.newtool-facts { display: flex; gap: 1.1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.newtool-fact { display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--text-muted); }
.newtool-fact i { color: var(--gold-dark); font-size: .8rem; }
html[data-theme="dark"] .newtool-fact i { color: var(--gold-light); }

.newtool-actions { display: flex; align-items: center; gap: 1.25rem; margin-top: auto; flex-wrap: wrap; }
.newtool-dismiss {
  font-size: .85rem; color: var(--text-muted); background: none; border: none;
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
  font-family: inherit; padding: 0;
}
.newtool-dismiss:hover { color: var(--text-secondary); }
.newtool-dismiss:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* =========================================================
   RESPONSIVE — homepage content (hero, stats, services,
   expertise, contact, trust strip, logo marquee, tweaks panel).
   Shared furniture (header/footer/nav/container/section) lives
   in core.css. Homepage breakpoints.
   ========================================================= */
@media (max-width: 1200px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 960px) {
  .stats-grid     { grid-template-columns: repeat(2, 1fr); }
  .services-grid  { grid-template-columns: repeat(2, 1fr); }
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero { padding: 4.5rem 1.5rem 3.5rem; }
  .hero-lede { font-size: 1.05rem; }

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

@media (max-width: 640px) {
  .hero { padding: 3.5rem 1rem 3rem; }
  .hero-lede { font-size: 1rem; }
  .hero-differentiator { font-size: .9rem; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: .85rem; }
  .hero-actions .btn { width: 100%; justify-content: center; text-align: center; }
  .trust-strip { flex-direction: column; align-items: center; gap: .75rem; }

  .stats-grid     { grid-template-columns: repeat(2, 1fr); }
  .services-grid  { grid-template-columns: 1fr; }
  .expertise-grid { grid-template-columns: 1fr; }
  .form-row       { grid-template-columns: 1fr; }

  .stat-number { font-size: 2.1rem; }
  .stat-number .unit { font-size: 1.1rem; }
  .testimonial-quote-mark { font-size: 4rem; margin-bottom: -1rem; }

  .service-feature h3 { font-size: 1.4rem; }
  .logo-strip-label { display: none; }
  .logo-strip-inner { padding: 0 1rem; }

  .tweaks-panel { width: calc(100% - 2rem); right: 1rem; left: 1rem; }

  .newtool-card { grid-template-columns: 1fr; max-height: 90vh; overflow-y: auto; }
  .newtool-visual { padding: 1.75rem 1.5rem 1.25rem; }
  .newtool-ladder { margin: 1.2rem 0; }
  .newtool-visual-foot { display: none; }
  .newtool-content { padding: 1.75rem 1.5rem 2rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card  { height: 210px; }

  .hero { padding: 3rem .875rem 2.5rem; }
  .eyebrow { font-size: .72rem; padding: .35rem .7rem .35rem .4rem; }

  .contact-form { padding: 1.25rem; }
  .cta-card { padding: 1.5rem; }
  .expertise-grid { gap: 1.25rem 0; }
}
