/* Friplo Games: dark studio. Neon color comes from light, used sparingly. */
:root {
  color-scheme: dark;
  --ink: #05060a;
  --ink-2: #0b0d14;
  --ink-3: #121522;
  --line: #20243a;
  --line-strong: #31364f;
  --text: #eef0f7;
  --muted: #a4a8bc;
  --faint: #6f748c;
  --magenta: #ff3d9a;
  --cyan: #34e0ff;
  --amber: #ffb43d;
  --violet: #8a6dff;
  --xis-blue: #3b6cf6;

  --display: "Funnel Display", ui-sans-serif, system-ui, sans-serif;
  --sans: "Funnel Sans", ui-sans-serif, system-ui, sans-serif;

  /* Type scale: 14 16 18 21 24 36 48 60 72+ */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.2rem + 1.8vw, 2.25rem);
  --step-4: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem);
  --step-5: clamp(2.9rem, 1.4rem + 5.6vw, 6rem);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --radius-lg: 28px;
  --radius-md: 16px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 var(--step-0)/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* Fine film grain over everything, so flat darks never look like a plastic fill. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .07;
  mix-blend-mode: overlay;
  background-image: 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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
::selection { background: var(--magenta); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--text); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-solid { background: var(--ink); border-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; }
.wordmark img { height: 34px; width: auto; }
@media (max-width: 480px) {
  .wordmark img { height: 30px; }
  .site-nav { gap: 0; margin-right: -8px; }
  .site-nav a { padding-inline: 7px; }
}

