/*
 * Freya's website: the Activity's look (bot/activity/src/style.css). A velvet playmat on a dark
 * table under one warm lamp, its edge stitched in gilt; Marcellus SC for names, Barlow Semi
 * Condensed for the small print. Everything is hosted here: no outside fonts, scripts or images.
 * Nothing flashes or sweeps: the sigil's points fade in once, slowly, and stay.
 */

@font-face {
  font-family: "Marcellus SC";
  src: url("/fonts/marcellus-sc.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/fonts/barlow-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/fonts/barlow-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/fonts/barlow-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/fonts/barlow-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --table: #040206;
  --velvet: #120c1a;
  --velvet-hi: #2a1d38;
  --ivory: #eee6d8;
  --gilt: #c9a96a;
  --gilt-dim: #7d6a49;
  --lavender: #8f86e8;
  --freya: #7f77dd;
  --muted: #a89db4;
  --lamp: #f2e4c9;
  --ink: #3b2f22;
  --ink-soft: #7a6a52;

  --display: "Marcellus SC", "Palatino Linotype", Palatino, serif;
  --ui: "Barlow Semi Condensed", "Bahnschrift", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--table);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ivory);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.55;
  background: radial-gradient(ellipse 120% 80% at 50% 0%, #0c0812, var(--table) 75%) fixed;
  overflow-x: hidden;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gilt);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  -webkit-user-drag: none;
}

/* ---------- The mat: velvet under the lamp, raised off the table, stitched in gilt ---------- */

.mat {
  position: relative;
  max-width: 1120px;
  margin: 12px auto;
  border-radius: 26px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 760px 560px at 50% 210px, color-mix(in oklab, var(--lamp) 15%, transparent) 0%, color-mix(in oklab, var(--lamp) 5%, transparent) 45%, transparent 75%),
    radial-gradient(ellipse 130% 900px at 50% 220px, var(--velvet-hi) 0%, var(--velvet) 55%, #0a0610 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.75),
    0 18px 50px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 240, 220, 0.05),
    inset 0 0 70px rgba(0, 0, 0, 0.5);
}
/* The gilt stitching just inside the edge. */
.mat::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px dashed rgba(201, 169, 106, 0.22);
  border-radius: 17px;
  pointer-events: none;
}
/* The nap of the velvet: fine static grain. */
.mat::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 1.2 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.inner {
  position: relative;
  padding: 26px 46px 30px;
}

