/* HALWA concept: black and white, flat, quiet. One typeface. Motion uses transform/opacity only. */
/* Geist, self-hosted: one 29 KB variable file covers every weight (no Google Fonts round trips) */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 800; font-display: swap; src: url("fonts/geist-latin.woff2") format("woff2"); }
:root {
  --ink: #0a0a0a;
  --paper: #f1f0eb;
  --dim: #8c8b86;
  --faint: #4b4b48;
  --rule: #232322;
  --rule-l: #d9d8d2;     /* hairline on white */
  --dim-l: #6b6a65;      /* secondary text on white */
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  /* sizes grow with the screen but level off early, so 1440p / 4K show more, not just bigger */
  --gutter: clamp(16px, 2vw, 40px);
  --bar: clamp(52px, 3.4vw, 68px);
  --fs-small: clamp(12px, .25vw + 9px, 15px);
  --fs-body: clamp(14px, .3vw + 10px, 18px);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--ink); color: var(--paper); -webkit-font-smoothing: antialiased; }
/* no visible scrollbars anywhere; scrolling (wheel, touch, keys) still works */
html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
::-webkit-scrollbar { display: none; width: 0; height: 0; }
body { font-family: var(--sans); font-size: var(--fs-body); line-height: 1.5; background: var(--ink); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; -webkit-user-drag: none; user-select: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--paper); color: var(--ink); }
.small { font-size: var(--fs-small); color: var(--dim); }
.dia::before { content: "\2726"; margin-right: .55em; font-size: .85em; }

/* ---------- top bar: tabs + always-visible links ---------- */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--bar); display: flex; align-items: stretch; justify-content: space-between; background: var(--ink); border-bottom: 1px solid var(--rule); }
.bar-l, .bar-r { display: flex; align-items: stretch; }
.brand { display: flex; align-items: center; padding: 0 var(--gutter); font-weight: 700; letter-spacing: .08em; font-size: clamp(15px, .4vw + 10px, 20px); }
.tab, .ext { position: relative; display: flex; align-items: center; padding: 0 clamp(12px, 1.3vw, 30px); font-size: clamp(13px, .25vw + 10px, 16px); color: var(--dim); transition: color .25s; }
.tab { border-left: 1px solid var(--rule); }
.tab:hover, .tab.on, .ext:hover { color: var(--paper); }
.tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--paper); }
.ext { padding: 0 clamp(8px, .8vw, 18px); }
.ext:last-child { padding-right: var(--gutter); }
.ext::after { content: "\2197"; margin-left: .3em; font-size: .8em; opacity: .5; }

/* ---------- entrance: transform-only ---------- */
@keyframes up { from { transform: translateY(var(--y, 28px)); opacity: 0; } }
@keyframes rise { from { transform: translateY(110%); } }
.in { animation: up .9s var(--ease) both; animation-delay: var(--d, 0s); }
/* extra bottom room so descenders (g, y, p) are never clipped by the mask */
.chars { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .28em; margin-bottom: -.28em; }
.chars span { display: inline-block; animation: rise 1s var(--ease) both; animation-delay: calc(var(--d, 0s) + var(--i) * 40ms); }

/* ---------- ticker ---------- */
.ticker { overflow: hidden; white-space: nowrap; user-select: none; }
.ticker-track { display: inline-flex; animation: tick var(--dur, 40s) linear infinite; }
/* no flex gap: it would also push the ✦ away from the text and make the spacing lopsided */
.ticker-item { display: inline-flex; align-items: center; padding: 1em 0; font-size: var(--fs-small); line-height: 1; }
.ticker-item img { width: 22px; height: 22px; flex: none; margin-right: .7em; }
.ticker-item::after { content: "\2726"; margin: 0 clamp(18px, 2vw, 40px); opacity: .35; font-size: .8em; line-height: 1; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- vertical stripe page transition ---------- */
.stripes { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: repeat(6, 1fr); pointer-events: none; }
/* stripes overlap by 1px so no hairline gaps show between them */
.stripes i { margin: 0 -1px; background: var(--paper); transform-origin: top; animation: stripe-open .75s var(--ease-io) both; will-change: transform; }
.stripes i:nth-child(even) { transform-origin: bottom; }
/* baked motion blur: a soft fading tail on each stripe's moving edge. It's a static gradient that
   scales with the stripe, so it costs nothing per frame, and the long edge stays softest mid-move
   when the stripe is moving fastest, then shrinks away as it settles. */
.stripes i { position: relative; }
.stripes i::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 22vh; pointer-events: none;
  background: linear-gradient(to bottom, rgba(241,240,235,.9), rgba(241,240,235,.55) 22%, rgba(241,240,235,.25) 48%, rgba(241,240,235,.08) 75%, rgba(241,240,235,0)); }
