/* ===== Footer ===== */
.footer {
  background: var(--bg-topbar); /* solid black — bookends the equally-black topbar */
  color: rgba(245, 245, 247, .68);
  border-top: 1px solid #fff;
}

.footer__inner { padding: 72px 0 0; }

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 52px;
}

/* This logo (icon square + "SERVER" wordmark) is drawn in --brand-dark (#323D41),
   designed to sit on a LIGHT background — both the icon's own backdrop and the
   "SERVER" text are nearly invisible against this footer's pure black. A
   translucent chip (rgba(255,255,255,.08) ≈ near-black once composited) wasn't
   bright enough; needs a genuinely light/solid backing, not just "less black". */
.footer__logo-link {
  display: inline-flex;
  padding: 10px 16px;
  border-radius: 10px;
  background: #f5f5f7;
}
.footer__logo { display: block; height: 40px; width: auto; }

.footer__tagline-desc {
  margin: 22px 0 0;
  max-width: 320px;
  font-family: "Manrope", "Manrope Fallback", var(--font-body);
  font-size: 14px;
  font-weight: 300;
  line-height: 21px;
  color: rgb(247, 251, 250);
}
.footer__tagline {
  margin: 14px 0 22px;
  font-family: "Manrope", "Manrope Fallback", var(--font-body);
  font-size: 14px;
  font-weight: 300;
  line-height: 21px;
  letter-spacing: .3px;
  color: rgb(247, 251, 250);
}

.footer__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  color: rgb(255, 255, 255);
  font-family: "Cairo", "Cairo Fallback", var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
}
.footer__cta:hover { background: rgba(255, 255, 255, .1); }
/* Same masked-external-SVG technique as .hero-card__icon-img (see its comment). */
.footer__cta-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-color: var(--brand-orange);
  -webkit-mask: var(--footer-cta-icon) center / contain no-repeat;
  mask: var(--footer-cta-icon) center / contain no-repeat;
}

.footer__col-title {
  display: block;
  margin-bottom: 22px;
  padding-top: 12px;
  /* Same red -> orange gradient as .cph-backups__underline (owner's "orange
     and red mixed" gradient) instead of flat --brand-orange — border-color
     can't take a gradient directly, so border-image stretches it across
     this single (top-only) border side; other sides stay borderless since
     their width is still 0. */
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--accent), var(--accent-2)) 1;
  font-family: "Cairo", "Cairo Fallback", var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  line-height: 17px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: rgb(255, 255, 255);
}
/* "Follow Us" title: no top border/padding (it's not the column's first item), and
   no bottom margin either — the flex column's own `gap` already spaces it from the
   icon row below; without zeroing this out, the margin and the gap stack (22px +
   14px = 36px), which is why the icons sat too far from the label. */
.footer__col--touch .footer__col-title:last-of-type {
  padding-top: 0;
  border-top: 0;
  margin-bottom: 0;
}

/* align-items: flex-start so each <li> shrinks to its own text width instead
   of stretching to the column's full width — otherwise .footer__tooltip's
   left:50% below centers on that full-width box instead of the short label
   text sitting inside it, landing the tooltip far off to the side. */
.footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer__links a,
.footer__links-link--soon {
  font-family: "Manrope", "Manrope Fallback", var(--font-body);
  font-size: 13px;
  font-weight: 300;
  line-height: 13px;
  color: rgba(245, 245, 247, .68);
  transition: color .15s;
}
.footer__links a:hover { color: var(--brand-orange); }

/* Not-yet-launched products (cPanel Business Hosting, Servers, Domains):
   plain <span>, not a link — hovering/focusing shows a small "Launching
   Soon" tooltip, same idea as the nav's .nav__tooltip (Servers/Domains) but
   positioned ABOVE the item instead of below, since these sit at the very
   bottom of the page and a below-item tooltip could run off past the
   viewport/page edge. */
.footer__links-item--soon { position: relative; }
.footer__links-link--soon { display: inline-block; cursor: default; }
.footer__links-link--soon:hover { color: rgba(245, 245, 247, .68); }

