/* ============================================================
   HUB — "Clair & ludique" theme (repris de CYBER SPRINT à l'identique)
   Toile crème chaude, formes arrondies douces, accents corail/orange.
   Display: Bricolage Grotesque · Body: DM Sans
   ============================================================ */
:root {
  /* warm neutrals */
  --cream:    #fff6ee;
  --cream-2:  #ffeada;
  --card:     #ffffff;
  --ink:      #2b1b14;   /* warm near-black */
  --ink-2:    #5b463c;
  --ink-soft: #9a8074;
  --line:     rgba(43,27,20,.10);

  /* brand warmth */
  --coral:    #ff5a3c;
  --coral-d:  #ef451f;
  --orange:   #ff8a2b;
  --amber:    #ffc24b;

  /* soft shadows */
  --sh-sm: 0 4px 14px rgba(70,30,15,.10);
  --sh-md: 0 14px 34px rgba(70,30,15,.14);
  --sh-lg: 0 26px 60px rgba(70,30,15,.20);

  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  user-select: none;
}

/* ---- background layers ---- */
#bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }

/* fine grain for a tactile, non-flat surface */
#grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* warm spotlight behind the title */
#home-fx {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  opacity: 1; animation: glow-breathe 7s ease-in-out infinite;
  background:
    radial-gradient(60% 55% at 50% 30%, rgba(255,138,43,.40), transparent 70%),
    radial-gradient(40% 40% at 70% 70%, rgba(255,90,60,.28), transparent 70%);
}
@keyframes glow-breathe { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.06); opacity: 1; } }

/* ============================================================
   LAYOUT
   ============================================================ */
.hub {
  position: relative; z-index: 3;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: clamp(20px, 4vh, 56px) clamp(20px, 4vw, 64px);
  gap: clamp(18px, 3.2vh, 40px);
}

/* ---- header ---- */
.hub-head { text-align: center; flex: none; }
.hub-kicker {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(12px, 1.4vw, 18px); font-weight: 700; letter-spacing: .26em;
  text-transform: uppercase; color: var(--coral-d); margin-bottom: 10px;
}
.hub-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(40px, 6.5vw, 96px);
  font-weight: 800; line-height: .9; letter-spacing: -.035em;
  color: var(--ink);
  text-shadow: 0 6px 0 rgba(255,90,60,.10);
  animation: title-float 5.5s ease-in-out infinite; transform-origin: center;
}
@keyframes title-float { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }

/* ============================================================
   THE THREE BIG BUTTONS — fill the screen
   ============================================================ */
.tiles {
  flex: 1 1 auto;
  width: min(1100px, 96vw);
  display: flex; flex-direction: column;
  gap: clamp(16px, 2.6vh, 32px);
}

.tile {
  position: relative;
  flex: 1 1 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border: none; border-radius: 36px;
  cursor: pointer; text-decoration: none;
  overflow: hidden;
  font-family: 'Bricolage Grotesque', sans-serif;
  color: #fff;
  box-shadow: 0 18px 40px rgba(255,90,60,.34), inset 0 2px 0 rgba(255,255,255,.35);
  transition: transform .2s var(--ease-bounce), box-shadow .22s ease, filter .2s ease;
  animation: tile-in .55s var(--ease-bounce) both;
}
.tile:nth-child(1) { animation-delay: .04s; }
.tile:nth-child(2) { animation-delay: .12s; }
.tile:nth-child(3) { animation-delay: .20s; }
@keyframes tile-in { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }

/* soft top shine, identique aux boutons du jeu */
.tile::after {
  content: ""; position: absolute; inset: 2px 2px 55%;
  border-radius: 34px 34px 40% 40%;
  background: linear-gradient(rgba(255,255,255,.28), transparent);
  pointer-events: none;
}
.tile:hover { transform: translateY(-5px) scale(1.01); box-shadow: 0 26px 54px rgba(255,90,60,.46); filter: saturate(1.05); }
.tile:active { transform: translateY(-1px) scale(.997); }

.tile-name {
  font-size: clamp(38px, 7vw, 92px); font-weight: 800;
  letter-spacing: -.02em; line-height: .92; z-index: 1;
}
.tile-sub {
  margin-top: 12px; z-index: 1;
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(14px, 1.8vw, 22px); font-weight: 600;
  letter-spacing: .04em; opacity: .92;
}

/* colour variants — restent dans la palette chaude du thème */
.tile.t-sprint  { background: linear-gradient(135deg, var(--orange), var(--coral) 60%, var(--coral-d)); }
.tile.t-phish   { background: linear-gradient(135deg, var(--amber), var(--orange) 55%, var(--coral)); }

/* future game — carte claire désactivée */
.tile.t-soon {
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: var(--sh-md);
  cursor: default;
}
.tile.t-soon::after {
  background: linear-gradient(rgba(255,138,43,.06), transparent);
}
.tile.t-soon:hover { transform: translateY(-5px) scale(1.01); box-shadow: var(--sh-lg); filter: none; }
.tile.t-soon .tile-sub { color: var(--ink-soft); }

.tile-badge {
  position: absolute; top: clamp(14px, 2.4vh, 26px); right: clamp(16px, 2.4vw, 30px);
  z-index: 1;
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(11px, 1.2vw, 15px); font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase;
  padding: 8px 18px; border-radius: 999px;
}
.tile.t-soon .tile-badge {
  color: var(--coral-d);
  background: linear-gradient(135deg, rgba(255,138,43,.16), rgba(255,90,60,.16));
}

@media (max-width: 720px) {
  .hub { padding: 16px; gap: 16px; }
  .tile { border-radius: 26px; }
  .tile::after { border-radius: 24px 24px 40% 40%; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-title, #home-fx, .tile { animation: none; }
}
