/* Home: a calm header and footer, and between them the portrait with knowledge circling it and running from your touch */
html, body.home { height: 100%; }
body.home { overflow: hidden; display: flex; flex-direction: column; touch-action: none; overscroll-behavior: none; }

.home-top {
  position: relative; z-index: 10; flex: none; display: flex; justify-content: center; align-items: center;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 12px; background: var(--bg);
}
/* the text logo writes itself in on every visit, then stays still */
.wordmark { display: block; position: relative; }
.wordmark img { width: clamp(150px, 17vw, 220px); height: auto; display: block;
  -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 55%); mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
  -webkit-mask-size: 240% 100%; mask-size: 240% 100%; -webkit-mask-position: 100% 0; mask-position: 100% 0;
}
.wordmark.go img { animation: write-in 2.3s cubic-bezier(.55, .1, .35, 1) .15s forwards; }
.wm-night { display: none !important; }
html.is-dark .wm-day { display: none !important; }
html.is-dark .wm-night { display: block !important; }
.wm-pen { position: absolute; top: 46%; left: 0; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 12px 3px color-mix(in srgb, var(--gold) 60%, transparent); opacity: 0; }
.wordmark.go .wm-pen { animation: pen-run 2.3s cubic-bezier(.55, .1, .35, 1) .15s forwards; }
@keyframes write-in { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
@keyframes pen-run { 0% { left: 0; opacity: 0; } 8% { opacity: 1; } 35% { top: 30%; } 60% { top: 58%; } 90% { opacity: 1; } 100% { left: 100%; top: 44%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wordmark img { animation: none; -webkit-mask-image: none; mask-image: none; } .wm-pen { display: none; } }
/* the quote: one still line, cut out between two scissor lines that snip across on every visit */
.quote-band { position: relative; z-index: 10; flex: none; background: var(--bg); padding: 0 16px; }
.home-quote { margin: 0; padding: 9px 0 10px; text-align: center; }
.home-quote blockquote { margin: 0; }
.home-quote p { margin: 0; white-space: nowrap; font-family: var(--display); font-style: italic; font-weight: 400; font-size: 15px; line-height: 1.35; color: var(--ink); }
.home-quote cite { font-family: var(--body); font-style: normal; font-weight: 600; font-size: .78em; letter-spacing: .04em; color: var(--gold-ink); white-space: nowrap; }
.home-quote.wrap p { white-space: normal; }
.home-quote.wrap .q-a, .home-quote.wrap .q-b { display: block; }
.home-quote.wrap cite { display: block; margin-top: 2px; }
.cut { position: relative; height: 14px; }
.cut-line { position: absolute; left: 0; right: 0; top: 50%; height: 0; border-top: 1.5px dashed color-mix(in srgb, var(--ink) 45%, transparent); clip-path: inset(0 100% 0 0); animation: cut-draw 2.2s cubic-bezier(.45, .05, .4, 1) .5s forwards; }
.cut-bottom .cut-line { clip-path: inset(0 0 0 100%); animation-name: cut-draw-back; animation-delay: .8s; }
@keyframes cut-draw { to { clip-path: inset(0 0 0 0); } }
@keyframes cut-draw-back { to { clip-path: inset(0 0 0 0); } }
.scissors { position: absolute; top: 50%; left: 0; width: 34px; height: 17px; margin: -8.5px 0 0 -17px; overflow: visible; color: var(--gold); opacity: 0;
  animation: cut-run 2.2s cubic-bezier(.45, .05, .4, 1) .5s forwards; }
.cut-bottom .scissors { left: 100%; transform: scaleX(-1); animation-name: cut-run-back; animation-delay: .8s; }
.scissors circle:not(.pin) { fill: none; stroke: currentColor; stroke-width: 2; }
.scissors .arm { stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.scissors .edge { fill: var(--ink); }
.scissors .pin { fill: var(--bg); }
.scissors .blade { transform-box: view-box; transform-origin: 21px 12px; animation: snip .28s ease-in-out .5s 8 alternate; }
.scissors .b1 { --open: -16deg; } .scissors .b2 { --open: 16deg; }
@keyframes snip { from { transform: rotate(var(--open)); } to { transform: rotate(0deg); } }
@keyframes cut-run { 0% { left: 0; opacity: 0; } 6% { opacity: 1; } 88% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes cut-run-back { 0% { left: 100%; opacity: 0; } 6% { opacity: 1; } 88% { opacity: 1; } 100% { left: 0; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cut-line { animation: none; clip-path: none; } .scissors { display: none; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.zone { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.field { position: absolute; inset: 0; }
body.home .frag { font-size: .8rem; box-shadow: 0 6px 22px -14px rgba(20, 33, 61, .35); cursor: pointer; }

.core {
  position: absolute; left: 50%; top: 50%; z-index: 5;
  width: clamp(170px, 32vmin, 330px); aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%); display: block; border-radius: 50%; -webkit-tap-highlight-color: transparent;
}
.core-halo { position: absolute; inset: 9%; display: grid; place-items: center; transition: transform .5s var(--ease); will-change: transform; }
.core-halo img { width: 100%; animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(-1.5deg); } }
/* the portrait levitates: a soft shadow on the ground below it, tightening and darkening as it sinks, spreading and fading as it rises */
.core-shadow {
  position: absolute; left: 20%; right: 20%; bottom: -1%; height: 10%; border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, rgba(20, 33, 61, .62), rgba(20, 33, 61, .28) 55%, transparent);
  filter: blur(4px); animation: hover-shadow 7s ease-in-out infinite;
}
html.is-dark .core-shadow { background: radial-gradient(closest-side, #000, rgba(0, 0, 0, .7) 50%, transparent); height: 12%; filter: blur(3px); }
@keyframes hover-shadow { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.78); opacity: .6; } }
.core.leaving .core-shadow { opacity: 0; transition: opacity .3s; }
.call-ring { position: absolute; left: 50%; top: 50%; z-index: 6; width: calc(clamp(170px, 32vmin, 330px) * 1.12); aspect-ratio: 1 / 1; transform: translate(-50%, -50%); pointer-events: none; }
.core-words { width: 100%; height: 100%; overflow: visible; animation: ringspin 26s linear infinite; }
.call-ring:has(.rw-about:hover) .core-words, .call-ring:has(.rw-about:focus-visible) .core-words { animation-play-state: paused; }
.rw-about { pointer-events: auto; cursor: pointer; }
.rw-about tspan { fill: var(--ink); font-weight: 700; animation: about-glow 2.4s ease-in-out infinite; }
@keyframes about-glow { 50% { fill: var(--gold-ink); } }
.about-ptr { pointer-events: none; }
.about-ptr path { fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.about-ptr .ap-dot { fill: var(--ink); }
.ap-bob { animation: ap-bob 1.1s ease-in-out infinite; }
@keyframes ap-bob { 50% { transform: translateX(7px); } }
.call-ring:has(.rw-about:hover) .ap-bob { animation-duration: .5s; }
.rw-about:hover tspan, .rw-about:focus-visible tspan { text-decoration: underline; }
.rw-about:focus-visible { outline: none; }
.core-words text { font-family: var(--body); font-weight: 600; font-size: 12px; letter-spacing: .12em; white-space: pre; text-transform: uppercase; fill: var(--gold-ink); }
@keyframes ringspin { to { transform: rotate(360deg); } }
.core:hover ~ .call-ring .core-words { animation-duration: 9s; }
.core-pulse { position: absolute; inset: 8%; border-radius: 50%; border: 2px solid var(--gold); opacity: 0; pointer-events: none; }
@keyframes pulse { 0% { opacity: .7; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.3); } }
.core:focus-visible { outline-offset: 10px; border-radius: 50%; }
.core.leaving .core-halo { transform: scale(1.08); }
.core.leaving .core-pulse { animation: burst .9s var(--ease) forwards; }
@keyframes burst { 0% { opacity: 1; transform: scale(.9); } 100% { opacity: 0; transform: scale(6); } }

.home-foot {
  position: relative; z-index: 10; flex: none; display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--rule); background: var(--bg); font-size: .8rem; color: var(--muted);
}
.home-links { display: flex; gap: 14px; }
.home-foot a { font-weight: 600; color: var(--ink); padding: 8px 2px; text-decoration: none; }
.home-foot a:hover { color: var(--gold-ink); }
.home-foot .social-link { padding: 0; }

@media (max-width: 640px) {
  .wordmark img { width: 140px; }
  body.home .frag { font-size: .7rem; }
  .core { width: 50vw; }
  .call-ring { width: calc(50vw * 1.16); }
}
