/* ==========================================================================
   GBAITA Innovation Arena 2026 — roles & companies
   Single-page index. White content, red hero, Archivo + Mulish.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mulish";
  src: url("../fonts/mulish.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --paper-rgb: 255, 255, 255;
  --surface: #fffdf9;
  --surface-sunk: #f0d6d2;
  --ink: #231b1b;
  --ink-soft: #453b3b;
  --muted: #7a6e6c;
  --rule: #e4ddd8;
  --rule-strong: #cfc5bd;
  --red: #b00101;
  --red-deep: #8f0101;
  --red-bright: #c00000;
  --rose: #f0d6d2;
  --teal: #b00101;
  --teal-deep: #b00101;
  --copper: #b00101;

  --header-h: 72px;
  --shell: 1040px;
  --pad: clamp(20px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 0.72, 0.2, 1);
  --font-display: "Archivo", "PingFang TC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans TC", "Noto Sans SC", sans-serif;
  --font-body: "Mulish", "PingFang TC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans TC", "Noto Sans SC", sans-serif;
  --font: var(--font-body);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

::selection { background: var(--red); color: #fff; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.site-header :focus-visible,
.hero :focus-visible { outline-color: #fff; }

.lang-switch button:focus-visible { outline-color: var(--red); }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: #fff;
  color: var(--red);
  font-size: 13px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------------------------------------------------------------- header */

.site-header {
  position: relative;
  z-index: 50;
  background: var(--red);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
  text-decoration: none;
  color: #fff;
}

.brand-logo { height: 34px; width: auto; }

.brand-event {
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.35;
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 28px;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}

.site-nav a:hover { color: #fff; }
.site-nav a:hover::after { transform: scaleX(1); }

.lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 0;
  border-radius: 4px;
  background: #fff;
}

