/* ==========================================================================
   FUN BITS — core tokens, reset, typography
   A sticker-collage game portal. Colour is carried by small surfaces (tiles,
   tags, chips); covers do the heavy lifting; white sticker outlines and hard
   offset shadows give every element a cut-out, pasted-on feel.
   ========================================================================== */

:root {
  /* Palette (fixed by the brief) */
  --fb-bg: #FFF8E9;
  --fb-ink: #252525;
  --fb-ink-2: #4A443B;
  --fb-muted: #7B7266;
  --fb-white: #FFFFFF;

  --fb-orange: #FF8552;
  --fb-orange-deep: #EF6A35;
  --fb-yellow: #FFD65A;
  --fb-yellow-deep: #F2C43F;
  --fb-blue: #79C7F2;
  --fb-pink: #F5A7C7;
  --fb-green: #8ED6A7;
  --fb-purple: #B9A4F5;

  /* Tints used behind covers and inside tiles */
  --fb-orange-soft: #FFE7D9;
  --fb-yellow-soft: #FFF2C9;
  --fb-blue-soft: #DFF2FC;
  --fb-pink-soft: #FDE3ED;
  --fb-green-soft: #E2F6E9;
  --fb-purple-soft: #EDE6FD;

  --fb-paper: #FFFDF7;
  --fb-wash: #F6EEDC;
  --fb-line: rgba(37, 37, 37, 0.12);
  --fb-line-soft: rgba(37, 37, 37, 0.07);

  /* Type */
  --fb-display: 'Baloo 2', 'Trebuchet MS', 'Segoe UI', sans-serif;
  --fb-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Shape */
  --fb-r-sm: 14px;
  --fb-r-md: 20px;
  --fb-r-lg: 28px;
  --fb-r-xl: 38px;
  --fb-outline: 3px solid var(--fb-white);

  /* Depth: a flat pasted edge + a soft ambient shadow */
  --fb-shadow-sm: 0 4px 0 rgba(37, 37, 37, 0.08), 0 12px 22px -14px rgba(37, 37, 37, 0.45);
  --fb-shadow: 0 7px 0 rgba(37, 37, 37, 0.07), 0 22px 36px -20px rgba(37, 37, 37, 0.5);
  --fb-shadow-lift: 0 10px 0 rgba(37, 37, 37, 0.06), 0 34px 52px -24px rgba(37, 37, 37, 0.55);
  --fb-shadow-hard: 0 5px 0 var(--fb-ink);

  /* Layout */
  --fb-shell: 1240px;
  --fb-gutter: 28px;
  --fb-header-h: 84px;
  --fb-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--fb-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fb-ink);
  background-color: var(--fb-bg);
  min-height: 100dvh;
  overflow-x: clip;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}

/* A very faint paper grain keeps the cream from reading as flat #FFF8E9 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(37, 37, 37, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
}

img,
svg,
video { display: block; max-width: 100%; }

img { height: auto; }

iframe {
  display: block;
  max-width: 100%;
  border: 0;
  vertical-align: bottom;
}

a { color: inherit; text-decoration: none; }

button,
input,
select { font: inherit; color: inherit; }

button { cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--fb-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
}

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

/* —— Utilities —— */

.fb-shell {
  width: 100%;
  max-width: calc(var(--fb-shell) + var(--fb-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--fb-gutter);
}

.fb-vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.fb-skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--fb-ink);
  color: var(--fb-white);
  font-weight: 700;
  transition: top 0.2s var(--fb-ease);
}
.fb-skip:focus-visible { top: 14px; }

:focus-visible {
  outline: 3px solid var(--fb-ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--fb-bg);
  border-radius: 8px;
}

::selection {
  background: var(--fb-yellow);
  color: var(--fb-ink);
}

/* —— Eyebrow / labels —— */

.fb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--fb-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fb-ink-2);
}

.fb-eyebrow__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--fb-orange);
  box-shadow: 0 0 0 4px rgba(255, 133, 82, 0.18);
}

/* —— Buttons —— */

.fb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 26px;
  border: 3px solid var(--fb-white);
  border-radius: 999px;
  font-family: var(--fb-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.18s var(--fb-ease), box-shadow 0.18s var(--fb-ease),
    background-color 0.18s var(--fb-ease);
}

.fb-btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.fb-btn--primary {
  background: var(--fb-orange);
  color: var(--fb-white);
  box-shadow: var(--fb-shadow-hard);
}
.fb-btn--primary:hover {
  background: var(--fb-orange-deep);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--fb-ink);
}
.fb-btn--primary:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--fb-ink);
}

.fb-btn--ghost {
  background: var(--fb-white);
  color: var(--fb-ink);
  box-shadow: 0 4px 0 rgba(37, 37, 37, 0.14);
}
.fb-btn--ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(37, 37, 37, 0.16);
}

.fb-btn--ink {
  background: var(--fb-ink);
  color: var(--fb-white);
  border-color: var(--fb-ink);
  box-shadow: 0 5px 0 rgba(37, 37, 37, 0.22);
}
.fb-btn--ink:hover { transform: translateY(-2px); }

.fb-btn--sm {
  min-height: 42px;
  padding: 8px 18px;
  font-size: 13px;
}

/* —— Sticker chips —— */

.fb-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 2px solid var(--fb-white);
  background: var(--fb-white);
  box-shadow: 0 3px 0 rgba(37, 37, 37, 0.08);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--fb-ink-2);
  white-space: nowrap;
}

.fb-chip--tone {
  background: var(--fb-tone, var(--fb-yellow));
  color: var(--fb-ink);
}

/* Category sticker: the small rotated label that appears on every card */
.fb-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  border: 2px solid var(--fb-white);
  background: var(--fb-tone, var(--fb-yellow));
  box-shadow: 0 2px 0 rgba(37, 37, 37, 0.1);
  font-family: var(--fb-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fb-ink);
  transform: rotate(-2deg);
  white-space: nowrap;
}

/* —— Reduced motion —— */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .fb-reveal { opacity: 1 !important; transform: none !important; }
}
