/* ===========================================================================
   THE SITE FOOTER — one sheet, one look, every page.

   Markup: pages/shared.jsx SiteFooter — the company facts (会社概要) and the
   accuracy / logo-ownership disclaimer. Rendered into the listing pages,
   statistics, About, the legal pages, the 404, the job-editor shell, every
   generated detail page, and the chat shell.

   WHY ITS OWN SHEET, IN ITS OWN UNITS
   Exactly the story styles/header.css tells, and for the same reasons — this
   footer had drifted three separate ways at once:

     1. It was sized in `rem`, which resolves against the DOCUMENT root, and the
        root is not the same on every page: global.css steps it 16 → 14 → 13 →
        ~12 down the breakpoints, while html.statistics-page-html and
        html.company-page-html swap in a 3.6vw root below 600px. At 400px wide
        that made the statistics footer half again the size of the jobs one.
     2. The phone step-up (@510px) was scoped `.Page:is(.job-list-page,
        .company-list-page)`, so ONLY those two page kinds got it — the legal
        pages and the 404 rendered at the raw shrunken rem beside them.
     3. The chat carried a SECOND COPY of all of it in chat.css, in that
        surface's own tokens, so its labels were the chat's redder orange and
        its text two steps lighter than the site's.

   So this sheet is ROOT-INDEPENDENT and SURFACE-INDEPENDENT:

     • .site-footer carries its OWN font-size, in px, following the listing
       pages' ladder exactly — they are the reference, nothing about them
       changes, and every other page now matches them whatever its root font is.
     • Everything inside is `em` against that. Only LEAVES set a font-size, so
       an em length never compounds — the one exception is .site-footer-note,
       which sets a size AND carries a width, and uses `--fu` below for that.
     • COLOURS ARE LITERALS, not tokens. `--brand` is `orange` (#ffa500) in
       global.css and #ff8000 in chat.css, so a token would render the chat's
       footer in a different orange from the site's. Same call chat.css already
       makes for .view-count.

   Loaded by pages/shared.jsx PageHead, pages/Chat.jsx and
   render/renderJobEditor.js, AFTER global.css / chat.css — it needs to outrank
   whichever of them is present, and load order is what does it.
   =========================================================================== */

.site-footer {
  /* THE FOOTER'S OWN SCALE. The steps are the listing pages' root ladder
     (global.css `html`): 16 at desktop and through the 1300px step, then
     14 / 13 / a viewport-proportional ~12. */
  --fu: 16px;
  font-size: var(--fu);
  /* STATED, not inherited — the two things that made the chat's footer read a
     quarter larger than the jobs page's at identical px sizes:
       • font-family. global.css puts Darker Grotesque on `html`; chat.css puts
         its UI stack there. A condensed display face and a system sans at the
         same font-size are not the same width — "Contact" measured 45px on the
         site and 56px on the chat.
       • line-height. global.css's reset is `body { line-height: 1 }`, chat.css
         uses 1.5, which made the facts row 94px tall there against 76px here.
     Same reason .header-container states both (styles/header.css). Anything
     that wants different leading sets it on itself — .site-footer-note does. */
  font-family: "Darker Grotesque", sans-serif;
  line-height: 1;
  /* The rest of what the two surfaces' resets disagree on, stated for the same
     reason. `color` is the inherited base (#fff on the site, --text #ececec on
     the chat) — everything visible here sets its own, but a future part would
     inherit the wrong one. `-webkit-font-smoothing` is the one that SHOWS:
     chat.css turns on antialiased for body, which renders the same face
     visibly lighter than the site's default. */
  color: #fff;
  -webkit-font-smoothing: auto;

  width: 100%;
  box-sizing: border-box;
  margin-top: 3em;
  padding: 2.4em 0 2.2em;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
/* Japanese pages use the site's self-hosted JP face. Stated for the same reason
   as the Latin one above: the site puts it on `html[lang="ja"] body` and the
   chat has no equivalent, so an inherited footer fell back to that surface's UI
   stack. Its SIZE needs nothing here — the optical difference between the two
   faces is handled once per document by --ja-optical (styles/global.css, and
   the same value in chat.css for the surfaces that do not load it), which is
   why the six hand-picked Japanese footer sizes are gone. */
html[lang="ja"] .site-footer {
  font-family: "IBM Plex Sans JP", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  font-synthesis: none;
}

@media (max-width: 915px) {
  .site-footer { --fu: 14px; }
}
@media (max-width: 755px) {
  .site-footer { --fu: 13px; }
}
@media (max-width: 600px) {
  /* 2.353vw = 12px at 510px; `min` caps it so 510–600px stays put and the
     shrink starts at 510px, exactly as the root ladder does. */
  .site-footer { --fu: min(12px, 2.353vw); }
}

/* (.about-parallax .site-footer lived here — a tighter standoff, 0.6/1.4 units
   instead of 3/2.4, from when that page's footer sat directly under the profile
   carousel. Removed 2026-08-16: it was the last page whose footer did not match
   the jobs and companies pages, and one page's spacing is not worth the footer
   having a variant.) */
/* The job-editor shell: main's bottom padding already carries the spacing. */
body.hosted-page .site-footer { margin-top: 0; }

/* ---- the wordmark ------------------------------------------------------- */

/* box-sizing and the image defaults, restated because chat.css's reset sets
   `*{box-sizing:border-box}` and `img,svg{display:block;max-width:100%}` where
   global.css leaves the UA values. Only the image ones are visible — an inline
   img sits on the text baseline and a block one does not, which moved the
   wordmark within its grid cell — but pinning all three is what makes the two
   surfaces provably identical rather than identical-by-luck. */
.site-footer,
.site-footer *{ box-sizing: border-box; }
.site-footer-logo {
  display: inline;
  max-width: none;
  height: 1.7em;
  width: auto;
  object-fit: contain;
}
/* The artwork is WHITE on transparent — right on the site, which has no light
   theme, and on the chat's dark one. The chat's LIGHT theme needs it inverted,
   by the same two selectors rail.css and header.css use for their copies (the
   media query for `system`, the attribute for an explicit choice). Inert on the
   site, which never sets data-theme. */
@media (prefers-color-scheme: light) {
  html:not(.has-rail):not([data-theme="dark"]) .site-footer-logo {
    filter: invert(1) hue-rotate(180deg);
  }
}
html:not(.has-rail)[data-theme="light"] .site-footer-logo {
  filter: invert(1) hue-rotate(180deg);
}

/* ---- the company facts (会社概要) ---------------------------------------- */

.site-footer-info {
  /* Five equal tracks: the wordmark's cell is the same width as each fact's, so
     all five get identical areas and evenly-spaced centres, with the logo on the
     exact page centre. */
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  justify-items: center;
  gap: 0.9em 1.5em;
  padding: 1.2em 2.5em;
  box-sizing: border-box;
  width: 100%;
}
.site-footer-fact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12em;
}
.site-footer-fact-label {
  font-size: 0.62em;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  /* The site's brand orange as a LITERAL — see the note at the top of the
     sheet. Same accent role as the header's micro-labels. */
  color: orange;
}
.site-footer-fact-value {
  font-size: 0.8em;
  color: rgba(165, 165, 165, 1);
}
.site-footer-fact-value--link { text-decoration: none; }
.site-footer-fact-value--link:hover,
.site-footer-fact-value--link:focus-visible { color: orange; }