.lang-switch button {
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.lang-switch button:hover { background: var(--rose); }

.lang-switch button[aria-pressed="true"] {
  background: var(--red-bright);
  color: #fff;
}

/* ------------------------------------------------------------------ hero */

.hero {
  background: var(--red);
  color: #fff;
  padding: clamp(36px, 4.5vw, 52px) 0 clamp(44px, 5vw, 60px);
}

.hero-main { max-width: 640px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 26px;
  height: 1px;
  background: currentColor;
}

.hero-title {
  max-width: 640px;
  margin: 0;
  color: #fff;
  font-size: clamp(36px, 4.2vw, 52px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  white-space: pre-line;
  text-wrap: balance;
}

.hero-lede {
  max-width: 600px;
  margin: 22px 0 0;
  font-size: 16.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.micro-label {
  margin: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}

/* -------------------------------------------------------------- sections */

.section {
  padding-top: clamp(40px, 4.5vw, 56px);
  scroll-margin-top: 16px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(20px, 4vw, 64px);
  align-items: end;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

.section-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-lede {
  max-width: 44ch;
  margin: 0;
  padding-bottom: 3px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------------------------------------------------------------- toolbar */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.search {
  position: relative;
  display: flex;
  flex: 1 1 260px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(176, 1, 1, 0.12);
}

.search-icon { flex: none; color: var(--muted); }

.search input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: #8a7f7c; opacity: 1; }

.search-clear {
  flex: none;
  padding: 2px 4px;
  border: 0;
  background: none;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.search-clear:hover { color: var(--ink); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  white-space: nowrap;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.chip:hover { border-color: var(--red); color: var(--red); }

.chip[aria-pressed="true"] {
  background: var(--red-bright);
  border-color: var(--red-bright);
  color: #fff;
}

.text-btn {
  margin-left: auto;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
  color: var(--red);
  cursor: pointer;
}

.text-btn:hover { color: var(--red-deep); }

.list-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0 4px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.list-meta p { margin: 0; }

/* ------------------------------------------------------------------ roles */

.roles { border-top: 1px solid var(--rule); }

.role {
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 76px;
}

.role-heading {
  margin: 0;
  font: inherit;
  letter-spacing: normal;
}

.role-toggle {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 22px;
  grid-template-areas: "num title meta icon";
  align-items: start;
  gap: 18px;
  width: 100%;
  padding: 18px 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.25s var(--ease);
}

.role-toggle:hover { background: #fffaf8; }

.role-num {
  grid-area: num;
  padding-top: 3px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.role-title {
  grid-area: title;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: pretty;
  transition: color 0.2s;
}

.role-toggle:hover .role-title,
.role.is-open .role-title { color: var(--red); }

.role-meta {
  grid-area: meta;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-end;
  gap: 7px;
  padding-top: 3px;
  text-align: right;
  white-space: nowrap;
}

.role-track {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}

.role-salary {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.role-note {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--muted);
}

.role-icon {
  grid-area: icon;
  padding-top: 2px;
  color: var(--muted);
  transition: transform 0.4s var(--ease), color 0.2s;
}

.role-icon svg { display: block; }
.role.is-open .role-icon { transform: rotate(180deg); color: var(--red); }

.role-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}

.role-body-inner {
  overflow: hidden;
  min-height: 0;
  visibility: hidden;
  transition: visibility 0.45s;
}

.role.is-open .role-body { grid-template-rows: 1fr; }
.role.is-open .role-body-inner { visibility: visible; }

.role-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 48px);
  padding: 2px 0 30px 66px;
}

.summary {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.role-remark {
  max-width: 34ch;
  margin: 16px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.role-detail {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.role-block h4 {
  margin: 0 0 10px;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}

.role-block ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.role-block li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.role-block li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 1px;
  background: var(--rule-strong);
}

.role-block.pref,
.role-block.benefits {
  margin-top: 2px;
  padding: 14px 16px;
  border-radius: 4px;
}

.role-block.pref {
  border-left: 2px solid var(--red);
  background: rgba(240, 214, 210, 0.38);
}

.role-block.benefits {
  border-left: 2px solid var(--red);
  background: var(--surface);
}

/* -------------------------------------------------------------- companies */

.companies {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.company {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}

.company-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 52px;
  padding: 6px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
}

.company-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.company-monogram {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--red);
}

.company-text { min-width: 0; }

.company-name {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.company-blurb {
  margin: 7px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}

.company-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px solid var(--rose);
}

.company-link:hover { color: var(--red-deep); }

/* ----------------------------------------------------------------- footer */

.site-footer {
  margin-top: clamp(48px, 6vw, 72px);
  padding: 36px 0;
  background: #000;
  color: #fff;
}

.footer-main {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-logo { height: 30px; width: auto; flex: none; }

.footer-org {
  max-width: 70ch;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
}

.footer-managed {
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 11.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

/* --------------------------------------------------------- states & misc */

.status {
  padding: 30px 0;
  font-size: 14px;
  color: var(--muted);
}

.load-error,
.empty {
  padding: 48px 0 56px;
  border-bottom: 1px solid var(--rule);
}

.load-error h3,
.empty h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 500;
}

.load-error p,
.empty p {
  max-width: 60ch;
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 4px;
  background: var(--red-bright);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--red-deep); }

.noscript {
  margin: 0;
  padding: 20px;
  background: var(--rose);
  color: var(--ink);
  text-align: center;
  font-size: 14px;
}

/* ----------------------------------------------------------- CJK tuning */

:lang(zh) .hero-title {
  max-width: 640px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
}

:lang(zh) .section-title {
  letter-spacing: 0.01em;
  line-height: 1.25;
}

:lang(zh) .eyebrow,
:lang(zh) .micro-label {
  letter-spacing: 0.1em;
  text-transform: none;
}

:lang(zh) .role-title,
:lang(zh) .company-name {
  letter-spacing: 0;
  line-height: 1.4;
}

:lang(zh) .role-block h4 { letter-spacing: 0.1em; }

:lang(zh) .role-block li {
  font-size: 14.5px;
  line-height: 1.75;
}

:lang(zh) .summary { line-height: 1.8; }

/* --------------------------------------------------------- breakpoints */

@media (max-width: 960px) {
  .site-nav { display: none; }
  .brand-event { display: none; }
  .lang-switch { margin-left: auto; }
}

@media (max-width: 900px) {
  .section-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 14px;
  }

  .role-toggle {
    grid-template-columns: 40px minmax(0, 1fr) 20px;
    grid-template-areas:
      "num title icon"
      "num meta  meta";
    row-gap: 8px;
  }

  .role-meta {
    justify-content: flex-start;
    gap: 7px;
    padding-top: 0;
    text-align: left;
  }

  .role-body-grid { padding-left: 60px; }

}

@media (max-width: 720px) {
  :root { --header-h: 62px; }

  .brand-logo { height: 28px; }
  .role-title { font-size: 17px; }
  .hero-lede { font-size: 16px; }
  .role-meta {
    flex-wrap: wrap;
    gap: 3px 7px;
    padding-top: 2px;
    white-space: normal;
  }
  .role-track,
  .role-meta .meta-sep { display: none; }
  .role-salary { font-size: 11.5px; white-space: nowrap; }

  .search { flex-basis: 100%; }

  #expand-all { display: none; }

  .chips {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent);
    mask-image: linear-gradient(90deg, #000 90%, transparent);
  }
  .chips::-webkit-scrollbar { display: none; }

  .role-body-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 2px 0 28px;
  }

  .role-toggle { padding: 16px 0; }


  .footer-main { flex-direction: column; align-items: flex-start; gap: 12px; }

  .company {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 14px;
  }

  .company-logo {
    width: 110px;
    height: 42px;
    padding: 4px;
  }

  .company-name { font-size: 17px; }
}

@media (max-width: 520px) {
  .hero-title { font-size: clamp(32px, 9.2vw, 40px); }
  .role-num { padding-top: 3px; }
  .brand-event { display: none; }
}

/* ------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* -------------------------------------------------------------- print */

@media print {
  .site-header,
  .toolbar,
  .list-meta,
  .skip-link,
  .lang-switch { display: none !important; }

  body { background: #fff; color: #000; font-size: 11pt; }

  .site-header,
  .hero { background: #fff !important; color: #000 !important; }
  .hero-title,
  .hero-lede,
  .eyebrow { color: #000 !important; }
  .site-footer { background: #fff !important; color: #000 !important; }
  .footer-org,
  .footer-managed { color: #000 !important; border-color: #ccc !important; }

  .section { padding-top: 24pt; }
  .hero { padding-top: 0; }
  .role { break-inside: avoid; }
  .company { break-inside: avoid; }

  .role-body { grid-template-rows: 1fr !important; }
  .role-body-inner { visibility: visible !important; }
  .role-block.pref,
  .role-block.benefits { background: none; }
}
