/* One motion language for the page. Numbers checked against the motion resources of the catalog:
   Magic UI Blur Fade (0.4 s, 6 px blur, trigger 50 px inside the viewport), Motion.dev stagger (0.05-0.1 s per item),
   Animate UI accordion (0.35 s, cubic-bezier(.215,.61,.355,1)), React Bits Blur Text (blur 10 px, 0.35 s a step, 0.2 s between words),
   Magic UI Border Beam (6-8 s a lap). Everything is switched off for prefers-reduced-motion. */
:root { --ease: cubic-bezier(.215, .61, .355, 1); --dur: .6s; interpolate-size: allow-keywords; }

/* 1. first screen: the copy arrives block by block */
@keyframes m-hero-in { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } }
.landing .o-hero-copy > * { animation: m-hero-in .9s var(--ease) both; }
.landing .o-hero-copy > :nth-child(1) { animation-delay: .15s; } .landing .o-hero-copy > :nth-child(2) { animation-delay: .25s; }
.landing .o-hero-copy > :nth-child(3) { animation-delay: .4s; } .landing .o-hero-copy > :nth-child(4) { animation-delay: .52s; } .landing .o-hero-copy > :nth-child(5) { animation-delay: .64s; }

/* 2. module panel: the old text leaves upward, the new one comes from below (or the other way when scrolling back); the number rolls */
@keyframes m-who-in { from { opacity: 0; transform: translateY(calc(var(--dy, 1) * 10px)); filter: blur(4px); } }
@keyframes m-roll { from { opacity: 0; transform: translateY(calc(var(--dy, 1) * .4em)); filter: blur(5px); } }
.landing .who.swap > * { animation: m-who-in var(--dur) var(--ease) both; }
.landing .who.swap > :nth-child(2) { animation-delay: 40ms; } .landing .who.swap > :nth-child(3) { animation-delay: 80ms; }
.landing .who.swap > :nth-child(4) { animation-delay: 120ms; } .landing .who.swap > :nth-child(5) { animation-delay: 160ms; } .landing .who.swap > :nth-child(6) { animation-delay: 200ms; }
.landing .who .who-count b { display: inline-block; }
.landing .who.swap .who-count b { animation: m-roll var(--dur) var(--ease) both; }
@keyframes m-dot { 40% { transform: translate(-50%, -50%) scale(1.7); } }
.landing .index li.on::before { animation: m-dot .6s var(--ease); }

/* 3. sections: heading, copy and blocks rise in turn */
.rv { opacity: 0; transform: translateY(20px); filter: blur(6px); transition: opacity var(--dur) var(--ease) var(--d, 0ms), transform var(--dur) var(--ease) var(--d, 0ms), filter var(--dur) var(--ease) var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; filter: none; }
.landing .fx-card.reveal { transition-duration: var(--dur); transition-timing-function: var(--ease); }

/* 4. path of a task: the panel fades in, the picture settles, the text slides in */
@keyframes m-panel { from { opacity: 0; } }
@keyframes m-img { from { opacity: 0; transform: scale(1.05); } }
@keyframes m-txt { from { opacity: 0; transform: translateX(18px); } }
.landing .lp-panel { animation: m-panel .4s var(--ease) both; }
.landing .lp-panel > img { animation: m-img .7s var(--ease) both; }
.landing .lp-panel > div { animation: m-txt .5s .08s var(--ease) both; }

/* 5. questions open smoothly, the chevron turns */
.landing .lp-faq::details-content { block-size: 0; overflow: hidden; transition: block-size .35s var(--ease), content-visibility .35s allow-discrete; }
.landing .lp-faq[open]::details-content { block-size: auto; }
.landing .lp-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; list-style: none; }
.landing .lp-faq summary::-webkit-details-marker { display: none; }
.landing .lp-faq summary::after { content: ""; flex: none; width: 8px; height: 8px; border: solid var(--o-ink-2); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .35s var(--ease); }
.landing .lp-faq[open] summary::after { transform: rotate(-135deg); }

