@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

/*
  TOUCH 2 TECH — Shared Foundation Styles
  ----------------------------------------
  This file holds the design tokens (colors, type, spacing) and the small
  set of components that are reused across the platform: the app header
  bar, buttons, and focus states. Individual apps (e.g. Classic Bongos)
  load this file AND their own stylesheet — app-specific visuals never
  live here.
*/

:root {
  /* ---- Color: "Toy Shelf" daytime palette (home / browsing) ---- */
  --t2t-cream:        #FFF7E9;
  --t2t-cream-panel:  #FFFFFF;
  --t2t-ink:          #241640;
  --t2t-ink-soft:     #5B5177;

  --t2t-sun:          #FFC93C; /* Bongo 1 / primary accent   */
  --t2t-coral:        #FF5D73; /* Bongo 2 / secondary accent */
  --t2t-teal:         #2FE6C9; /* call-to-action / links     */
  --t2t-violet:       #8C6BFF; /* headings / brand mark      */

  /* ---- Color: "Spotlight Stage" palette (inside an activity) ---- */
  --t2t-stage-bg:     #1B1030;
  --t2t-stage-panel:  #241542;
  --t2t-stage-text:   #c800ff;
  --t2t-stage-text-soft: #B7A9DE;

  /* ---- Shape & shadow: hard, offset "sticker" edges, not soft blur ---- */
  --t2t-radius-lg:    28px;
  --t2t-radius-md:    18px;
  --t2t-radius-sm:    12px;
  --t2t-border:       3px solid var(--t2t-ink);
  --t2t-shadow-pop:   5px 5px 0 rgba(36, 22, 64, 0.16);
  --t2t-shadow-pop-sm: 3px 3px 0 rgba(36, 22, 64, 0.16);

  /* ---- Type ---- */
  --t2t-font: "Poppins", sans-serif;

  --t2t-space-1: 8px;
  --t2t-space-2: 16px;
  --t2t-space-3: 24px;
  --t2t-space-4: 40px;
  --t2t-space-5: 64px;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--t2t-font);
  color: var(--t2t-ink);
  background: var(--t2t-cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }

button {
  font-family: var(--t2t-font);
  cursor: pointer;
}

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

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

/* Visible keyboard focus everywhere — never rely on color alone */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 4px solid var(--t2t-teal);
  outline-offset: 3px;
  border-radius: var(--t2t-radius-sm);
}

/* ---------------------------------------------------------------- */
/* Buttons                                                           */
/* ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--t2t-space-1);
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 999px;
  border: var(--t2t-border);
  background: var(--t2t-teal);
  color: var(--t2t-ink);
  box-shadow: var(--t2t-shadow-pop-sm);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 rgba(36,22,64,0.2); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(36,22,64,0.2); }

.btn--disabled,
.btn:disabled {
  background: #EFE9DC;
  color: var(--t2t-ink-soft);
  border-color: #D9D2C4;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ---------------------------------------------------------------- */
/* App header (used inside every activity, e.g. Classic Bongos)     */
/* ---------------------------------------------------------------- */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--t2t-space-2);
  min-height: 72px;
  padding: var(--t2t-space-2) var(--t2t-space-3);
  background: transparent;
  position: relative;
  z-index: 5;
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: var(--t2t-space-1);
}

.app-header__back,
.app-header__fullscreen {
  background: rgba(253, 246, 255, 0.08);
  color: var(--t2t-stage-text);
  border: 2px solid rgba(253, 246, 255, 0.35);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 700;
}

.app-header__back:hover,
.app-header__fullscreen:hover {
  background: rgba(253, 246, 255, 0.18);
}

.app-header__title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--t2t-stage-text-soft);
  letter-spacing: 0.02em;
}

/* Shared LI Blocks logo — sits inside the app header, to the left of center. */
.app-header::after {
  content: "";
  position: absolute;
  left: 220px;
  top: 50%;
  width: 160px;
  height: 40px;
  transform: translateY(-50%);
  background: url("../assets/LI Blocks_TBG_V_WT.png") center / contain no-repeat;
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 900px) {
  .app-header::after {
    left: 220px;
    width: 100px;
    height: 32px;
  }
}

@media (max-width: 680px) {
  .app-header::after {
    left: 205px;
    width: 86px;
    height: 28px;
  }
}

@media (max-width: 560px) {
  .app-header {
    min-height: 64px;
    padding: 10px 14px;
  }

  .app-header::after {
    left: 195px;
    width: 78px;
    height: 26px;
  }

  .app-header__title { display: none; }
}

/* ---------------------------------------------------------------- */
/* Reduced motion — respected globally                               */
/* ---------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
