/* TCC / Movimento: cinematic care, not a loading screen. */
@view-transition{navigation:auto}
::view-transition-old(root){animation:chapter-out .25s ease both}
::view-transition-new(root){animation:chapter-in .48s cubic-bezier(.16,1,.3,1) both}
@keyframes chapter-out{to{opacity:0;transform:translateY(-18px)}}
@keyframes chapter-in{from{opacity:0;transform:translateY(38px)}}
html[data-motion="active"] .hero-copy{animation:none}
.motion-word{display:inline-block;transform-origin:50% 100%;backface-visibility:hidden}
.motion-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px 20px;margin-top:20px}
.motion-toolbar button,.carousel-controls button{min-height:44px;cursor:pointer;font:inherit;color:var(--txt);border:1px solid var(--line2);background:#151e18;border-radius:7px;padding:10px 15px;font-size:.8rem}
.motion-toolbar button{background:transparent;border:0;border-bottom:1px solid #53623c;border-radius:0;padding:6px 0;color:var(--txt2)}
.motion-toolbar button:hover{color:var(--acc);border-color:var(--acc)}
.motion-toolbar button:disabled{cursor:default;opacity:.7}
.motion-toolbar .motion-state{width:6px;height:6px;display:inline-block;border-radius:50%;background:var(--acc);box-shadow:0 0 10px #b6ff0066;margin-right:8px}
html[data-motion="paused"] .motion-state{background:var(--txt3);box-shadow:none}
.reading-progress{position:fixed;inset:0 0 auto;height:3px;z-index:240;pointer-events:none}
.reading-progress>i{display:block;height:100%;background:var(--acc);transform:scaleX(0);transform-origin:left;box-shadow:0 0 12px #b6ff0080}
.hero:has(.motion-aside){overflow:hidden;background:radial-gradient(ellipse at 85% 38%,#b6ff0010,transparent 48%)}
.hero:has(.motion-aside) .hero-layout{grid-template-columns:minmax(0,1.35fr) minmax(330px,1fr);gap:clamp(28px,4vw,60px)}
.motion-aside.hero-aside{border:0;padding-top:0;display:block;position:relative}
.scene-shell{position:relative;isolation:isolate;height:390px;margin:-30px -28px 18px}
.scene-shell::before{content:"";position:absolute;inset:14% 10%;z-index:-1;background:radial-gradient(ellipse,#b6ff0015,transparent 70%);border-radius:50%}
.particle-stage{position:absolute;inset:0;overflow:hidden;contain:layout paint}
.particle-stage canvas{width:100%;height:100%;display:block}
.scene-shell .territory-float{position:absolute;right:14px;bottom:0;width:47%;z-index:2;transform:rotate(-5deg);border:1px solid #a3b78d88;border-radius:10px;box-shadow:0 18px 55px #0009;overflow:hidden;background:var(--bg2);transition:border-color .3s ease}
.scene-shell .territory-float:hover{transform:rotate(0) translateY(-5px)}
.scene-shell .territory-float img{width:100%;height:auto;display:block;border-radius:0;max-height:none;object-fit:cover}
.scene-caption{position:absolute;left:28px;bottom:10px;max-width:20ch;font-size:.7rem;color:#c0c9c3;letter-spacing:.1em;text-transform:uppercase;line-height:1.8;pointer-events:none}
.scene-caption strong{display:block;color:var(--acc);font-size:.77rem;letter-spacing:.04em}
.motion-aside h2{margin-top:22px;border-top:1px solid #b6ff003d;padding-top:18px}
.motion-aside p{font-size:.86rem}
/* The library only changes the working static grid after it is available. */
.carousel-shell{position:relative;margin-top:28px;min-width:0}
.grid.g3.cards-nav.chapter-carousel{display:block;overflow:hidden;perspective:1200px;padding:28px 0 45px;margin:0;isolation:isolate}
.chapter-carousel .swiper-wrapper{align-items:stretch;gap:0}
.chapter-carousel .swiper-slide{height:auto;box-sizing:border-box;transition:opacity .5s ease;opacity:.54;transform-style:preserve-3d}
.chapter-carousel .swiper-slide-active{opacity:1}
.chapter-carousel .swiper-slide a.card{height:100%;margin:0;min-height:440px;padding:26px;box-shadow:0 18px 32px #0005;background:#141d19;border-color:#506439;transition:border-color .25s,box-shadow .25s;transform:none}
.chapter-carousel .swiper-slide-active a.card{border-color:#b6ff0090;box-shadow:0 0 0 1px #b6ff001a,0 24px 55px #0008}
.chapter-carousel .cardimg{height:220px;margin:-26px -26px 24px}
.chapter-carousel .cardimg img{filter:saturate(.8);object-fit:cover}
.chapter-carousel .swiper-slide-active .cardimg img{filter:saturate(1)}
.chapter-carousel .card h3{font-size:1.25rem}
.chapter-carousel .card p{font-size:.94rem;line-height:1.65}
.chapter-carousel .swiper-slide-shadow-left,.chapter-carousel .swiper-slide-shadow-right{border-radius:12px;pointer-events:none}
.carousel-controls{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;position:relative;z-index:3;margin-top:0}
.carousel-controls button{min-width:44px;transition:background .2s,border-color .2s}
.carousel-controls button:hover{background:#26351b;border-color:var(--acc)}
.carousel-controls .carousel-next{background:var(--acc);color:var(--bg);font-weight:600;border-color:var(--acc)}
.carousel-controls .carousel-next:hover{background:#d8ff66}
.carousel-controls .carousel-position{min-width:72px;text-align:center;font-family:var(--font-m);font-size:.88rem;color:var(--acc)}
.carousel-controls .carousel-pause{background:none;border-color:transparent;color:var(--txt3);font-size:.8rem}
.carousel-hint{text-align:center;color:var(--txt3);font-size:.82rem;margin-top:18px;line-height:1.6}
.carousel-shell:before{content:"";position:absolute;left:15%;right:15%;height:1px;bottom:130px;background:#b6ff0055;box-shadow:0 0 35px 6px #b6ff0020;pointer-events:none}
html[data-motion="active"] .timeline{position:relative}
html[data-motion="active"] .timeline::after{content:"";position:absolute;left:0;top:0;bottom:32px;width:2px;background:var(--acc);transform:scaleY(var(--timeline-progress,0));transform-origin:top;pointer-events:none;box-shadow:0 0 10px #b6ff0050}
html[data-motion="active"] .btn,html[data-motion="active"] .cardimg{will-change:auto}
@media(min-width:1001px){.hero:has(.motion-aside){padding-top:148px;padding-bottom:70px;min-height:760px}.motion-aside{perspective:900px}}
@media(max-width:1000px){
 .hero:has(.motion-aside) .hero-layout{grid-template-columns:1fr}
 .motion-aside.hero-aside{max-width:600px;width:100%;margin:auto}
 .scene-shell{height:350px;margin:0 0 24px}
 .scene-shell .territory-float{width:37%}
 .chapter-carousel .swiper-slide a.card{min-height:430px}
}
@media(max-width:700px){
 .motion-toolbar{gap:8px 16px;margin-top:14px}.motion-toolbar button{font-size:.76rem}
 .scene-shell{height:300px;margin:0 -12px 16px}.scene-shell .territory-float{width:43%;right:14px}
 .hero-copy>.scene-shell{height:200px;margin:14px 0 8px}
 .hero-copy>.scene-shell .particle-stage{inset:-12px -8px}
 .hero-copy>.scene-shell .territory-float{width:36%;right:2px;bottom:0}
 .hero-copy>.scene-shell .scene-caption{display:none}
 .scene-caption{font-size:.6rem;left:14px;bottom:2px;max-width:17ch}.scene-caption strong{font-size:.65rem}
 .motion-aside.hero-aside{margin-top:0}.motion-aside h2{font-size:1.25rem}
 .grid.g3.cards-nav.chapter-carousel{padding:18px 0 32px;width:calc(100% + 24px);margin-left:-12px}
 .chapter-carousel .swiper-slide a.card{padding:22px;min-height:440px}.chapter-carousel .cardimg{margin:-22px -22px 20px;height:185px}
 .chapter-carousel .card h3{font-size:1.13rem}.chapter-carousel .card p{font-size:.9rem}
 .carousel-controls{gap:8px}.carousel-controls button{font-size:.78rem;padding:10px 12px}
 .carousel-controls .carousel-pause{flex-basis:100%;padding:4px;min-height:36px}
 .carousel-hint{margin-top:6px;font-size:.78rem}
}
@media(prefers-reduced-motion:reduce){
 ::view-transition-old(root),::view-transition-new(root){animation:none}
 .motion-word{transform:none!important;opacity:1!important}
}
@media print{
 .motion-toolbar,.reading-progress,.scene-shell,.carousel-controls,.carousel-hint{display:none!important}
 .carousel-shell,.chapter-carousel,.chapter-carousel .swiper-wrapper{display:block!important;transform:none!important;overflow:visible!important;perspective:none!important}
 .chapter-carousel .swiper-wrapper{display:flex!important;flex-direction:column;gap:0}
 .chapter-carousel .swiper-slide{width:100%!important;transform:none!important;opacity:1!important;margin:0 0 20px!important;break-inside:avoid}
 .chapter-carousel [data-chapter="1"]{order:1}.chapter-carousel [data-chapter="2"]{order:2}.chapter-carousel [data-chapter="3"]{order:3}.chapter-carousel [data-chapter="4"]{order:4}.chapter-carousel [data-chapter="5"]{order:5}
 .chapter-carousel .swiper-slide a.card{height:auto;min-height:0;padding:18px;box-shadow:none!important;background:#fff!important;color:#111!important;border-color:#bbb}
 .swiper-slide-shadow-left,.swiper-slide-shadow-right,.carousel-shell::before{display:none!important}
 .motion-word{transform:none!important;opacity:1!important}
 .brow .fill{transform:scaleX(1)!important}
}
