/* GrailVerse VI 2.0 — shared styles for every page except the home page (which inlines its own copy) */
:root {
  --abyss: #000000;
  --line: rgba(236, 239, 241, 0.12);
  --line-strong: rgba(236, 239, 241, 0.7);
  --text: #eceff1;
  --muted: #8b959c;
  --dim: #545e65;
  --cyan: #00ffcc;
  --pink: #ff00aa;
  --font: 'Manrope', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --gutter: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--abyss); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: rgba(0, 255, 204, .3); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
html[lang="zh"] .l-en, html[lang="en"] .l-zh { display: none !important; }

/* header */
.hdr { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter); padding-top: max(14px, env(safe-area-inset-top));
  transition: background .4s, border-color .4s; border-bottom: 1px solid transparent; }
.hdr.scrolled { background: rgba(0, 0, 0, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 34px; width: auto; }
.brand span { font-weight: 600; letter-spacing: .24em; font-size: 13px; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a { font-size: 13px; color: var(--muted); transition: color .2s; }
.nav a:hover, .nav a.cur { color: var(--text); }
.lang { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; border: 1px solid var(--line); padding: 8px 12px; min-height: 36px; }
.lang b { color: var(--text); font-weight: 500; }
.lang i { font-style: normal; color: var(--dim); }
@media (max-width: 767px) { .nav a { display: none; } .brand span { display: none; } }

/* buttons & links */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 1px solid var(--cyan); color: var(--cyan);
  font-weight: 600; font-size: 14px; letter-spacing: .02em; transition: background .25s, color .25s, box-shadow .25s; }
.btn:hover, .btn:focus-visible { background: var(--cyan); color: #000; box-shadow: 0 0 32px rgba(0, 255, 204, .35); outline: none; }
.btn.ghost { border-color: var(--line-strong); color: var(--text); }
.btn.ghost:hover, .btn.ghost:focus-visible { background: var(--text); color: #000; box-shadow: none; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lnk { display: inline-flex; gap: 6px; color: var(--cyan); font-weight: 600; border-bottom: 1px solid rgba(0, 255, 204, .4); padding-bottom: 2px; }
.back { display: inline-flex; gap: 8px; color: var(--muted); font-size: 14px; transition: color .2s; }
.back:hover { color: var(--text); }

/* page head */
.page { padding: clamp(128px, 16vw, 200px) var(--gutter) clamp(80px, 10vw, 140px); }
.page-head { display: grid; grid-template-columns: minmax(140px, 1fr) 3fr; gap: 24px 48px; margin-bottom: clamp(56px, 8vw, 104px); }
.page-head h1 { margin: 0; font-weight: 800; font-size: clamp(40px, 6vw, 96px); line-height: 1; letter-spacing: -.04em; max-width: 16ch; }
html[lang="zh"] .page-head h1 { font-weight: 900; letter-spacing: 0; line-height: 1.15; }
.page-head h1 em { font-style: normal; color: var(--cyan); }
.page-head p { margin: 28px 0 0; max-width: 56ch; color: var(--muted); font-size: clamp(16px, 1.3vw, 19px); line-height: 1.7; }
html[lang="zh"] .page-head p { max-width: 36em; }
@media (max-width: 767px) { .page-head { grid-template-columns: 1fr; } }

/* blocks */
.blk { padding-top: clamp(64px, 8vw, 112px); }
.blk-t { display: grid; grid-template-columns: minmax(140px, 1fr) 3fr; gap: 24px 48px; margin-bottom: 40px; }
.blk-t h2 { margin: 0; font-size: clamp(26px, 2.8vw, 40px); font-weight: 800; letter-spacing: -.02em; }
html[lang="zh"] .blk-t h2 { font-weight: 700; letter-spacing: .02em; }
@media (max-width: 767px) { .blk-t { grid-template-columns: 1fr; gap: 12px; } }

.cols { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.col { padding: 28px 28px 0 0; }
.col + .col { padding-left: 28px; border-left: 1px solid var(--line); }
.col h3 { margin: 0 0 12px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
html[lang="zh"] .col h3 { font-weight: 700; letter-spacing: .02em; }
.col p { margin: 0; color: var(--muted); line-height: 1.7; max-width: 38ch; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } .col, .col + .col { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); } }

/* job list */
.jobs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.jobs a { display: grid; grid-template-columns: 1fr 120px 190px 32px; gap: 24px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line); transition: background .25s, padding .25s; }
.jobs a:hover { background: rgba(0, 255, 204, .04); }
.jobs a h3 { margin: 0; font-size: clamp(18px, 1.6vw, 22px); font-weight: 700; }
.jobs .meta { color: var(--muted); font-size: 14px; white-space: nowrap; }
.jobs .arr { color: var(--cyan); transition: transform .25s; }
.jobs a:hover .arr { transform: translateX(4px); }
@media (max-width: 767px) {
  .jobs a { grid-template-columns: 1fr 24px; gap: 6px 12px; }
  .jobs a .meta:empty { display: none; }
  .jobs a .meta:empty { display: none; }
  .jobs a .meta { grid-column: 1; white-space: normal; }
  .jobs a .arr { grid-row: 1 / span 3; grid-column: 2; }
}

/* job detail */
.facts { display: flex; flex-wrap: wrap; gap: 12px 40px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div { display: grid; gap: 6px; }
.facts b { font-weight: 600; font-size: 17px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; grid-template-columns: 28px 1fr; padding: 16px 0; border-bottom: 1px solid var(--line); color: #c9cfd3; line-height: 1.75; }
.list li::before { content: ''; width: 10px; height: 1px; margin-top: .9em; background: var(--cyan); }
.apply { margin-top: clamp(56px, 7vw, 96px); padding-top: 40px; border-top: 1px solid var(--line-strong); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.apply p { margin: 0; color: var(--muted); }
.apply a.m { color: var(--cyan); }

/* contact */
.contacts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.contacts > div { padding: 32px 32px 36px 0; }
.contacts > div + div { padding-left: 32px; border-left: 1px solid var(--line); }
.contacts h3 { margin: 0 0 10px; font-size: 24px; font-weight: 800; }
html[lang="zh"] .contacts h3 { font-weight: 700; }
.contacts p { margin: 0 0 24px; color: var(--muted); line-height: 1.6; }
@media (max-width: 767px) { .contacts { grid-template-columns: 1fr; } .contacts > div, .contacts > div + div { padding: 28px 0; border-left: 0; border-bottom: 1px solid var(--line); } }
.form { display: grid; gap: 0; max-width: 760px; border-top: 1px solid var(--line); }
.form label { display: grid; gap: 10px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.form input, .form textarea { width: 100%; background: transparent; border: 0; color: var(--text); font: inherit; font-size: 17px; padding: 4px 0; resize: vertical; outline: none; }
.form input::placeholder, .form textarea::placeholder { color: var(--dim); }
.form label:focus-within { border-color: var(--cyan); }
.form label:focus-within .mono { color: var(--cyan); }
.form .actions { margin-top: 32px; }
.form .note { color: var(--dim); font-size: 13px; }
.form-msg { margin-top: 20px; font-size: 15px; }
.form-msg.ok { color: var(--cyan); } .form-msg.err { color: var(--pink); }

/* legal */
.prose { font-feature-settings: "calt" 0; max-width: 820px; color: #c9cfd3; line-height: 1.8; font-size: 16px; }
.prose h2 { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 40px; }
.prose h3 { color: var(--text); font-size: 21px; font-weight: 700; margin: 56px 0 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.prose strong { color: var(--text); }
.prose a { color: var(--cyan); }
.prose ul { padding-left: 1.2em; } .prose li { margin: 6px 0; } .prose li::marker { color: var(--cyan); }
.prose address { font-style: normal; margin-top: 16px; }

/* poster dialog */
.dlg { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.dlg.open { display: flex; }
.dlg-box { width: min(560px, 100%); max-height: 92vh; display: flex; flex-direction: column; gap: 16px; background: #000; border: 1px solid var(--line-strong); padding: 20px; }
.dlg-top { display: flex; justify-content: space-between; align-items: center; }
.dlg-img { flex: 1; overflow: auto; min-height: 200px; display: grid; place-items: start center; }
.dlg-img img { width: 100%; height: auto; display: block; }
.dlg-x { width: 36px; height: 36px; border: 1px solid var(--line); font-size: 20px; line-height: 1; color: var(--muted); }
.dlg-x:hover { color: var(--text); border-color: var(--line-strong); }

/* footer */
.ftr { padding: 56px var(--gutter) max(40px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.ftr .fbrand { display: flex; align-items: center; gap: 12px; }
.ftr .fbrand img { height: 30px; opacity: .8; }
.ftr .fbrand span { font-weight: 600; letter-spacing: .24em; font-size: 12px; }
.ftr .flinks { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: flex-end; }
.ftr .flinks a { font-size: 13px; color: var(--muted); transition: color .2s; }
.ftr .flinks a:hover { color: var(--text); }
.ftr .fmeta { grid-column: 1 / -1; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 767px) { .ftr { grid-template-columns: 1fr; } .ftr .flinks { justify-content: flex-start; } }

/* reveal */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }
