/* ============================================================================
   SADER — FOOTER  (.s-footer)
   Merged, premium footer. Dark world (data-theme="dark") — ink-brown ground.
   Editorial, calm, generous. Hairline + brass rules. Logical properties only,
   so it mirrors for RTL with no overrides. Reuses .eyebrow / .kicker /
   .btn--ghost / .btn--text / .lang-switch from components.css.
   ============================================================================ */

.s-footer {
  position: relative;
  background-color: var(--bg);
  color: var(--text);
  padding-block: clamp(var(--space-5), 2.5vw, var(--space-6)) var(--space-5);
  /* a single brass hairline crowns the footer where it meets the page above */
  border-block-start: 1px solid var(--line-brass);
  /* always fill the viewport so the page above never bleeds through */
  min-block-size: 100svh;
  display: flex;
  flex-direction: column;
}

.s-footer > .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* A faint brass column-glow on the inline-start edge — the "binding" of a tome. */
.s-footer::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  inline-size: 2px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--line-brass) 18%,
    var(--line-brass) 82%,
    transparent 100%);
  opacity: 0.7;
  pointer-events: none;
}

/* ==========================================================================
   SCROLL-TO-TOP — centered arrow at the crown of the footer.
   ========================================================================== */
.s-footer__scroll-top-wrap {
  display: flex;
  justify-content: center;
  padding-block: clamp(var(--space-3), 1.5vw, var(--space-4));
}

.s-footer__scroll-top {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-faint);
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--space-3) var(--space-6);
}
[dir="rtl"] .s-footer__scroll-top { letter-spacing: var(--tracking-wide); }
.s-footer__scroll-top:hover,
.s-footer__scroll-top:focus-visible {
  color: var(--text);
  outline: none;
}
.s-footer__scroll-top svg {
  display: block;
  transition: transform var(--dur-base) var(--ease);
}
.s-footer__scroll-top:hover svg,
.s-footer__scroll-top:focus-visible svg { transform: translateY(-5px); }

/* ==========================================================================
   STATEMENT — bold brand banner that crowns the footer, echoing the big
   marketing statement + CTA pattern (quote left, actions right).
   ========================================================================== */
.s-footer__statement {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-8);
  padding-block-end: clamp(var(--space-6), 4vw, var(--space-9));
  border-block-end: 1px solid var(--line);
}
.s-footer__statement-body { max-inline-size: none; }
.s-footer__statement-quote {
  position: relative;
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 0.85rem + 2vw, 2.75rem);
  font-weight: var(--fw-light);
  font-style: italic;
  line-height: 1.15;
  color: var(--text);
  white-space: nowrap;
}
[dir="rtl"] .s-footer__statement-quote { font-style: normal; }
.s-footer__statement-text {
  margin: 0;
  max-inline-size: none;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-muted);
}
.btn.s-footer__statement-btn {
  padding-inline: var(--space-5);
}

.s-footer__statement-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: var(--space-4);
}
@media (max-width: 760px) {
  .s-footer__statement { flex-direction: column; align-items: flex-start; }
}

/* Footer wordmark standing in for the retired newsroom panel. */
.s-footer__feature-logo {
  display: block;
  max-inline-size: 140px;
  block-size: auto;
  opacity: 0.92;
}

/* ==========================================================================
   CROWN — scroll-up + top band grouped so space-between doesn't
   insert a gap between them.
   ========================================================================== */
.s-footer__crown {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   TOP BAND — wordmark + blurb on one side, careers invite on the other.
   ========================================================================== */
.s-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(var(--space-7), 5vw, var(--space-11));
  align-items: end;
}

.s-footer__intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.s-footer__wordmark {
  display: inline-block;
  line-height: 0;
}
.s-footer__wordmark-img {
  display: block;
  height: clamp(3rem, 1.5rem + 4vw, 5rem);
  width: auto;
  transition: opacity var(--dur-fast) var(--ease);
}
.s-footer__wordmark:hover .s-footer__wordmark-img { opacity: 0.8; }

.s-footer__blurb {
  max-inline-size: 36ch;
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-style: italic;
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
  color: var(--text-muted);
}
[dir="rtl"] .s-footer__blurb { font-style: normal; }

/* Careers invite — sits to the inline-end, anchored to the wordmark baseline. */
.s-footer__invite {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  max-inline-size: 34ch;
}
.s-footer__invite-text {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-muted);
  text-align: justify;
  text-justify: inter-word;
}
.s-footer__invite-cta { margin-block-start: var(--space-2); }

/* ==========================================================================
   RULES — thin brass / hairline dividers.
   ========================================================================== */
.s-footer__rule {
  block-size: 1px;
  border: 0;
  background-color: var(--line-brass);
  margin-block: 0;
}

/* ==========================================================================
   LINK COLUMNS — featured newsroom + three text columns.
   ========================================================================== */
.s-footer__cols {
  display: grid;
  grid-template-columns: 2.2fr repeat(3, 1fr);
  gap: clamp(var(--space-6), 4vw, var(--space-9));
  align-items: start;
}

