/* Everyone's own links page (server/shape/link-pages.mjs): what every design shares. Each design's own stylesheet comes
   after this one, with its palettes written in front of it from src/lib/link-page/designs.ts, which set --bg, --text,
   --text2, --surface, --hover, --line, --accent and --on-accent. Nothing here may name a colour of its own. */

@font-face { font-family: Geist; src: url(/fonts/Geist_400Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Geist; src: url(/fonts/Geist_500Medium.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Geist; src: url(/fonts/Geist_600SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Geist; src: url(/fonts/Geist_700Bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(/fonts/GeistMono_400Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(/fonts/GeistMono_500Medium.woff2) format('woff2'); font-weight: 500; font-display: swap; }

:root { --sans: Geist, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'Geist Mono', ui-monospace, Menlo, Consolas, monospace; --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.backdrop { display: none; }
.page {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: max(48px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) max(40px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  display: grid;
  gap: 20px;
}

/* Whose page it is. */
.who { display: grid; justify-items: center; text-align: center; gap: 4px; min-width: 0; }
.face { display: block; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--surface); }
.face.initial { display: grid; place-items: center; font-size: 40px; font-weight: 600; color: var(--text2); border: 1px solid var(--line); }
.name { margin: 10px 0 0; font-size: 24px; line-height: 1.2; font-weight: 600; text-wrap: balance; overflow-wrap: anywhere; }
.handle { margin: 0; font-size: 14px; color: var(--text2); }
.line { margin: 6px 0 0; max-width: 46ch; color: var(--text2); text-wrap: pretty; overflow-wrap: anywhere; }
.prompt { display: none; }

/* Their sites as marks alone. */
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.social { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--text); }
a.social:hover { background: var(--hover); }
.social svg { display: block; width: 24px; height: 24px; }

/* The links, with a heading over each group. */
.links { display: grid; gap: 12px; min-width: 0; }
.group { margin: 14px 0 0; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text2); text-align: center; }
.group:first-child { margin-top: 0; }
.link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
}
a.link:hover { background: var(--hover); transform: translateY(-1px); }
a.link:active { transform: translateY(1px); }
.mark { flex: none; width: 32px; display: grid; place-items: center; }
.mark svg { display: block; width: 24px; height: 24px; }
.text { min-width: 0; flex: 1; display: grid; gap: 2px; }
.title { font-weight: 600; overflow-wrap: anywhere; }
.where { font-size: 13px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover { display: none; }

/* Featured: the first link, large, with their newest art across it. */
.link.featured { min-height: 76px; }
.link.featured .title { font-size: 18px; }
.link.featured.with-cover { flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
.link.featured.with-cover .cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: pixelated; }
.link.featured.with-cover .mark { display: none; }
.link.featured.with-cover .text { padding: 14px 18px 16px; }

/* Grid: two tiles to a row, a heading across both. */
.layout-grid .links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-grid .group { grid-column: 1 / -1; }
.layout-grid .link { flex-direction: column; justify-content: center; text-align: center; min-height: 116px; gap: 10px; padding: 14px 10px; }
.layout-grid .link .mark svg { width: 32px; height: 32px; }
.layout-grid .link .where { display: none; }

/* Their newest art. */
.art { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.piece { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--surface); }
.piece img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
a.piece:hover img { transform: scale(1.03); }
.piece img { transition: transform 0.2s ease; }

/* Joining Pixtopia with their invitation. */
.invite { display: grid; justify-items: center; gap: 2px; padding: 14px 18px; border-radius: 14px; background: var(--accent); color: var(--on-accent); text-decoration: none; text-align: center; }
.invite-title { font-weight: 600; }
.invite-line { font-size: 13px; opacity: 0.8; }
a.invite:hover { filter: brightness(1.08); }

/* A tip in PIXA, when its owner wants them: beside the invitation, in the accent's outline rather than its fill. */
.tip { display: grid; justify-items: center; gap: 2px; padding: 12px 18px; border-radius: 14px; border: 2px solid var(--accent); background: transparent; color: var(--text); text-decoration: none; text-align: center; }
.tip-title { font-weight: 600; }
.tip-line { font-size: 13px; color: var(--text2); }
a.tip:hover { background: var(--hover); }

.made { display: grid; justify-items: center; gap: 2px; margin-top: 6px; font-size: 13px; color: var(--text2); text-align: center; }
.made p { margin: 0; }
.made a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

.preview-note { position: sticky; top: 0; z-index: 5; margin: 0; padding: 8px 16px; text-align: center; font: 500 13px/1.4 var(--sans); background: #ffb547; color: #0b0b0c; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
