/* Royal Smoke — footer (BLACKBIRD-inspired, site palette) */

.rs-footer {
  --rs-footer-top-muted: color-mix(in srgb, var(--rs-footer-top-ink) 55%, transparent);
  --rs-footer-seal: 112px;
  --rs-seashell: var(--rs-footer-bottom-text);
  position: relative;
  margin: 0;
  padding: 0;
  border-top: none;
  background: var(--rs-footer-bottom-bg);
  color: var(--rs-footer-bottom-text);
  overflow-x: hidden;
  overflow-y: visible;
}

.rs-footer__top {
  background: var(--rs-footer-top-bg);
  color: var(--rs-footer-top-ink);
  padding: 40px var(--rs-pad-x) calc(var(--rs-footer-seal) * 0.5 + 28px);
}

.rs-footer__top-inner {
  max-width: var(--rs-container);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.rs-footer__intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 28ch;
}

.rs-footer__brand {
  font-family: var(--rs-font-display);
  font-size: 22px;
  font-weight: var(--rs-weight-sub);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--rs-footer-top-ink);
}

.rs-footer__tagline {
  margin: 8px 0 0;
  max-width: 28ch;
  color: var(--rs-footer-top-muted);
  font-size: 13px;
  line-height: 1.45;
}

.rs-footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rs-footer__contacts a {
  color: var(--rs-footer-top-muted);
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: color var(--rs-dur-fast) ease;
}

.rs-footer__contacts a:hover {
  color: var(--rs-gold);
}

.rs-footer__grid {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  justify-content: space-evenly;
  justify-items: start;
  align-items: start;
  column-gap: 0;
  row-gap: 28px;
  width: 100%;
  box-sizing: border-box;
}

.rs-footer__col {
  min-width: 0;
}

.rs-footer__col h3 {
  margin: 0 0 18px;
  font-family: var(--rs-font-ui);
  font-size: 12px;
  font-weight: var(--rs-weight-sub);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rs-footer-top-ink);
}

.rs-footer__col a {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  font-weight: var(--rs-weight-ui);
  color: var(--rs-footer-top-muted);
  transition: color var(--rs-dur-fast) ease;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.rs-footer__col a:hover {
  color: var(--rs-gold);
}

.rs-footer__col a.rs-footer__link--stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 0;
  line-height: inherit;
}

.rs-footer__col a.rs-footer__link--stack span {
  display: block;
  padding: 8px 0;
}

/* ——— Bridge: seal + social on the color split ——— */
.rs-footer__bridge {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 18px;
  height: 0;
  margin: 0;
  padding-inline: var(--rs-pad-x);
  pointer-events: none;
}

.rs-footer__bridge::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--rs-gold) 18%,
    var(--rs-gold) 82%,
    transparent 100%
  );
  opacity: 0.45;
  transform: translateY(-50%);
}

.rs-footer__seal {
  position: relative;
  z-index: 2;
  width: var(--rs-footer-seal);
  height: var(--rs-footer-seal);
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  transform: translateY(-50%);
  box-shadow:
    0 0 0 4px var(--rs-footer-top-bg),
    0 0 0 5px rgba(201, 154, 68, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.35);
}

.rs-footer__seal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.rs-footer__social {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  transform: translateY(-50%);
}

.rs-footer__social--left {
  justify-content: flex-end;
}

.rs-footer__social--right {
  justify-content: flex-start;
}

.rs-footer__soc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--rs-footer-top-bg);
  color: var(--rs-footer-top-ink);
  border: 1px solid color-mix(in srgb, var(--rs-footer-top-ink) 12%, transparent);
  transition:
    background var(--rs-dur-fast) ease,
    color var(--rs-dur-fast) ease,
    transform var(--rs-dur-fast) var(--rs-ease);
  -webkit-tap-highlight-color: transparent;
}

.rs-footer__soc:hover {
  background: var(--rs-gold);
  color: var(--rs-footer-top-ink);
  transform: translateY(-2px);
}

.rs-footer__soc:focus-visible {
  outline: 2px solid var(--rs-gold);
  outline-offset: 2px;
}

/* ——— Bottom: wordmark + copy ——— */
.rs-footer__bottom {
  background: var(--rs-footer-bottom-bg);
  /* half of seal hangs into bottom — keep clear gap under logo/buttons */
  padding: calc(var(--rs-footer-seal) * 0.5 + 20px) var(--rs-pad-x) 0;
}

