/* ============================================================
   FOOTER v3 — Contabo anatomy, house monochrome system,
   elevated with haptic-premium detailing.

   Anatomy (unchanged, so all 46 pages keep working):
     1. swoosh      — curve that lifts the footer off the page
     2. CTA + trust — "customer information / rating" band
     3. link columns — global footer navigation
     4. payments    — logo + payment chips row
     5. bottom bar  — copyright + legal

   Design notes (soft-skill / high-end-visual-design, applied
   inside the existing Space Grotesk + monochrome token system):
     · CTA band uses a "double-bezel": an outer hairline ring
       (::before) + an inner top highlight (inset shadow) so it
       reads as machined hardware, not a flat card.
     · Brand mark is framed as a squircle "app-icon" badge so the
       abstract logo reads as intentional at footer scale.
     · Trust numbers get tabular figures + inter-item dividers.
     · All hovers use the house custom bezier (--ease-out) — never
       default ease/linear.

   Scoped under .footer so nothing leaks into page content.
   Layout only — renders correctly even if JS fails.
   ============================================================ */

/* ---------- 1. Swoosh ---------- */
.footer-swoosh {
  position: relative;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.footer-swoosh svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: clamp(42px, 6vw, 84px);
  display: block;
  overflow: visible;
}

.footer-swoosh .swoosh-fill {
  fill: var(--bg-raised);
}

/* The crest is a hairline stroke on the path itself — a 1px straight rule
   cannot trace a curve. */
.footer-swoosh .swoosh-crest {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* ---------- Footer shell ---------- */
.footer {
  position: relative;
  border-top: 0;
  padding-block: 0 clamp(1.75rem, 3vw, 2.75rem);
  background: var(--bg-raised);
}

.footer .container {
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

/* ---------- 2. CTA + trust band (double-bezel) ---------- */
.footer-cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.5rem, 3.5vw, 3rem);
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-lg) + 6px);
  background:
    radial-gradient(
      120% 160% at 82% -20%,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0) 55%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0));
  /* Inner top highlight — the "machined edge" of the double-bezel. */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Outer hairline ring, offset a few px outside the card — the second bezel.
   Pure decoration; pointer-events off so it never eats clicks. */
.footer-cta::before {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid var(--border-faint);
  border-radius: calc(var(--radius-lg) + 12px);
  pointer-events: none;
}

.footer-cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 0.95rem + 1.1vw, 1.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: var(--tracking-heading);
  color: var(--text);
  max-width: 22ch;
}

.footer-cta-lede {
  margin-top: 0.7rem;
  max-width: 52ch;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.footer-cta-actions .btn {
  min-height: 48px;
  padding-inline: 1.5rem;
  white-space: nowrap;
  transition: transform 220ms var(--ease-out),
    background-color 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out);
}

.footer-cta-actions .btn:hover {
  transform: translateY(-2px);
}

.footer-cta-actions .btn:active {
  transform: translateY(0) scale(0.985);
}

/* Trust metrics — the three numbers that answer "is this a real host". */
.footer-trust {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem clamp(1.25rem, 3.5vw, 2.75rem);
  margin: 0;
  padding: clamp(1.1rem, 2.4vw, 1.5rem) 0 0;
  list-style: none;
  border-top: 1px solid var(--border-faint);
}

.footer-trust li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.footer-trust li + li {
  padding-left: clamp(1.25rem, 3.5vw, 2.75rem);
  border-left: 1px solid var(--border-faint);
}

.footer-trust strong {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: var(--tracking-heading);
  font-variant-numeric: tabular-nums;
}

/* ---------- 3. Link columns ---------- */
.footer .footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr));
  gap: clamp(1.75rem, 3.5vw, 3rem);
}

/* Brand lockup — logo framed as a squircle "app-icon" badge so the abstract
   mark reads as intentional, not a stray glyph. Scoped to the footer so the
   header/other navs keep their plain 32px treatment. */
.footer-brand .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.footer-brand .brand img {
  width: 42px;
  height: 42px;
  margin-right: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #050505;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 18px rgba(0, 0, 0, 0.45);
}

