@charset "UTF-8";

/* The field continues through the catalogue. Text stays perfectly still. */
:root {
  --page-signal: #6e874a;
  --page-core: #47652d;
  --page-rgb: 112 139 74;
  --page-light: .56;
  --rule-period: 15.6s;
  --specimen-period: 14.8s;
  --specimen-open: 1.045;
}
:root[data-theme="dark"] {
  --page-signal: #c0d49d;
  --page-core: #ecf2ce;
  --page-rgb: 177 204 135;
  --page-light: .9;
}
:root[data-observation-mode="purpose"] {
  --rule-period: 11.2s;
  --specimen-period: 11.7s;
  --specimen-open: 1.035;
}
:root[data-observation-mode="growth"] {
  --rule-period: 19.4s;
  --specimen-period: 17.3s;
  --specimen-open: 1.09;
}
.directory, .directory-tabs, .directory-foot, .afterword, footer { position: relative; }
.directory { --rule-delay: -2.4s; }
.directory-tabs { --rule-delay: -7.1s; }
.category-panel { --rule-delay: -11.6s; }
.directory-foot { --rule-delay: -4.8s; }
footer { --rule-delay: -9.3s; }

/* A seven-pixel strip contains all light, so nothing blooms across the copy. */
.living-rule {
  position: absolute; left: 0; right: 0; top: -4px; height: 7px; z-index: 2;
  display: block; overflow: hidden; pointer-events: none; isolation: isolate;
  max-width: none;
  --rule-strength: .66;
}
.directory-tabs > .living-rule,
.category-panel > .living-rule,
.directory-foot > .living-rule { top: auto; bottom: -4px; }
.directory-foot > .living-rule { opacity: .46; }
.living-rule::before {
  content: ""; position: absolute; top: 3px; left: 0; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--page-signal) 16%, var(--page-signal) 84%, transparent);
  opacity: .34;
  animation: rule-breath 9.7s ease-in-out var(--rule-delay, 0s) infinite paused;
}
.living-rule::after {
  content: ""; position: absolute; left: 0; top: 3px; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent 5%, var(--page-core), transparent 95%);
  opacity: 0; scale: .05 1; transform-origin: left center;
}
.living-rule > i { position: absolute; left: 0; width: 28%; display: block; pointer-events: none; }
.rule-glow {
  top: 1px; height: 5px; opacity: var(--page-light);
  background: radial-gradient(ellipse, rgb(var(--page-rgb) / .34), transparent 70%);
  animation: rule-stream var(--rule-period) linear var(--rule-delay, 0s) infinite paused;
}
.rule-glow::after {
  content: ""; position: absolute; top: 2px; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--page-signal) 42%, var(--page-core) 51%, transparent 85%);
}
.rule-seed {
  top: 2px; height: 3px;
  animation: rule-stream var(--rule-period) linear var(--rule-delay, 0s) infinite paused;
}
.rule-seed::after {
  content: ""; position: absolute; left: 50%; width: 3px; height: 3px;
  background: var(--page-core); opacity: var(--page-light); border-radius: 50%;
  box-shadow: 0 0 5px rgb(var(--page-rgb) / .45);
}
.category-panel > .living-rule .rule-glow,
.category-panel > .living-rule .rule-seed { animation-direction: reverse; }
[data-observation-mode="purpose"] .category-panel > .living-rule .rule-glow,
[data-observation-mode="purpose"] .category-panel > .living-rule .rule-seed { animation-direction: normal; }
[data-observation-mode="growth"] .living-rule::after { transform-origin: center; }
.category-panel:is(:hover, :focus-within) > .living-rule,
.directory-tabs:focus-within > .living-rule,
footer:focus-within > .living-rule { --rule-strength: 1; }
@keyframes rule-breath {
  0%, 100% { opacity: calc(var(--rule-strength) * .24); }
  48% { opacity: var(--rule-strength); }
  72% { opacity: calc(var(--rule-strength) * .63); }
}
@keyframes rule-stream {
  0% { transform: translateX(-105%); opacity: 0; }
  8% { opacity: var(--page-light); }
  84% { opacity: var(--page-light); }
  100% { transform: translateX(462%); opacity: 0; }
}

