:root {
  --ink:    #f7efe6;
  --hush:   rgba(247, 239, 230, 0.6);
  --honey:  #ffae2b;
  --rose:   #ff2e8f;
  --violet: #7a4dff;
  --coral:  #ff5436;
  --blue:   #2f7bff;
  --rx: 8deg; --ry: -12deg;
  --px: 0; --py: 0;
  --sheen: 0;
  --gx: 50%; --gy: 50%;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #08080a; }
body {
  font-family: "Bricolage Grotesque", "Inter Display", "Inter", ui-sans-serif, system-ui, sans-serif;
  font-optical-sizing: auto;
  color: var(--ink);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  perspective: 1000px;
  touch-action: none;
}
.card {
  container-type: inline-size;
  position: relative;
  width: min(580px, 90vw);
  aspect-ratio: 1.7;
  border-radius: 18px;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  will-change: transform;
  opacity: 0;
  animation: deal 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s forwards;
}
@keyframes deal { from { opacity: 0; translate: 0 40px; scale: 0.94; } to { opacity: 1; translate: 0 0; scale: 1; } }

.face {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #141416;
}

.ply {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: #2b2b30;
  transform: translateZ(calc(var(--i) * -1.5px));
}
.ply:last-of-type { background: #0d0d0f; }

.content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6.6cqw 6.8cqw 5.6cqw;
  transform: translateZ(26px);
  transform-style: preserve-3d;
}
.content nav { transform: translateZ(14px); }

.face::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: linear-gradient(115deg,
    transparent 30%,
    color-mix(in srgb, var(--honey) 30%, transparent) 39%,
    color-mix(in srgb, var(--coral) 34%, transparent) 45%,
    color-mix(in srgb, var(--rose) 36%, transparent) 51%,
    color-mix(in srgb, var(--violet) 36%, transparent) 57%,
    color-mix(in srgb, var(--blue) 30%, transparent) 63%,
    transparent 72%);
  filter: blur(22px);
  transform: translateX(calc(var(--sheen) * 34%));
  pointer-events: none;
}

.face::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(26cqw 20cqw at var(--gx) var(--gy), rgba(255, 255, 255, 0.07), transparent 72%),
    radial-gradient(70cqw 55cqw at var(--gx) var(--gy), rgba(255, 255, 255, 0.05), transparent 70%);
  pointer-events: none;
}

.grain {
  position: absolute;
  inset: 0;
  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='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.07;
  pointer-events: none;
}

.rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(70cqw 70cqw at var(--gx) var(--gy), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.06) 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.shadow {
  position: absolute;
  inset: 4% 3% -4%;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.9);
  filter: blur(30px);
  transform: translateZ(-90px) translate(calc(var(--px) * -34px), calc(20px + var(--py) * -22px));
}

h1 {
  position: relative;
  z-index: 1;
  font-size: 7.4cqw;
  font-weight: 700;
  font-stretch: 80%;
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 9.5em;
}
.bottom { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.top { position: relative; z-index: 1; }
.name { font-size: max(3.5cqw, 0.9375rem); font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.aside { margin-top: 2.4cqw; font-size: max(2.8cqw, 0.8125rem); line-height: 1.35; color: var(--hush); }
nav { display: flex; gap: max(2.6cqw, 8px); margin: -2cqw -2.4cqw -2cqw 0; }
nav a {
  --tint: var(--ink);
  display: grid;
  place-items: center;
  width: max(8.6cqw, 48px);
  height: max(8.6cqw, 48px);
  border-radius: 50%;
  color: var(--ink);
}
nav svg {
  width: max(5cqw, 26px);
  height: max(5cqw, 26px);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: filter 0.3s;
}
nav svg .solid { fill: currentColor; stroke: none; }
nav a:hover svg, nav a:focus-visible svg { filter: drop-shadow(0 0 5px var(--tint)) drop-shadow(0 0 12px var(--tint)); }
nav a:focus-visible { outline: 2px solid var(--tint); outline-offset: -4px; }

footer { padding: 16px 16px 22px; text-align: center; font-size: 0.8125rem; color: #6d6660; }

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; opacity: 1; }
  nav svg { transition: none; }
}
