/* ==========================================================================
   Footer
   Contained exactly like the hero (navbar edges, --nav-edge-left/right),
   48px radius, the hero's soft aqua gradient. Desktop (RTL):
   [brand + social] [quick links] [contact] [booking CTA panel], then a quiet
   bottom bar. Quick links reuse the navbar's [data-section] scroll-spy.
   ========================================================================== */

.site-footer {
  --footer-gutter: var(--space-4);

  padding-bottom: var(--space-4);
  scroll-margin-top: var(--header-height, 0px);
}

.site-footer__frame {
  position: relative;
  isolation: isolate;
  margin-left: var(--nav-edge-left, var(--footer-gutter));
  margin-right: var(--nav-edge-right, var(--footer-gutter));
  padding: var(--space-6);                 /* 48px */
  border: 1px solid rgb(255 255 255 / 0.7);
  border-radius: var(--radius-xl);         /* 48px */
  background: var(--gradient-hero);        /* same surface as the hero */
  box-shadow: 0 2px 4px rgb(19 61 63 / 0.04), 0 16px 48px rgb(19 61 63 / 0.06);
  overflow: hidden;
}

/* One very soft aqua glow in the top corner — the only decoration */
.site-footer__frame::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -160px;
  left: -120px;
  width: 420px;
  height: 420px;
  border-radius: var(--radius-circle);
  background: radial-gradient(closest-side, rgb(175 228 231 / 0.55), rgb(175 228 231 / 0));
  pointer-events: none;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.8fr) minmax(0, 1.2fr) minmax(0, 1.35fr);
  align-items: start;
  gap: var(--space-5); /* 40px */
}

/* ---- Brand ---- */
/* Main logo above the ICU logo (the brand column is too narrow for both in a row) */
.footer-brand__logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  border-radius: var(--space-1);
}

.footer-brand__logo img {
  width: auto;
  height: var(--space-5); /* 40px */
}

.footer-brand__logo .footer-brand__logo-icu {
  height: var(--space-8); /* 56px — its tagline needs the extra height */
}

.footer-brand__text {
  margin: var(--space-2) 0 var(--space-3);
  color: var(--color-neutral-900);
  font-size: var(--font-size-b2);
  line-height: var(--line-height-b2);
  text-wrap: pretty;
}

.site-footer .footer-social { /* beats the global ul[role="list"] reset */
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.footer-social__link {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--space-6);  /* 48px */
  height: var(--space-6);
  border-radius: var(--radius-circle);
  background: color-mix(in srgb, var(--color-primary-100) 70%, #ffffff);
  color: var(--color-primary);
  transition:
    background-color var(--duration-base) var(--ease-smooth),
    color var(--duration-base) var(--ease-smooth),
    transform var(--duration-base) var(--ease-smooth);
}

/* Tooltip with the platform name (also the accessible name via aria-label) */
.footer-social__link::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + var(--space-1));
  left: 50%;
  padding: var(--space-0-5) var(--space-1);
  border-radius: var(--radius-pill);
  background: var(--color-primary-700);
  color: var(--color-text-on-brand);
  font-size: var(--font-size-b3);
  line-height: var(--line-height-b3);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, var(--space-0-5));
  transition:
    opacity var(--duration-base) ease,
    transform var(--duration-base) var(--ease-smooth);
  pointer-events: none;
}

.footer-social__link:hover,
.footer-social__link:focus-visible {
  background: var(--color-primary);
  color: var(--color-text-on-brand);
}

.footer-social__link:hover::after,
.footer-social__link:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---- Column headings ---- */
.footer-col__title {
  margin: 0 0 var(--space-2);
  color: var(--color-primary-700);
  font-size: var(--font-size-b1);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-b1);
}

/* ---- Quick links ---- */
.site-footer .footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-0-5);
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--space-4); /* 32px desktop; 44px+ on touch below */
  color: var(--color-neutral-900);
  font-size: var(--font-size-b2);
  line-height: var(--line-height-b2);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-smooth);
}

/* Arrow follows the text and points the reading direction (RTL → left) */
.footer-link__arrow {
  order: 1;
  flex: none;
  max-width: 0;
  opacity: 0;
  transition:
    max-width var(--duration-base) var(--ease-smooth),
    opacity var(--duration-base) ease,
    transform var(--duration-base) var(--ease-smooth);
}

.footer-link:hover,
.footer-link:focus-visible,
.footer-link.is-active {
  color: var(--color-primary);
}

.footer-link.is-active {
  font-weight: var(--font-weight-bold);
}

.footer-link:hover .footer-link__arrow,
.footer-link:focus-visible .footer-link__arrow,
.footer-link.is-active .footer-link__arrow {
  max-width: 16px;
  opacity: 1;
}

.footer-link:hover .footer-link__arrow {
  transform: translateX(calc(var(--space-0-5) * -1));
}

