/* ==========================================================================
   RAN FOOTER 2026 — the site's back matter
   --------------------------------------------------------------------------
   Replaces the .raxo-footer slab. The footer is composed as the last sheet of
   a printed report: a contact band, an index of the site, a legal line.

   Bound to the site's own tokens so it cannot drift: --footer-bg, --crimson,
   --footer-text, --footer-muted, --font-display, --font-body.
   Namespaced .rf- so it cannot collide with any page layer.

   Artwork is structural, not decorative: the opening rule, the column
   hairlines and the ruled newsletter field are the furniture of the document.
   ========================================================================== */

.rf {
  /* Fallbacks repeat the values declared in styles.css :root, so the footer
     still resolves on any page that ships a partial token set. */
  --rf-ink: var(--footer-bg, #090C11);
  --rf-text: var(--footer-text, #F3F1EF);
  --rf-muted: var(--footer-muted, #9EA3AD);
  --rf-accent: var(--crimson, #C8283B);

  --rf-text-2: rgba(243, 241, 239, 0.68);
  --rf-text-3: rgba(243, 241, 239, 0.46);
  --rf-rule: rgba(243, 241, 239, 0.13);
  --rf-rule-strong: rgba(243, 241, 239, 0.28);
  --rf-pad: clamp(20px, 5vw, 64px);
  --rf-gutter: clamp(32px, 5vw, 72px);

  position: relative;
  display: block;
  background: var(--rf-ink);
  color: var(--rf-text);
  overflow: hidden;
  isolation: isolate;
  font-family: var(--font-body, 'Public Sans', sans-serif);
  font-variant-numeric: tabular-nums;
  border-top: 0;
}

.rf * {
  box-sizing: border-box;
}

/* styles.css caps every paragraph at 68ch for reading measure. The footer is
   laid out by its grid, so that cap only produces ragged two-line orphans. */
.rf p {
  max-width: none;
}

/* The sheet opens on a rule: an accent segment, then hairline to the edge. */
.rf::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    to right,
    var(--rf-accent) 0 132px,
    var(--rf-rule) 132px 100%
  );
  z-index: 2;
}

.rf-wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--rf-pad);
}

/* ---------- 1. contact band ---------------------------------------------- */

.rf-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: var(--rf-gutter);
  align-items: end;
  padding: clamp(60px, 7vw, 92px) 0 clamp(40px, 5vw, 56px);
  border-bottom: 1px solid var(--rf-rule);
}

.rf-email {
  display: block;
  font-family: var(--font-display, 'Bricolage Grotesque', sans-serif);
  font-size: clamp(1.6rem, 3.7vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-weight: 500;
  color: var(--rf-text);
  text-decoration: none;
  padding-bottom: 8px;
  box-shadow: inset 0 -1px 0 var(--rf-rule-strong);
  transition: color 180ms ease-out;
  overflow-wrap: anywhere;
  width: fit-content;
  max-width: 100%;
}

.rf-email:hover {
  transition: box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.rf-email:hover,
.rf-email:focus-visible {
  box-shadow: inset 0 -3px 0 var(--rf-accent);
}

.rf-contact-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
  margin: 32px 0 0;
}

.rf-meta-key {
  margin: 0 0 4px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--rf-text-3);
}

.rf-meta-val {
  display: block;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--rf-text-2);
  text-decoration: none;
}

a.rf-meta-val {
  width: fit-content;
  box-shadow: inset 0 -1px 0 transparent;
  transition: color 160ms ease-out;
}

a.rf-meta-val:hover {
  transition: color 160ms ease-out, box-shadow 160ms ease-out;
}

a.rf-meta-val:hover,
a.rf-meta-val:focus-visible {
  color: var(--rf-text);
  box-shadow: inset 0 -1px 0 var(--rf-rule-strong);
}

/* Newsletter: a ruled field, not a widget. */
.rf-sub-form {
  margin: 0;
}

.rf-sub-field {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--rf-rule-strong);
  transition: border-color 180ms ease-out;
}

