/* ============================================================
   KET Digital, the home (2026-11-26): the tunnel in 53XV's static.
   Asad: keep the tunnel, made of the static the 53XV portfolio opens on, speeding up through the seven
   segments, and static out into the 53XV page, so the whole site is one theme. The look is 53XV's own:
   its ground (#07080c), its type (Schibsted Grotesk, Martian Mono, the same files as /studios/), one
   ember (#ff4f1f), a header and an instrument bar like its own. The scene is front.js; without it (no
   script, no WebGL) a still of the same tunnel stands behind the same words.
   ============================================================ */
@font-face { font-family: 'Schibsted Grotesk Variable'; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url('/assets/fonts/schibsted-grotesk-latin-wght.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Schibsted Grotesk Variable'; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url('/assets/fonts/schibsted-grotesk-latin-ext-wght.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Martian Mono Variable'; font-style: normal; font-display: swap; font-weight: 100 800; font-stretch: 75% 112.5%;
  src: url('/assets/fonts/martian-mono-latin-standard.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Martian Mono Variable'; font-style: normal; font-display: swap; font-weight: 100 800; font-stretch: 75% 112.5%;
  src: url('/assets/fonts/martian-mono-latin-ext-standard.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ground: #07080c; --ink: #eceae4; --dim: rgba(236, 234, 228, 0.66); --faint: rgba(236, 234, 228, 0.36); --line: rgba(236, 234, 228, 0.18);
  --ember: #ff4f1f; --ember-ink: #ff7a52;
  --u: min(100vw / 1440, 100svh / 900); --pad: clamp(16px, 2.6vw, 40px); --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: 'Schibsted Grotesk Variable', 'Schibsted Grotesk', system-ui, sans-serif;
  --mono: 'Martian Mono Variable', 'Martian Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--ground); color: var(--ink); }
body { margin: 0; font-family: var(--display); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
::selection { background: var(--ember); color: var(--ground); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--ink); color: var(--ground); padding: 10px 14px; }
.skip:focus { left: 8px; }
.tag { font: 450 10.5px/1.5 var(--mono); font-stretch: 87.5%; letter-spacing: 0.12em; text-transform: uppercase; }

/* the scene, and the still of it that stands in without script or WebGL */
canvas.gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
/* the still is fetched only when it is needed: no script, or no WebGL (front.js sets gl-off) */
.still { position: fixed; inset: 0; z-index: 0; background: var(--ground); }
html:not(.js) .still, html.gl-off .still { background: var(--ground) url('/assets/tunnel-still.webp') 64% 38% / cover no-repeat; }
@media (max-aspect-ratio: 9/10) { html:not(.js) .still, html.gl-off .still { background-image: url('/assets/tunnel-still-tall.webp'); background-position: 50% 24%; } }
.shade { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to top, rgba(7, 8, 12, 0.86), rgba(7, 8, 12, 0) 48%), radial-gradient(90% 70% at 0% 100%, rgba(7, 8, 12, 0.6), rgba(7, 8, 12, 0) 62%); }

/* the frame: name, menu and the button above (as on 53XV) */
.top { position: fixed; z-index: 6; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 22px; padding: 14px var(--pad); }
.top .name { font: 800 14px/1 var(--display); letter-spacing: -0.01em; text-transform: uppercase; margin-right: auto; text-decoration: none; }
.top nav { display: flex; gap: 20px; }
.top nav a { text-decoration: none; opacity: 0.88; } .top nav a:hover { opacity: 1; }
.top nav a[aria-current] { color: var(--ember-ink); opacity: 1; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 16px; border: 1px solid var(--line); color: var(--ink); background: transparent; text-decoration: none; cursor: pointer;
  font: 450 10.5px/1 var(--mono); font-stretch: 87.5%; letter-spacing: 0.12em; text-transform: uppercase; transition: border-color 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease); }
.btn:hover { border-color: var(--ink); }
.btn.solid { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.btn.solid:hover { background: #fff; }
.btn.ember { background: var(--ember); color: var(--ground); border-color: var(--ember); }
.btn .arr { width: 12px; height: 12px; }

/* the instruments below (as on 53XV): where you are, what is running, the time */
.inst { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; padding: 12px var(--pad); color: var(--dim); pointer-events: none;
  background: linear-gradient(to top, rgba(7, 8, 12, 0.7), rgba(7, 8, 12, 0)); }
.inst > :nth-child(2) { text-align: center; } .inst > :last-child { text-align: right; }
.inst b { color: var(--ink); font-weight: 450; }
html:not(.js) .inst { display: none; }

/* the essay over the tunnel */
main { position: relative; z-index: 2; }
.seg-s { min-height: 118svh; display: grid; align-content: end; padding: 0 var(--pad) calc(var(--pad) + 60px); }
.seg-s.first { min-height: 100svh; }
.seg { max-width: 66rem; display: grid; gap: 22px; }
.seg > .tag { color: var(--dim); } .seg > .tag i { font-style: normal; color: var(--ember-ink); }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.045em; line-height: 0.9; }
h1 { font-size: clamp(44px, calc(var(--u) * 120), 168px); max-width: 12ch; }
h2 { font-size: clamp(38px, calc(var(--u) * 96), 132px); max-width: 13ch; }
h1 .dim, h2 .dim { color: var(--faint); }
.lede { margin: 0; font-size: clamp(17px, calc(var(--u) * 21), 23px); line-height: 1.48; color: var(--dim); max-width: 42ch; }
.ledes { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.list { margin: 0; padding: 0; list-style: none; max-width: 40rem; }
.list li { display: flex; gap: 16px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--line); font-size: clamp(18px, calc(var(--u) * 25), 28px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.list li:last-child { border-bottom: 1px solid var(--line); }
.list li span { font: 450 10.5px/1 var(--mono); font-stretch: 87.5%; letter-spacing: 0.12em; color: var(--ember-ink); flex: none; width: 2.6em; }
.panel { border: 1px solid var(--line); padding: 18px 20px; background: rgba(7, 8, 12, 0.6); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); display: grid; gap: 10px; }
.sheet { max-width: 31rem; }
.sheet h3 { font-size: 26px; letter-spacing: -0.03em; }
.sheet ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.sheet ol li { display: flex; gap: 12px; color: var(--ink); } .sheet ol li::before { content: '✓'; color: var(--ember-ink); }
.sheet p { margin: 0; color: var(--dim); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; max-width: 62rem; }
.cards h3 { font-size: 32px; letter-spacing: -0.035em; }
.cards p { margin: 0; color: var(--dim); line-height: 1.48; }
html.js .seg { transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
html.js.motion .seg:not(.in) { opacity: 0; transform: translate3d(0, 28px, 0); }

/* the end of the page */
.end { position: relative; z-index: 2; padding: 40px var(--pad) 72px; border-top: 1px solid var(--line); display: grid; gap: 18px; color: var(--dim); background: rgba(7, 8, 12, 0.72); }
.end .name { font: 800 clamp(40px, calc(var(--u) * 110), 150px)/0.86 var(--display); letter-spacing: -0.05em; color: var(--ink); }
.end .name i { font-style: normal; color: var(--ember); }
.end nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.end nav a { text-decoration: none; } .end nav a:hover { color: var(--ink); }
.end p { margin: 0; }

/* on the way into 53XV everything but the scene steps aside */
body.gone main, body.gone .top, body.gone .inst, body.gone .end, body.gone .shade { opacity: 0; pointer-events: none; transition: opacity 0.6s var(--ease); }

@media (max-width: 760px) {
  .top { gap: 12px; } .top nav { display: none; }
  .inst { grid-template-columns: 1fr 1fr; } .inst > :nth-child(2) { display: none; }
  .seg-s { padding-bottom: calc(var(--pad) + 48px); }
}
@media (prefers-reduced-motion: reduce) { html.js .seg { transition: none; } }