.footer-brand p {
  max-width: 24rem;
  margin-top: 1.15rem;
  color: var(--text-tertiary);
  font-size: 0.84rem;
  line-height: 1.75;
}

/* Live status pill — points at the status page instead of restating it. */
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.4rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.76rem;
  transition: border-color 220ms var(--ease-out),
    color 220ms var(--ease-out),
    transform 220ms var(--ease-out);
}

.footer-status:hover {
  color: var(--text);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.footer-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  /* Neutral on purpose: a green dot baked into static HTML would keep
     claiming all-is-well during an outage. Real state lives on /status. */
  background: var(--text-tertiary);
  flex: 0 0 auto;
  animation: footer-status-pulse 2.8s var(--ease-out) infinite;
}

@keyframes footer-status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.14); }
  70% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.footer-col {
  min-width: 0;
}

/* Link columns are native <details> drawers. Without JS they stay open (the
   `open` attribute is in the HTML); js/footer-drawer.js only re-sets the
   default per viewport. The header is the <summary>. */
.footer-col-drawer {
  min-width: 0;
}

.footer-col-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0;
  padding: 0.2rem 0;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Kill the native disclosure triangle on every engine. */
.footer-col-heading::-webkit-details-marker,
.footer-col-heading::marker {
  content: "";
  display: none;
}

/* Chevron built from two borders — no SVG, no icon font. Points down when the
   drawer is shut, flips up when open. */
.footer-col-heading::after {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-bottom: 3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.5;
  transition: transform 240ms var(--ease-out), opacity 200ms var(--ease-out);
}

.footer-col-drawer[open] > .footer-col-heading::after {
  margin-bottom: 0;
  margin-top: 3px;
  transform: rotate(-135deg);
}

.footer-col-heading:hover::after {
  opacity: 0.85;
}

.footer-col-heading:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 4px;
}

.footer-col-panel {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

/* Subtle settle-in when a drawer opens (height itself can't animate natively). */
.footer-col-drawer[open] .footer-col-panel {
  animation: footer-panel-in 240ms var(--ease-out);
}

@keyframes footer-panel-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.footer-col a {
  display: inline-block;
  color: var(--text-tertiary);
  font-size: 0.84rem;
  transition: color 200ms var(--ease-out),
    transform 200ms var(--ease-out);
}

.footer-col a:hover {
  color: var(--text);
  transform: translateX(3px);
}

/* ---------- 4. Payments / security row ---------- */
.footer-payments {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem clamp(1rem, 2.5vw, 1.75rem);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: clamp(1.1rem, 2.6vw, 1.5rem) 0;
  border-top: 1px solid var(--border-faint);
  /* No border-bottom here — .footer-bottom already carries the single divider
     above the copyright bar. A second line 28px below this read as a double
     rule on phones. */
}

.footer-payments-label {
  color: var(--text-tertiary);
  font-size: 0.74rem;
}

.footer-pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Outlined chips rather than coloured brand logos: the house palette is
   monochrome, and red/blue/orange payment logos would be the loudest colour
   on the entire site. */
.footer-pay-methods li {
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: border-color 200ms var(--ease-out),
    color 200ms var(--ease-out);
}

.footer-pay-methods li:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.footer-payments-note {
  margin-left: auto;
  color: var(--text-tertiary);
  font-size: 0.74rem;
}

/* ---------- 5. Bottom bar ---------- */
.footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(1.75rem, 3.5vw, 2.25rem);
  color: var(--text-tertiary);
  font-size: 0.78rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
}

.footer-legal a {
  transition: color 200ms var(--ease-out);
}

