/* Text is SF Pro Rounded through the system's `ui-rounded` (Safari / Apple devices; Apple's licence
   doesn't allow hosting the font files), falling back to Nunito from Google Fonts everywhere else.
   Both are variable fonts, so link weight animates smoothly. */
:root { --rounded: ui-rounded, 'Nunito', system-ui, sans-serif; }
@font-face {
  font-family: 'SF Pro Rounded Black';
  src: local('SFProRounded-Black'), local('SF Pro Rounded Black');
  font-weight: 900;
  font-display: swap;
}

:root { color-scheme: light; font-family: Arial, Helvetica, sans-serif; color: #000; background: #fff; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { min-height: 100svh; }
main { position: absolute; inset: 0 0 64px; overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: default; }
canvas.grabbable { cursor: grab; }
canvas.grabbing { cursor: grabbing; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
#letter-controls { position: absolute; inset: 0; pointer-events: none; }
.letter-control { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; padding: 0; border: 0; pointer-events: none; }
footer { position: absolute; z-index: 3; bottom: 0; left: 0; right: 0; height: 64px; padding: 0 max(24px, env(safe-area-inset-right)) max(0px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
footer { font-family: var(--rounded); letter-spacing: -.02em; }
footer p { margin: 0; font-size: 13px; color: #666; }
#info { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 65px; min-height: 44px; border: 0; padding: 0; background: transparent; color: #666; font: inherit; font-size: 13px; cursor: pointer; }
#info:hover { color: #000; }
#info:focus-visible { outline: 2px solid #000; outline-offset: 3px; border-radius: 4px; }
#info svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 600px) { footer { padding-left: 18px; padding-right: 18px; gap: 8px; } footer p, #info { font-size: 12px; } #info { min-width: 48px; } }
@media (prefers-reduced-motion: reduce) { canvas { cursor: default; } }

#about { position: absolute; z-index: 2; left: 0; top: 0; border-radius: 24px; background: transparent; border: 0; transform: translate(-50%, -50%); transform-origin: center; overflow: hidden; }
#about[hidden] { display: none; }
#about:focus { outline: none; }
.about-content { display: flex; flex-direction: column; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: clamp(20px, 3vw, 40px); font: 400 16px/1.45 var(--rounded); letter-spacing: -.02em; text-align: center; text-wrap: balance; }
.about-copy { flex: 0 0 auto; width: 100%; max-width: 480px; margin: auto; }
.about-content p { margin: 0 0 1em; }
.about-content p:last-child { margin-bottom: 0; }
/* Links are rounded black and inflate on hover, letter by letter like a cascade: each letter's real
   font size and weight grow on a springy, overshooting curve (so the words around get pushed aside).
   A fixed line height keeps the line from getting taller. */
/* Native kerning is off for link letters (app.js restores it as fixed margins): browsers only kern neighbours of equal size, so mid-cascade a
   strongly kerned pair (the "To" in Todayin.Design) would lose it, then snap together at the end. */
.about-content a { color: #000; font-weight: 900; line-height: 1; text-decoration: none; font-kerning: none; font-feature-settings: "kern" 0; transition: color .2s; }
.about-content a .ch { font-size: 1em; transition: font-size .45s cubic-bezier(.3, 1.9, .5, 1) calc(var(--r) * 22ms), font-weight .45s cubic-bezier(.3, 1.9, .5, 1) calc(var(--r) * 22ms); }
.about-content a:hover .ch { font-size: 1.1em; font-weight: 1000; transition-delay: calc(var(--i) * 35ms); }
.about-links a:hover .ch { font-weight: 600; }
.about-links { list-style: none; margin: 2em 0 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: .35em; }
.about-links a { color: #9a9a9a; font-weight: 400; }
.about-links a:hover { color: #555; }
.about-content a:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
@media (max-width: 600px) { .about-content { font-size: 14px; line-height: 1.45; padding: 22px; } }

/* Blueprint rendering: light grey grid behind the outlined letters. */
:root.wireframe, :root.wireframe body { background: #e4e5e8; }
:root.wireframe main { background-color: #e4e5e8; background-image: linear-gradient(#d4d6da 1px, transparent 1px), linear-gradient(90deg, #d4d6da 1px, transparent 1px); background-size: 120px 120px; background-position: -1px -1px; }
:root.wireframe #about { background-color: #e4e5e8; background-image: linear-gradient(#d4d6da 1px, transparent 1px), linear-gradient(90deg, #d4d6da 1px, transparent 1px); background-size: 120px 120px; }
:root.wireframe .about-content { color: #55575b; }
:root.wireframe .about-links a { color: #a3a5a9; }
:root.wireframe .about-links a:hover { color: #6e7074; }
@media (prefers-reduced-motion: reduce) { .about-content a .ch { transition: none; } .about-content a:hover .ch { font-size: 1em; font-weight: inherit; } }
/* The card's text rises into place, paragraph by paragraph, as the card opens; it fades out quickly on close. */
.about-copy > * { opacity: 0; transform: translateY(14px); transition: opacity .2s ease-in, transform .2s ease-in; }
#about.shown .about-copy > * { opacity: 1; transform: none; transition: opacity .45s ease-out, transform .7s cubic-bezier(.2, .9, .25, 1.15); }
#about.shown .about-copy > :nth-child(1) { transition-delay: 0ms; }
#about.shown .about-copy > :nth-child(2) { transition-delay: 45ms; }
#about.shown .about-copy > :nth-child(3) { transition-delay: 90ms; }
#about.shown .about-copy > :nth-child(4) { transition-delay: 135ms; }
#about.shown .about-copy > :nth-child(5) { transition-delay: 180ms; }
#about.shown .about-copy > :nth-child(6) { transition-delay: 225ms; }
#about.shown .about-copy > :nth-child(7) { transition-delay: 270ms; }
#about.shown .about-copy > :nth-child(8) { transition-delay: 315ms; }
@media (prefers-reduced-motion: reduce) { .about-copy > *, #about.shown .about-copy > * { transform: none; } }