.rf-sub-field:focus-within {
  border-bottom-color: var(--rf-accent);
}

.rf-sub-input {
  flex: 1;
  min-width: 0;
  padding: 12px 0 12px;
  border: 0;
  background: transparent;
  color: var(--rf-text);
  font: inherit;
  font-size: 0.9375rem;
  border-radius: 0;
}

.rf-sub-input::placeholder {
  color: var(--rf-text-3);
}

.rf-sub-input:focus {
  outline: none;
}

.rf-sub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--rf-text);
  cursor: pointer;
  transition: color 160ms ease-out, transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.rf-sub-btn:hover,
.rf-sub-btn:focus-visible {
  color: var(--rf-accent);
  transform: translateX(3px);
}

.rf-sub-note {
  margin: 12px 0 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--rf-text-3);
}

/* ---------- 2. site index ------------------------------------------------ */

.rf-index {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 40px 0;
  padding: clamp(48px, 5vw, 64px) 0;
  border-bottom: 1px solid var(--rf-rule);
}

/* Hairlines between columns read as a newspaper column grid. */
.rf-index > div + div {
  border-left: 1px solid var(--rf-rule);
  padding-left: clamp(16px, 1.8vw, 24px);
}

.rf-col-head {
  margin: 0 0 16px;
  font-family: var(--font-display, 'Bricolage Grotesque', sans-serif);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--rf-text);
}

.rf-col-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.rf-col-list a {
  display: inline-block;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--rf-text-2);
  text-decoration: none;
  transition: color 140ms ease-out;
}

.rf-col-list a:hover,
.rf-col-list a:focus-visible {
  color: var(--rf-text);
}

.rf-col-list a::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 4px;
  background: var(--rf-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.rf-col-list a:hover::after,
.rf-col-list a:focus-visible::after {
  transform: scaleX(1);
}

/* Actions sit above the follow links, divided by the same hairline the rest
   of the sheet is ruled with. */
.rf-col-list--follow {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rf-rule);
}

/* ---------- 3. legal line ------------------------------------------------ */

.rf-base {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 24px 0 clamp(32px, 3.5vw, 48px);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--rf-text-3);
}

.rf-base p {
  margin: 0;
}

.rf-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rf-legal a,
.rf-legal button {
  font: inherit;
  color: var(--rf-text-2);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color 140ms ease-out;
}

.rf-legal a:hover,
.rf-legal a:focus-visible,
.rf-legal button:hover,
.rf-legal button:focus-visible {
  color: var(--rf-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- accessible focus -------------------------------------------- */

.rf a:focus-visible,
.rf button:focus-visible,
.rf input:focus-visible {
  outline: 2px solid var(--rf-accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.rf-sub-field input:focus-visible {
  outline-offset: 0;
  border-radius: 0;
}

/* ---------- pressed states ----------------------------------------------- */

.rf-email:active {
  box-shadow: inset 0 -3px 0 var(--rf-rule-strong);
}

.rf-col-list a:active,
.rf-legal a:active,
.rf-legal button:active,
a.rf-meta-val:active {
  color: var(--rf-text-3);
}

.rf-sub-btn:active {
  transform: translateX(3px) scale(0.92);
}

/* ---------- responsive --------------------------------------------------- */

@media (max-width: 1080px) {
  .rf-index {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px 0;
  }

  /* With three columns the rules no longer mark every column boundary, so
     they would read as random dividers. Drop them below five. */
  .rf-index > div + div {
    border-left: 0;
    padding-left: 0;
  }

  .rf-index {
    gap: 36px 28px;
  }
}

@media (max-width: 860px) {
  .rf-contact {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 36px;
  }

  .rf-email {
    font-size: clamp(1.55rem, 6.4vw, 2.1rem);
  }
}

@media (max-width: 620px) {
  .rf-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }

  .rf-contact-meta {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .rf-base {
    display: block;
  }

  .rf-legal {
    margin: 16px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rf *,
  .rf *::after {
    transition-duration: 0.01ms !important;
  }
}