.site-nav { display: flex; gap: clamp(4px, 2vw, 28px); }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: 8px;
  color: var(--muted); text-decoration: none; font-size: var(--step--1); font-weight: 500;
  transition: color .2s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; text-decoration-color: var(--line-strong); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 600 var(--step-0)/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s;
}
.btn-primary { background: var(--text); color: var(--ink); box-shadow: 0 10px 40px -12px rgba(255, 255, 255, .35); }
.btn-primary:hover { background: #fff; transform: translateY(-1px); }
.btn-quiet { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-quiet:hover { box-shadow: inset 0 0 0 1px var(--muted); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; padding-block: 120px 96px;
}
/* Light in the room: pink spill from the L and O, cooler fill on the left. */
.hero-light {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(36% 42% at 72% 44%, rgba(255, 61, 139, .17), transparent 70%),
    radial-gradient(30% 36% at 22% 40%, rgba(138, 109, 255, .09), transparent 70%),
    radial-gradient(60% 40% at 50% 100%, rgba(52, 224, 255, .06), transparent 70%);
}
.hero-inner { display: grid; justify-items: center; text-align: center; }
.hero-mark { margin: 0; width: min(100%, 980px); }
.hero-logo { width: 100%; height: auto; overflow: visible; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hero-logo .frip, .hero-logo .games { fill: url(#lit-white); }
.hero-logo .pick, .hero-logo .lo-glow { fill: #ff3d8b; }
/* Before the intro script runs, hold the letters back so nothing flashes. */
.js .hero-logo .frip, .js .hero-logo .games, .js .hero-logo .pick, .js .hero-logo .lo-glow { opacity: 0; }

.hero-copy { margin-top: clamp(40px, 7vh, 72px); display: grid; justify-items: center; }
.tagline {
  font: 500 var(--step-4)/1.05 var(--display); letter-spacing: -.03em; color: var(--text);
}
.hero .lede { margin-top: 18px; max-width: 30em; font-size: var(--step-1); line-height: 1.5; color: var(--muted); }
.hero .actions { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* Copy arrives as the logo finishes lighting up. */
.js .hero-copy > * { opacity: 0; transform: translateY(12px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .hero-copy > :nth-child(2) { transition-delay: .12s; }
.js .hero-copy > :nth-child(3) { transition-delay: .24s; }
.intro-done .hero-copy > * { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .hero-logo .frip, .js .hero-logo .games, .js .hero-logo .pick, .js .hero-logo .lo-glow { opacity: 1; }
  .js .hero-copy > * { opacity: 1; transform: none; transition: none; }
}

/* On the home page the header logo waits until the big one scrolls away. */
.home .wordmark { opacity: 0; transition: opacity .4s var(--ease); }
.home .site-header.is-solid .wordmark { opacity: 1; }

.scroll-cue {
  position: absolute; right: var(--gutter); bottom: 48px;
  writing-mode: vertical-rl; font-size: var(--step--1); color: var(--faint); text-decoration: none;
  display: flex; align-items: center; gap: 14px; min-width: 44px;
}
.scroll-cue::after { content: ""; width: 1px; height: 56px; background: linear-gradient(var(--faint), transparent); }

@media (max-width: 760px) {
  .hero { padding-block: 110px 64px; }
  .tagline { font-size: clamp(2rem, 9vw, 2.6rem); }
  .hero .lede { font-size: var(--step-0); }
  .hero .actions { width: 100%; }
  .hero .actions .btn { flex: 1 1 auto; }
  .scroll-cue { display: none; }
}

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding-block: clamp(88px, 14vw, 180px); }
.section-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { font-size: var(--step-4); line-height: 1.02; letter-spacing: -.03em; }
.section-head p { color: var(--muted); max-width: 34em; font-size: var(--step-1); line-height: 1.5; }

/* Studio */
.studio .statement {
  font: 500 var(--step-5)/1.02 var(--display); letter-spacing: -.035em;
}
.studio .statement .dim { color: var(--faint); }
/* The genre in "Love ___? So do we." cycles through the kinds of games we love. */
.genre { display: inline-block; }
.genre-line { white-space: nowrap; }
.statement-visual { display: block; }
/* On phones the genre always sits on its own line, so the heading looks the same for every genre. */
@media (max-width: 600px) {
  .genre-line { display: block; }
  .studio .statement { font-size: clamp(2.1rem, 11vw, 2.9rem); }
}
.genre-word {
  display: inline-block; transition: opacity .35s var(--ease), transform .35s var(--ease);
  text-decoration: underline; text-decoration-color: #ff3d8b; text-decoration-thickness: .06em; text-underline-offset: .14em;
}
.genre-word.is-out { opacity: 0; transform: translateY(-.35em); }
.genre-word.is-in { opacity: 0; transform: translateY(.35em); transition: none; }
.studio-lede { margin-top: 32px; max-width: 34em; font-size: var(--step-1); line-height: 1.55; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.values {
  margin: clamp(56px, 8vw, 104px) 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.values li { padding: 32px 32px 0 0; }
.values li + li { padding-left: 32px; border-left: 1px solid var(--line); }
.values h3 { font-size: var(--step-2); letter-spacing: -.015em; line-height: 1.2; }
.values p { margin-top: 10px; color: var(--muted); max-width: 22em; }
.values .glyph { display: block; width: 28px; height: 28px; margin-bottom: 26px; }
@media (max-width: 860px) {
  .values { grid-template-columns: 1fr; }
  .values li, .values li + li { padding: 28px 0; border-left: 0; }
  .values li + li { border-top: 1px solid var(--line); }
}

/* Games: XIS (pre-launch teaser; the full section waits in launch-kit/xis) */
.xis {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center;
  padding: clamp(32px, 5vw, 72px); border-radius: var(--radius-lg);
  background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
/* XIS's own blue, as light falling behind the board. */
.xis::before {
  content: ""; position: absolute; z-index: -1; inset: -20% -10% -20% 40%; pointer-events: none;
  background: radial-gradient(45% 45% at 55% 50%, rgba(59, 108, 246, .26), transparent 70%), radial-gradient(30% 30% at 70% 70%, rgba(52, 224, 255, .1), transparent 70%);
}
.xis-id { display: flex; align-items: center; gap: 18px; }
.xis-id img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 12px 30px -10px rgba(0,0,0,.8); }
.xis-id h3 { font-size: var(--step-3); letter-spacing: -.02em; line-height: 1; }
.xis-id .status { margin-top: 8px; }
.xis-tagline { margin-top: clamp(28px, 4vw, 44px); font: 500 var(--step-4)/1.04 var(--display); letter-spacing: -.03em; }
.xis-lede { margin-top: 20px; color: var(--muted); font-size: var(--step-1); line-height: 1.5; max-width: 26em; }
.xis .feature-links { margin-top: 28px; }

/* A glimpse of the board: tilted, with its edges fading into the dark. */
.xis-peek { perspective: 1200px; }
.xis-peek img {
  display: block; width: 100%; height: auto; border-radius: 28px;
  transform: rotateY(-16deg) rotateX(8deg) rotateZ(2deg);
  -webkit-mask-image: radial-gradient(75% 75% at 45% 45%, #000 45%, transparent 100%);
  mask-image: radial-gradient(75% 75% at 45% 45%, #000 45%, transparent 100%);
}
@media (max-width: 960px) {
  .xis { grid-template-columns: 1fr; }
  .xis-peek { order: -1; max-width: 440px; }
  .xis::before { inset: -10% -20% 45% -20%; }
}
.status { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-size: var(--step--1); font-weight: 500; }
.status::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--xis-blue);
  box-shadow: 0 0 0 4px rgba(59, 108, 246, .22), 0 0 14px var(--xis-blue);
}
.feature-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 8px; }
.text-link {
  display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 10px) / 100% 1px no-repeat;
  color: var(--text); transition: background-size .3s var(--ease), color .2s;
}
.text-link:hover { color: #fff; background-size: 0 1px; background-position: 100% calc(100% - 10px); }
.more { margin-top: 28px; color: var(--faint); font-size: var(--step--1); }

/* Contact */
.contact { text-align: left; }
.contact h2 { font-size: var(--step-4); letter-spacing: -.03em; line-height: 1.02; }
.contact .mail {
  display: inline-block; margin-top: 18px;
  font: 500 var(--step-4)/1.1 var(--display); letter-spacing: -.03em;
  color: var(--muted); text-decoration: none; overflow-wrap: normal;
  transition: color .3s;
}
.contact .mail:hover { color: var(--text); }
.contact p { margin-top: 24px; color: var(--muted); }
.contact-panel {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  padding: clamp(36px, 7vw, 96px); background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
}
/* A soft spill of colored light along the panel's lower edge, as if from a strip lamp. */
.contact-panel::before {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -60%; height: 90%; pointer-events: none;
  background:
    radial-gradient(40% 50% at 18% 50%, rgba(255, 61, 154, .22), transparent 70%),
    radial-gradient(40% 50% at 55% 60%, rgba(138, 109, 255, .16), transparent 70%),
    radial-gradient(40% 50% at 88% 50%, rgba(52, 224, 255, .2), transparent 70%);
  filter: blur(10px);
}
.contact-panel > * { position: relative; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px 48px; color: var(--faint); font-size: var(--step--1); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer a { text-decoration: none; color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover { color: var(--text); }

/* ---------- Inner pages ---------- */
.page-hero { position: relative; isolation: isolate; padding-top: calc(72px + clamp(64px, 10vw, 140px)); padding-bottom: clamp(48px, 7vw, 88px); }
/* Coloured light spilling from the top of the page, fading out well before any edge. */
.page-hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 720px; pointer-events: none;
  background:
    radial-gradient(48% 60% at 8% 0%, rgba(255, 61, 154, .16), transparent 70%),
    radial-gradient(44% 55% at 92% 0%, rgba(52, 224, 255, .12), transparent 70%),
    radial-gradient(40% 45% at 55% 0%, rgba(138, 109, 255, .08), transparent 70%);
}
.page-hero h1 { font-size: var(--step-5); letter-spacing: -.035em; line-height: .98; }
.page-hero .lede { margin-top: 24px; max-width: 32em; color: var(--muted); font-size: var(--step-1); line-height: 1.5; }

.prose { max-width: 40em; }
.prose h2 { font-size: var(--step-3); letter-spacing: -.02em; line-height: 1.15; margin-top: 2.4em; scroll-margin-top: 104px; }
.prose h3 { font-size: var(--step-1); margin-top: 1.8em; scroll-margin-top: 104px; }
.prose p, .prose ul { margin-top: 1em; color: #c9ccda; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: .4em; }
.prose a { color: var(--text); text-underline-offset: 4px; text-decoration-color: var(--faint); }
.prose a:hover { text-decoration-color: var(--text); }
.prose strong { color: var(--text); font-weight: 600; }

/* Support */
.support-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.reach {
  position: sticky; top: 104px;
  padding: 32px; border-radius: var(--radius-lg); background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.reach h2 { font-size: var(--step-2); letter-spacing: -.015em; }
.reach p { margin-top: 10px; color: var(--muted); }
.reach .btn { margin-top: 24px; width: 100%; }
.reach .addr { margin-top: 14px; font-size: var(--step--1); color: var(--faint); overflow-wrap: anywhere; }
.reach::before {
  content: ""; position: absolute; inset: auto -20% -70% -20%; height: 100%; pointer-events: none;
  background: radial-gradient(50% 50% at 30% 50%, rgba(255, 61, 154, .16), transparent 70%), radial-gradient(50% 50% at 75% 50%, rgba(52, 224, 255, .14), transparent 70%);
}
.reach > * { position: relative; }

.faq h2, .per-game h2 { font-size: var(--step-3); letter-spacing: -.02em; }
.faq-list { margin-top: 24px; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; min-height: 64px; padding: 20px 48px 20px 0; position: relative;
  font: 500 var(--step-1)/1.35 var(--display); letter-spacing: -.01em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background: linear-gradient(var(--muted), var(--muted)) center / 14px 1.5px no-repeat, linear-gradient(var(--muted), var(--muted)) center / 1.5px 14px no-repeat;
  transition: transform .3s var(--ease);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover::after { background-color: transparent; }
.faq-list .answer { padding: 0 0 24px; color: #c9ccda; max-width: 36em; }
.faq-list .answer p + p { margin-top: .8em; }

.per-game { margin-top: clamp(64px, 9vw, 112px); }
.game-card {
  margin-top: 24px; padding: 28px; border-radius: var(--radius-md); background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
  scroll-margin-top: 104px; display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start;
}
.game-card:target { box-shadow: inset 0 0 0 1px var(--xis-blue), 0 0 0 4px rgba(59, 108, 246, .18); }
.game-card h3 { font-size: var(--step-2); letter-spacing: -.015em; }
.game-card p { margin-top: 8px; color: var(--muted); }
.game-card ul { margin: 12px 0 0; padding-left: 1.2em; color: #c9ccda; }
.game-card .game-mail { margin-top: 14px; color: var(--muted); }
.game-card .game-mail a { color: var(--text); text-underline-offset: 4px; text-decoration-color: var(--faint); }
.game-icon { width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 10px 24px -10px rgba(0,0,0,.8); }
@media (max-width: 900px) {
  .support-grid { grid-template-columns: 1fr; }
  .reach { position: relative; top: auto; }
  .game-card { grid-template-columns: 1fr; }
}

/* Privacy */
.legal-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.toc { position: sticky; top: 104px; font-size: var(--step--1); }
.toc h2 { font: 600 var(--step--1)/1 var(--sans); color: var(--faint); margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 1px solid transparent;
  color: var(--muted); text-decoration: none; transition: color .2s, border-color .2s;
}
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--text); border-left-color: var(--magenta); }
.summary-box {
  padding: 28px 32px; border-radius: var(--radius-md); background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
}
.summary-box h2 { margin-top: 0; font-size: var(--step-2); }
.summary-box ul { color: var(--text); }
.meta-line { margin-top: 20px; color: var(--faint); font-size: var(--step--1); }
.legal-body > section:first-child h2 { margin-top: 0; }
@media (max-width: 900px) {
  .legal-grid { grid-template-columns: 1fr; }
  .toc { position: static; padding: 20px 24px; border-radius: var(--radius-md); background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
  .toc ol { columns: 2; column-gap: 24px; border-left: 0; }
  .toc a { padding-left: 0; border: 0; min-height: 40px; display: flex; align-items: center; }
}
@media (max-width: 420px) { .toc ol { columns: 1; } }
[id] { scroll-margin-top: 96px; }
.faq-list .answer a { color: var(--text); text-underline-offset: 4px; text-decoration-color: var(--faint); }
.faq-list .answer a:hover { text-decoration-color: var(--text); }
@media (max-width: 480px) {
  .contact-panel { padding: 36px 28px; }
  .contact .mail { font-size: 1.875rem; }
}

/* Page not found */
.not-found { min-height: calc(100svh - 120px); display: flex; align-items: center; }
.not-found .code {
  font: 700 clamp(4.5rem, 3rem + 8vw, 9rem)/1 var(--display); letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1.5px #ff3d8b; text-shadow: 0 0 40px rgba(255, 61, 139, .35);
  margin-bottom: 20px;
}
.not-found .actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