.footer__tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -4px);
  margin-bottom: 10px;
  background: #fff;
  color: var(--brand-orange);
  border: 1.5px solid var(--brand-orange);
  font-family: "Manrope", "Manrope Fallback", var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 20;
}
.footer__tooltip::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--brand-orange);
}
.footer__tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-1.5px);
  border: 5px solid transparent;
  border-top-color: #fff;
}
.footer__links-item--soon:hover .footer__tooltip,
.footer__links-link--soon:focus-visible + .footer__tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.footer__col--touch { display: flex; flex-direction: column; gap: 14px; }

.footer__contact-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Manrope", "Manrope Fallback", var(--font-body);
  font-size: 13px;
  font-weight: 300;
  line-height: 13px;
  color: rgba(245, 245, 247, .78);
  transition: color .15s;
}
/* Same masked-external-SVG technique as .hero-card__icon-img (see its comment). */
.footer__contact-line-icon {
  display: block;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  background-color: var(--brand-orange);
  -webkit-mask: var(--footer-icon) center / contain no-repeat;
  mask: var(--footer-icon) center / contain no-repeat;
}
.footer__contact-line:hover { color: #fff; }

.footer__underline {
  width: 60px;
  height: 3px;
  margin: 6px 0 2px;
  /* Same red -> orange gradient as .cph-backups__underline / .footer__col-title
     above (owner's "orange and red mixed" gradient), instead of flat --brand-orange. */
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* Same lesson as the logo backdrop above: a faint translucent circle on pure black
   barely registers. Brighter fill + a visible border + full-white icon colour
   (was rgba(245,245,247,.7)) so the circles read clearly at rest, not just on hover. */
.footer__social { display: flex; gap: 12px; }
.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  transition: background .15s, border-color .15s, color .15s;
}
.footer__social a:hover { background: var(--brand-orange); border-color: var(--brand-orange); color: #fff; }
/* Same masked-external-SVG technique as .hero-card__icon-img (see its comment) —
   background-color: currentColor picks up the anchor's own `color: #fff`, so the
   icon stays white in both the resting and hover state, matching the old inline
   `fill/stroke="currentColor"` SVGs' behaviour exactly. */
.footer__social-icon {
  display: block;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: var(--social-icon) center / contain no-repeat;
  mask: var(--social-icon) center / contain no-repeat;
}

.footer__bottom {
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  text-align: center;
}
.footer__bottom p {
  margin: 0;
  font-family: "Manrope", "Manrope Fallback", var(--font-body);
  font-size: 11px;
  font-weight: 300;
  line-height: 11px;
  color: rgb(247, 251, 250);
}

@media (max-width: 980px) {
  .footer__grid { grid-template-columns: 1fr 1fr; row-gap: 44px; }
  .footer__brand { grid-column: 1 / -1; }
}

/* Tablet only: base rule's `72px 0 0` zeros the side gutter at this width too —
   the columns run edge to edge. */
@media (min-width: 561px) and (max-width: 1210px) {
  .footer__inner { padding-left: var(--gutter); padding-right: var(--gutter); }
}

@media (max-width: 560px) {
  .footer__inner { padding: 56px var(--gutter) 0; } /* keep the side gutter — `0` left the text on the screen edge */
  .footer__grid { grid-template-columns: 1fr; gap: 40px; }
  /* Centre everything (mobile only). */
  .footer__inner { text-align: center; }
  .footer__links,
  .footer__col--touch { align-items: center; }
  .footer__contact-line,
  .footer__social { justify-content: center; }
  .footer__underline { display: none; } /* "Follow Us" gets the same gradient title rule as the other columns instead */

  /* Tighter, consistent rhythm: every column title carries the same full-width
     gradient rule, with less space around the titles, links and brand copy. */
  .footer__grid { gap: 28px; padding-bottom: 20px; }
  .footer__bottom { padding: 14px 0 calc(28px + env(safe-area-inset-bottom)); } /* room below the text so the phone's bottom edge/home bar never clips it */
  .footer__bottom p { line-height: 16px; } /* was 11px = font-size, which clips descenders */
  .footer__tagline-desc { margin: 16px auto 0; }
  .footer__tagline { margin: 10px 0 16px; }
  .footer__col-title { margin-bottom: 14px; }
  .footer__links { gap: 8px; }
  .footer__col--touch { gap: 10px; }
  .footer__col--touch .footer__col-title { align-self: stretch; margin-bottom: 4px; }
  .footer__col--touch .footer__col-title:last-of-type { padding-top: 12px; border-top: 3px solid transparent; margin: 14px 0 4px; }
}
