/* fan/apple.css: /worlds/apple/ only. Written 2026-11-21.

   Bondi Blue, on a desktop at night. The accent is the 1998 iMac's color,
   lifted until it reads on black, because that machine is the hinge of the
   whole story: before it the company nearly died, and after it came every
   line he uses. The backdrop is the two ends of the timeline at once: the
   first Mac's gray dither pattern, fixed, and two slow soft lights of the 2025
   glass drifting over it. The lights move on transform only, and stop under
   reduced motion, so the page stays cheap. */

body[data-fan="apple"] { --a: #4fc1e0; }

/* ── the backdrop ── */
.ap-sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(100% 80% at 50% 0%, #131b21 0%, #0b0f13 48%, #060708 100%);
}

.ap-sky > span { position: absolute; }

.ap-glow { inset: 0; background: radial-gradient(44% 30% at 50% 4%, rgba(79,193,224,.17), transparent 72%); }

/* the glass: two big soft discs, pre-blurred by their own gradient rather
   than by a filter, so moving them costs nothing but a composite */
.ap-light { width: 72vmax; height: 72vmax; border-radius: 50%; will-change: transform; }

.ap-light--a {
  top: -32vmax; left: -22vmax;
  background: radial-gradient(closest-side, rgba(79,193,224,.15), transparent);
  animation: ap-drift-a 38s ease-in-out infinite alternate;
}

.ap-light--b {
  bottom: -38vmax; right: -26vmax;
  background: radial-gradient(closest-side, rgba(185,196,208,.09), transparent);
  animation: ap-drift-b 46s ease-in-out infinite alternate;
}

@keyframes ap-drift-a { to { transform: translate3d(18vmax, 12vmax, 0) scale(1.1); } }

@keyframes ap-drift-b { to { transform: translate3d(-16vmax, -10vmax, 0) scale(1.08); } }

/* the 1984 desktop: a one-bit checker, two pixels a square, fading out down
   the page so it never sits under body text at full strength */
.ap-dither {
  inset: 0;
  background-image: repeating-conic-gradient(rgba(220,230,240,.05) 0 25%, transparent 0 50%);
  background-size: 4px 4px;
  mask-image: linear-gradient(#000, transparent 62%);
  -webkit-mask-image: linear-gradient(#000, transparent 62%);
}

@media (prefers-reduced-motion: reduce) { .ap-light, .apa-eye { animation: none; } }

/* ── hero ── */
/* the company sets its own name in its own system face (San Francisco since
   2015), which on a Mac is what -apple-system resolves to; set in aluminum
   gray rather than the accent, because that is what the machines are made of */
body[data-fan="apple"] .fan-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", var(--sans);
  font-weight: 600; letter-spacing: -0.03em;
  color: #e6ebf0; text-shadow: 0 0 34px rgba(79,193,224,.3);
}

/* ── the Macintosh ── */
.ap-art { padding: 0 var(--gutter); max-width: var(--maxw); margin: 2.6rem 0 0; }

.ap-art svg { display: block; width: min(250px, 100%); margin-inline: auto; overflow: visible; }

.apa-body   { fill: #d9d3c3; }

.apa-bezel  { fill: #c6bfad; }

/* the screen is lit: the first Mac drew black on white, not green on black */
.apa-screen { fill: #e4ecef; filter: drop-shadow(0 0 14px rgba(79,193,224,.35)); }

.apa-face   { fill: #1d2024; }

.apa-groove { stroke: #b7af9b; stroke-width: 2; fill: none; }

.apa-slot   { fill: #3a352d; }

.apa-slotlip { fill: #b7af9b; }

.apa-base   { fill: #c6bfad; }

.apa-vent   { stroke: #a9a18c; stroke-width: 2.4; stroke-linecap: round; fill: none; }

/* a blink every few seconds: the eyes squash on their own centers, which is
   transform only and so as cheap as motion gets */
.apa-eye {
  transform-box: fill-box; transform-origin: center;
  animation: ap-blink 6.5s ease-in-out infinite;
}

@keyframes ap-blink {
  0%, 94%, 100% { transform: scaleY(1); }
  97% { transform: scaleY(.12); }
}

.ap-art figcaption {
  margin-top: 0.9rem; text-align: center;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--mute);
}
