/* Echolite Studio: the site is a sticker sheet. Light by default, dark when the device asks for it. */

@font-face {
  font-family: "Lilita One";
  src: url("/fonts/lilita-one-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Lexend";
  src: url("/fonts/lexend-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --sheet: #eef1f6;
  --ink: #1d2433;
  --muted: #4b5368;
  --link: #1a6fc0;
  --dot: #1d243318;
  --ring: #2496ed1c;
  --edge: #ffffff;
  --face: #ffffff;
  --flap: #d7dce6;
  --shadow: #1d243333;
  --yellow: #ffd43b;
  --blue: #2496ed;
  --coral: #f2665a;
  --display: "Lilita One", "Arial Black", system-ui, sans-serif;
  --text: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 62rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sheet: #161a25;
    --ink: #eef1f6;
    --muted: #aab1c5;
    --link: #8fd0ff;
    --dot: #ffffff12;
    --ring: #ffffff10;
    --edge: #d5dae5;
    --face: #262e40;
    --flap: #9ca3b5;
    --shadow: #00000080;
    --blue: #2a8fe0;
    --coral: #e95d52;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html {
  background-color: var(--sheet);
  /* the backing sheet's faint dots */
  background-image: radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 1.5px);
  background-size: 18px 18px;
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--text);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; }
main { flex: 1; }

a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; letter-spacing: 0.005em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 7vw, 4.25rem); margin: 0 0 1.25rem; max-width: 13ch; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); margin: 0 0 0.75rem; }
h3 { font-size: 1.3rem; margin: 1.75rem 0 0.4rem; }
p, ul { margin: 0 0 1rem; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.25rem); color: var(--muted); max-width: 34rem; }

/* ---------- header and footer ---------- */
.site-header { padding-block: 1.25rem; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none; font: 400 1.35rem/1 var(--display); }
.brand img { width: 2.6rem; height: 2.6rem; }
.site-header nav { display: flex; gap: 1.25rem; font-size: 0.98rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

.site-footer { padding-block: 2.5rem 2rem; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; border-top: 2px dashed var(--dot); padding-top: 1.5rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer a { color: var(--muted); }

/* ---------- the sticker ---------- */
/* The paper (white edge, face, shadow) is its own layer behind the text. Only the paper gets the
   drop-shadow filter, so the text is never rasterised and stays sharp even when the sticker tilts. */
.sticker { --cut: 34px; --edge-w: 7px; position: relative; display: block; color: inherit; text-decoration: none; }
.sticker .paper { position: absolute; inset: 0; z-index: 0; transform: rotate(var(--tilt, 0deg)); filter: drop-shadow(0 12px 14px var(--shadow)); }
/* Only the paper tilts (the flap lives inside it): rotated text can't line up with the pixel grid and looks soft on ordinary screens. */
.sticker .paper::before, .sticker .paper::after { content: ""; position: absolute; z-index: 0; }
.sticker .paper::before {
  inset: 0; background: var(--edge); border-radius: 28px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}
/* The face sits inside the edge; its own cut is set so the edge stays even along the diagonal. */
.sticker .paper::after {
  inset: var(--edge-w); background: var(--face); border-radius: 21px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut) + 4px), calc(100% - var(--cut) + 4px) 100%, 0 100%);
}
.sticker .face { position: relative; z-index: 1; padding: calc(var(--edge-w) + 1.4rem) calc(var(--edge-w) + 1.5rem) calc(var(--edge-w) + 1.6rem); }
.sticker .flap { position: absolute; z-index: 1; right: 0; bottom: 0; width: var(--cut); height: var(--cut);
  background: linear-gradient(135deg, var(--flap) 0 50%, transparent 50%); border-top-left-radius: 7px; }
@media (prefers-color-scheme: dark) { .sticker { --edge-w: 5px; } }
a.sticker:hover .paper::after { background: color-mix(in srgb, var(--face) 92%, var(--blue)); }
a.sticker { transition: transform 0.2s ease; }
a.sticker:hover { transform: translateY(-3px); }

