/* Landing hub: a fragment of a Wordfeud board. The hero is the board with the
   wordmark played through the centre; destinations are tiles on your rack. */
.home {
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(var(--s4), 5vw, var(--s6)) var(--gutter) var(--s7);
}

/* Board colours — the physical board stays dark in both themes. */
.board {
  --board: #223039;
  --board-line: rgba(255, 255, 255, 0.06);
  --pz-tw: #a8443d;   /* triple word  */
  --pz-dw: #c98540;   /* double word  */
  --pz-tl: #2d6e9e;   /* triple letter*/
  --pz-dl: #4f97c0;   /* double letter*/
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: var(--board);
  background-image:
    linear-gradient(var(--board-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--board-line) 1px, transparent 1px);
  background-size: 34px 34px;
  background-position: center;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, var(--shadow);
  padding: clamp(var(--s6), 9vw, 72px) var(--gutter);
  text-align: center;
}
/* A few bonus squares, muted so the played word stays the focus. */
.board .pz {
  position: absolute; width: 34px; height: 34px; border-radius: 3px;
  opacity: 0.85; pointer-events: none;
}
.board .pz::after {
  content: attr(data-l);
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 700 10px/1 var(--font-body); letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
}
.board .pz-1 { top: 44px;  left: 8%;  background: var(--pz-tw); }
.board .pz-2 { top: 108px; right: 12%; background: var(--pz-tl); }
.board .pz-3 { bottom: 40px; left: 16%; background: var(--pz-dl); }
.board .pz-4 { bottom: 72px; right: 9%; background: var(--pz-dw); }
.board .star {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 180px; line-height: 1; color: rgba(255, 255, 255, 0.04);
  pointer-events: none; user-select: none;
}

.board-inner { position: relative; display: grid; gap: var(--s4); justify-items: center; }
/* The word, played flat through the centre — tiles lifted off the board. */
.board .wordmark { --t: clamp(30px, 5.6vw, 50px); justify-content: center; }
.board .wordmark .tile { transform: none; box-shadow: inset 0 -2px 0 var(--tile-edge), 0 4px 10px rgb(0 0 0 / 0.35); }
.board .wordmark .tld { transform: none; color: rgba(255, 255, 255, 0.5); }
.board-tag {
  margin: 0; max-width: 34ch;
  color: #cdd8e0; font-size: clamp(1rem, 2.4vw, 1.15rem); line-height: 1.5;
}
.board-count {
  font: 600 0.82rem/1 var(--font-body); letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55); font-variant-numeric: tabular-nums;
}
.board-count[hidden] { display: none; }

/* Racks — destinations as tiles waiting to be played. */
.racks { margin-top: var(--s5); display: grid; gap: var(--s3); }

.rack {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(var(--s3), 3vw, var(--s5));
  padding: clamp(var(--s4), 3vw, var(--s5));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit; text-decoration: none;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
a.rack:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }

.rack-tile { --t: clamp(46px, 11vw, 62px); align-self: center; }
.rack-tile .tile { box-shadow: inset 0 -3px 0 var(--tile-edge), 0 2px 4px rgb(0 0 0 / 0.18); }

.rack-body { display: grid; gap: 6px; min-width: 0; }
.rack-head { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.rack-body h2 { margin: 0; font-family: var(--font-display); font-size: clamp(1.25rem, 3.2vw, 1.6rem); line-height: 1.05; }
.rack-body p { margin: 0; color: var(--ink-2); font-size: 0.96rem; line-height: 1.45; max-width: 52ch; }
.rack-meta { font: 600 0.82rem/1 var(--font-body); letter-spacing: 0.03em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rack-meta[hidden] { display: none; }

.rack-go { color: var(--accent); font-weight: 600; font-size: 0.95rem; white-space: nowrap; }

/* The ladder — the premium square. Lives on the board, like play itself. */
.rack-feature {
  background: var(--board, #223039);
  border-color: transparent;
}
.rack-feature .rack-body h2 { color: #f2f6f9; }
.rack-feature .rack-body p { color: #c2cdd6; }
.rack-feature .rack-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: 6px; }
.rack-feature .btn { font-size: 0.95rem; padding: 0.6em 1.1em; }
.rack-feature .btn:not(.btn-primary) { background: transparent; color: #e9eef2; border-color: rgba(255, 255, 255, 0.28); }
.rack-feature .rack-meta { color: rgba(255, 255, 255, 0.6); }

.badge-new {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  background: #a8443d; color: #fff;
  font: 700 0.68rem/1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase;
}

.home-foot {
  margin-top: var(--s6);
  text-align: center;
  color: var(--ink-3);
  font-size: 0.85rem;
}

@media (max-width: 560px) {
  .rack { grid-template-columns: auto 1fr; }
  .rack-go { grid-column: 2; justify-self: start; }
  .rack-feature .rack-actions { grid-column: 1 / -1; }
}
