/* footer.css — 21 Oct (Ali): no "Get started" column on the left and no "Address" column on the
   right; four link columns, and the company name and address move to the bottom bar. Loaded last. */
.foot__cols {
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.8fr); /* Support gets room for the e-mail on one line (≥ 290px from 1101 up) */
  justify-content: start;
  column-gap: 32px;
}
.foot__cols > div {
  min-width: 0;
}
/* desktop.css (DT-03, 19 Oct) laid the old six columns out in bands and let the first column span
   the row at 1251–1400px; with four plain columns every one is an ordinary grid item */
@media (min-width: 769px) {
  .foot__cols {
    row-gap: 0;
  }
  .foot__cols > div:first-child {
    grid-column: auto;
    display: block;
    flex-wrap: nowrap;
    gap: 0;
  }
  .foot__cols > div:first-child h5 {
    width: auto;
  }
}
.foot__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 40px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(11, 11, 20, 0.1);
}
.foot__co {
  flex: 1 1 100%;
  margin: 0 0 6px;
  font-size: 15px;
  color: #5b5f76;
}
.foot__co b {
  color: var(--m-ink, #0b0b14);
  font-weight: 600;
}
@media (min-width: 1101px) {
  .foot__co {
    flex: 1 1 auto;
    margin: 0;
    order: -1;
    margin-right: auto;
  }
}
@media (max-width: 768px) {
  .foot__cols {
    grid-template-columns: 1fr 1fr;
    gap: 22px 16px;
  }
  /* mobile.css ordered six columns; with four, let them flow: Company, Platform / Legal, Support */
  .foot__cols > div,
  .foot__cols > div:first-child,
  .foot__cols > div:nth-child(4),
  .foot__cols > div:nth-child(5),
  .foot__cols > div:nth-child(6) {
    grid-column: auto;
    order: 0;
    display: block;
    padding: 0;
    border: 0;
  }
  .foot__cols > div:nth-child(4) {
    grid-column: 1 / -1;
    padding-top: 4px;
    border-top: 1px solid rgba(11, 11, 20, 0.08);
  }
  .foot__bottom {
    margin-top: 32px;
    gap: 14px 20px;
  }
  .foot__co {
    font-size: 14px;
    line-height: 1.5;
  }
}
/* 21 Oct night (Alfi): the card no longer spans the viewport. It is capped at 1140px (100px narrower
   than the 1240px .wrap content container, Alfi's second pass the same night; below 1188px it is the
   viewport minus the footer's 24px side padding) and sits centred on every route. The legal panel keeps
   its 100px inset under the card (940px at full size) and centres with it. The four columns size to
   their content and share the leftover space evenly (space-between), text left-aligned, from 1024px
   up; between 769 and 1023px they fall to two columns so the e-mail never crushes the others, and the
   phone layout in the 768px block above is untouched (T040). */
.foot {
  width: min(1140px, 100%);
  margin-inline: auto;
}
@media (min-width: 1024px) {
  .foot__cols {
    grid-template-columns: repeat(4, auto);
    justify-content: space-between;
    column-gap: 40px;
  }
}
.disc {
  width: min(940px, calc(100% - 200px));
  margin: -24px auto 0;
}
@media (min-width: 769px) and (max-width: 1023px) {
  .foot__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 32px;
  }
}
@media (max-width: 900px) {
  .disc {
    width: calc(100% - 48px);
    margin-top: -20px;
  }
}
@media (max-width: 640px) {
  .disc {
    width: calc(100% - 16px);
    margin-top: -16px;
  }
}
/* bottom row on one line from 1024px up (Alfi, third pass): inside the 1140px card the row has 1028px.
   The address at 17px (home.css's `.foot p` was beating the 15px declared for .foot__co above), the
   four icons and the three links with 40px gaps need ~1123px, so the gaps alone could never close it.
   The row gap and the link gap go 40→28px, the icon gap 14→12px, and the address gets the 15px this
   file always meant for it (`.foot p.foot__co` outranks `.foot p`): ~1008px, so it fits with room to
   spare at every viewport of 1188px and up. Icon size, link size and the 1101–1187px / tablet / phone
   behaviour are untouched. */