/* An index mark receives a travelling highlight, never a glowing button. */
.directory-tabs button { position: relative; overflow: hidden; }
.directory-tabs button::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 35%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--page-core), transparent);
  opacity: 0; transform: translateX(-115%); pointer-events: none;
}
.directory-tabs button[aria-selected="true"]::after,
.directory-tabs button:is(:hover, :focus-visible)::after {
  animation: tab-reply 8.6s ease-in-out -1.8s infinite paused;
}
.directory-tabs button:is(:hover, :focus-visible)::after { animation-duration: 3.2s; animation-delay: -.3s; }
.directory-tabs button[aria-selected="true"] .tab-number { color: var(--accent); }
.directory-tabs > .living-rule::after {
  left: var(--index-origin, 12.5%); width: 52px; height: 3px; top: 2px;
  margin-left: -26px; scale: 1; opacity: .32;
  background: radial-gradient(ellipse, var(--page-core), rgb(var(--page-rgb) / .3) 26%, transparent 71%);
  transition: left .65s cubic-bezier(.18,.67,.18,1), opacity .45s;
}
.directory.is-sensing .directory-tabs > .living-rule::after { opacity: .86; }
@keyframes tab-reply {
  0%, 14% { transform: translateX(-115%); opacity: 0; }
  32%, 70% { opacity: var(--page-light); }
  88%, 100% { transform: translateX(390%); opacity: 0; }
}

/* Each existing specimen keeps its own internal tempo and small opening. */
.panel-specimen { position: relative; isolation: isolate; }
.panel-specimen::before {
  content: ""; position: absolute; width: 160px; height: 160px; left: 50%; top: 50%;
  z-index: -1; pointer-events: none; border-radius: 50%;
  background: radial-gradient(ellipse, rgb(var(--page-rgb) / .1), transparent 68%);
  transform: translate(-50%, -57%) scale(.85);
  animation: specimen-field 18.9s ease-in-out -6.1s infinite paused;
}
.panel-specimen svg { overflow: visible; transition: stroke .6s; }
.panel-specimen svg > g {
  transform-box: fill-box; transform-origin: center;
  animation: specimen-unfold var(--specimen-period) ease-in-out -4.1s infinite paused;
}
.panel-specimen svg > g > * {
  transform-box: fill-box; transform-origin: center; stroke-width: .85;
  animation: specimen-memory 12.7s ease-in-out -2.1s infinite paused;
}
.panel-specimen svg > g > :nth-child(2) { animation-duration: 17.3s; animation-delay: -8.6s; }
.panel-specimen svg > g > :nth-child(3) { animation-duration: 15.1s; animation-delay: -4.3s; }
.panel-specimen svg > g > :nth-child(4) { animation-duration: 19.4s; animation-delay: -12.7s; }
.panel-specimen .sample-lab { animation-name: specimen-shell; }
.category-panel:is(:hover, :focus-within) .panel-specimen svg { stroke: var(--living-edge, var(--accent)); }
@keyframes specimen-unfold {
  0%, 100% { scale: .982 1; }
  46% { scale: var(--specimen-open) 1.018; }
  73% { scale: 1.012 .99; }
}
@keyframes specimen-shell {
  0%, 100% { scale: .975 1; rotate: -1.8deg; }
  48% { scale: var(--specimen-open) 1.04; rotate: 1.8deg; }
}
@keyframes specimen-memory {
  0%, 100% { stroke-opacity: .56; scale: 1; stroke-width: .8; }
  47% { stroke-opacity: 1; scale: 1.027; stroke-width: 1.13; }
  65% { stroke-opacity: .84; scale: 1.012; stroke-width: .9; }
}
@keyframes specimen-field {
  0%, 100% { transform: translate(-50%, -57%) scale(.85); opacity: .45; }
  54% { transform: translate(-48%, -55%) scale(1.09); opacity: 1; }
}

.panel-status .status-dot {
  position: relative; width: 5px; height: 5px; background: var(--page-signal);
  border-color: var(--page-signal); flex-shrink: 0;
  animation: status-respiration 8.9s ease-in-out -2.5s infinite paused;
}
.panel-status .status-dot::after {
  content: ""; position: absolute; inset: -3px; border: 1px solid var(--page-signal);
  border-radius: 50%; opacity: .2;
  animation: status-periphery 11.3s ease-in-out -5.8s infinite paused;
}
@keyframes status-respiration {
  0%, 100% { scale: .88; opacity: .57; box-shadow: 0 0 2px rgb(var(--page-rgb) / .08); }
  48% { scale: 1.12; opacity: 1; box-shadow: 0 0 7px rgb(var(--page-rgb) / .5); }
}
@keyframes status-periphery {
  0%, 100% { scale: .8; opacity: .12; }
  46% { scale: 1.35; opacity: .47; }
}