/* Featured newsroom panel (Porsche-style prominence). */
.s-footer__feature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  padding-inline-end: clamp(var(--space-5), 3vw, var(--space-8));
  /* a hairline keeps it visually distinct from the link columns */
  border-inline-end: 1px solid var(--line);
}
@media (max-width: 980px) {
  .s-footer__feature { border-inline-end: 0; padding-inline-end: 0; }
}

.s-footer__feature-link { display: inline-block; }
.s-footer__feature-title {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
  color: var(--text);
  /* animated brass underline that grows on hover/focus */
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  padding-block-end: 2px;
  transition: background-size var(--dur-base) var(--ease),
              color var(--dur-fast) var(--ease);
}
[dir="rtl"] .s-footer__feature-title { background-position: 100% 100%; }
.s-footer__feature-link:hover .s-footer__feature-title,
.s-footer__feature-link:focus-visible .s-footer__feature-title {
  background-size: 100% 1px;
  color: var(--accent);
}
.s-footer__feature-text {
  max-inline-size: 38ch;
  font-size: var(--fs-small);
  line-height: var(--lh-body);
  color: var(--text-muted);
  text-align: justify;
  text-justify: inter-word;
}
.s-footer__feature-cta { margin-block-start: var(--space-2); }

/* Text columns. */
.s-footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.s-footer__col-title {
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  font-weight: var(--fw-semi);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-faint);
}
[dir="rtl"] .s-footer__col-title { letter-spacing: var(--tracking-wide); }

.s-footer__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.s-footer__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-small);
  line-height: var(--lh-snug);
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease);
}
/* A short brass tick slides in from the inline-start on hover (LV detail). */
.s-footer__link::before {
  content: "";
  inline-size: 0;
  block-size: 1px;
  background-color: var(--accent);
  transition: inline-size var(--dur-fast) var(--ease);
}
.s-footer__link:hover,
.s-footer__link:focus-visible { color: var(--text); }
.s-footer__link:hover::before,
.s-footer__link:focus-visible::before { inline-size: var(--space-4); }

/* External-link glyph — mirrors automatically since it sits inline-end. */
.s-footer__link--ext { gap: var(--space-2); }
.s-footer__ext {
  display: inline-flex;
  color: var(--text-faint);
  transition: color var(--dur-fast) var(--ease);
}
.s-footer__link--ext:hover .s-footer__ext,
.s-footer__link--ext:focus-visible .s-footer__ext { color: var(--accent); }
[dir="rtl"] .s-footer__ext svg { transform: scaleX(-1); }

/* ==========================================================================
   SOCIAL ROW — the newsroom conversation. Brass stroke on hover.
   ========================================================================== */
.s-footer__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  margin-block-start: 0;
  padding-block-start: var(--space-5);
  border-block-start: 1px solid var(--line);
}
.s-footer__social-label {
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-faint);
}
[dir="rtl"] .s-footer__social-label { letter-spacing: var(--tracking-wide); }

.s-footer__social-list {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.s-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 44px;
  block-size: 44px;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  transition: color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease);
}
.s-footer__social-link:hover,
.s-footer__social-link:focus-visible {
  color: var(--accent-strong);
  border-color: var(--line-brass);
  background-color: var(--surface);
}
.s-footer__social-link svg { display: block; }

/* ==========================================================================
   BOTTOM BAR — copyright · legal links · language switch.
   ========================================================================== */
.s-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5) var(--space-6);
  margin-block-start: clamp(var(--space-8), 5vw, var(--space-10));
  padding-block-start: var(--space-6);
  border-block-start: 1px solid var(--line-brass);
}
.s-footer__copyright {
  font-size: var(--fs-caption);
  letter-spacing: var(--tracking-tight);
  color: var(--text-faint);
}
[dir="rtl"] .s-footer__copyright { letter-spacing: 0; }

.s-footer__legal {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.s-footer__legal-link {
  font-size: var(--fs-caption);
  letter-spacing: var(--tracking-wide);
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease);
}
.s-footer__legal-link:hover,
.s-footer__legal-link:focus-visible { color: var(--accent); }
.s-footer__legal-sep {
  inline-size: 1px;
  block-size: 0.9em;
  background-color: var(--line-strong);
}

/* ==========================================================================
   RESPONSIVE — collapse gracefully; never crowd.
   ========================================================================== */
@media (max-width: 980px) {
  .s-footer__top {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    align-items: start;
  }
  .s-footer__rule {
    margin-block: var(--space-8);
  }
  .s-footer__cols {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8) var(--space-7);
  }
  .s-footer__feature { grid-column: 1 / -1; }
  .s-footer__social {
    margin-block-start: var(--space-8);
  }
}

@media (max-width: 560px) {
  .s-footer__cols { grid-template-columns: 1fr; }
  .s-footer__bottom { justify-content: flex-start; }
  .s-footer__invite { max-inline-size: none; }
}
