/*
 * Site footer (markup from src/lib/siteFooter.ts) and the drawings in the
 * blue band above it. Linked from the start of the footer markup, after the
 * Webflow CSS, so equal-specificity rules here win.
 */

.sf {
  --sf-ink: #14150f;
  --sf-muted: #5c5d56;
  --sf-line: #e6e4dc;
  --sf-blue: #0055ff;
  --sf-blue-press: #0046cc;
  --sf-bg: #fff;
  --sf-field: #f6f5f2;
  --sf-error: #b03b2e;
  --sf-ease: cubic-bezier(0.23, 1, 0.32, 1);
  background-color: var(--sf-bg);
  color: var(--sf-ink);
  font-family: Seasonsans, Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
}

/* The research page is black; its footer follows. */
.sf[data-theme='dark'] {
  --sf-ink: #efeee9;
  --sf-muted: #9a9b93;
  --sf-line: #2b2c27;
  --sf-bg: #000;
  --sf-field: #14150f;
  --sf-error: #f08a7b;
}

.sf *,
.sf *::before,
.sf *::after {
  box-sizing: border-box;
}

/*
 * Undo Webflow's element rules (h2 size, p opacity, list indents,
 * underlines). :where() keeps these as weak as Webflow's own, so the class
 * rules below still win.
 */
:where(.sf) h2,
:where(.sf) p,
:where(.sf) ul,
:where(.sf) li,
:where(.sf) form {
  margin: 0;
  padding: 0;
}

:where(.sf) h2 {
  font-family: inherit;
  letter-spacing: 0;
}

:where(.sf) p {
  opacity: 1;
}

:where(.sf) ul {
  list-style: none;
}

:where(.sf) a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.sf a:focus-visible,
.sf-news-button:focus-visible {
  outline: 2px solid var(--sf-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.sf-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Layout: lines up with the header's 1224px row. */
.sf-inner {
  max-width: 1264px;
  margin: 0 auto;
  padding: 48px 20px 20px;
}

/* minmax(0, …) tracks: the email field's own minimum width must not widen them. */
.sf-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

.sf-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  align-content: start;
  gap: 24px;
}

.sf-logo {
  display: block;
}

.sf-logo img {
  display: block;
  width: auto;
  height: 28px;
  border-radius: 0;
}

/* Newsletter form */
.sf-news {
  width: 100%;
  max-width: 400px;
}

.sf-news-title {
  color: var(--sf-ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.sf-news-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.sf-news-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--sf-line);
  border-radius: 6px;
  background-color: var(--sf-field);
  color: var(--sf-ink);
  font: 500 16px/20px Seasonsans, Arial, sans-serif;
  outline: none;
  transition-property: border-color, background-color, box-shadow;
  transition-duration: 120ms;
  transition-timing-function: ease;
}

.sf-news-input::placeholder {
  color: var(--sf-muted);
  opacity: 1;
}

.sf-news-input:focus {
  border-color: var(--sf-blue);
  background-color: var(--sf-bg);
  box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.24);
}

.sf-news-input[aria-invalid='true'] {
  border-color: var(--sf-error);
}

.sf-news-input[aria-invalid='true']:focus {
  box-shadow: 0 0 0 3px rgba(176, 59, 46, 0.2);
}

.sf-news-button {
  display: inline-grid;
  flex: none;
  place-items: center;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background-color: var(--sf-blue);
  color: #fff;
  font: 500 15px/20px Seasonsans, Arial, sans-serif;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 160ms var(--sf-ease), background-color 120ms ease, opacity 120ms ease;
}

.sf-news-button:active {
  background-color: var(--sf-blue-press);
  transform: scale(0.97);
}

.sf-news-button:disabled {
  opacity: 0.72;
  cursor: progress;
}

.sf-news-label {
  grid-area: 1 / 1;
}

.sf-news-busy,
.sf-news[data-state='sending'] .sf-news-label {
  visibility: hidden;
}

.sf-news[data-state='sending'] .sf-news-busy {
  visibility: visible;
}

/* Error under the field; after success, the confirmation in its place. */
.sf-news-status {
  color: var(--sf-error);
  font-size: 13px;
  line-height: 18px;
}

.sf-news-status:not(:empty) {
  margin-top: 8px;
}

.sf-news-status:focus {
  outline: none;
}

.sf-news[data-state='done'] .sf-news-row {
  display: none;
}