/* Narrow screens: the wordmark gets its own centred line and the four facts stay
   on ONE row of EQUAL quarter-width cells — the long Address wraps inside its
   cell instead of grabbing extra width (which is what made the old space-evenly
   flex row read uneven). */
@media (max-width: 755px) {
  .site-footer-info {
    grid-template-columns: repeat(4, 1fr);
    align-items: start;
    gap: 1em 0.6em;
  }
  .site-footer-fact { text-align: center; } /* wrapped address lines stay centred */
  .site-footer-logo-link {
    order: -1;
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
  }
}

/* ---- the disclaimer ----------------------------------------------------- */

/* Held to a readable measure rather than the footer's full width: .site-footer
   has no horizontal padding of its own, so at `width: 100%` this ran the whole
   1132px the rail leaves — around 200 characters a line, roughly double what
   anyone reads comfortably, and it touched both edges. This is the site's own
   content-column idiom (the `min(cap, 100% - 2× gutter)` shape .stats-hero and
   #statistics-content use): a 62-unit cap on wide screens, and below that a
   1.5-unit gutter each side so the text never reaches the edge on a phone. The
   footer is a centred flex column, so it centres itself.
   62 is a settled number, not a guess: full width read as too wide and 52 as too
   narrow, so this sits between them — ~992px and two or three lines at desktop.
   NOTE the box is in `var(--fu)`, not em: this element sets its own font-size,
   so an em here would measure against 0.7 of the footer's unit rather than the
   unit itself. It is the only rule in the sheet that needs that. */
.site-footer-note {
  width: min(calc(62 * var(--fu)), calc(100% - 3 * var(--fu)));
  /* Down from 1.6 units, which it carried while there were two of these
     stacked: .site-footer-info already ends in 1.2 units of bottom padding, so
     the full margin put ~45px of air between the facts and the disclaimer and
     floated it away from the block it belongs to. */
  margin-top: calc(0.2 * var(--fu));
  font-size: 0.7em;
  line-height: 1.4;
  color: rgba(105, 105, 105, 1);
}

/* ===========================================================================
   PHONE (≤510px)
   The footer's own font-size is ~9–12px down here, matching the listing pages'
   root. The cards and filters above it are deliberately easier to read than
   that, so the footer comes up a step to sit with them.
   Unlike before, this applies to EVERY page's footer. It used to be scoped to
   `.Page:is(.job-list-page, .company-list-page)`, which is why the legal pages
   and the 404 sat a visible step smaller than the jobs page beside them.
   =========================================================================== */
@media (max-width: 510px) {
  .site-footer-logo { height: 2.1em; }
  .site-footer-fact-label { font-size: 0.8em; }
  .site-footer-fact-value { font-size: 1em; line-height: 1.2; }
  .site-footer-note { font-size: 0.9em; }
}
html[lang="ja"] .site-footer-note {
  line-height: 1.55;
}
@media (max-width: 510px) {}
