/* fyonce brand basics, shared by all game pages */
:root {
  --paper: #f2e9da;
  --linen: #e6d8bf;
  --ink: #3b1219;
  --burgundy: #7b1e2e;
  --burgundy-dark: #5c1421;
  --blue: #a9c7e4;
  --blue-dark: #6f93bd;
  --matcha: #8fb35a;
  --muted: #8a6d66;
  --line: rgba(59, 18, 25, .16);

  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --body: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", "SF Mono", Menlo, monospace;
  --hand: "Reenie Beanie", "Comic Sans MS", cursive;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .23 0 0 0 0 .07 0 0 0 0 .1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --linen-weave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Crect width='6' height='6' fill='%23ece0c8'/%3E%3Crect width='6' height='2' fill='%23f7efe0'/%3E%3Crect width='2' height='6' fill='%23d9c9ab' opacity='.6'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--paper) var(--grain);
  color: var(--ink);
  font-family: var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--burgundy); color: var(--paper); }
a { color: inherit; }

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(16px, 4vw, 48px) 0;
}
.logo { font: 36px/1 var(--hand); color: var(--burgundy); text-decoration: none; display: inline-block; transform: rotate(-4deg); }
.bracket {
  font: 500 12px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--burgundy);
  text-decoration: none;
  white-space: nowrap;
}
a.bracket:hover { color: var(--blue-dark); }
.label {
  margin: 0 0 14px 4px;
  font: 12px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* photo cloth patches */
.patch { position: absolute; display: block; transform: rotate(var(--r, 0deg)); transition: transform .35s cubic-bezier(.2, .8, .2, 1.4); }
.patch:hover { transform: rotate(calc(var(--r, 0deg) * -1)) scale(1.08); }
/* draggable patches (see shared/decor.js) */
.patch { touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
body > .patch.free { position: absolute; right: auto; bottom: auto; margin: 0; }
.patch.dragging { cursor: grabbing; transform: rotate(calc(var(--r, 0deg) * -1)) scale(1.12); }
.patch img { display: block; width: 100%; height: auto; filter: drop-shadow(0 4px 5px rgba(59, 18, 25, .28)); pointer-events: none; }
.patch-text { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }

/* stitched light blue ribbon */
.ribbon {
  position: relative;
  z-index: 3;
  width: 106vw;
  margin: 8px 0 8px -3vw;
  overflow: hidden;
  transform: rotate(-2deg);
  background: var(--blue) var(--grain);
  box-shadow: 0 8px 16px -10px rgba(59, 18, 25, .45);
}
.ribbon::before, .ribbon::after { content: ""; position: absolute; left: 0; right: 0; border-top: 2px dashed rgba(255, 255, 255, .9); pointer-events: none; }
.ribbon::before { top: 6px; }
.ribbon::after { bottom: 6px; }
.ribbon__track { display: inline-flex; align-items: center; white-space: nowrap; padding: 14px 0 12px; animation: ribbon 40s linear infinite; font: 30px/1 var(--hand); color: var(--burgundy); }
.ribbon__track span { padding: 0 22px; }
.ribbon__track i { font-style: normal; font-size: 18px; color: var(--paper); }
@keyframes ribbon { to { transform: translateX(-50%); } }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
  padding: 40px clamp(16px, 4vw, 48px) 28px;
  border-top: 1px solid var(--line);
  font: 11px/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .ribbon__track { animation: none; }
  .patch { transition: none; }
}
