/* ============================================================
   rayul.ca — shared styles
   One typeface, one ground, credits over chrome.
   ============================================================ */
:root {
  --ground: #000;
  --ink: #f2f2f0;
  --ink-2: #d6d7d9;
  --quiet: #a9aaad;
  --dim: #6b6c70;
  --line: #222224;
  --line-2: #18181a;
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --pad: 40px;
  --small: 13px;
  --role: #c4140a;
}
@media (max-width: 700px) {
  :root { --pad: 20px; --small: 12px; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
button { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; }
:focus-visible { outline: 1px solid #fff; outline-offset: 3px; }
.small { font-size: var(--small); letter-spacing: 0.04em; line-height: 1.5; }
.quiet { color: var(--quiet); }
.dim { color: var(--dim); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--pad) 0;
  font-size: var(--small); letter-spacing: 0.04em;
  position: relative; z-index: 5;
}
.site-header a { padding: 12px 0; }
.site-header .brand { font-weight: 500; }
.site-header nav { display: flex; gap: 32px; }
.site-header nav a { color: var(--quiet); }
.site-header nav a[aria-current="page"] { color: var(--ink); }
.site-header.overlay { position: fixed; top: 0; left: 0; right: 0; }
@media (max-width: 700px) {
  .site-header { padding-top: 8px; }
  .site-header a { padding: 14px 0; }
  .site-header nav { gap: 20px; }
}

/* ---------- logo marquee ---------- */
.mq {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.mq-track { display: flex; align-items: center; width: max-content; animation: mq var(--mq-dur, 48s) linear infinite; }
.mq-track img { height: var(--mq-h, 20px); width: auto; margin-right: var(--mq-gap, 28px); opacity: 0.75; }
@keyframes mq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .mq-track { animation: none; } }

/* ---------- player overlay ---------- */
.player {
  position: fixed; inset: 0; z-index: 50;
  background: #000;
  display: none;
  font-size: var(--small); letter-spacing: 0.04em;
}
.player.is-open { display: block; }
.player-top {
  position: absolute; top: 20px; left: var(--pad); right: var(--pad);
  display: flex; justify-content: space-between; align-items: center;
}
.player-close { padding: 12px 0; display: flex; gap: 10px; align-items: center; }
.player-stage {
  position: absolute; left: 50%; top: 76px; transform: translateX(-50%);
  width: min(1040px, calc(100vw - 2 * var(--pad)), calc((100vh - 280px) * 16 / 9));
}
.player-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.player-frame img, .player-frame iframe, .player-frame .yt-host { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.player-frame iframe { pointer-events: none; }
.player-frame .click-catch { position: absolute; inset: 0; z-index: 2; }
.player-controls { display: flex; align-items: center; gap: 24px; }
.ctl { padding: 12px 0; color: var(--quiet); display: flex; align-items: center; gap: 8px; }
.ctl:hover { color: #fff; }
.ctl.play { color: var(--ink); }
.scrub { flex: 1 1 auto; height: 24px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.scrub-bar { position: relative; width: 100%; height: 2px; background: #2e2f33; }
.scrub-fill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: var(--ink); }
.scrub-head { position: absolute; top: -4px; width: 1px; height: 10px; background: #fff; left: 0; }
.tc { color: var(--quiet); min-width: 92px; text-align: right; }
.player-foot {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 36px;
  width: min(1040px, calc(100vw - 2 * var(--pad)));
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px;
}
.player-title { margin: 0 0 10px; font-size: 32px; font-weight: 500; letter-spacing: -0.01em; line-height: 1; }
.player-nav { display: flex; gap: 32px; }
.player-nav button { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 6px 0; text-align: right; }
.player-nav button[disabled] { visibility: hidden; }
.player-nav .lbl { color: var(--dim); }
.player-nav .prev .ttl { color: var(--quiet); }
.only-mobile { display: none; }
@media (max-width: 700px) {
  .only-desktop { display: none !important; }
  .only-mobile { display: inline; }
  .player-top { top: 8px; }
  .player-close { padding: 14px 0; }
  .player-stage { left: 0; right: 0; transform: none; width: 100%; top: 50%; margin-top: -150px; }
  .player-controls { gap: 16px; padding: 0 var(--pad); }
  .ctl { padding: 14px 0; }
  .tc { min-width: 0; }
  .player-foot { left: var(--pad); right: var(--pad); width: auto; transform: none; bottom: 24px; flex-direction: column; align-items: stretch; gap: 20px; }
  .player-title { font-size: 26px; line-height: 1.05; margin-bottom: 8px; }
  .player-nav { justify-content: space-between; border-top: 1px solid #2a2b2e; }
  .player-nav button { flex-direction: row; gap: 10px; padding: 14px 0; }
  .player-nav .prev .ttl { display: none; }
}
/* pseudo full screen (iPhone fallback for YouTube) */
.player.is-pseudo-fs .player-stage { top: 0; left: 0; right: 0; bottom: 0; width: 100vw; margin: 0; transform: none; height: 100%; display: flex; flex-direction: column; justify-content: center; background: #000; z-index: 3; }
.player.is-pseudo-fs .player-frame { max-height: calc(100% - 48px); }
.player-stage:fullscreen { position: static; transform: none; width: 100vw; height: 100vh; margin: 0; display: flex; flex-direction: column; justify-content: center; background: #000; }
.player-stage:fullscreen .player-frame,
.player.is-pseudo-fs .player-frame { width: min(100vw, calc((100% - 48px) * 16 / 9)); width: min(100vw, calc((100vh - 48px) * 16 / 9)); margin: 0 auto; }
.player-stage:fullscreen .player-controls { padding: 0 var(--pad); }
.player.is-pseudo-fs .player-controls { padding: 0 var(--pad); }
.player.is-pseudo-fs .player-foot, .player.is-pseudo-fs .player-top { display: none; }
.player .poster { transition: opacity 0.5s ease; }