.stripes i:nth-child(even)::after { top: auto; bottom: 100%; transform: scaleY(-1); }
.stripes i:nth-child(1), .stripes i:nth-child(6) { animation-delay: .05s; }
.stripes i:nth-child(2), .stripes i:nth-child(5) { animation-delay: .11s; }
.stripes i:nth-child(3), .stripes i:nth-child(4) { animation-delay: .17s; }
.stripes.close i { animation: stripe-close .5s var(--ease-io) both; }
.stripes.close i:nth-child(3), .stripes.close i:nth-child(4) { animation-delay: 0s; }
.stripes.close i:nth-child(2), .stripes.close i:nth-child(5) { animation-delay: .05s; }
.stripes.close i:nth-child(1), .stripes.close i:nth-child(6) { animation-delay: .1s; }
@keyframes stripe-open { from { transform: scaleY(1); } to { transform: scaleY(0); } }
@keyframes stripe-close { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- custom circle crosshair cursor (mouse/trackpad only) ---------- */
@media (pointer: fine) {
  html.has-cursor, html.has-cursor * { cursor: none !important; }
}
.cursor { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; mix-blend-mode: difference; color: #fff; }
.cursor-ring { position: absolute; left: -17px; top: -17px; width: 34px; height: 34px; border: 1px solid currentColor; border-radius: 50%; transition: transform .35s var(--ease), background-color .25s; }
.cursor-x { position: absolute; left: 0; top: 0; }
.cursor-x::before, .cursor-x::after { content: ""; position: absolute; background: currentColor; transition: transform .3s var(--ease); }
.cursor-x::before { left: -6px; top: 0; width: 12px; height: 1px; }
.cursor-x::after { left: 0; top: -6px; width: 1px; height: 12px; }
.cursor.hover .cursor-ring { transform: scale(1.9); }
.cursor.hover .cursor-x::before, .cursor.hover .cursor-x::after { transform: scale(.4); }
.cursor.drag .cursor-ring { transform: scale(1.5, .8); }
.cursor.down .cursor-ring { transform: scale(.75); }
.cursor.hide { opacity: 0; }
/* older devices: the blend mode makes the GPU re-read the moving page under the cursor every frame,
   so use a plain white cursor with a dark edge instead (still visible on white and black) */
.perf-low .cursor { mix-blend-mode: normal; }
.perf-low .cursor-ring { box-shadow: 0 0 0 1px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.45); }
.perf-low .cursor-x::before, .perf-low .cursor-x::after { box-shadow: 0 0 0 1px rgba(0,0,0,.45); }

/* ---------- viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 80; display: none; background: #080808; touch-action: none; }
/* page behind an open viewer: hidden (after the viewer fades in) so the browser stops drawing it */
.viewing-hide body > :not(.viewer):not(.cursor):not(.stripes) { visibility: hidden; }
.viewing body * { animation-play-state: paused; }
.viewing .viewer, .viewing .viewer *, .viewing .cursor, .viewing .cursor *, .viewing .stripes, .viewing .stripes * { animation-play-state: running; }
.viewer.open { display: block; animation: vfade .14s ease-out both; }
@keyframes vfade { from { opacity: 0; } }
.viewer-box { position: absolute; overflow: hidden; }
.viewer-zoom { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.viewer-zoom img, .viewer-zoom video { width: 100%; height: 100%; object-fit: contain; }
.viewer-btn { position: absolute; z-index: 2; width: clamp(40px, 2.4vw, 52px); aspect-ratio: 1; display: grid; place-items: center; background: rgba(10, 10, 10, .7); border: 1px solid var(--rule); font-size: clamp(16px, .4vw + 11px, 20px); transition: background .2s, color .2s; }
.viewer-btn:hover { background: var(--paper); color: var(--ink); }
.v-close { top: var(--gutter); right: var(--gutter); }
.v-prev { left: var(--gutter); top: 50%; transform: translateY(-50%); }
.v-next { right: var(--gutter); top: 50%; transform: translateY(-50%); }
.v-cap { position: absolute; left: var(--gutter); top: var(--gutter); max-width: calc(100% - 2 * var(--gutter) - 64px); font-size: var(--fs-small); color: var(--dim); line-height: clamp(40px, 2.4vw, 52px); }
.v-hint { position: absolute; left: 50%; bottom: var(--gutter); transform: translateX(-50%); font-size: var(--fs-small); color: var(--faint); }

@media (max-width: 560px) {
  .brand { display: none; }
  .tab:first-child { border-left: 0; }
  .tab { padding: 0 11px; font-size: 13px; }
  .ext { padding: 0 7px; font-size: 13px; }
  .ext::after { display: none; }
  .v-prev, .v-next { top: auto; bottom: var(--gutter); transform: none; }
  .v-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; }
}
