/* =========================================================
   Luralura — Home / The Board
   Palette sampled from "The Transparent Self & My Friends"
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body.home {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #ece5d8;
  color: #171029;
  font-family: "Manrope", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: #c8400a; color: #fdf6e8; }

.sr {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- canvas ---------- */
#board {
  position: fixed; inset: 0;
  display: block; width: 100%; height: 100%;
  z-index: 1;
}

/* ---------- atmosphere ---------- */
.glass {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(90% 70% at 14% 2%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 62%),
    radial-gradient(120% 110% at 50% 50%, rgba(70, 40, 20, 0) 52%, rgba(58, 32, 18, .16) 100%);
}

.grain {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  opacity: .30;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.42'/></svg>");
  background-size: 160px 160px;
}

.frame {
  position: fixed; z-index: 4; pointer-events: none;
  inset: clamp(9px, 1.2vw, 18px);
  border: 1px solid rgba(23, 16, 41, .10);
}

/* ---------- header ---------- */
.top {
  position: fixed; z-index: 6;
  top: 0; left: 0; right: 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px;
  padding: clamp(20px, 2.6vw, 38px) clamp(20px, 3vw, 44px);
  pointer-events: none;
}
.top a { pointer-events: auto; }

.brand {
  display: inline-flex; flex-direction: column; gap: 5px;
  text-decoration: none; color: inherit;
  text-shadow: 0 0 10px rgba(236, 229, 216, .95), 0 0 24px rgba(236, 229, 216, .85), 0 0 40px rgba(236, 229, 216, .6);
}
.brand-name {
  font-family: "Manrope", sans-serif;
  font-weight: 700; font-size: 16px; letter-spacing: -.015em; line-height: 1;
}
.brand-sub {
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(23, 16, 41, .58); font-weight: 500;
}

/* ---------- labels riding the ribbons ---------- */
.labels {
  position: fixed; inset: 0; z-index: 5;
  pointer-events: none;
  opacity: 1;
}

.rl {
  position: absolute; top: 0; left: 0;
  display: inline-flex; align-items: baseline; gap: .78em;
  white-space: nowrap;
  text-decoration: none;
  transform-origin: 0 50%;
  pointer-events: auto;
  will-change: transform;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  color: #fffdf7;
  text-shadow:
    0 1px 2px rgba(25, 10, 32, .58),
    0 0 7px rgba(25, 10, 32, .42),
    0 0 18px rgba(25, 10, 32, .28);
  filter: drop-shadow(0 3px 8px rgba(25, 10, 32, .16));
  transition: letter-spacing .45s ease;
}
.rl:hover { letter-spacing: .012em; }

.rl-n {
  font-size: 9.5px; letter-spacing: .16em; font-weight: 500;
  opacity: .72; font-variant-numeric: tabular-nums;
}
.rl-t {
  font-family: "Manrope", sans-serif;
  font-weight: 600;
  font-size: clamp(15px, 1.52vw, 25px);
  letter-spacing: -.012em;
  line-height: 1.15;
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.rl:hover .rl-t,
.rl:focus-visible .rl-t { border-bottom-color: currentColor; }
.rl.is-hot .rl-t { border-bottom-color: currentColor; }
.rl:focus-visible { outline: none; }
.rl:focus-visible .rl-n { opacity: 1; }

/* ---------- footer ---------- */
.foot {
  position: fixed; z-index: 6;
  bottom: 0; left: 0; right: 0;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: clamp(18px, 2.4vw, 32px) clamp(20px, 3vw, 44px);
  font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(23, 16, 41, .55); font-weight: 500;
  pointer-events: none;
}
.foot span { display: inline-block; }
.foot .dot { color: #c8400a; padding: 0 .5em; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .rl { gap: .6em; }
  .rl-t { font-size: 13.5px; letter-spacing: -.005em; }
  .rl-n { font-size: 8.5px; }
  .brand-name { font-size: 14px; }
  .foot { font-size: 8.5px; letter-spacing: .1em; }
  .foot .long { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .labels { transition-duration: .01s; }
}


/* ---------- zoomed work ---------- */
.top, .foot {
  transition: opacity .45s ease, visibility .45s ease;
}
.is-zoomed .top, .is-zoomed .foot {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.is-zoomed .top a { pointer-events: none; }

.detail {
  position: fixed; inset: 0; z-index: 7;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.detail-stage {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(64px, 9vh, 90px) clamp(66px, 8vw, 118px);
  will-change: transform;
}
.detail-image {
  display: block;
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  background: rgba(255, 253, 246, .22);
  box-shadow: 0 20px 55px rgba(32, 15, 35, .15);
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  transition: opacity .24s ease, transform .24s ease;
  pointer-events: none;
}
.detail-image.is-changing {
  opacity: 0;
  transform: translate3d(0, 8px, 0) scale(.992);
}
.detail-arrow {
  position: fixed; z-index: 8;
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 64px;
  border: 0;
  background: rgba(255, 251, 242, .26);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(23, 16, 41, .72);
  font: 400 40px/1 "Manrope", sans-serif;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.detail-arrow:hover {
  background: rgba(255, 251, 242, .64);
  color: #171029;
}
.detail-prev { left: clamp(12px, 2vw, 28px); }
.detail-next { right: clamp(12px, 2vw, 28px); }
.detail-close {
  position: fixed; z-index: 8;
  top: clamp(20px, 2.6vw, 34px); right: clamp(20px, 3vw, 40px);
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(23, 16, 41, .16);
  background: rgba(255, 251, 242, .58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #171029;
  font: 400 25px/1 "Manrope", sans-serif;
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
}
.detail-close:hover { background: rgba(255, 251, 242, .88); transform: rotate(8deg); }

@media (max-width: 760px) {
  .detail-stage { padding: 68px 18px 76px; }
  .detail-arrow {
    top: auto; bottom: 18px; transform: none;
    width: 52px; height: 46px;
    background: rgba(255, 251, 242, .42);
  }
  .detail-prev { left: 18px; }
  .detail-next { right: 18px; }
  .detail-close { width: 34px; height: 34px; font-size: 22px; }
}
