/* GLN hero 04 · Inside the wall. Paper, ink, and one cobalt for water (in the drawing only). */
:root {
  --paper: #ffffff;
  --ink: #141518;
  --ink-2: #3f4147;
  --ink-3: #62646a;
  --rule: #d9dadc;
  /* 1px up to 1440 wide, growing to 1.5px at 2560 */
  --u: clamp(1px, calc(1px + (100vw - 1440px) * 0.000446), 1.5px);
  --nav: calc(76 * var(--u));
  --pad: calc(64 * var(--u));
  --sheet-a: 1072.07 / 2490.71;
  --sheet-e: 2346.28 / 2947.94;
  --ease-out: cubic-bezier(.16, .84, .26, 1);
  font-size: clamp(16px, calc(16px + (100vw - 1440px) * 0.0043), 20.8px);
}
@media (max-width: 999px) { :root { --pad: 22px; --nav: 60px; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Schibsted Grotesk", "Schibsted Fallback", system-ui, sans-serif;
  font-size: 1rem; line-height: 1.5; font-kerning: normal;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg, canvas { display: block; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 30; background: var(--ink); color: #fff; padding: 12px 16px; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* ---------------------------------------------------------------- header */
.nav {
  position: absolute; z-index: 20; top: 0; left: 0; right: 0; height: var(--nav);
  display: flex; align-items: center; gap: calc(40 * var(--u)); padding: 0 var(--pad);
}
.wordmark { font-weight: 700; font-size: calc(23 * var(--u)); letter-spacing: -0.02em; text-decoration: none; margin-right: auto; min-height: 44px; display: inline-flex; align-items: center; }
.nav__links { display: flex; gap: calc(30 * var(--u)); }
.nav__links a { text-decoration: none; font-size: .9375rem; color: var(--ink-2); min-height: 44px; display: inline-flex; align-items: center; }
.nav__links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 999px) { .nav__links { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: calc(52 * var(--u)); min-height: 44px; padding: 0 calc(24 * var(--u));
  font: inherit; font-size: 1rem; font-weight: 500; letter-spacing: -0.005em;
  border: 1.25px solid var(--ink); text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.btn--solid { background: var(--ink); color: #fff; }
.btn--solid:hover { background: #2c2e33; }
.btn--line { background: var(--paper); color: var(--ink); }
.btn--line:hover { background: #f1f1f2; }
.btn--nav { height: calc(44 * var(--u)); font-size: .9375rem; }
@media (max-width: 999px) { .btn--nav { padding: 0 16px; } }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
/* the pin: a tall wrapper with a sticky hero (native, so nothing is re-parented and the layout is final at first paint) */
.js.motion .pin { height: calc(300vh); height: calc(300svh); }
.js.motion .hero { position: sticky; top: 0; }
.stage { position: absolute; inset: 0; }
.sheet { position: absolute; }
.sheet img, .sheet svg { width: 100%; height: 100%; }
.sheet--a {
  top: calc(var(--nav) + 2.2vh); bottom: 3.6vh; left: 66%;
  aspect-ratio: var(--sheet-a); transform: translateX(-50%);
}
.ink { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.ink svg { position: absolute; left: 0; top: 0; }
.js.motion .underlay { opacity: .14; transition: opacity .6s ease; }
.js.motion .underlay.is-gone { opacity: 0; }
.sheet--e { display: none; }
.gl { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .5s ease; }
.gl.is-on { opacity: 1; }
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.leaders line { stroke: var(--ink); stroke-width: .75px; }
.leaders .dot { fill: var(--ink); }
.leaders .bal { fill: var(--paper); stroke: var(--ink); stroke-width: 1px; }
.leaders text { font: 600 12px/1 "Schibsted Grotesk", "Schibsted Fallback", sans-serif; font-variant-numeric: tabular-nums; fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.leaders .is-hot line { stroke-width: 1.5px; }
.leaders .is-hot .bal { fill: var(--ink); }
.leaders .is-hot text { fill: #fff; }
.dim-text {
  position: absolute; left: 0; top: 0; visibility: hidden; line-height: 1;
  font-size: calc(13 * var(--u)); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .01em;
  white-space: nowrap; transform-origin: 50% 100%; will-change: transform, opacity;
}
.dim-text.is-set { visibility: visible; }

.hero__text {
  position: absolute; z-index: 3; left: var(--pad); top: calc(var(--nav) + 12.5vh);
  width: min(44vw, calc(640 * var(--u)));
  will-change: opacity, transform;
}
.hero h1 {
  margin: 0; font-weight: 600; font-size: calc(78 * var(--u)); line-height: .97; letter-spacing: -0.038em;
  text-wrap: balance;
}
.hero__sub { margin: calc(30 * var(--u)) 0 0; max-width: 28em; font-size: 1.1875rem; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.hero__cta { display: flex; flex-wrap: wrap; gap: calc(12 * var(--u)); margin-top: calc(38 * var(--u)); }

/* first-screen reveal: CSS, started by the inline script (.go), never waits for a library */
@keyframes rise { from { opacity: 0; transform: translateY(.55em); } to { opacity: 1; transform: none; } }
.js .hero__text > * { opacity: 0; }
.js.go .hero__text > * { animation: rise .9s var(--ease-out) both; }
.js.go .hero__text > :nth-child(2) { animation-delay: .09s; }
.js.go .hero__text > :nth-child(3) { animation-delay: .17s; }

/* figure title block, bottom left, like the corner of a drawing sheet */
.fig {
  position: absolute; z-index: 3; left: var(--pad); bottom: calc(30 * var(--u)); margin: 0;
  border: 1.25px solid var(--ink); font-size: calc(13 * var(--u)); line-height: 1.2; color: var(--ink-2);
  display: grid; grid-template-columns: auto auto;
}
.fig__row { display: contents; }
.fig__k, .fig__v { padding: calc(7 * var(--u)) calc(11 * var(--u)); }
.fig__k { border-right: 1px solid var(--ink); color: var(--ink); font-weight: 600; }
.fig__row + .fig__row > span { border-top: 1px solid var(--ink); }
.fig__v { min-width: calc(250 * var(--u)); }

/* ---------------------------------------------------------------- parts: callouts (wide) / legend (narrow) */
.parts { position: relative; }
.callouts { list-style: none; margin: 0; padding: 0; }
.callout {
  display: flex; align-items: flex-start; gap: calc(11 * var(--u));
  margin: 0; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.callout__num {
  flex: none; display: grid; place-items: center;
  width: calc(27 * var(--u)); height: calc(27 * var(--u)); min-width: 24px; min-height: 24px;
  border: 1.25px solid var(--ink); border-radius: 50%; background: var(--paper);
  font-size: calc(13 * var(--u)); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1;
  transition: background-color .18s, color .18s;
}
.callout__text { display: flex; flex-direction: column; gap: 2px; padding-top: calc(3 * var(--u)); }
.callout__name { font-size: 1rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.callout__line { font-size: .875rem; line-height: 1.38; color: var(--ink-2); text-wrap: pretty; }
.callout__line .ln { will-change: transform; }
.callout:hover .callout__name, .callout.is-hot .callout__name { text-decoration: underline; text-decoration-thickness: 1.25px; text-underline-offset: 3px; }
.callout.is-hot .callout__num, .callout[aria-pressed="true"] .callout__num { background: var(--ink); color: #fff; }

/* no JS: a plain list under the drawing */
html:not(.js) .hero { height: auto; }
html:not(.js) .parts { margin-top: 100svh; padding: 0 var(--pad) 48px; }
html:not(.js) .callouts { display: grid; gap: 14px; max-width: 40em; }
html:not(.js) .fig { display: none; }

/* wide screens, JS: callouts float at the end of their leaders */
.js:not(.legend) .parts { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.js:not(.legend) .callout {
  position: absolute; left: 0; top: 0; pointer-events: auto; visibility: hidden; opacity: 0;
  width: max-content; max-width: calc(262 * var(--u));
  will-change: transform, opacity;
}
.js:not(.legend) .callout.is-on { visibility: visible; }
.js:not(.legend) .callout.is-left { flex-direction: row-reverse; text-align: right; }
.js:not(.legend) .callout.is-left .callout__text { align-items: flex-end; }

/* narrow screens: numbered legend under the drawing */
.js.legend .parts { position: absolute; z-index: 4; left: var(--pad); right: var(--pad); bottom: 18px; }
.js.legend .callouts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.js.legend .callout { width: 100%; min-height: 44px; align-items: center; opacity: 0; visibility: hidden; transition: opacity .3s; }
.js.legend .callout.is-on { opacity: 1; visibility: visible; }
.js.legend .callout__text { padding-top: 0; }
.js.legend .callout__name { font-size: .9375rem; }
.js.legend .callout__line { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.legend-note { display: none; }
.legend-note__n { color: var(--ink); font-weight: 600; white-space: pre; }
.js.legend .legend-note { display: block; margin: 6px 0 0; min-height: 2.9em; font-size: 1rem; line-height: 1.45; color: var(--ink-2); }
.js.legend .fig { display: none; }
@media (min-width: 640px) { .js.legend .callouts { grid-template-columns: 1fr 1fr 1fr; } }

/* phones & portrait: text on top, drawing below */
.js.legend .hero__text { top: calc(var(--nav) + 3vh); width: auto; right: var(--pad); }
.js.legend .hero h1 { font-size: clamp(34px, 9.6vw, 64px); line-height: 1; }
.js.legend .hero__sub { font-size: 1.0625rem; margin-top: 16px; }
.js.legend .hero__cta { margin-top: 22px; }
.js.legend .sheet--a { top: calc(var(--nav) + 3vh + var(--text-h, 330px) + 14px); bottom: 18px; left: 50%; }

/* ---------------------------------------------------------------- still mode (reduced motion / no WebGL) */
.still .sheet--a { display: none; }
.still .sheet--e { display: block; }
.still .gl { display: none; }
.still.js .hero { height: auto; min-height: 100svh; }
.still.js .callout { opacity: 1; visibility: visible; }
.still.legend .hero { height: auto; display: flex; flex-direction: column; }
.still.legend .hero__text { order: 0; } .still.legend .stage { order: 1; } .still.legend .parts { order: 2; }
.still.legend .hero__text, .still.legend .parts { position: relative; left: auto; right: auto; top: auto; bottom: auto; }
.still.legend .hero__text { padding: calc(var(--nav) + 3vh) var(--pad) 0; }
.still.legend .stage { position: relative; height: var(--e-h, 120vw); margin-top: 20px; }
.still.legend .parts { padding: 8px var(--pad) 40px; }
.still.legend .callouts { grid-template-columns: 1fr; gap: 10px; }
.still.legend .callout { align-items: flex-start; }
.still.legend .callout__line { position: static !important; width: auto; height: auto; clip: auto; white-space: normal; font-size: .9375rem; }
.still.legend .legend-note { display: none; }

/* ---------------------------------------------------------------- follow-on */
.more { padding: calc(150 * var(--u)) var(--pad) calc(130 * var(--u)); max-width: calc(1100 * var(--u) + 2 * var(--pad)); }
.more h2 { margin: 0 0 calc(22 * var(--u)); font-weight: 600; font-size: calc(40 * var(--u)); line-height: 1.08; letter-spacing: -0.03em; }
.more p { margin: 0; max-width: 34em; font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); }
.more p + p { margin-top: calc(30 * var(--u)); }
.back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; color: var(--ink); text-underline-offset: 5px; text-decoration-thickness: 1.25px; }
@media (max-width: 999px) { .more h2 { font-size: 30px; } .more p { font-size: 1.0625rem; } }

.foot { border-top: 1px solid var(--rule); padding: 26px var(--pad) 34px; }
.foot p { margin: 0; font-size: .875rem; color: var(--ink-3); }

/* ---------------------------------------------------------------- language switch (EN / 中文) */
.lang { display: inline-flex; align-items: center; flex: none; margin-right: calc(-10 * var(--u)); }
.lang__b {
  position: relative; min-height: 44px; min-width: 44px; padding: 0 6px; margin: 0; background: none; border: 0; cursor: pointer;
  font: inherit; font-size: .875rem; font-weight: 500; line-height: 1; color: var(--ink-3); -webkit-tap-highlight-color: transparent;
}
/* the switch shows 中文 in a system font, so the page's Chinese font loads only when Chinese is shown */
.lang__b--zh { font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", sans-serif; }
.lang__b::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 10px; height: 1.25px; background: var(--ink); transform: scaleX(0); transition: transform .3s var(--ease-out); }
.lang__b:hover, .lang__b[aria-pressed="true"] { color: var(--ink); }
.lang__b[aria-pressed="true"]::after { transform: scaleX(1); }
.lang__sep { color: var(--rule); font-size: .875rem; }
@media (max-width: 999px) { .nav { gap: 14px; } .lang { margin-right: 0; } }
@media (max-width: 400px) { .nav { gap: 6px; } .lang__b { min-width: 40px; padding: 0 4px; } .btn--nav { padding: 0 12px; } }

/* ---------------------------------------------------------------- Simplified Chinese */
:root { --zh: "GLN Sans SC", "GLN Sans SC Fallback", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", sans-serif; }
html:lang(zh) body { font-family: "Schibsted Grotesk", var(--zh); line-height: 1.8; letter-spacing: 0; line-break: strict; }
html:lang(zh) .btn, html:lang(zh) .callout__name, html:lang(zh) .more h2, html:lang(zh) .wordmark { letter-spacing: 0; }
html:lang(zh) .hero h1 { font-weight: 700; font-size: calc(64 * var(--u)); line-height: 1.3; letter-spacing: 0; text-wrap: balance; }
html:lang(zh) .hero__sub { max-width: 26em; font-size: 1.125rem; line-height: 1.85; }
html:lang(zh) .callout__name { line-height: 1.4; }
html:lang(zh) .callout__line { line-height: 1.7; }
html:lang(zh):not(.legend) .callout { max-width: calc(240 * var(--u)); }
html:lang(zh) .callout__line { text-wrap: balance; }
html:lang(zh) .fig { line-height: 1.4; }
html:lang(zh) .fig__v { min-width: calc(230 * var(--u)); }
html:lang(zh) .more h2 { font-weight: 700; line-height: 1.35; }
html:lang(zh) .more p { max-width: 30em; line-height: 1.85; }
html:lang(zh) .foot p { line-height: 1.8; }
html:lang(zh).js.legend .hero h1 { font-size: clamp(30px, 8.2vw, 54px); line-height: 1.3; }
html:lang(zh).js.legend .hero__sub { font-size: 1rem; line-height: 1.8; }
html:lang(zh).js.legend .legend-note { line-height: 1.7; }
@media (max-width: 999px) { html:lang(zh) .more h2 { font-size: 28px; } html:lang(zh) .more p { font-size: 1rem; } }