@media (min-width: 1024px) {
  .foot__bottom {
    column-gap: 28px;
  }
  .foot__socials {
    gap: 12px;
  }
  .foot__links {
    gap: 28px;
  }
  .foot p.foot__co {
    font-size: 15px;
  }
}
/* ---- compact card under the desktop breakpoint (Alfi, fourth pass, 21 Oct night) ---- */
/* 769–1187px: home.css's footer v2 gives .foot `min-height: 72vh` with `justify-content: space-between`.
   On an iPad Pro (1032x1366) that is a 984px card holding 523px of content, with the blank stretched
   between the columns and the bottom row. Below the desktop breakpoint the card is as tall as its
   content; the desktop card (1188px and up) keeps its viewport-based height. */
@media (max-width: 1187px) {
  .foot {
    min-height: 0;
  }
}
/* 641–768px (iPad Mini): Company / Platform over Legal / Support, two tidy columns and no full-width
   Support row; the columns are at least 276px wide, so the e-mail stays on one line. Phones (640px
   and under) keep Support on its own row under a hairline because the e-mail (~255px at 16px, ~190px
   after its <wbr>) does not fit a ~150–180px column without breaking mid-word (T040 asserts one line). */
@media (min-width: 641px) and (max-width: 768px) {
  .foot__cols > div:nth-child(4) {
    grid-column: auto;
    padding-top: 0;
    border-top: 0;
  }
}
/* 768px and under: mobile.css already makes every link a 44px tap target, and home.css then stacks a
   14px grid gap on top of each one, so a six-link column ran ~40% taller than its text needs. The
   tap targets stay at 44px; the gap between them drops to 4px, the gap between rows of groups from
   22px to 18px, and the bottom bar's top margin / padding / item gap from 32 / 24 / 14px to
   24 / 18 / 10px. Type sizes are untouched. */
@media (max-width: 768px) {
  .foot__cols {
    row-gap: 18px;
  }
  .foot ul {
    gap: 4px;
  }
  .foot__bottom {
    margin-top: 24px;
    padding-top: 18px;
    gap: 10px;
  }
}
/* ---- 25 Oct (Alfi): compact card at every width, legal panel reads as part of the footer ---- */
/* Root cause of the tall card: home.css's "footer v2" block gives .foot `min-height: 72vh` and lays it
   out as a column flexbox with `justify-content: space-between`, so on a 1236px-tall viewport the card
   is 890px and the 463px it does not need is stretched between the link columns and the bottom row.
   The 1187px rule above only cancelled the minimum below the desktop breakpoint. The card is now as
   tall as its content everywhere, the bottom row follows the columns after a 48px gap, and the legal
   panel (a sibling of the card that the same v2 block tucks 24px under it, inset 100px a side and
   capped at 940px by the rule above) widens to the card's width less a 24px inset, with its top padding
   cut to what the tuck needs, so it reads as the card's lower band rather than a block hanging under it. */
.foot {
  min-height: 0;
  display: block;
  padding-bottom: 40px;
}
.foot__bottom {
  margin-top: 48px;
}
.disc {
  width: min(1092px, calc(100% - 48px));
  margin: -24px auto 0;
  padding: 52px 48px 32px;
}
@media (max-width: 900px) {
  .disc {
    width: calc(100% - 48px);
    margin-top: -20px;
    padding-top: 44px;
    padding-inline: 28px;
  }
}
@media (max-width: 768px) {
  .foot__bottom {
    margin-top: 24px;
  }
  .disc {
    padding-top: 40px;
    padding-inline: 20px;
    padding-bottom: 76px; /* mobile.css's value restated: the base rule above would otherwise beat it (T044: the floating Discord button clears the last line) */
  }
}
@media (max-width: 640px) {
  .disc {
    width: calc(100% - 16px);
    margin-top: -16px;
    padding-top: 36px;
    padding-inline: 20px;
  }
}