.footer-legal a:hover {
  color: var(--text);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet: CTA stacks, link grid goes 3-up then 2-up. */
@media (max-width: 1024px) {
  .footer .footer-top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-brand p {
    max-width: 48ch;
  }
}

@media (max-width: 860px) {
  .footer-cta {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-cta-actions {
    justify-content: flex-start;
  }
  /* Dividers between trust items read oddly once they wrap. */
  .footer-trust li + li {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 680px) {
  .footer .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.5rem;
  }
  .footer-col ul {
    gap: 0.5rem;
  }
  .footer-col a {
    font-size: 0.82rem;
  }
  .footer-payments-note {
    margin-left: 0;
  }
}

@media (max-width: 400px) {
  .footer .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   MOBILE FOOTER — tight drawers + refined payment chips (≤767px)
   ============================================================ */
@media (max-width: 767px) {
  .footer .footer-top {
    row-gap: 0;
  }
  .footer-brand {
    margin-bottom: 0.9rem;
  }
  /* Comfortable touch target + a hairline divider so the collapsed headers
     read as a clean list instead of floating with dead space between them. */
  .footer-col-heading {
    padding: 0.95rem 0;
    font-size: 0.74rem;
    border-top: 1px solid var(--border-faint);
  }
  /* Slimmer chips + tighter gaps so all five methods sit on ONE row instead
     of "Net banking" wrapping alone onto a second line. */
  .footer-pay-methods {
    gap: 0.4rem;
  }
  .footer-pay-methods li {
    padding: 0.3rem 0.55rem;
    font-size: 0.64rem;
  }
}

/* ============================================================
   MOTION / PRINT
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .footer-status-dot {
    animation: none;
  }
  .footer-cta-actions .btn,
  .footer-col a,
  .footer-status,
  .footer-legal a,
  .footer-pay-methods li,
  .footer-col-heading::after {
    transition: none;
  }
  .footer-col-drawer[open] .footer-col-panel {
    animation: none;
  }
  .footer-cta-actions .btn:hover,
  .footer-status:hover,
  .footer-col a:hover {
    transform: none;
  }
}

/* Rebalance the shared footer callout: message, proof points, then actions. */
.footer-cta {
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr) auto;
  gap: clamp(1.25rem, 2.8vw, 2.4rem);
  border-color: rgba(255,255,255,.11);
  background: linear-gradient(115deg, #17191f, #101218 70%);
  box-shadow: 0 18px 45px rgba(0,0,0,.18);
  border-radius: 22px;
  padding: clamp(1.6rem, 3vw, 2.5rem);
}
.footer-cta::before { display:none; }
.footer-cta-title { max-width: 25ch; font-size: clamp(1.2rem, 1rem + .8vw, 1.55rem); line-height: 1.2; }
.footer-cta-lede { max-width: 46ch; font-size: .84rem; }
.footer-trust {
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
  flex-direction: column;
  justify-content: center;
  gap: .55rem;
  padding: 0 0 0 clamp(1rem, 2vw, 1.6rem);
  border-top: 0;
  border-left: 1px solid var(--border-faint);
}
.footer-trust li + li { padding-left: 0; border-left: 0; }
.footer-trust strong { font-size: 1rem; }
.footer-cta-actions { grid-column: 3; grid-row: 1; flex-direction: column; align-items: stretch; justify-content: center; }
.footer-cta-actions .btn { justify-content: center; min-width: 138px; padding-inline: 1.1rem; }
.footer-status { white-space: nowrap; font-size: .72rem; }
@media (max-width: 1024px) {
  .footer-cta { grid-template-columns: minmax(0, 1fr) auto; }
  .footer-trust { grid-column: 1 / -1; grid-row: auto; flex-direction: row; align-self: auto; padding: 1rem 0 0; border-left: 0; border-top: 1px solid var(--border-faint); }
  .footer-trust li + li { padding-left: 1rem; border-left: 1px solid var(--border-faint); }
  .footer-cta-actions { grid-column: 2; grid-row: 1; flex-direction: row; }
}
@media (max-width: 860px) {
  .footer-cta { grid-template-columns: minmax(0,1fr); }
  .footer-cta-actions { grid-column: 1; grid-row: auto; }
  .footer-trust { grid-column: 1; }
}
@media print {
  .footer-swoosh,
  .footer-cta {
    display: none;
  }
  .footer {
    background: none;
    color: #000;
  }
}
