/*
 * The game's own pages for search engines and first visits (/starpix, /starquiz, /en): the rules page's night, type and
 * measure (public/regles), each page with its game's light. StarParty and StarQuiz in lilac and pink, StarPix in the
 * sky's blue (data-accent='sky' on <html>).
 */
@font-face { font-family: 'PP Museum'; src: url('/fonts/PPMuseum-Light.woff') format('woff'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Inter Variable'; src: url('/fonts/InterVariable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Nephilm'; src: url('/fonts/Nephilm.woff2') format('woff2'); font-display: swap; }
:root {
  color-scheme: dark;
  interpolate-size: allow-keywords;
  --night: #0f1320; --table: #141a2b; --deep: #0b0e19;
  --line: rgba(206, 214, 240, .09); --line-2: rgba(206, 214, 240, .17);
  --title: #f4f1fb; --text: #c3c8d7; --muted: #8890a6;
  --soft: #dac4f3; --accent: #f4a6cb; --accent-rgb: 244, 166, 203;
  --serif: 'PP Museum', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Nephilm', 'PP Museum', Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(20px, 4.4vw, 64px);
  --gap: clamp(28px, 5vw, 96px);
}
/* StarPix: the sky's blue where StarParty has its pink. */
:root[data-accent='sky'] { --soft: #bfe0ff; --accent: #8ec9ff; --accent-rgb: 142, 201, 255; }
* { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--night); font: 400 16.5px/1.7 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* The same fine grain as the rules page: the night is a material, not a void. */
body::after { content: ''; position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: .055;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
::selection { background: rgba(var(--accent-rgb), .3); color: #fff; }
.wrap { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); }
main { display: block; overflow-x: clip; }
a { color: var(--soft); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
:focus-visible { outline: 1px solid var(--soft); outline-offset: 4px; border-radius: 4px; }
.link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .28em; text-decoration-color: rgba(var(--accent-rgb), .42); transition: color .2s, text-decoration-color .2s; }
.link:hover { text-decoration-color: currentColor; }
h1, h2, h3 { margin: 0; color: var(--title); font-family: var(--serif); font-weight: 300; }
p, figure, blockquote { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: fixed; top: 10px; left: 50%; z-index: 20; padding: 9px 18px; border: 1px solid rgba(var(--accent-rgb), .45); border-radius: 999px; background: #1b2032; color: #f1edff;
  font-size: 14px; transform: translate(-50%, calc(-100% - 14px)); transition: transform .18s ease; }
.skip:focus-visible { transform: translate(-50%, 0); }

/* The bar */
.top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 26px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 31px; height: auto; transform: translateY(-2px); }
.brand span { display: inline-flex; font: 400 17px/1 var(--display); letter-spacing: .08em; }
.brand i { font-style: normal; }
.brand i:nth-child(1) { color: #f5f2ff; } .brand i:nth-child(2) { color: #eee9ff; } .brand i:nth-child(3) { color: #e4dbff; } .brand i:nth-child(4) { color: #d8caff; }
.brand i:nth-child(5) { color: #cab9fa; } .brand i:nth-child(6) { color: #b99ff2; } .brand i:nth-child(7) { color: #a98fea; } .brand i:nth-child(8) { color: #99a3e8; } .brand i:nth-child(9) { color: #8db9dd; }
.top nav { display: flex; gap: clamp(16px, 2.4vw, 34px); font-size: 14.5px; }
.top nav a { color: var(--text); white-space: nowrap; }
.top nav a:hover, .top nav a[aria-current] { color: var(--accent); }

/* The hero: the game's words on one side, the game itself on the other, to try at once */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); grid-template-areas: 'copy stage'; align-items: center; column-gap: var(--gap);
  min-height: min(860px, calc(100svh - 86px)); padding-block: clamp(24px, 4vh, 56px) clamp(64px, 10vh, 112px); }
.hero-copy { grid-area: copy; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(48px, 6.4vw, 96px); line-height: .96; letter-spacing: -.03em; text-wrap: balance; animation: rise 1.1s var(--ease) .05s backwards; }
.lead { margin-top: clamp(26px, 3.2vw, 40px); max-width: 30em; font-size: clamp(17px, 1.3vw, 19.5px); line-height: 1.62; text-wrap: pretty; animation: rise 1.1s var(--ease) .16s backwards; }
.hero-meta { margin-top: clamp(28px, 3.4vw, 44px); display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 26px; color: var(--muted); font-size: 14px; animation: rise 1.1s var(--ease) .27s backwards; }
.hero-meta .link { color: var(--title); font-size: 16.5px; }
.hero-meta .link:hover { color: var(--accent); }
.stage { grid-area: stage; position: relative; display: grid; justify-items: center; align-content: center; gap: clamp(18px, 2.4vw, 30px); animation: fade 1.2s var(--ease) .2s backwards; }

/* The chapters: a title and its opening words side by side, then what the chapter shows */
.chapter { position: relative; padding-block: clamp(80px, 10vw, 144px); }
.chapter::before, .end::before, .foot::before { content: ''; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--line); }
.head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--gap); align-items: start; }
.head h2 { font-size: clamp(38px, 4.3vw, 62px); line-height: 1.02; letter-spacing: -.022em; text-wrap: balance; }
.head > p { max-width: 33em; padding-top: .5em; font-size: 17.5px; text-wrap: pretty; }
.content { margin-top: clamp(56px, 6.5vw, 96px); }
h3 { font-size: clamp(22px, 1.9vw, 26px); line-height: 1.25; letter-spacing: -.005em; }
h3 + p { margin-top: 10px; }