/* ---- 26 Oct (Ali): legal copy aligned. The panel was a two-column grid (text capped at 120ch, the
   "Strix Options" wordmark bottom-right), which left a ragged empty column beside the paragraphs.
   One column now: the text runs the panel's full width and the wordmark sits on its own row below. ---- */
.disc {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
.disc p,
.disc > div:first-child {
  max-width: none;
}
.disc .made {
  justify-self: start;
  margin-top: 18px;
}

/* ---- 27 Oct (Task 1.2): phones (640px and under) stack the four groups in one column ---- */
/* The two 116–176px columns at 320–440px crushed "Accounts & pricing" / "Live Program Rules" against
   the gutter and left Support alone on a hairline row. One column now: Company, Platform, Legal,
   Support in that order, 20px between groups (no hairlines), every link still a 44px row with no
   extra gap stacked on it. The bottom row (company line, icons, Terms / Privacy) shares the groups'
   left edge, which also keeps the icons out of the floating Discord button's bottom-right corner.
   The legal panel takes the card's full width (it was 8px wider than the card a side) and keeps a
   20px inset, so its copyright and paragraphs start on the same line as the card's text. Tablets
   (641–1023px) keep their two columns and the desktop card is untouched. */
@media (max-width: 640px) {
  .foot__cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px 0;
  }
  .foot__cols > div:nth-child(4) {
    grid-column: auto;
    padding-top: 0;
    border-top: 0;
  }
  .foot h5 {
    margin-bottom: 4px;
  }
  .foot ul a[href^='mailto:'] {
    max-width: 100%;
  }
  .foot__bottom {
    margin-top: 24px;
    padding-top: 18px;
    gap: 14px;
    align-items: flex-start;
  }
  .foot__socials {
    align-self: flex-start;
    justify-content: flex-start;
  }
  .disc {
    width: 100%;
    padding-inline: 20px;
  }
}
/* under 360px the one-line e-mail (246px) would run under the floating Discord button's column
   (x ≥ 260 at 320px wide) whenever its row rests in the bottom strip; capped at 220px it breaks at
   its <wbr> after "support@" into two clean lines that end well short of the button */
@media (max-width: 359px) {
  .foot ul a[href^='mailto:'] {
    max-width: 220px;
    padding: 8px 0; /* two lines inside the 44px row sat on the next link; the row grows to ~56px */
    line-height: 1.3;
  }
}
/* 768px and under (phones and the 641–768 two-column band): the link lists only looked like 44px rows.
   mobile.css gives every "li a" margin: -11px 0 (its 44px hit area for links inside paragraphs), so
   each list item was 24px tall and the 44px tap boxes overlapped the next link by ~20px (a tap between
   "Contact" and "Affiliates" opened Affiliates). Each item is now as tall as its link, the link box is
   as wide as its text (not the row), and the 4px list gap goes, since the rows carry their own height. */
@media (max-width: 768px) {
  .foot ul {
    gap: 0;
  }
  .foot ul li {
    display: block;
  }
  .foot ul a {
    display: flex;
    width: max-content;
    max-width: 100%;
    margin: 0;
  }
}
/* 5 Nov (Ali): "Review us on Trustpilot" shows the green star and the wordmark, as the other pages'
   footer does (TrustpilotWordmark in src/components/marketing/TrustpilotBadge.tsx). The margin, not a
   space, separates it from "Review us on", because the link is a flex box on phones and a flex box
   drops a trailing space. */
.foot__tp-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 0.3em;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  vertical-align: bottom;
}
.foot__tp-mark svg {
  display: block;
  flex: none;
  width: 15px;
  height: 15px;
}
