/* Johnson Enterprises — colour, gradient and motion for the three calls to
   action (Quote, Call, WhatsApp), the footer and the contact page.
   Loaded after the build CSS, so it layers on top without a React rebuild.
   Hooks are mostly attribute selectors (href^="tel:", href*="wa.me"), so every
   instance is caught wherever it appears, not just the ones with a class. */

:root {
  --cta-quote: linear-gradient(135deg, #0b5cff 0%, #2997ff 55%, #45d3ff 100%);
  --cta-quote-lit: linear-gradient(135deg, #1f78ff 0%, #45a9ff 55%, #6fe0ff 100%);
  --cta-call: linear-gradient(135deg, #ff6a00 0%, #ff9d2e 55%, #ffc251 100%);
  --cta-call-lit: linear-gradient(135deg, #ff7d1f 0%, #ffae48 55%, #ffd277 100%);
  --cta-wa: linear-gradient(135deg, #128c7e 0%, #25d366 60%, #5bf39a 100%);
  --cta-wa-lit: linear-gradient(135deg, #16a494 0%, #34e277 60%, #76ffb2 100%);
  --cta-glow-quote: 0 10px 30px -10px #2997ffcc, 0 2px 8px -2px #0b5cff80;
  --cta-glow-call: 0 10px 30px -10px #ff8a1fcc, 0 2px 8px -2px #ff6a0080;
  --cta-glow-wa: 0 10px 30px -10px #25d366cc, 0 2px 8px -2px #128c7e80;
  --cta-ease: cubic-bezier(.16, 1, .3, 1);
}

/* ------------------------------------------------------------------ base */
/* Shared treatment: solid gradient fill, white text, lift and sheen on hover.
   `background-size: 200%` lets the gradient slide rather than hard-swap. */
.je-cta,
a.btn[href^="tel:"],
a.btn[href*="wa.me"],
.btn.nav__quote,
.btn.qf__submit,
a.btn[href="/contact"],
.ct-action,
.callbar__item {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-size: 200% 200%;
  background-position: 0% 50%;
  transition:
    transform .35s var(--cta-ease),
    box-shadow .35s var(--cta-ease),
    background-position .6s var(--cta-ease),
    filter .35s var(--cta-ease);
}

/* The sheen: a soft white band parked off to the left that sweeps across on
   hover. `::after` is used because several buttons already own `::before`. */
.je-cta::after,
a.btn[href^="tel:"]::after,
a.btn[href*="wa.me"]::after,
.btn.nav__quote::after,
.btn.qf__submit::after,
a.btn[href="/contact"]::after,
.ct-action::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, #ffffff5c 50%, transparent 65%);
  background-size: 250% 100%;
  background-position: 160% 0;
  transition: background-position .75s var(--cta-ease);
  pointer-events: none;
}

.je-cta:hover::after,
a.btn[href^="tel:"]:hover::after,
a.btn[href*="wa.me"]:hover::after,
.btn.nav__quote:hover::after,
.btn.qf__submit:hover::after,
a.btn[href="/contact"]:hover::after,
.ct-action:hover::after {
  background-position: -60% 0;
}

/* --------------------------------------------------------------- quote */
.btn.nav__quote,
.btn.qf__submit,
a.btn[href="/contact"],
.ct-action--primary {
  background-image: var(--cta-quote);
  color: #fff;
  border: 0;
  box-shadow: var(--cta-glow-quote);
}

.btn.nav__quote:hover,
.btn.qf__submit:hover,
a.btn[href="/contact"]:hover,
.ct-action--primary:hover {
  background-image: var(--cta-quote-lit);
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -12px #2997ffe6, 0 4px 12px -2px #0b5cff99;
}

/* ---------------------------------------------------------------- call */
a.btn[href^="tel:"],
.callbar__item--call,
.ct-action[href^="tel:"] {
  background-image: var(--cta-call);
  color: #1b0d00;
  border: 0;
  box-shadow: var(--cta-glow-call);
}

a.btn[href^="tel:"]:hover,
.callbar__item--call:hover,
.ct-action[href^="tel:"]:hover {
  background-image: var(--cta-call-lit);
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -12px #ff9d2ee6, 0 4px 12px -2px #ff6a0099;
}

/* The ghost variant sits on photography, so it keeps a glass fill and only
   picks up the warm colour on its edge and text. */
a.btn.btn--ghost[href^="tel:"] {
  background-image: none;
  background-color: #ffffff14;
  color: #fff;
  box-shadow: inset 0 0 0 1.5px #ff9d2e, 0 8px 24px -12px #ff8a1f99;
  backdrop-filter: blur(6px);
}

a.btn.btn--ghost[href^="tel:"]:hover {
  background-image: var(--cta-call);
  color: #1b0d00;
  box-shadow: var(--cta-glow-call);
}

/* ------------------------------------------------------------ whatsapp */
a[href*="wa.me"].btn,
a[href*="wa.me"].ct-action,
.callbar__item[href*="wa.me"] {
  background-image: var(--cta-wa);
  color: #fff;
  border: 0;
  box-shadow: var(--cta-glow-wa);
}

a[href*="wa.me"].btn:hover,
a[href*="wa.me"].ct-action:hover,
.callbar__item[href*="wa.me"]:hover {
  background-image: var(--cta-wa-lit);
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -12px #25d366e6, 0 4px 12px -2px #128c7e99;
}

/* ------------------------------------------------- attention on primary */
/* A slow breath on the one button we most want tapped. Deliberately gentle:
   scale stays under 1.5% so it reads as alive, not as a flashing advert. */
@keyframes je-breathe {
  0%, 100% { box-shadow: var(--cta-glow-quote); transform: scale(1); }
  50% { box-shadow: 0 16px 44px -10px #2997ffff, 0 3px 12px -2px #0b5cffb3; transform: scale(1.014); }
}

.btn.nav__quote,
.ct-action--primary {
  animation: je-breathe 3.4s var(--ease-inout, ease-in-out) infinite;
}

.btn.nav__quote:hover,
.ct-action--primary:hover {
  animation-play-state: paused;
}

/* -------------------------------------------------------- mobile callbar */
.callbar {
  backdrop-filter: blur(14px);
  border-top: 1px solid #96bcff33;
}

.callbar__item {
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
}

.callbar__item[href="/contact"] {
  background-image: var(--cta-quote);
  box-shadow: var(--cta-glow-quote);
}

.callbar__item:active { transform: scale(.97); }

/* --------------------------------------------------------- contact page */
.ct-actions { gap: var(--s-3, 12px); }

.ct-action {
  border-radius: var(--r-m, 18px);
  color: #fff;
  font-weight: 650;
  box-shadow: var(--shadow-soft);
}

/* Email keeps the calm brand navy, so the three cards read as a set without
   three loud colours competing. */
.ct-action[href^="mailto:"] {
  background-image: linear-gradient(135deg, #071426 0%, #0b2b5a 60%, #176bff 100%);
  color: #fff;
  box-shadow: 0 10px 30px -12px #176bff99;
}

.ct-action[href^="mailto:"]:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -12px #2997ffcc;
}

.ct-action svg,
.ct-action img { filter: drop-shadow(0 1px 2px #0003); }

/* --------------------------------------------------------------- footer */
.footer {
  position: relative;
  background-image: linear-gradient(180deg, #030712 0%, #061227 55%, #071a38 100%);
}

/* A thin spectrum rule across the very top of the footer. */
.footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #0b5cff, #2997ff, #25d366, #ffc251, #ff6a00, #0b5cff);
  background-size: 300% 100%;
  animation: je-rule 14s linear infinite;
}

@keyframes je-rule {
  0% { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}

/* The oversized wordmark gets a slow-moving gradient instead of flat ink. */
.footer__word {
  background: linear-gradient(100deg, #123a78 0%, #2997ff 35%, #45d3ff 50%, #2997ff 65%, #123a78 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: je-word 9s linear infinite;
}

@keyframes je-word {
  0% { background-position: 0% 0; }
  100% { background-position: 250% 0; }
}

/* Footer links: a gradient underline that grows from the left on hover. */
.footer__col a,
.footer__cities a,
.footer__contact a {
  position: relative;
  transition: color .3s var(--cta-ease);
}

.footer__col a::after,
.footer__cities a::after,
.footer__contact a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--cta-quote);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--cta-ease);
}

.footer__col a:hover,
.footer__cities a:hover,
.footer__contact a:hover { color: #fff; }

.footer__col a:hover::after,
.footer__cities a:hover::after,
.footer__contact a:hover::after { transform: scaleX(1); }

/* Phone and WhatsApp in the footer are the money links: give them colour. */
.footer__contact a[href^="tel:"] { color: #ffc251; }
.footer__contact a[href^="tel:"]::after { background: var(--cta-call); }
.footer a[href*="wa.me"]:not(.btn) { color: #5bf39a; }
.footer a[href*="wa.me"]:not(.btn)::after { background: var(--cta-wa); }

.footer__social a {
  transition: transform .3s var(--cta-ease), filter .3s var(--cta-ease);
}

.footer__social a:hover {
  transform: translateY(-3px) scale(1.08);
  filter: drop-shadow(0 6px 14px #2997ff80);
}

/* ------------------------------------------- inline tel links elsewhere */
/* Bare phone links in body copy stay text, but readable as links. */
a[href^="tel:"]:not(.btn):not(.ct-action):not(.callbar__item):not(.contact__card) {
  color: inherit;
  text-decoration-color: #ff9d2e;
  text-underline-offset: 3px;
}

/* ================================================================
   Home page closing band ("Ready to make your space safer?")
   This is the last thing a visitor sees before the footer and the
   final chance to get a call, so the contact row is promoted from
   small grey text into four tappable, colour-coded cards.
   ================================================================ */

.cta.ground-black {
  position: relative;
  overflow: hidden;
}

/* A slow aurora behind the tunnel art, so the band is not flat black. */
.cta.ground-black::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 90%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(45% 55% at 20% 40%, #0b5cff40 0%, transparent 70%),
    radial-gradient(40% 50% at 78% 30%, #25d36626 0%, transparent 72%),
    radial-gradient(35% 45% at 50% 85%, #ff8a1f1f 0%, transparent 70%);
  filter: blur(18px);
  animation: je-aurora 18s ease-in-out infinite alternate;
}

@keyframes je-aurora {
  0% { transform: translate3d(-3%, 0, 0) scale(1); opacity: .85; }
  100% { transform: translate3d(3%, 2%, 0) scale(1.08); opacity: 1; }
}

.cta__inner { position: relative; z-index: 1; }

/* The second line of the headline picks up the brand gradient. */
.cta__title .line-mask:last-child span {
  background: linear-gradient(100deg, #2997ff 0%, #45d3ff 45%, #5bf39a 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: je-word 8s linear infinite;
}

/* ---- the contact row, rebuilt as cards ---- */
.cta__contact {
  /* The parent centres its children, so without an explicit width this grid
     shrinks to its content and the four cards stack in one narrow column. */
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--s-3, 12px);
  margin-top: var(--s-6, 32px);
  padding: 0;
  list-style: none;
  border: 0;
}

.cta__contact li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px 14px 18px;
  border: 1px solid #96bcff26;
  border-radius: var(--r-m, 18px);
  background: linear-gradient(145deg, #ffffff0f, #ffffff05);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition:
    transform .35s var(--cta-ease),
    border-color .35s var(--cta-ease),
    box-shadow .35s var(--cta-ease);
}

/* A coloured spine down the left edge identifies each card at a glance. */
.cta__contact li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--cta-quote);
}

.cta__contact li:nth-child(1)::before { background: var(--cta-call); }
.cta__contact li:nth-child(2)::before { background: var(--cta-wa); }
.cta__contact li:nth-child(3)::before { background: var(--cta-quote); }
.cta__contact li:nth-child(4)::before { background: linear-gradient(180deg, #8193ad, #aebdd3); }

.cta__contact li:hover {
  transform: translateY(-3px);
  border-color: #96bcff5c;
  box-shadow: 0 16px 34px -20px #000, 0 0 0 1px #ffffff0f inset;
}

.cta__contact li span {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-dark-3, #8193ad);
}

.cta__contact li a,
.cta__contact li > :last-child {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
  color: var(--on-dark, #eef4ff);
  word-break: break-word;
  transition: color .3s var(--cta-ease);
}

.cta__contact li:nth-child(1) a { color: #ffc251; }
.cta__contact li:nth-child(2) a { color: #5bf39a; }
.cta__contact li:nth-child(3) a { color: #7cc4ff; }

.cta__contact li a:hover { filter: brightness(1.18); }

@media (max-width: 560px) {
  .cta__contact { grid-template-columns: 1fr 1fr; }
  .cta__contact li a,
  .cta__contact li > :last-child { font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cta.ground-black::before,
  .cta__title .line-mask:last-child span { animation: none; }
  .cta__contact li:hover { transform: none; }
}

/* The generic inline-tel rule above is more specific than the footer rules,
   so the footer's money links are restated here, after it, to win. */
.footer .footer__contact a[href^="tel:"]:not(.btn) {
  color: #ffc251;
  text-decoration-color: #ffc251;
}

.footer .footer__contact a[href^="tel:"]:not(.btn):hover { color: #ffd68a; }

/* ------------------------------------------------------ reduced motion */
/* Anyone who has asked their system to limit motion gets the colour and the
   hover states, but nothing that moves on its own. */
@media (prefers-reduced-motion: reduce) {
  .btn.nav__quote,
  .ct-action--primary,
  .footer::before,
  .footer__word {
    animation: none;
  }

  .je-cta,
  a.btn[href^="tel:"],
  a.btn[href*="wa.me"],
  .btn.nav__quote,
  .btn.qf__submit,
  a.btn[href="/contact"],
  .ct-action,
  .callbar__item {
    transition-duration: .01ms;
  }

  .je-cta::after,
  a.btn[href^="tel:"]::after,
  a.btn[href*="wa.me"]::after,
  .btn.nav__quote::after,
  .btn.qf__submit::after,
  a.btn[href="/contact"]::after,
  .ct-action::after {
    display: none;
  }

  .btn.nav__quote:hover,
  .ct-action--primary:hover,
  a.btn[href^="tel:"]:hover,
  a[href*="wa.me"].btn:hover {
    transform: none;
  }
}