.sf-news[data-state='done'] .sf-news-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 12px;
  color: var(--sf-ink);
  font-size: 15px;
  line-height: 20px;
  overflow-wrap: anywhere;
  animation: sf-in 240ms var(--sf-ease);
}

.sf-news[data-state='done'] .sf-news-status::before {
  content: '';
  flex: none;
  width: 20px;
  height: 20px;
  background-color: var(--sf-blue);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='10' r='8.25'/%3E%3Cpath d='m6.75 10.25 2.25 2.25 4.25-4.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='10' r='8.25'/%3E%3Cpath d='m6.75 10.25 2.25 2.25 4.25-4.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sf-news-note {
  margin-top: 8px;
  color: var(--sf-muted);
  font-size: 13px;
  line-height: 18px;
}

@keyframes sf-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

@keyframes sf-fade {
  from {
    opacity: 0;
  }
}

/* Link columns */
.sf-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 24px;
}

.sf-col-title {
  margin-bottom: 8px;
  color: var(--sf-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
}

.sf-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
  color: var(--sf-ink);
}

/* Bottom row: ©, legal, social */
.sf-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
  margin-top: 40px;
  padding-top: 12px;
  border-top: 1px solid var(--sf-line);
}

.sf-copy {
  color: var(--sf-muted);
  font-size: 13px;
  line-height: 18px;
}

.sf-legal {
  display: flex;
  gap: 20px;
}

.sf-legal-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--sf-muted);
  font-size: 13px;
  line-height: 18px;
}

.sf-social {
  display: flex;
  margin: 0 -8px 0 auto;
}

.sf-social-link {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  color: var(--sf-muted);
}

.sf-social-link svg {
  display: block;
}

.sf-link:active,
.sf-legal-link:active,
.sf-social-link:active {
  color: var(--sf-blue);
}

@media (hover: hover) and (pointer: fine) {
  .sf-link,
  .sf-legal-link,
  .sf-social-link {
    transition: color 120ms ease;
  }

  .sf-link:hover,
  .sf-legal-link:hover,
  .sf-social-link:hover {
    color: var(--sf-blue);
  }

  .sf-news-button:hover {
    background-color: var(--sf-blue-press);
  }
}

/* Desktop: logo and form on the left, columns on the right. */
@media (min-width: 992px) {
  .sf-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    column-gap: clamp(40px, 6vw, 96px);
  }
}

/* Phones: everything stacks; every link is a 44px tap target. */
@media (max-width: 767px) {
  .sf-inner {
    padding: 40px 20px 24px;
  }

  .sf-top {
    gap: 36px;
  }

  .sf-news {
    max-width: none;
  }

  .sf-news-input,
  .sf-news-button {
    height: 48px;
  }

  .sf-news[data-state='done'] .sf-news-status {
    min-height: 48px;
  }

  .sf-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
  }

  .sf-col-title {
    margin-bottom: 4px;
  }

  /* The whole row is the target, not just the word. */
  .sf-link {
    display: flex;
    min-height: 44px;
    padding: 0;
  }

  .sf-logo {
    margin: -8px 0;
    padding: 8px 0;
  }

  .sf-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-top: 36px;
  }

  .sf-social {
    order: -1;
    margin: 0 0 0 -12px;
  }

  .sf-social-link {
    width: 44px;
    height: 44px;
  }

  .sf-legal {
    gap: 24px;
  }

  .sf-legal-link {
    min-width: 44px;
    min-height: 44px;
    font-size: 14px;
  }

  .sf-copy {
    order: 1;
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sf-news-button:active {
    transform: none;
  }

  .sf-news[data-state='done'] .sf-news-status {
    animation-name: sf-fade;
  }
}

/*
 * The blue band's drawings: whole now, and inside the band, lined up with the
 * header's edges. Webflow pinned cropped copies to the band's bottom corners.
 * Below 768px Webflow hides them (.cta-l, .cta-r).
 */
.container-large.is-footer > .sf-art {
  bottom: 40px;
  height: auto;
}

.container-large.is-footer > .sf-art.cta-l {
  left: max(20px, calc(50% - 612px));
  width: 221px;
}

.container-large.is-footer > .sf-art.cta-r {
  right: max(20px, calc(50% - 612px));
  width: 249px;
}

@media (max-width: 991px) {
  .container-large.is-footer > .sf-art {
    bottom: 24px;
  }

  .container-large.is-footer > .sf-art.cta-l {
    width: 133px;
  }

  .container-large.is-footer > .sf-art.cta-r {
    width: 149px;
  }
}