/* Small round stickers: a white die-cut pill with the coloured pill inside it, so no seam can show. */
.badge { display: inline-block; padding: 4px; border-radius: 999px; background: var(--edge); box-shadow: 0 8px 14px -6px var(--shadow); }
.badge > span { display: block; font: 600 0.92rem/1 var(--text); padding: 0.7rem 1rem; border-radius: 999px; color: #fff; }
.badge.yellow > span { background: var(--yellow); color: #1d2433; }
.badge.blue > span { background: var(--blue); }
.badge.coral > span { background: var(--coral); }
@media (prefers-color-scheme: dark) { .badge { padding: 3px; } }

/* ---------- home ---------- */
.hero { padding-block: 2.5rem 1rem; }
.sheet { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 38rem) auto; justify-content: start; gap: 2rem 2.5rem; align-items: center; margin-block: 2.5rem 4.5rem; }
/* echo rings: faint, behind the stickers */
.sheet::before { content: ""; position: absolute; z-index: -1; left: 30rem; top: 50%; width: 34rem; height: 34rem; transform: translateY(-50%);
  border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(circle, transparent 0 34px, var(--ring) 35px 37px);
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); }
.sheet .sticker { --tilt: -1.2deg; max-width: 38rem; }
.game { display: flex; gap: 1.25rem; align-items: center; }
.game .icon { width: 5.5rem; height: 5.5rem; flex: none; }
.game h2 { margin: 0 0 0.35rem; }
.game p { margin: 0; color: var(--muted); }
.badges { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.badges .yellow { margin-left: 0.4rem; }
.badges .blue { margin-left: 1.4rem; }
.badges .coral { margin-left: 0; }
@media (max-width: 720px) {
  .sheet { grid-template-columns: minmax(0, 1fr); }
  .sheet::before { left: auto; right: -12rem; }
  .badges { flex-direction: row; flex-wrap: wrap; }
  .badges .blue { margin-left: 0; }
  .game { flex-direction: column; align-items: flex-start; }
}

.lore { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.5rem 2.5rem; align-items: center; margin-block: 1rem 4rem; }
.lore img { width: clamp(7rem, 18vw, 10rem); height: auto; transform: rotate(4deg); filter: drop-shadow(0 12px 14px var(--shadow)); }
.lore h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.2; max-width: 26ch; margin-bottom: 1rem; }
.lore p { color: var(--muted); max-width: 36rem; }
@media (max-width: 560px) { .lore { grid-template-columns: minmax(0, 1fr); } }

.contact { margin-bottom: 2rem; }
.contact .face { display: grid; gap: 0.25rem; }
.contact .address { font: 600 clamp(1.05rem, 3vw, 1.35rem)/1.3 var(--text); overflow-wrap: anywhere; }
.contact .sticker { max-width: 34rem; --tilt: 0.8deg; }

/* ---------- game page ---------- */
.game-hero { display: flex; gap: 1.75rem; align-items: center; padding-block: 2rem 1rem; flex-wrap: wrap; }
.game-hero .icon { width: 7.5rem; height: 7.5rem; filter: drop-shadow(0 12px 14px var(--shadow)); transform: rotate(-3deg); }
.game-hero h1 { margin-bottom: 0.5rem; }
.game-hero .lead { margin: 0; }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; margin-block: 2.5rem 3rem; }
@media (max-width: 760px) { .columns { grid-template-columns: minmax(0, 1fr); } }
.columns .sticker:nth-child(1) { --tilt: -0.8deg; }
.columns .sticker:nth-child(2) { --tilt: 0.9deg; }
.face ul { padding-left: 1.2rem; margin: 0; }
.face li { margin-bottom: 0.5rem; }
.face li::marker { color: var(--blue); }
.status { margin-block: 0 3rem; display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; align-items: center; }
.status p { margin: 0; color: var(--muted); }

/* ---------- long text (privacy policy) ---------- */
.prose { max-width: 42rem; padding-block: 2rem 1rem; }
.prose h1 { font-size: clamp(2.2rem, 6vw, 3.25rem); max-width: none; }
.prose h2 { font-size: 1.6rem; margin-top: 2.5rem; }
.prose .updated { color: var(--muted); font-size: 0.95rem; }
.prose li { margin-bottom: 0.5rem; }

/* ---------- 404 ---------- */
.lost { text-align: center; padding-block: 4rem; display: grid; justify-items: center; gap: 0.5rem; }
.lost img { width: 9rem; transform: rotate(-6deg); filter: drop-shadow(0 12px 14px var(--shadow)); margin-bottom: 1rem; }
.lost h1 { max-width: none; }

@media (prefers-reduced-motion: reduce) { a.sticker { transition: none; } }