/* One readable response to changing a category; content itself never blinks. */
.directory[data-page-motion="running"] .category-panel.is-reindexing > .living-rule::after { animation: catalogue-reply 1.1s cubic-bezier(.16,.67,.16,1) both; }
.directory[data-page-motion="running"] .category-panel.is-reindexing .panel-specimen svg { animation: specimen-arrive 1.1s cubic-bezier(.16,.67,.16,1) both; }
@keyframes catalogue-reply {
  0% { scale: .05 1; opacity: 0; }
  28% { opacity: 1; }
  70% { scale: 1 1; opacity: .64; }
  100% { scale: 1 1; opacity: 0; }
}
@keyframes specimen-arrive {
  0% { scale: .955; stroke: var(--line); }
  48% { scale: 1.04; stroke: var(--page-core); }
  100% { scale: 1; stroke: var(--line); }
}

/* The last mark gently opens; its companion light has a separate cadence. */
.afterword { isolation: isolate; }
.afterword::before {
  content: ""; position: absolute; inset: 8% -2%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 30% 52%, rgb(var(--page-rgb) / .09), transparent 66%);
  animation: afterword-tide 24.3s ease-in-out -9.1s infinite alternate paused;
}
.afterword > svg { overflow: visible; }
.afterword > svg path {
  transform-box: fill-box; transform-origin: center bottom;
  animation: leaf-return 16.7s ease-in-out -3.2s infinite paused;
}
.afterword > svg path + path { animation-name: leaf-open; animation-duration: 21.1s; animation-delay: -9.8s; }
@keyframes leaf-return {
  0%, 100% { rotate: -2.8deg; scale: .98 1; stroke-opacity: .68; }
  49% { rotate: 2deg; scale: 1.04 1.025; stroke-opacity: 1; }
}
@keyframes leaf-open {
  0%, 100% { rotate: 2.4deg; scale: 1; stroke-opacity: .74; }
  53% { rotate: -3.6deg; scale: 1.06 1.025; stroke-opacity: 1; }
}
@keyframes afterword-tide {
  from { transform: translateX(-1.5%) scale(.96); opacity: .35; }
  to { transform: translateX(2.5%) scale(1.035); opacity: 1; }
}

/* Nothing runs until its own section is visible and the page is in motion. */
[data-page-motion="running"] .living-rule::before,
[data-page-motion="running"] .rule-glow,
[data-page-motion="running"] .rule-seed,
[data-page-motion="running"] .directory-tabs button::after,
[data-page-motion="running"] .panel-specimen::before,
[data-page-motion="running"] .panel-specimen svg > g,
[data-page-motion="running"] .panel-specimen svg > g > *,
[data-page-motion="running"] .status-dot,
[data-page-motion="running"] .status-dot::after,
.afterword[data-page-motion="running"]::before,
.afterword[data-page-motion="running"] > svg path { animation-play-state: running; }

[data-page-motion="paused"] *,
[data-page-motion="paused"] *::before,
[data-page-motion="paused"] *::after,
[data-page-motion="paused"]::before,
[data-page-motion="paused"]::after { animation-play-state: paused !important; }
[data-page-motion="reduced"] *,
[data-page-motion="reduced"] *::before,
[data-page-motion="reduced"] *::after,
[data-page-motion="reduced"]::before,
[data-page-motion="reduced"]::after { animation: none !important; transition: none !important; }
[data-page-motion="reduced"] .rule-glow,
[data-page-motion="reduced"] .rule-seed { display: none; }
[data-page-motion="reduced"] .living-rule::before { opacity: .23; }
[data-page-motion="reduced"] .status-dot { opacity: .8; box-shadow: none; }
[data-page-motion="reduced"] .status-dot::after { opacity: .15; }

@media(max-width:600px) {
  .category-panel .panel-specimen { position: absolute; }
  .directory-foot > .living-rule { max-width: none; }
  .panel-specimen::before { width: 105px; height: 105px; }
  .category-panel .panel-specimen { opacity: .42; }
  .living-rule > i { width: 28%; }
  .rule-seed::after { width: 2px; height: 2px; top: .5px; }
  .afterword::before { inset: 8% -4%; }
}
@media(prefers-reduced-motion:reduce) {
  :root:not([data-motion-override="true"]) :is(.directory, .afterword, footer) *,
  :root:not([data-motion-override="true"]) :is(.directory, .afterword, footer) *::before,
  :root:not([data-motion-override="true"]) :is(.directory, .afterword, footer) *::after,
  :root:not([data-motion-override="true"]) .afterword::before { animation: none !important; transition: none !important; }
  :root:not([data-motion-override="true"]) :is(.rule-glow, .rule-seed) { display: none; }
  :root:not([data-motion-override="true"]) .living-rule::before { opacity: .23; }
  :root:not([data-motion-override="true"]) .panel-status .status-dot { box-shadow: none; }
}