/* ---------- The bar: Freya's star and name, a way home ---------- */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gilt);
}
.brand svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.bar nav {
  display: flex;
  gap: 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.bar nav a {
  color: var(--muted);
  text-decoration: none;
}
.bar nav a:hover,
.bar nav a[aria-current="page"] {
  color: var(--ivory);
}

/* ---------- The hero: the summoning circle pressed into the velvet, lit up the ladder ---------- */

.hero {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 18px 0 8px;
}

/* The table: the circle pressed into the velvet, a hand of cards lying on it. */
.spread {
  --fc: 150px;
  --step: calc(var(--fc) * 0.62);
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  margin-top: 6px;
}
.sigil {
  width: calc(var(--fc) * 3.3);
  max-width: 100%;
  aspect-ratio: 1;
  overflow: visible;
}

.fan {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fan li {
  grid-area: 1 / 1;
  width: var(--fc);
  transform-origin: 50% 110%;
  animation: settle 1s ease-out both;
}
.fan img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 4px rgba(5, 2, 10, 0.55)) drop-shadow(0 16px 22px rgba(5, 2, 10, 0.6));
  transition: translate 0.35s ease-out;
}
.fan li:hover img {
  translate: 0 -10px;
}
.fan li:nth-child(1) { z-index: 1; translate: calc(var(--step) * -2) 24px; rotate: -14deg; animation-delay: 0.1s; }
.fan li:nth-child(2) { z-index: 2; translate: calc(var(--step) * -1) 6px; rotate: -7deg; animation-delay: 0.2s; }
.fan li:nth-child(3) { z-index: 3; translate: 0 -6px; scale: 1.06; animation-delay: 0.3s; }
.fan li:nth-child(4) { z-index: 2; translate: var(--step) 6px; rotate: 7deg; animation-delay: 0.2s; }
.fan li:nth-child(5) { z-index: 1; translate: calc(var(--step) * 2) 24px; rotate: 14deg; animation-delay: 0.1s; }
@keyframes settle {
  from {
    opacity: 0;
  }
}
/* Pressed: a shade darker than the cloth, the faintest light on the lower lip of each groove. */
.sigil .press {
  fill: none;
  stroke: rgba(4, 1, 8, 0.5);
  stroke-width: 1.2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 0 rgba(255, 236, 214, 0.06));
}
/* The eight points, Common at the top and clockwise to Glorious, each in its rarity's colour. */
.sigil .pt {
  stroke: color-mix(in oklab, var(--pt) 70%, #000);
  stroke-width: 0.8;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  fill: color-mix(in oklab, var(--pt) 55%, transparent);
}
.sigil .glow {
  fill: var(--pt);
  opacity: 0.55;
}
.sigil .hub {
  fill: var(--gilt);
}
.sigil [data-r="0"] { --pt: #8a8f99; }
.sigil [data-r="1"] { --pt: #2f9e63; }
.sigil [data-r="2"] { --pt: #3a6fd8; }
.sigil [data-r="3"] { --pt: #9646de; }
.sigil [data-r="4"] { --pt: #d6ac52; }
.sigil [data-r="5"] { --pt: #c9d0de; }
.sigil [data-r="6"] { --pt: #7a4cf0; }
.sigil [data-r="7"] { --pt: #efb8ff; }

/* Lit once, a point at a time up the ladder, each fading in slowly; never again. */
.sigil .lit {
  animation: light 1.1s ease-out both;
}
.sigil .lit:nth-child(1) { animation-delay: 0.4s; }
.sigil .lit:nth-child(2) { animation-delay: 0.65s; }
.sigil .lit:nth-child(3) { animation-delay: 0.9s; }
.sigil .lit:nth-child(4) { animation-delay: 1.15s; }
.sigil .lit:nth-child(5) { animation-delay: 1.4s; }
.sigil .lit:nth-child(6) { animation-delay: 1.65s; }
.sigil .lit:nth-child(7) { animation-delay: 1.9s; }
.sigil .lit:nth-child(8) { animation-delay: 2.15s; }
@keyframes light {
  from {
    opacity: 0;
  }
}

.eyebrow {
  margin: 22px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--gilt) 85%, transparent);
}
h1 {
  margin: 6px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(46px, 9vw, 76px);
  line-height: 1;
  letter-spacing: 0.22em;
  /* The tracking pads the last letter's right; this keeps the word centred. */
  padding-left: 0.22em;
  color: var(--ivory);
  text-shadow: 0 2px 24px rgba(242, 228, 201, 0.12);
}
.lede {
  max-width: 34em;
  margin: 18px 0 0;
  font-size: 19px;
  color: color-mix(in oklab, var(--ivory) 88%, transparent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 14px;
  margin-top: 28px;
}

/* The one big button: a gilt edge, brighter along its top where the lamp catches it. */
.button {
  position: relative;
  display: inline-block;
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--ivory);
  background:
    linear-gradient(180deg, #33244a, #1c1329) padding-box,
    linear-gradient(180deg, #ecd8a6, #a3854c 45%, #6c5531) border-box;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 14px 30px 13px;
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 210, 0.16),
    0 12px 30px rgba(0, 0, 0, 0.5);
  transition:
    translate 0.2s,
    box-shadow 0.25s,
    filter 0.25s;
}
.button::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(201, 169, 106, 0.22);
  border-radius: 4px;
  pointer-events: none;
}
.button:hover {
  translate: 0 -1px;
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 210, 0.2),
    0 14px 34px rgba(0, 0, 0, 0.55),
    0 0 26px color-mix(in oklab, var(--gilt) 16%, transparent);
}

/* The quieter way: a rounded control on the table's edge. */
.ghost {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory);
  background: rgba(16, 10, 24, 0.6);
  border: 1px solid rgba(238, 230, 216, 0.18);
  border-radius: 999px;
  padding: 13px 22px;
  transition:
    border-color 0.2s,
    background-color 0.2s;
}
.ghost:hover {
  border-color: color-mix(in oklab, var(--gilt) 60%, transparent);
  background: rgba(30, 20, 44, 0.75);
}

.note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Zones stitched into the mat, like a playmat's ---------- */

.zone {
  margin: 0;
  min-width: 0;
  padding: 18px 20px 20px;
  border: 1px dashed rgba(201, 169, 106, 0.24);
  border-radius: 16px;
}
.zone legend {
  margin-left: 6px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--gilt) 75%, transparent);
}

.ladder {
  margin-top: 46px;
}
.ladder ol {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.ladder li {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--muted);
}
.ladder img {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}
.ladder li:last-child {
  color: #f3d9fb;
}
.ladder p {
  margin: 14px 4px 0;
  font-size: 15px;
  text-align: center;
  color: var(--muted);
}

.zones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.zones .zone {
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: start;
  column-gap: 14px;
}
.zones img {
  width: 40px;
  height: 40px;
  margin-top: 2px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}
.zones h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.25;
  color: var(--ivory);
}
.zones p {
  grid-column: 1 / -1;
  margin: 10px 0 0;
  font-size: 16px;
  color: color-mix(in oklab, var(--ivory) 80%, transparent);
}
/* A command, as the Activity labels them. */
.cmd {
  font-weight: 600;
  white-space: nowrap;
  color: #c3bdf6;
  background: rgba(127, 119, 221, 0.16);
  border-radius: 4px;
  padding: 0 5px;
}

/* ---------- The foot of the mat ---------- */

.foot {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px dashed rgba(201, 169, 106, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.foot nav a {
  text-decoration: none;
}
.foot nav a:hover {
  color: var(--ivory);
}
.foot p {
  margin: 0;
}

/* ---------- Terms and Privacy: cream paper laid on the velvet, as the rules booklet ---------- */

.paper {
  max-width: 760px;
  margin: 26px auto 0;
  padding: 44px 52px 40px;
  color: var(--ink);
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.36  0 0 0 0 0.25  0 0 0 0.16 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    linear-gradient(170deg, #f6efe2 0%, #ece2cf 60%, #e1d4bb 100%);
  border-radius: 6px;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.55),
    0 3px 10px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(120, 100, 70, 0.18);
  font-size: 16.5px;
  line-height: 1.6;
}
.paper h1 {
  padding: 0;
  font-size: clamp(30px, 6vw, 40px);
  letter-spacing: 0.08em;
  color: #2b1d3a;
  text-shadow: none;
}
.paper .dated {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.paper .summary {
  margin: 22px 0 0;
  padding: 14px 18px;
  border: 1px dashed rgba(120, 100, 70, 0.45);
  border-radius: 6px;
  font-size: 15.5px;
}
.paper h2 {
  margin: 34px 0 0;
  padding-top: 18px;
  border-top: 1px dashed rgba(120, 100, 70, 0.35);
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.25;
  color: #2b1d3a;
}
.paper h3 {
  margin: 20px 0 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5b4a33;
}
.paper p,
.paper ul {
  margin: 10px 0 0;
}
.paper ul {
  padding-left: 1.25em;
}
.paper li + li {
  margin-top: 5px;
}
.paper a {
  color: #4d3f9e;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.paper strong {
  font-weight: 600;
  color: #2b1d3a;
}
.paper .cmd {
  color: #463b9a;
  background: rgba(127, 119, 221, 0.14);
}
.paper .seal {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 0 16px;
  padding: 10px;
  border-radius: 50%;
  fill: #f6efe2;
  background: radial-gradient(circle at 35% 30%, #9a90ea, #5248a8 72%);
  box-shadow:
    0 1px 3px rgba(40, 20, 60, 0.5),
    inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

/* ---------- Widths ---------- */

@media (max-width: 899px) {
  .spread {
    --fc: 128px;
  }
  .zones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ladder ol {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 16px;
  }
}

@media (max-width: 599px) {
  body {
    font-size: 16px;
  }
  .mat {
    margin: 8px;
    border-radius: 20px;
  }
  .mat::before {
    inset: 9px;
    border-radius: 13px;
  }
  .inner {
    padding: 22px 22px 24px;
  }
  .bar nav {
    gap: 14px;
    font-size: 11px;
    letter-spacing: 0.18em;
  }
  .lede {
    font-size: 17px;
  }
  /* Three cards on a phone, the Glorious still in the middle. */
  .spread {
    --fc: 104px;
    --step: calc(var(--fc) * 0.66);
  }
  .fan li:nth-child(1),
  .fan li:nth-child(5) {
    display: none;
  }
  .actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 340px;
  }
  .button,
  .ghost {
    justify-content: center;
    text-align: center;
  }
  .zones {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .zone {
    padding: 14px 14px 16px;
  }
  .ladder img {
    width: 40px;
    height: 40px;
  }
  .ladder li {
    font-size: 11px;
    letter-spacing: 0.08em;
  }
  .paper {
    margin-top: 20px;
    padding: 28px 20px 26px;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sigil .lit,
  .fan li {
    animation: none;
  }
  .fan img {
    transition: none;
  }
  .fan li:hover img {
    translate: none;
  }
  .button,
  .ghost {
    transition: none;
  }
  .button:hover {
    translate: none;
  }
}

/* ---------- Not found ---------- */

.hero.lost {
  padding: 90px 0 110px;
}
.lost h1 {
  font-size: clamp(34px, 7vw, 54px);
  letter-spacing: 0.14em;
  padding-left: 0.14em;
}