/* Facts in columns: each its title on a short line of the game's light, and a sentence */
.facts { margin: 0; display: grid; grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr)); gap: clamp(40px, 4.4vw, 64px) clamp(24px, 3vw, 44px); }
.facts > div { display: grid; gap: 6px; align-content: start; }
.facts dt { color: var(--title); font: 300 22px/1.3 var(--serif); }
.facts dt::before { content: ''; display: block; width: 22px; height: 1px; margin-bottom: 16px; background: var(--accent); }
.facts dd { margin: 0; max-width: 26em; }

/* A list of names in columns, read down like an index */
.names { margin: 0; padding: 0; list-style: none; columns: 4 11em; column-gap: clamp(24px, 3vw, 44px); color: var(--title); font: 300 clamp(19px, 1.6vw, 23px)/1.55 var(--serif); }
.names li { break-inside: avoid; }
/* A list set in a chapter keeps the chapter's space above it (its own margins are set aside above). */
.facts.content, .names.content { margin-top: clamp(56px, 6.5vw, 96px); }

.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 21px 0; color: var(--title); font: 300 clamp(20px, 1.75vw, 23.5px)/1.3 var(--serif); list-style: none; cursor: pointer; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ''; flex: none; width: 13px; height: 13px; translate: 0 -.05em;
  background: linear-gradient(var(--soft), var(--soft)) center / 100% 1px no-repeat, linear-gradient(var(--soft), var(--soft)) center / 1px 100% no-repeat; transition: rotate .4s var(--ease); }
.faq-list summary:hover { color: var(--soft); }
.faq-list details[open] summary::after { rotate: 45deg; }
.faq-list details::details-content { block-size: 0; overflow: hidden; transition: block-size .45s var(--ease), content-visibility .45s allow-discrete; }
.faq-list details[open]::details-content { block-size: auto; }
.faq-list details p { max-width: 36em; padding: 0 40px 24px 0; }

/* The end: one sentence, the game's star, and the way in */
.end { position: relative; display: grid; justify-items: center; gap: clamp(36px, 4vw, 52px); padding-block: clamp(96px, 12vw, 176px) clamp(80px, 9vw, 128px); text-align: center; }
.end h2 { font-size: clamp(44px, 6.4vw, 96px); line-height: .98; letter-spacing: -.03em; text-wrap: balance; }
.go { position: relative; width: 148px; height: 148px; display: grid; place-items: center; border-radius: 50%; background: var(--deep); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--title);
  font: 300 24px/1 var(--serif); transition: color .3s, scale .5s var(--ease); }
.go svg { position: absolute; left: -12px; top: -12px; width: calc(100% + 24px); height: calc(100% + 24px); rotate: -90deg; overflow: visible; }
.go circle { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: .7 1; stroke-dashoffset: -.3; vector-effect: non-scaling-stroke;
  transition: stroke-dasharray 1.4s var(--ease), stroke-dashoffset 1.4s var(--ease); }
.go:hover { color: var(--accent); scale: 1.04; }
.go:hover circle { stroke-dasharray: .06 1; stroke-dashoffset: -.94; }
.end-star { width: clamp(96px, 9vw, 128px); height: auto; animation: bob 3.2s ease-in-out infinite; }

.foot { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 28px; padding-block: 30px 44px; color: var(--muted); font-size: 13.5px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--soft); }

@keyframes rise { from { opacity: 0; translate: 0 24px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes bob { 50% { translate: 0 -5%; } }

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'copy' 'stage'; row-gap: 52px; min-height: 0; padding-top: 28px; }
  .hero h1 { font-size: clamp(44px, 10.5vw, 80px); }
  .head { grid-template-columns: minmax(0, 1fr); row-gap: 26px; }
  .head > p { padding-top: 0; }
  .facts { --columns: 2; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .top { padding-block: 18px; }
  .top nav { gap: 15px; font-size: 13.5px; }
  .brand span { font-size: 15px; }
  .brand img { width: 27px; }
  .hero { padding-top: 22px; padding-bottom: 72px; row-gap: 44px; }
  .lead { font-size: 17px; }
  .head > p { font-size: 16.5px; }
  .facts { --columns: 1; gap: 30px; }
  .names { columns: 2; column-gap: 20px; font-size: 18px; }
  .names li { padding-block: 2px; line-height: 1.3; }
  .faq-list details p { padding-right: 0; }
}
@media (max-width: 370px) { .brand span { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