.rs-footer__wordmark {
  max-width: var(--rs-container);
  margin: 0 auto;
  padding-bottom: 28px;
  font-family: var(--rs-font-ui);
  font-weight: 800;
  font-size: clamp(30px, 8vw, 96px);
  line-height: 0.88;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-align: center;
  color: var(--rs-seashell);
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.rs-footer__meta {
  max-width: var(--rs-container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 calc(20px + var(--rs-safe-b));
  border-top: 1px solid rgba(252, 242, 238, 0.18);
}

.rs-footer__copy,
.rs-footer__credit {
  margin: 0;
  font-family: var(--rs-font-ui);
  font-size: 11px;
  font-weight: var(--rs-weight-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rs-text-muted);
  line-height: 1.2;
}

.rs-footer__copy {
  white-space: nowrap;
}

.rs-footer__credit {
  text-align: right;
}

.rs-footer__credit-link,
.rs-footer__credit-name {
  color: inherit;
  text-decoration: none;
}

.rs-footer__credit-link:hover {
  color: var(--rs-gold);
}

/* ——— Tablet ——— */
@media (min-width: 768px) {
  .rs-footer {
    --rs-footer-seal: 140px;
  }

  .rs-footer__top {
    padding: 48px var(--rs-pad-x) calc(var(--rs-footer-seal) * 0.5 + 32px);
  }

  .rs-footer__top-inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 48px;
  }

  .rs-footer__intro {
    flex: 0 0 22%;
    max-width: none;
    padding-top: 4px;
  }

  .rs-footer__grid {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    margin-inline: 0;
    justify-content: space-evenly;
    column-gap: 0;
    row-gap: 32px;
  }

  .rs-footer__bridge {
    column-gap: 32px;
  }

  .rs-footer__wordmark {
    letter-spacing: -0.04em;
    padding-bottom: 32px;
  }

  .rs-footer__meta {
    padding-top: 20px;
    padding-bottom: calc(22px + var(--rs-safe-b));
  }

  .rs-footer__copy,
  .rs-footer__credit {
    font-size: 12px;
  }
}

/* ——— Desktop ——— */
@media (min-width: 1024px) {
  .rs-footer {
    --rs-footer-seal: 148px;
  }

  .rs-footer__top {
    padding: 56px var(--rs-pad-x-lg) calc(var(--rs-footer-seal) * 0.5 + 36px);
  }

  .rs-footer__top-inner {
    gap: 72px;
  }

  .rs-footer__brand {
    font-size: 24px;
  }

  .rs-footer__grid {
    justify-content: space-evenly;
    column-gap: 0;
    row-gap: 40px;
  }

  .rs-footer__col h3 {
    margin-bottom: 22px;
  }

  .rs-footer__col a {
    padding: 10px 0;
    font-size: 15px;
  }

  .rs-footer__col a.rs-footer__link--stack span {
    padding: 10px 0;
  }

  .rs-footer__bridge {
    column-gap: 40px;
    padding-inline: var(--rs-pad-x-lg);
  }

  .rs-footer__soc {
    width: 44px;
    height: 44px;
  }

  .rs-footer__bottom {
    padding-inline: var(--rs-pad-x-lg);
    padding-top: calc(var(--rs-footer-seal) * 0.5 + 24px);
  }

  .rs-footer__wordmark {
    font-size: clamp(64px, 7.5vw, 112px);
    letter-spacing: -0.045em;
    padding-bottom: 36px;
  }

  .rs-footer__meta {
    padding-top: 22px;
    padding-bottom: calc(24px + var(--rs-safe-b));
    border-top-color: rgba(252, 242, 238, 0.08);
  }

  .rs-footer__copy {
    font-size: 11px;
    letter-spacing: 0.12em;
    color: rgba(252, 242, 238, 0.32);
  }
}

/* ——— Mobile: brand + contacts centered ——— */
@media (max-width: 767px) {
  .rs-footer__intro {
    width: 100%;
    max-width: none;
    align-items: center;
    text-align: center;
  }

  .rs-footer__contacts {
    align-items: center;
  }
}

/* ——— Narrow phones: even 3-col gutters + equal side insets ——— */
@media (max-width: 767px) {
  .rs-footer__top {
    padding-inline: max(var(--rs-pad-x-sm, 20px), var(--rs-safe-l, 0px))
      max(var(--rs-pad-x-sm, 20px), var(--rs-safe-r, 0px));
  }

  .rs-footer__grid {
    grid-template-columns: repeat(3, max-content);
    justify-content: space-evenly;
    width: 100%;
    column-gap: 0;
    row-gap: 24px;
  }

  .rs-footer__col a.rs-footer__link--stack {
    gap: 0;
  }

  .rs-footer__col h3 {
    letter-spacing: 0.06em;
    margin-bottom: 14px;
  }
}

@media (max-width: 479px) {
  .rs-footer {
    --rs-footer-seal: 96px;
  }

  .rs-footer__grid {
    justify-content: space-evenly;
    column-gap: 0;
    row-gap: 20px;
  }

  .rs-footer__col h3 {
    font-size: 11px;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
  }

  .rs-footer__col a {
    font-size: 13px;
    padding: 7px 0;
    line-height: 1.35;
  }

  .rs-footer__col a.rs-footer__link--stack span {
    padding: 7px 0;
  }

  .rs-footer__bridge {
    column-gap: 10px;
  }

  .rs-footer__soc {
    width: 36px;
    height: 36px;
  }

  .rs-footer__wordmark {
    font-size: clamp(28px, 10vw, 44px);
    padding-bottom: 22px;
  }

  .rs-footer__meta {
    padding-top: 14px;
    padding-bottom: calc(16px + var(--rs-safe-b));
  }

  .rs-footer__copy,
  .rs-footer__credit {
    font-size: 10px;
  }
}

/* iOS Safari: keep wordmark from blowing out layout */
@supports (-webkit-touch-callout: none) {
  .rs-footer__wordmark {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  .rs-footer {
    overflow-x: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rs-footer__soc {
    transition: none;
  }

  .rs-footer__soc:hover {
    transform: none;
  }
}
