/* Plaintexters brand, Night theme: values taken from brand-kit/code/plaintexters.css. */
@font-face { font-family: "Baloo Bhai 2"; src: url("/fonts/baloo-bhai-2-latin.ttf") format("truetype"); font-weight: 400 800; font-display: swap; }

:root {
  --background: #0F1115;
  --text: #ECEAE5;
  --text-muted: #9BA1AB;
  --accent-text: #8AA6FF;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--background); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px 20px;
  color: var(--text);
  font: 500 clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem)/1.5 "Baloo Bhai 2", system-ui, sans-serif;
  text-align: center;
}

/* The brand backdrop, fixed behind the page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    var(--grain),
    radial-gradient(75% 95% at 100% 0%, #3A66F780, #3A66F700 68%),
    radial-gradient(45% 70% at 100% 60%, #8AA6FF33, #8AA6FF00 68%),
    radial-gradient(70% 85% at 72% 100%, #2B4FD04D, #2B4FD000 68%),
    radial-gradient(65% 80% at 0% 100%, #1E2A6B6B, #1E2A6B00 68%),
    linear-gradient(160deg, #0F1115 0%, #0F1118 45%, #101322 100%);
}

/* Centred in the free space; the footer stays at the bottom. */
main { width: 100%; max-width: 760px; margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: clamp(32px, 6vh, 56px); }

footer { padding-top: 32px; color: var(--text-muted); font-size: 0.9rem; text-wrap: balance; }

.logo { width: min(100%, 520px); height: auto; }

/* A glass card. */
.card {
  container-type: inline-size;
  position: relative;
  width: 100%;
  padding: clamp(28px, 5vw, 48px) clamp(18px, 5vw, 48px);
  border-radius: 28px;
  background: linear-gradient(180deg, #FFFFFF14, #FFFFFF00 50%), #171B2166;
  box-shadow: 0 40px 90px #00000080, 0 10px 28px #00000059;
  -webkit-backdrop-filter: blur(36px) brightness(1.3) saturate(1.2);
  backdrop-filter: blur(36px) brightness(1.3) saturate(1.2);
  animation: enter 250ms ease-out both;
}

/* The lit rim. */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(165deg, #D2DCFFB3, #8AA6FF33 30%, #8AA6FF14 70%, #C3D0FF4D);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* One line at every width: the size follows the card's own width. */
h1 { margin: 0 0 20px; font-size: min(9.4cqi, 3.25rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; white-space: nowrap; }

p { margin: 0; color: var(--text-muted); text-wrap: balance; }

.joke { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 2px solid #FFFFFF14; color: var(--text); }

/* One sentence per line, so the punchline starts on its own. */
.joke span { display: block; }

.key { color: var(--accent-text); white-space: nowrap; }

@keyframes enter { from { opacity: 0; transform: translateY(24px); } }

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
}
