/* ==========================================================================
   KeySmooshy - Shared look for every page: fonts, colors, buttons, game tabs
   Load before the page's own stylesheet.
   ========================================================================== */

/* Self-hosted (the CSP allows fonts from this site only). SIL Open Font License, see fonts/OFL-*.txt */
@font-face {
  font-family: 'Fredoka';
  src: url('../fonts/fredoka.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: 'Nunito';
  src: url('../fonts/nunito.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --font-display: 'Fredoka', 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Calm cream base, one warm accent, soft pastels for color-coding */
  --cream: #fbf0e4;
  --cream-deep: #f1e3d3;
  --surface: #ffffff;
  --ink: #3a3253;
  --text: #5e5873;
  --muted: #9c96b0;
  --line: #e9dac9;

  --coral: #ef6a66;
  --coral-dark: #d4504d;
  --coral-soft: #ffe5e1;

  --pink: #ffd2df;   --pink-ink: #d9487a;
  --peach: #ffd9bf;  --peach-ink: #d9733a;
  --butter: #ffe9a3; --butter-ink: #96700a;
  --mint: #c6ecd7;   --mint-ink: #2f8f62;
  --sky: #cde0ff;    --sky-ink: #3a74c9;
  --lilac: #ded2ff;  --lilac-ink: #7357c9;

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 1px 2px rgba(58, 50, 83, 0.04), 0 10px 30px rgba(58, 50, 83, 0.08);
  --shadow-soft: 0 2px 4px rgba(58, 50, 83, 0.05), 0 6px 16px rgba(58, 50, 83, 0.07);
}

/* --- Big friendly button: flat color with a pressable bottom edge --- */
.btn-play,
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 32px;
  background: var(--coral);
  border: none;
  border-radius: 999px;
  box-shadow: 0 5px 0 var(--coral-dark), 0 12px 24px rgba(239, 106, 102, 0.25);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  outline: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
}

.btn-play:hover,
.cta-btn:hover {
  background: #f27773;
  transform: translateY(-1px);
}

.btn-play:active,
.cta-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--coral-dark), 0 4px 10px rgba(239, 106, 102, 0.2);
}

.btn-play:focus-visible,
.cta-btn:focus-visible,
.btn-secondary:focus-visible {
  outline: 3px solid var(--sky-ink);
  outline-offset: 3px;
}

.btn-secondary {
  padding: 13px 18px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--line);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.2s ease;
}

.btn-secondary:hover {
  border-color: #e4d9cd;
}

.btn-secondary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--line);
}

/* --- Switch between our games (top of each welcome card and site header) --- */
.game-tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  background: var(--cream-deep);
  border-radius: 999px;
}

.game-tab {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.game-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}

.game-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.game-tab-icon {
  font-size: 18px;
  line-height: 1;
}

.tab-new {
  padding: 2px 7px;
  background: var(--butter);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--butter-ink);
}

@media (max-width: 400px) {
  .game-tab {
    padding: 9px 8px;
    font-size: 14px;
    gap: 6px;
  }

  .tab-new {
    display: none;
  }
}