/* 6. small things */
.landing .pl-plan::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--o-tint), transparent 70%); opacity: 0; transition: opacity .4s var(--ease); pointer-events: none; }
.landing .pl-plan:hover::before { opacity: 1; }
.scroll-cue { transition: opacity .6s var(--ease), transform .6s var(--ease), border-color .3s; }
.scroll-cue.gone { transform: translateY(10px); }
.final-bg { overflow: hidden; background: none; }
.final-bg::before { content: ""; position: absolute; inset: -40px 0; transform: translateY(var(--py, 0px)); will-change: transform;
  background: radial-gradient(700px 300px at 50% 100%, rgba(139, 92, 246, .22), transparent), linear-gradient(rgba(8, 6, 13, .35), rgba(8, 6, 13, .6)), url(/site/img/tree.jpg) center / cover; }

@media (prefers-reduced-motion: reduce) {
  .landing .o-hero-copy > *, .landing .who.swap > *, .landing .who.swap .who-count b, .landing .index li.on::before, .landing .lp-panel, .landing .lp-panel > * { animation: none; }
  .rv { opacity: 1; transform: none; filter: none; transition: none; }
  .landing .lp-faq::details-content, .landing .lp-faq summary::after, .landing .pl-plan::before { transition: none; }
  .final-bg::before { transform: none; }
}

/* 2. changing the language cross-fades the page instead of blinking (cross-document view transition) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; animation-timing-function: var(--ease); }

/* 4. a thin read-progress line at the very top */
.m-progress { position: fixed; z-index: 70; top: 0; left: 0; right: 0; height: 2px; transform-origin: left; transform: scaleX(var(--p, 0)); pointer-events: none;
  background: linear-gradient(90deg, var(--o-violet), var(--o-lilac)); box-shadow: 0 0 10px var(--o-violet); }

/* 1. Mac -> server: a light travels along the line under the two blocks and back */
.landing .sp-link { position: relative; }
.landing .sp-link::before { content: ""; position: absolute; top: -1px; left: 0; width: 140px; height: 1px; background: linear-gradient(90deg, transparent, var(--o-lilac), transparent);
  box-shadow: 0 0 8px var(--o-violet); animation: m-beam 5s var(--ease) infinite alternate; }
@keyframes m-beam { to { left: calc(100% - 140px); } }

/* 3. path of a task: the active step fills like a story and hands over to the next */
.landing .lp-steps label { position: relative; }
.landing .lp-steps.auto label.prog::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--o-violet), var(--o-lilac)); animation: m-fill 6s linear both; }
.landing .lp-steps:hover label.prog::after, .landing .lp-steps:focus-within label.prog::after { animation-play-state: paused; }
@keyframes m-fill { from { width: 0; } to { width: 100%; } }

/* 5. the cursor spotlight on every block */
.landing .sp-card, .landing .pl-plan { --mx: 50%; --my: 50%; }
.landing .sp-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .32s var(--ease);
  background: radial-gradient(360px circle at var(--mx) var(--my), var(--o-tint), transparent 60%); }
.landing .sp-card:hover::after { opacity: 1; }
.landing .pl-plan::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .32s var(--ease);
  background: radial-gradient(360px circle at var(--mx) var(--my), var(--o-tint), transparent 60%); }
.landing .pl-plan:hover::after { opacity: 1; }

/* 8. module list as a dock: names near the cursor grow */
.landing .index button { transform: scale(var(--s, 1)); transform-origin: left center; transition: transform .18s var(--ease), color .3s; }

@media (prefers-reduced-motion: reduce) { .landing .sp-link::before { animation: none; } .landing .lp-steps.auto label.prog::after { animation: none; width: 100%; } ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none; } }

/* module picture: two stacked images cross-fade */
.landing .holo-inner img { opacity: 0; transition: opacity .8s var(--ease); }
.landing .holo-inner img.on { opacity: 1; }
.landing .holo-inner img + img { position: absolute; inset: 1px; width: calc(100% - 2px); height: calc(100% - 2px); }
@media (prefers-reduced-motion: reduce) { .landing .holo-inner img { transition: none; } }

