/* Main menu (index.html) */
#menu {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-screen);
  font: 14px/1.4 var(--font-body); color: var(--ink);
}
.menu-inner { text-align: center; padding: 14px; max-width: 760px; width: 100%; }
.logo {
  margin: 0; font-family: var(--font-display); font-weight: 800; letter-spacing: 1px;
  font-size: clamp(30px, 7.2vw, 58px); line-height: 1;
  background: var(--accent-text);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 6px 30px rgba(255,150,60,.18);
}
.logo sup {
  font-size: .24em;
  vertical-align: top;   /* pinned to the top line — stays in flow */
  margin-left: .1em;
  letter-spacing: 0;
  /* Own gradient: the parent's background-clip does not cover a top-aligned child
     that sits outside its normal position. */
  background: var(--accent-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tagline { margin: 8px 0 30px; opacity: .65; font-size: clamp(13px, 2.4vw, 17px); }
.tiles { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.tile {
  flex: 1 1 220px; max-width: 280px; text-align: left;
  background: var(--surface); border: 1px solid var(--surface-line);
  border-radius: var(--r-card); padding: 20px; color: var(--ink); cursor: pointer; text-decoration: none;
  display: block; font: inherit;
  transition: transform var(--ease) ease, border-color var(--ease) ease, background var(--ease) ease;
  position: relative; /* for badge absolute positioning */
}
.tile:hover {
  transform: translateY(-3px); border-color: var(--accent-glow); background: var(--accent-tint);
  box-shadow: 0 12px 30px rgba(0,0,0,.35), 0 0 0 1px rgba(255,177,77,.12);
}
.tile:active { transform: translateY(-1px); }
.tile-title { font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: .3px; margin-bottom: 8px; }
.tile-sub { opacity: .65; font-size: 13px; }
.tile-stat { margin-top: 5px; font-size: 12px; color: var(--accent); opacity: .8; font-weight: 800;}
.tile.disabled { cursor: default; opacity: .4; pointer-events: none; }
.tile-badge {
  display: inline-block;
  margin-top: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: .6;
  position: absolute;
  right: -15px;
  top: calc(50% - 24px);
  font-size: 20px;
  font-weight: 800;
  font-family: var(--font-display);
  transform: scaleX(1.5) rotate(90deg);
  background-image: linear-gradient(to right, #FFF4E5 0%, #FFC477 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tile:hover .tile-badge { opacity: 1; }
.tile:active .tile-badge { opacity: .8; }
.menu-foot { margin-top: 24px; opacity: .45; font-size: 12px; }
.settings-link {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 20px; padding: 7px 16px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,.1); background: none;
  color: rgba(255,255,255,.38); font: 13px var(--font-body);
  text-decoration: none; transition: color var(--ease), border-color var(--ease);
}
.settings-link:hover { color: rgba(255,255,255,.65); border-color: rgba(255,255,255,.25); }
/* Two-column row of menu links (Achievements + Settings) */
.menu-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.menu-links .settings-link { margin-top: 0; }
/* Absolute-DDK crown — revealed on the menu only once earned */
.menu-crown {
  margin: 4px 0 2px; font: 800 13px var(--font-display); letter-spacing: .06em;
  color: #ffce6a; text-shadow: 0 0 12px rgba(255,190,60,.55); text-transform: uppercase;
}

/* Logo icon (used on index.html and donate.html) */
.menu-logo { width: 64px; height: 64px; margin-bottom: 16px; border-radius: 50%; display: block; margin-inline: auto; }

/* "Support" footer link */
.menu-foot-support { margin-top: 24px; }
.support-link {
  color: inherit; opacity: .75; text-decoration: none; transition: opacity .15s;
}
.support-link:hover { opacity: .95; }

/* ── Orchestrated entrance animation on load (DESIGN.md: one good page-load) ──
   fill-mode: backwards — hides the element during the delay, but NOT forwards,
   so after the animation we return to the base state and don't break tile hover transforms. */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.logo,
.tagline,
.tile,
.settings-link,
.menu-foot {
  animation: riseIn .5s cubic-bezier(.2,.7,.3,1) backwards;
}
.logo          { animation-delay: .05s; }
.tagline       { animation-delay: .13s; }
.tiles .tile:nth-child(1) { animation-delay: .21s; }
.tiles .tile:nth-child(2) { animation-delay: .29s; }
.settings-link { animation-delay: .37s; }
.menu-foot     { animation-delay: .43s; }

@media (prefers-reduced-motion: reduce) {
  .logo, .tagline, .tile, .settings-link, .menu-foot { animation: none; }
}