/* ---- Contact ---- */
.site-footer .footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-contact__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: var(--space-2);
}

.footer-contact__icon {
  display: grid;
  place-items: center;
  width: var(--space-5);  /* 40px */
  height: var(--space-5);
  border-radius: var(--radius-circle);
  background: color-mix(in srgb, var(--color-primary-100) 70%, #ffffff);
  color: var(--color-primary);
  transition:
    background-color var(--duration-base) var(--ease-smooth),
    color var(--duration-base) var(--ease-smooth);
}

.footer-contact__row:hover .footer-contact__icon {
  background: var(--color-primary);
  color: var(--color-text-on-brand);
}

.footer-contact__label {
  display: block;
  color: var(--color-neutral-900);
  font-size: var(--font-size-b3);
  line-height: var(--line-height-b3);
}

.footer-contact__value {
  display: inline-block;
  color: var(--color-primary-700);
  font-size: var(--font-size-b2);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-b2);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-smooth);
}

a.footer-contact__value:hover,
a.footer-contact__value:focus-visible {
  color: var(--color-primary);
}

.footer-contact__value--text {
  font-style: normal;
  font-weight: var(--font-weight-medium);
}

address.footer-contact__value span {
  display: block;
}

/* ---- Booking CTA panel ---- */
.footer-cta {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--space-4);
  border: 1px solid rgb(255 255 255 / 0.8);
  border-radius: var(--radius-panel); /* 32px */
  background: color-mix(in srgb, var(--color-primary-100) 45%, #ffffff);
  overflow: hidden;
}

.footer-cta__art {
  position: absolute;
  z-index: -1;
  top: calc(var(--space-2) * -1);
  left: calc(var(--space-2) * -1); /* RTL end corner */
  color: var(--color-primary);
  opacity: 0.12;
  transform: rotate(-12deg);
}

.footer-cta__label {
  display: inline-flex;
  align-items: center;
  height: var(--space-4); /* 32px */
  padding-inline: var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--color-neutral-100);
  color: var(--color-primary);
  font-size: var(--font-size-b3);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-b3);
}

.footer-cta__title {
  margin: var(--space-2) 0 var(--space-1);
  color: var(--color-primary-700);
  font-size: var(--font-size-h7);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-h7);
  text-wrap: balance;
}

.footer-cta__text {
  margin: 0 0 var(--space-3);
  color: var(--color-neutral-900);
  font-size: var(--font-size-b2);
  line-height: var(--line-height-b2);
}

.footer-cta__btn:hover {
  transform: translateY(calc(var(--space-0-5) * -1));
}

.footer-cta__btn:active {
  transform: scale(0.98);
}

/* ---- Bottom bar ---- */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid rgb(19 61 63 / 0.1);
  color: var(--color-neutral-900);
  font-size: var(--font-size-b3);
  line-height: var(--line-height-b3);
}

.footer-bottom p {
  margin: 0;
}

.site-footer .footer-bottom__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.footer-bottom__item--link {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-smooth);
}

.footer-bottom__item--link:hover {
  color: var(--color-primary);
}

.footer-bottom__note {
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
}

/* ---- Focus ---- */
.footer-brand__logo:focus-visible,
.footer-social__link:focus-visible,
.footer-link:focus-visible,
.footer-contact__value:focus-visible,
.footer-bottom__item--link:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--space-1);
}

.footer-social__link:focus-visible {
  border-radius: var(--radius-circle);
}

@media (prefers-reduced-motion: reduce) {
  .site-footer *,
  .site-footer *::after {
    transition: none !important;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1599.98px) {
  .site-footer {
    --footer-gutter: var(--space-3);
  }
}

@media (max-width: 1439.98px) {
  .site-footer__frame {
    padding: var(--space-5);
  }

  .site-footer__grid {
    gap: var(--space-4);
  }
}

/* Tablet: two balanced rows — [brand | links] / [contact | CTA] */
@media (max-width: 1279.98px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5) var(--space-4);
  }
}

/* Touch-friendly link targets wherever the pointer is coarse */
@media (pointer: coarse) {
  .footer-link {
    min-height: 44px;
  }
}

/* Mobile: stacked, smaller frame radius */
@media (max-width: 767.98px) {
  .site-footer {
    --footer-gutter: var(--space-2);

    padding-bottom: var(--space-2);
  }

  .site-footer__frame {
    padding: var(--space-4) var(--space-2) var(--space-3);
    border-radius: var(--space-3); /* 24px */
  }

  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }

  /* Links in two columns keep the stack short */
  .site-footer .footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 var(--space-2);
  }

  .footer-link {
    min-height: 44px;
  }

  .footer-cta {
    padding: var(--space-3);
    border-radius: var(--space-3);
  }

  .footer-cta__btn {
    align-self: stretch;
    justify-content: space-between;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    margin-top: var(--space-4);
  }
}