/* buttons stand still: no lift, no lean; on hover they only glow a little brighter */
.landing .btn, .landing .btn:hover, .landing .btn:active, .landing .beam, .landing .beam:hover { transform: none; translate: none; }
.landing .btn-primary { transition: filter .3s var(--ease), box-shadow .3s var(--ease); }
.landing .btn-primary:hover { filter: brightness(1.18); box-shadow: 0 0 28px -4px var(--o-violet), inset 0 1px 0 rgba(255, 255, 255, .3); }
.landing .beam span { transition: filter .3s var(--ease); }
.landing .beam:hover span { filter: brightness(1.25); }

/* Flows: one row per kind of work, the chain on one or two lines; stages fill as the flow is walked through */
.landing .fx-flows { grid-template-columns: 1fr; gap: 12px; }
.landing .fx-card { display: grid; grid-template-columns: minmax(180px, 250px) 1fr; grid-template-areas: "t c" "d c"; gap: 6px 40px; align-items: center; padding: 22px 28px; cursor: default; }
.landing .fx-card h3 { grid-area: t; align-self: end; }
.landing .fx-card .fx-fd { grid-area: d; align-self: start; margin: 0; font-size: 14px; }
.landing .fx-card .fx-chain { grid-area: c; gap: 10px 0; }
.landing .fx-chain .n { padding: 7px 14px; margin-right: 30px; }
.landing .fx-chain .n:last-of-type { padding: 7px 14px; margin-right: 0; }
.landing .fx-chain .n::after { right: -21px; width: 12px; }
.landing .fx-chain .n::before { content: ""; position: absolute; inset: 0; border-radius: 999px; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(139, 92, 246, .38), rgba(196, 181, 253, .22)); box-shadow: inset 0 0 0 1px rgba(196, 181, 253, .45);
  transform: scaleX(0); transform-origin: left; transition: transform .85s var(--ease); }
.landing .fx-chain .n.done::before { transform: scaleX(1); }
.landing .fx-chain .n.done { color: var(--o-ink); }
.landing .fx-chain.clearing .n::before { opacity: 0; transition: opacity .8s var(--ease); }
.landing .fx-chain .n { z-index: 0; isolation: isolate; }
@media (max-width: 800px) { .landing .fx-card { grid-template-columns: 1fr; grid-template-areas: "t" "d" "c"; gap: 8px; } .landing .fx-card .fx-chain { margin-top: 12px; } }
@media (prefers-reduced-motion: reduce) { .landing .fx-chain .n::before { transition: none; } }
.landing .fx-more { margin: 20px 0 0; font: 600 var(--t-body)/1.4 var(--f); color: var(--o-ink-2); }
/* While the page scrolls the module picture and the particles blur, whichever way it goes; they sharpen when it rests. */
.field, .holo-inner { transition: filter .35s var(--ease); }
.council.moving .holo-inner { filter: blur(10px); }
body:has(.council.moving) .field { filter: blur(6px); }
@media (prefers-reduced-motion: reduce) { .council.moving .holo-inner, body:has(.council.moving) .field { filter: none; } }

/* Module texts are normal page flow (one scroll); the sticky .pin behind them keeps the particles and the picture. */
.council .pin .holo { grid-column: 2; }
.council .mods { position: relative; z-index: 1; margin-top: -100svh; padding: 25svh var(--edge, 24px); pointer-events: none; }
.council .index { z-index: 2; }
.council .mods .who.mod { box-sizing: border-box; min-height: 50svh; max-width: min(46%, 560px); display: flex; flex-direction: column; justify-content: center; }
.council .mods .who.mod > * { opacity: 0; }
@media (max-width: 760px) { .council .mods { padding: 25svh 24px; } .council .mods .who.mod { max-width: none; justify-content: flex-end; padding-bottom: 4svh; } }
